/*
 * Wanda the World — public marketing home page (design concept H: stacked panels).
 * Mobile-first: single-column by default, progressively enhanced at min-width breakpoints.
 * Built entirely on the shared custom properties in tokens.css — no duplicated hex literals.
 */

html {
    scroll-behavior: smooth;
    /* Base color lives on the root so body's background is NOT propagated to the
       canvas — that propagation is what hid the body::before globe layer. */
    background: var(--color-bg);
}

body.home {
    margin: 0;
    position: relative;
    /* Transparent so the body::before globe (and html base color) shows. */
    background: transparent;
    color: var(--color-fg-body);
    font-family: var(--font-family-sans);
    line-height: var(--line-height-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Outer-space backdrop: the star-field art (same asset as the Pencil design's
   stacked-panels fill) covering the whole viewport so the background reads as
   space everywhere, not just where the globe art sits. */
body.home::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url("/static/img/star-field.png") center / cover no-repeat;
    pointer-events: none;
}

/* Headphone-globe splash: a cropped window pinned to the very BOTTOM of the
   document. The image is top-anchored inside a short window, so only its upper
   part — starfield, headphone arc, top of the globe — rises into view as the
   user scrolls to the end of the page. Top edge is mask-faded into the space
   backdrop. One image, no JS. */
body.home::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 74vh;
    z-index: -1;
    background: url("/static/img/globe-hint.png") center top / auto 160vh no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
    mask-image: linear-gradient(to bottom, transparent, #000 35%);
    pointer-events: none;
}

/* .account-deleted-banner — stateless deletion flash on the home page (feature 890). */
.account-deleted-banner {
    margin: 0;
    padding: 14px 20px;
    background: color-mix(in srgb, var(--color-accent, #34D399) 14%, var(--color-bg));
    color: var(--color-fg);
    font-weight: 600;
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.icon {
    width: 1em;
    height: 1em;
    flex: none;
}

.icon--accent {
    color: var(--color-accent);
}

.icon--muted {
    color: var(--color-fg-muted);
}

/* ---------- Shared atoms ---------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--color-accent);
    color: var(--color-bg);
    font-size: 16px;
}

.brand__name {
    color: var(--color-fg);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--color-accent);
    font-family: var(--font-family-mono);
    font-size: var(--font-size-eyebrow);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow--pill {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--color-accent) 13%, transparent);
}

/* ---------- Buttons / badges (marketing button system) ----------
   PAGE-LOCAL by design — do NOT consolidate into components/primitives.css.
   This is the landing marketing button set (larger 12px 22px padding, --radius-md,
   15px type, .btn--accent / .btn--ghost variants), a different system from the
   dashboard .btn in primitives.css. Only landing.ftl links home.css and it never
   links primitives.css, so merging them would be a visible change, not a refactor. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--tap-target-min);
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, background 0.15s ease;
}

.btn .icon {
    font-size: 18px;
}

.btn--accent {
    background: var(--color-accent);
    color: var(--color-bg);
}

.btn--accent:hover {
    filter: brightness(1.08);
}

.btn--ghost {
    border: 1px solid var(--color-divider);
    color: var(--color-fg-body);
    font-weight: 500;
}

.btn--ghost:hover {
    background: var(--color-surface);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-micro);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge--popular {
    background: var(--color-accent);
    color: var(--color-bg);
}

.badge--value {
    background: color-mix(in srgb, var(--color-accent) 13%, transparent);
    color: var(--color-accent);
}

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

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-divider);
}

.nav__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px var(--space-5);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.nav__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-4);
}

.nav__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
}

.nav__links a,
.nav__login {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-target-min);
    color: var(--color-fg-muted);
    font-size: 14px;
    font-weight: 500;
}

.nav__login {
    color: var(--color-fg-muted);
}

.nav__links a:hover,
.nav__login:hover {
    color: var(--color-fg);
}

.nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: var(--tap-target-min);
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-bg);
    font-size: 13px;
    font-weight: 600;
}

.nav__cta .icon {
    font-size: 15px;
}

.nav__cta:hover {
    filter: brightness(1.08);
}

/* ---------- Stacked panels ---------- */

.stack {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.panel {
    /* Translucent so the body's globe background shows through all three panels. */
    background: color-mix(in srgb, var(--color-bg-elevated) 70%, transparent);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.panel--app {
    align-items: center;
    text-align: center;
}

.hero-fg {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

/* Header matte — keeps the headline crisp over the starfield/globe */
.hero-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    max-width: 660px;
    padding: var(--space-4) var(--space-5);
    background: color-mix(in srgb, var(--color-bg) 45%, transparent);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-lg);
}

.panel__headline {
    margin: 0;
    color: var(--color-fg);
    font-size: clamp(30px, 7vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1px;
}

.panel__headline--sm {
    font-size: clamp(26px, 6vw, 34px);
    letter-spacing: -0.6px;
    line-height: 1.12;
}

.panel__sub {
    margin: 0;
    max-width: 600px;
    color: var(--color-fg-body);
    font-size: 17px;
    line-height: 1.5;
}

.panel--app .panel__sub {
    margin-inline: auto;
}

.panel__sub--start {
    color: var(--color-fg-muted);
    font-size: 16px;
}

.phone {
    width: 240px;
    max-width: 80%;
    border-radius: var(--radius-lg);
}

.hear-wanda {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-fg);
    font-weight: 600;
}

.hear-wanda audio {
    width: 100%;
    max-width: 360px;
}

.hear-wanda__credit {
    margin: 0;
    color: var(--color-fg-muted);
    font-size: var(--font-size-body-sm);
    font-weight: 400;
}

.hear-wanda__credit a {
    color: inherit;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.get-app-qr {
    display: none;
    margin: 0;
    text-align: center;
    font-size: var(--font-size-body-sm);
}

.get-app-qr img {
    display: block;
    margin-inline: auto;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-target-min);
}

.store-badge img {
    height: 44px;
    width: auto;
}

/* ---------- Trust rows ---------- */

.trust-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2) var(--space-3);
    color: var(--color-fg-muted);
    font-size: 14px;
}

.trust-row__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.trust-row__item .icon {
    font-size: 15px;
}

.trust-row__dot {
    width: 3px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--color-divider);
}

/* ---------- How-it-works steps (3 cards, mobile-first single column) ---------- */

.steps {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    text-align: left;
}

.step {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    /* drop shadow so the boxes pop off the globe behind them */
    box-shadow:
        0 22px 48px -18px rgba(0, 0, 0, 0.75),
        0 8px 20px -10px rgba(0, 0, 0, 0.55);
}

.step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--color-accent) 13%, transparent);
    font-size: 17px;
}

.step__title {
    margin: 0;
    color: var(--color-fg);
    font-size: 16px;
    font-weight: 600;
}

.step__body {
    margin: 0;
    color: var(--color-fg-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- Proof + FAQ ---------- */

.proof {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.proof__item {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.proof__quote {
    margin: 0;
    color: var(--color-fg-body);
    font-size: 16px;
}

.proof__who {
    color: var(--color-fg-muted);
    font-size: 14px;
}

.faq {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.faq__item {
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-divider);
}

.faq__q {
    cursor: pointer;
    font-weight: 600;
}

.faq__a {
    margin: var(--space-2) 0 0;
    color: var(--color-fg-muted);
}

/* ---------- Panel header (gift + premium) ---------- */

.panel__header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.panel__header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}

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

.band {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-divider);
    background-size: cover;
    background-position: center;
}

/* ---------- Gift bundles (3 cards, mobile-first single column) ---------- */

.bundles {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.bundle {
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-radius: 14px;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.bundle--featured {
    border-color: var(--color-accent);
}

.bundle__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.bundle__name {
    color: var(--color-fg);
    font-size: 16px;
    font-weight: 600;
}

.bundle__audio {
    margin: 0;
    color: var(--color-fg);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.bundle__tokens {
    margin: 0;
    color: var(--color-fg-muted);
    font-family: var(--font-family-mono);
    font-size: 12px;
}

.bundle__price {
    margin: 0;
    display: flex;
    align-items: flex-end;
    gap: var(--space-1);
}

.bundle__amount {
    color: var(--color-fg);
    font-size: 30px;
    font-weight: 700;
}

.bundle__per {
    color: var(--color-fg-muted);
    font-size: 13px;
}

.price-card__divider,
.free-vs-prem__divider,
.footer__divider {
    height: 1px;
    background: var(--color-divider);
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-fg-body);
    font-size: 14px;
}

.feature-list .icon {
    font-size: 16px;
}

.bundle__cta {
    margin-top: auto;
}

/* ---------- Panel CTAs ---------- */

.panel__ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

/* ---------- Recipient gift-code entry (feature 878) ---------- */

.redeem-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.redeem-entry__label {
    color: var(--color-fg-body);
    font-size: var(--font-size-meta);
    font-weight: 600;
}

.redeem-entry__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.redeem-entry__input {
    min-width: 180px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-divider);
    background: var(--color-bg-elevated);
    color: var(--color-fg);
    font-family: var(--font-family-mono);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.redeem-entry__input::placeholder {
    color: var(--color-fg-muted);
    letter-spacing: 2px;
}

.redeem-entry__submit {
    white-space: nowrap;
}

/* ---------- Premium price + features (mobile-first single column) ---------- */

.premium-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.price-card {
    background: var(--color-surface);
    border: 1px solid var(--color-accent);
    border-radius: 14px;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.price-card__top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-fg);
    font-size: 14px;
    font-weight: 600;
}

.price-card__top .icon {
    font-size: 16px;
}

.price-card__price {
    margin: 0;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.price-card__amount {
    color: var(--color-fg);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1px;
}

.price-card__per {
    color: var(--color-fg-muted);
    font-size: 15px;
}

.price-card__anchor {
    margin: 0;
    color: var(--color-fg-muted);
    font-size: 13px;
}

.price-card__cta {
    width: 100%;
}

.price-card__micro {
    margin: 0;
    color: var(--color-fg-muted);
    font-size: 11px;
    text-align: center;
    line-height: 1.4;
}

.premium-feats {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.feature-list li {
    font-size: 15px;
}

.free-vs-prem {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.free-vs-prem__row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-fg-muted);
    font-size: 14px;
    font-weight: 500;
}

.free-vs-prem__row .icon {
    font-size: 16px;
}

.free-vs-prem__row--prem {
    color: var(--color-fg-body);
    font-weight: 600;
}

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

.footer {
    /* Translucent so the headphone/globe crest pinned to the document bottom
       shows through as the user reaches the end of the page. */
    background: color-mix(in srgb, var(--color-bg-elevated) 55%, transparent);
    border-top: 1px solid var(--color-divider);
}

.footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--space-7) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.badges--footer .store-badge img {
    height: 40px;
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3) var(--space-5);
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
}

.footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-target-min);
    color: var(--color-fg-muted);
    font-size: 13px;
}

.footer__links a:hover {
    color: var(--color-fg);
}

.footer__copy {
    color: var(--color-fg-muted);
    font-size: 12px;
}

/* ---------- Breakpoint: tablet — multi-column rows ---------- */

@media (min-width: 768px) {
    .nav__inner,
    .stack,
    .footer__inner {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }

    .panel {
        padding: var(--space-7);
        gap: var(--space-6);
    }

    .phone {
        width: 300px;
    }

    .band {
        height: 200px;
    }

    .band--short {
        height: 180px;
    }

    .steps {
        flex-direction: row;
    }

    .step {
        flex: 1 1 0;
    }

    .proof {
        flex-direction: row;
    }

    .proof__item {
        flex: 1 1 0;
    }

    .bundles {
        flex-direction: row;
        align-items: stretch;
    }

    .bundle {
        flex: 1 1 0;
    }

    .premium-row {
        flex-direction: row;
        align-items: flex-start;
    }

    .premium-row > .price-card,
    .premium-row > .premium-feats {
        flex: 1 1 0;
    }
}

/* ---------- Breakpoint: desktop ---------- */

@media (min-width: 1024px) {
    .nav__inner {
        padding-block: 0;
        min-height: 64px;
    }

    .get-app-qr {
        display: block;
    }
}
