/* Public marketing site (Home + Contact) — see Views/Shared/_PublicLayout.cshtml.
   Loaded after brand.css so it inherits the brand indigo (#2E3AA8) established
   there, and scoped under .public-* class names so nothing here can leak into
   the authenticated app's vendored theme. */

:root {
    --public-ink: #1c1e33;
    --public-ink-muted: #5c5f7a;
    --public-line: #e7e7f1;
    --public-tint: #f4f2ff;   /* the logo's own mark colour */
    --public-brand: #2e3aa8;
    --public-brand-dark: #242e82;
}

.public-body {
    margin: 0;
    background: #ffffff;
    color: var(--public-ink);
    font-family: "Open Sans", -apple-system, "Segoe UI", sans-serif;
    line-height: 1.65;
}

.public-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Nav ---- */

.public-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--public-line);
}

.public-nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.public-brand .brand-mark {
    width: 32px;
    height: 32px;
}

.public-brand .brand-wordmark {
    font-size: 20px;
}

.public-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.public-nav-links a {
    color: var(--public-ink-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.public-nav-links a:hover {
    color: var(--public-brand);
}

.public-nav-actions {
    flex-shrink: 0;
}

/* On narrow screens the section links would wrap into the logo; the Sign in
   button and brand are what actually matter, so drop the rest. */
@media (max-width: 860px) {
    .public-nav-links {
        display: none;
    }

    .public-nav-actions {
        margin-left: auto;
    }
}

/* ---- Section rhythm ---- */

.public-section {
    padding: 88px 0;
}

.public-section-tint {
    background: var(--public-tint);
}

.public-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--public-brand);
    margin-bottom: 14px;
}

.public-section h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700;
    margin: 0 0 16px;
    text-wrap: balance;
}

.public-lead {
    font-size: 17px;
    color: var(--public-ink-muted);
    max-width: 62ch;
    margin: 0 0 40px;
}

/* ---- Hero ---- */

.public-hero {
    padding: 96px 0 88px;
    background: linear-gradient(180deg, var(--public-tint) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--public-line);
}

.public-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 20px;
    max-width: 18ch;
    text-wrap: balance;
}

.public-hero p {
    font-size: 18px;
    color: var(--public-ink-muted);
    max-width: 60ch;
    margin: 0 0 32px;
}

.public-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.public-hero-actions .btn {
    padding: 11px 26px;
    font-weight: 600;
}

/* Two-column hero. The copy column is listed first in the markup so it also
   comes first when the grid collapses — the message should always lead. */
.public-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 48px;
}

.public-hero-art img,
.public-split-art img {
    display: block;
    width: 100%;
    height: auto;   /* paired with the intrinsic width/height attrs to avoid layout shift */
    max-width: 520px;
    margin-inline: auto;
}

@media (max-width: 900px) {
    .public-hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* The hero art used to be dropped here, because a decorative illustration
       competing with the copy on a small screen isn't worth pushing the CTA
       below the fold. The product demo that replaced it earns its place, so it
       stays — and the padding tightens to pay for the space it takes. */
    .public-hero {
        padding: 56px 0 48px;
    }
}

/* ---- Hero product demo ----

   A short looping depiction of the Docs module (markup in
   Views/Shared/_HeroDemo.cshtml). This is the first motion anywhere on the
   site, so it also establishes the reduced-motion convention.

   The rules are written so that NO animation is the correct resting state:
   scene A is visible, scene B is hidden, and everything is fully faded in.
   Every switch-off below is therefore just `animation: none` — the static
   fallback needs no separate styling, and can't drift out of step with the
   animated version. */

.public-demo {
    position: relative;
    max-width: 520px;
    margin-inline: auto;
}

.public-demo-stage {
    display: block;
    width: 100%;
    height: auto;   /* paired with the intrinsic width/height attrs to avoid layout shift */
    font-family: inherit;
}

/* Text inside the SVG. Kept here rather than as presentation attributes so the
   sizes sit next to the layout rules that constrain them. */
.public-demo-stat-label {
    font-size: 7.5px;
    font-weight: 600;
    fill: #ffffff;
    fill-opacity: 0.85;
    text-anchor: middle;
}

.public-demo-stat-value {
    font-size: 17px;
    font-weight: 700;
    fill: #ffffff;
    text-anchor: middle;
}

.public-demo-card-title {
    font-size: 9.5px;
    font-weight: 700;
    fill: var(--public-ink);
}

.public-demo-badge {
    font-size: 6.8px;
    font-weight: 600;
    fill: #ffffff;
    text-anchor: middle;
}

.public-demo-btn-label {
    font-size: 7.5px;
    font-weight: 600;
    fill: #ffffff;
    text-anchor: middle;
}

.public-demo-muted {
    font-size: 7.5px;
    fill: var(--public-ink-muted);
}

/* ---- the loop ----

   One 9s period shared by every animated part. The scenes cross-fade at the
   halfway mark; individual cards and rows stagger themselves with a delay
   derived from --demo-step. Because every animation has the same duration, a
   positive delay produces a permanent, consistent offset rather than drift. */

.public-demo-scene-a {
    animation: public-demo-scene-a 9s linear infinite;
}

.public-demo-scene-b {
    opacity: 0;
    animation: public-demo-scene-b 9s linear infinite;
}

@keyframes public-demo-scene-a {
    0%, 44% { opacity: 1; }
    50%, 94% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes public-demo-scene-b {
    0%, 44% { opacity: 0; }
    50%, 94% { opacity: 1; }
    100% { opacity: 0; }
}

/* Stat cards and table rows share one entrance; only the delay differs.
   `backwards` holds the hidden first frame during that delay, otherwise each
   element would flash at full opacity before its turn. */
.public-demo-stat,
.public-demo-row {
    animation: public-demo-enter 9s ease-out infinite backwards;
    animation-delay: calc(var(--demo-step, 0) * 0.09s);
}

/* The reminder table fills in after the counters above it have landed, so the
   eye is led down the screen rather than everything arriving at once. */
.public-demo-scene-a .public-demo-row {
    animation-delay: calc(0.7s + var(--demo-step, 0) * 0.09s);
}

/* Scene B's rows arrive after the cross-fade, not with scene A's. */
.public-demo-scene-b .public-demo-row {
    animation-delay: calc(4.6s + var(--demo-step, 0) * 0.09s);
}

@keyframes public-demo-enter {
    0% { opacity: 0; transform: translateY(7px); }
    7% { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---- pause control ---- */

.public-demo-toggle {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--public-brand);
    background: #ffffff;
    border: 1px solid var(--public-line);
    border-radius: 999px;
    cursor: pointer;
}

.public-demo-toggle:hover {
    color: var(--public-brand-dark);
    border-color: #c9caea;
}

.public-demo-toggle:focus-visible {
    outline: 2px solid var(--public-brand);
    outline-offset: 2px;
}

/* Pausing keeps the current frame on screen rather than resetting it, which is
   what someone who hit Pause to read a label expects. */
.public-demo.is-paused .public-demo-scene,
.public-demo.is-paused .public-demo-stat,
.public-demo.is-paused .public-demo-row {
    animation-play-state: paused;
}

/* ---- when motion is switched off ----

   Two situations, one outcome: fall back to the resting state defined above —
   scene A, fully drawn. Below 900px the site's convention is to drop
   decorative art entirely, but this isn't decoration: it's the only look at
   the product a visitor gets, so it stays and simply stops moving. The pause
   button goes, since there is no longer anything to pause. */

@media (prefers-reduced-motion: reduce) {
    .public-demo-scene,
    .public-demo-stat,
    .public-demo-row {
        animation: none;
    }

    .public-demo-toggle {
        display: none;
    }
}

@media (max-width: 900px) {
    .public-demo-scene,
    .public-demo-stat,
    .public-demo-row {
        animation: none;
    }

    .public-demo-toggle {
        display: none;
    }
}

/* Section intro that pairs text with a supporting illustration. */
.public-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
    margin-bottom: 44px;
}

@media (max-width: 900px) {
    .public-split {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .public-split-art {
        display: none;
    }
}

/* ---- Cards ---- */

.public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.public-card {
    background: #ffffff;
    border: 1px solid var(--public-line);
    border-radius: 12px;
    padding: 28px;
}

.public-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--public-tint);
    color: var(--public-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 18px;
}

.public-section-tint .public-card-icon {
    background: #ffffff;
}

.public-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
}

.public-card p {
    font-size: 14.5px;
    color: var(--public-ink-muted);
    margin: 0;
}

/* ---- Checklist ---- */

.public-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px 32px;
}

.public-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--public-ink-muted);
}

.public-checklist i {
    color: var(--public-brand);
    margin-top: 4px;
    flex-shrink: 0;
}

/* ---- How it works: numbered step sequence ---- */

.public-steps {
    list-style: none;   /* the numbers are rendered explicitly, not by the marker */
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.public-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 24px;
}

/* The connector line lives on the marker column and is drawn as a background,
   so it can't be mistaken for content and disappears cleanly on the last step. */
.public-step-marker {
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.public-step-marker::after {
    content: "";
    position: absolute;
    top: 48px;
    bottom: -8px;
    width: 2px;
    background: var(--public-line);
}

.public-step:last-child .public-step-marker::after {
    display: none;
}

.public-step-number {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--public-brand);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.public-step-body {
    padding-bottom: 40px;
}

.public-step:last-child .public-step-body {
    padding-bottom: 0;
}

.public-step-glyph {
    color: var(--public-brand);
    margin-bottom: 12px;
}

.public-step-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
}

.public-step-body p {
    font-size: 15px;
    color: var(--public-ink-muted);
    margin: 0;
    max-width: 68ch;
}

@media (max-width: 600px) {
    .public-step {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 16px;
    }

    .public-step-number {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .public-step-marker::after {
        top: 40px;
    }
}

/* ---- Pipeline (deliberately understated — these aren't shipped yet) ---- */

.public-pipeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.public-pipeline-item {
    border: 1px dashed #cfd0e4;
    border-radius: 10px;
    padding: 20px 22px;
    background: #ffffff;
}

.public-pipeline-item h3 {
    font-size: 15.5px;
    font-weight: 700;
    margin: 0 0 6px;
}

.public-pipeline-item p {
    font-size: 14px;
    color: var(--public-ink-muted);
    margin: 0;
}

.public-pipeline-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--public-brand);
    background: var(--public-tint);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 12px;
}

/* ---- CTA band ---- */

.public-cta {
    background: var(--public-brand);
    color: #ffffff;
    padding: 72px 0;
    text-align: center;
}

.public-cta h2 {
    color: #ffffff;
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 700;
    margin: 0 0 14px;
    text-wrap: balance;
}

.public-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    max-width: 56ch;
    margin: 0 auto 28px;
}

.public-cta .btn-light {
    background: #ffffff;
    color: var(--public-brand);
    border-color: #ffffff;
    font-weight: 700;
    padding: 11px 30px;
}

.public-cta .btn-light:hover {
    background: var(--public-tint);
    color: var(--public-brand-dark);
}

/* ---- Contact page ---- */

.public-form-card {
    background: #ffffff;
    border: 1px solid var(--public-line);
    border-radius: 12px;
    padding: 32px;
}

/* Honeypot: must be invisible to humans but still present and fillable for
   bots. Deliberately NOT `display:none` or `type=hidden` — some bots skip
   those — and aria-hidden + tabindex keep it away from screen readers and
   keyboard users. */
.public-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---- Footer ---- */

.public-footer {
    background: #14162e;
    color: rgba(255, 255, 255, 0.65);
    padding: 36px 0;
}

.public-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

.public-footer .brand-wordmark {
    font-size: 18px;
}

.public-footer .brand-wordmark .hh {
    color: #ffffff;
}

.public-footer .brand-wordmark .aappss {
    color: #a9acd6;
}

.public-footer-links {
    display: flex;
    gap: 22px;
    margin-left: auto;
}

.public-footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
}

.public-footer-links a:hover {
    color: #ffffff;
}

.public-footer small {
    width: 100%;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.45);
}
