/*
 * FareGoal marketing page. Loaded after style.css, which owns every colour
 * variable — nothing here invents a colour of its own.
 *
 * The dark bands use --ink*, which is the same navy in both themes on purpose:
 * gold is only legible on navy, and these are brand surfaces rather than UI.
 */

body.marketing {
    padding: 0;
    overflow-x: hidden;
}

body.marketing main {
    max-width: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---- nav ---- */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 68rem;
    margin: 0 auto;
    padding: 1.1rem 1.25rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.nav-signin {
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.nav-signin:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* ---- hero ---- */

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
    max-width: 68rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3.5rem;
}

.pill {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    color: var(--gold-ink);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.3rem, 6vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
}

/* Gold can't be read as text on white, so it underlines instead. */
.gold-underline {
    background-image: linear-gradient(var(--gold), var(--gold));
    background-repeat: no-repeat;
    background-position: 0 92%;
    background-size: 0 0.14em;
    padding-bottom: 0.06em;
    animation: sweep 0.8s 0.35s ease-out forwards;
}

@keyframes sweep {
    to {
        background-size: 100% 0.14em;
    }
}

.lede {
    max-width: 34rem;
    margin: 0 0 1.6rem;
    font-size: 1.1rem;
    color: var(--muted);
}

.signup {
    display: flex;
    gap: 0.6rem;
    max-width: 30rem;
}

.signup input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: var(--field);
    color: var(--text);
    font: inherit;
}

.signup input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.signup button {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 0.6rem;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease;
}

.signup button:hover {
    transform: translateY(-1px);
}

.signup-note {
    margin: 0.65rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.signup-note.done {
    color: var(--gold-ink);
    font-weight: 600;
}

.signup-note.failed {
    color: var(--danger);
}

/* ---- hero demo ---- */

.hero-demo {
    position: relative;
}

.fare-card {
    position: relative;
    padding: 1.1rem 1.2rem 1rem;
    border: 1px solid var(--ink-border);
    border-radius: 1rem;
    background: var(--ink);
    color: var(--ink-text);
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7);
}

.fare-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.route {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.route .arrow {
    color: var(--gold);
}

.cabin {
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.chart {
    display: block;
    width: 100%;
    height: 120px;
}

.goal-line {
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-dasharray: 5 5;
    opacity: 0.75;
}

.trace {
    fill: none;
    stroke: var(--ink-text);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
}

.dot {
    fill: var(--ink-text);
    transition: fill 0.3s ease;
}

.fare-card.hit .dot {
    fill: var(--gold);
}

.fare-card.hit .trace {
    stroke: var(--gold);
    opacity: 1;
}

.fare-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.price {
    font-size: 1.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.fare-card.hit .price {
    color: var(--gold);
}

.pp {
    margin-left: 0.35rem;
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.goal-tag {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
}

.stamp {
    position: absolute;
    top: 42%;
    left: 50%;
    padding: 0.35rem 1rem;
    border: 2px solid var(--gold);
    border-radius: 0.5rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    /* Opaque, because the gold trace runs straight through where this sits. */
    background: var(--ink);
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-9deg) scale(1.6);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.fare-card.hit .stamp {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-9deg) scale(1);
}

.mail-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 92%;
    margin: 0.9rem 0 0 auto;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: var(--surface);
    box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.8);
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mail-chip.show {
    opacity: 1;
    transform: translateY(0);
}

.mail-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    border-radius: 50%;
    background: var(--gold);
}

.mail-text {
    font-weight: 600;
}

/* ---- flight path divider ---- */

.flightpath {
    position: relative;
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.flightpath svg {
    display: block;
    width: 100%;
    height: 40px;
}

.dashes {
    fill: none;
    stroke: var(--border);
    stroke-width: 2;
    stroke-dasharray: 6 9;
}

.plane {
    position: absolute;
    top: 0.1rem;
    left: 1.25rem;
    color: var(--gold-ink);
    font-size: 1.3rem;
    animation: fly 9s linear infinite;
}

@keyframes fly {
    0% {
        transform: translate(0, 18px) rotate(-14deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    50% {
        transform: translate(46vw, 0) rotate(0deg);
    }
    92% {
        opacity: 1;
    }
    100% {
        transform: translate(92vw, 18px) rotate(14deg);
        opacity: 0;
    }
}

/* ---- bands ---- */

.band {
    max-width: 68rem;
    margin: 0 auto;
    padding: 3.2rem 1.25rem;
}

.band h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    letter-spacing: -0.02em;
    margin: 0 0 1.6rem;
}

.band-lede {
    margin: -1rem 0 1.8rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---- steps ---- */

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    padding: 1.4rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface);
    transition: opacity 0.5s ease, transform 0.25s ease, border-color 0.25s ease;
}

.step:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.step-num {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    margin-bottom: 0.8rem;
    border: 2px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-ink);
    font-weight: 700;
}

.step h3,
.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.step p,
.card p {
    margin: 0;
    color: var(--muted);
}

/* ---- alerts ---- */

.alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.1rem;
}

.card {
    padding: 1.4rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface);
    transition: opacity 0.5s ease, transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    border-color: var(--gold);
}

.card-tag {
    display: inline-block;
    margin-bottom: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--field);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.subject {
    margin-top: 0.9rem !important;
    padding: 0.7rem 0.85rem;
    border-left: 3px solid var(--gold);
    border-radius: 0 0.5rem 0.5rem 0;
    background: var(--field);
    color: var(--text) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    line-height: 1.45;
}

.spark {
    display: block;
    width: 100%;
    height: 70px;
    margin-top: 1rem;
}

.band-fill {
    fill: var(--gold);
    opacity: 0.16;
}

.spark-line {
    fill: none;
    stroke: var(--muted);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.reveal.in .spark-line {
    animation: draw 1.4s 0.2s ease-out forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.spark-dot {
    fill: var(--gold-ink);
    opacity: 0;
}

.reveal.in .spark-dot {
    animation: pop 0.4s 1.5s ease-out forwards;
}

@keyframes pop {
    from {
        opacity: 0;
        r: 0;
    }
    to {
        opacity: 1;
        r: 4.5;
    }
}

.spark-key {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem !important;
    font-size: 0.8rem;
}

.key-band,
.key-dot {
    width: 0.8rem;
    height: 0.8rem;
    flex: none;
    border-radius: 0.2rem;
    background: var(--gold);
    opacity: 0.35;
}

.key-dot {
    border-radius: 50%;
    background: var(--gold-ink);
    opacity: 1;
}

/* ---- quiet ---- */

.quiet {
    max-width: none;
    background: var(--ink);
    color: var(--ink-text);
}

.quiet > * {
    max-width: 65.5rem;
    margin-left: auto;
    margin-right: auto;
}

.quiet .band-lede {
    color: var(--ink-muted);
}

.quiet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.4rem;
}

.quiet-item {
    display: flex;
    gap: 0.7rem;
}

.quiet-item p {
    margin: 0;
    color: var(--ink-muted);
}

.quiet-item strong {
    color: var(--ink-text);
}

.tick {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    font-size: 0.85rem;
}

/* ---- coach ---- */

.coach {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
    align-items: center;
}

.coach h2 {
    margin-bottom: 0.9rem;
}

.coach p {
    margin: 0;
    color: var(--muted);
}

.digest {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--ink-border);
    border-radius: 0.9rem;
    background: var(--ink);
    color: var(--ink-text);
    overflow-x: auto;
}

.digest-head {
    margin: 0 0 0.7rem;
    color: var(--ink-muted) !important;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.digest pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: pre;
}

.digest .flag {
    color: var(--gold);
}

/* ---- what it doesn't do ---- */

.not-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.not-grid li {
    padding: 1.1rem 1.2rem;
    border: 1px dashed var(--border);
    border-radius: 0.9rem;
    color: var(--muted);
}

.not-grid strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--text);
}

/* ---- cta + footer ---- */

.cta {
    max-width: 68rem;
    margin: 0 auto;
    padding: 3.5rem 1.25rem 4rem;
    text-align: center;
}

.cta h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    letter-spacing: -0.02em;
    margin: 0 0 1.4rem;
}

.signup-wide {
    margin: 0 auto;
}

.cta .signup-note {
    text-align: center;
}

.foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 68rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
}

.foot a {
    color: var(--text);
    font-weight: 600;
}

/* ---- narrow screens ---- */

@media (max-width: 860px) {
    .hero,
    .coach {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Motion is decoration here; the page has to read the same without it. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .gold-underline {
        background-size: 100% 0.14em;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .spark-line {
        stroke-dashoffset: 0;
    }

    .spark-dot {
        opacity: 1;
    }

    .plane {
        display: none;
    }
}
