/* ==========================================================================
   Valen — site stylesheet
   One ink-and-paper palette, one accent (the ink itself), hairline borders.
   Light is the default; dark mirrors the client's own palette (#161619 + white).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    color-scheme: light;

    /* Surfaces */
    --bg: #ffffff;
    --bg-subtle: #fafafa;
    --bg-sunken: #f4f4f5;
    --bg-raised: #ffffff;
    --bg-inverted: #131316;

    /* Ink */
    --text: #0c0d0f;
    --text-2: #55595f;
    --text-3: #8b8f96;
    --text-inverted: #fbfbfc;
    --text-inverted-2: #a4a6ac;

    /* Lines */
    --line: rgba(13, 14, 17, 0.09);
    --line-2: rgba(13, 14, 17, 0.14);
    --line-inverted: rgba(255, 255, 255, 0.1);

    /* Accent — the client ships a monochrome palette, so the site does too. */
    --accent: #0c0d0f;
    --accent-hover: #26272b;
    --accent-text: #ffffff;
    --focus: rgba(12, 13, 15, 0.35);
    --live: #16a34a;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(13, 14, 17, 0.05);
    --shadow-md: 0 1px 2px rgba(13, 14, 17, 0.04), 0 8px 20px -12px rgba(13, 14, 17, 0.16);
    --shadow-lg: 0 2px 4px rgba(13, 14, 17, 0.04), 0 24px 60px -24px rgba(13, 14, 17, 0.24);

    /* Geometry */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-pill: 999px;

    --gutter: 24px;
    --maxw: 1120px;
    --section-y: clamp(72px, 9vw, 132px);

    /* Type */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0a0a0c;
    --bg-subtle: #0e0e11;
    --bg-sunken: #121215;
    --bg-raised: #141417;
    --bg-inverted: #f6f6f7;

    --text: #f4f4f6;
    --text-2: #a1a3aa;
    --text-3: #74767d;
    --text-inverted: #0c0d0f;
    --text-inverted-2: #55595f;

    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.15);
    --line-inverted: rgba(13, 14, 17, 0.1);

    --accent: #ffffff;
    --accent-hover: #e2e2e5;
    --accent-text: #0c0d0f;
    --focus: rgba(255, 255, 255, 0.4);
    --live: #35d07f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 20px -12px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    font-feature-settings: "cv05" 1, "ss03" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

::selection {
    background: var(--text);
    color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1.1;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 6.2vw, 4.25rem);
    letter-spacing: -0.042em;
    line-height: 1.02;
}

h2 {
    font-size: clamp(2rem, 4.4vw, 3rem);
    letter-spacing: -0.036em;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
    font-size: 1rem;
    letter-spacing: -0.012em;
}

p {
    text-wrap: pretty;
}

.lede {
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.55;
    color: var(--text-2);
    max-width: 56ch;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap-narrow {
    max-width: 780px;
}

.section {
    padding-block: var(--section-y);
}

.section-head {
    max-width: 640px;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head .eyebrow {
    margin-bottom: 18px;
}

.section-head p {
    margin-top: 18px;
}

.section--sunken {
    background: var(--bg-subtle);
    border-block: 1px solid var(--line);
}

.rule {
    height: 1px;
    background: var(--line);
    border: 0;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding-inline: 20px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.011em;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
        color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--secondary {
    background: var(--bg-raised);
    border-color: var(--line-2);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
    background: var(--bg-sunken);
    border-color: var(--line-2);
}

.btn--ghost {
    color: var(--text-2);
}

.btn--ghost:hover {
    background: var(--bg-sunken);
    color: var(--text);
}

.btn--sm {
    height: 36px;
    padding-inline: 14px;
    font-size: 0.875rem;
}

.btn--lg {
    height: 50px;
    padding-inline: 26px;
    font-size: 1rem;
}

.btn--block {
    width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    background: var(--bg-sunken);
    border-color: var(--line);
    color: var(--text-3);
    box-shadow: none;
    transform: none;
}

.btn__arrow {
    transition: transform 0.24s var(--ease);
}

.btn:hover .btn__arrow {
    transform: translateX(3px);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--line-2);
    padding-bottom: 2px;
    transition: border-color 0.18s var(--ease), gap 0.18s var(--ease);
}

.link-arrow:hover {
    border-color: var(--text);
    gap: 9px;
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.header.is-stuck {
    border-bottom-color: var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.brand__mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--accent);
    color: var(--accent-text);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.brand__mark svg {
    width: 14px;
    height: 14px;
}

/* The wordmark dot mirrors the client's own sidebar wordmark. */
.brand__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-3);
    margin-left: -3px;
    margin-top: 8px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
}

.nav a {
    padding: 8px 12px;
    border-radius: var(--r-md);
    font-size: 0.9375rem;
    font-weight: 450;
    color: var(--text-2);
    transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav a:hover {
    color: var(--text);
    background: var(--bg-sunken);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--r-md);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.icon-btn:hover {
    color: var(--text);
    background: var(--bg-sunken);
}

.icon-btn svg {
    width: 17px;
    height: 17px;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

.nav-toggle {
    display: none;
}

/* Mobile sheet */
.mobile-nav {
    display: none;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    padding: 8px var(--gutter) 20px;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    font-size: 1rem;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
}

.mobile-nav a:last-of-type {
    border-bottom: 0;
}

.mobile-nav .btn {
    margin-top: 14px;
}

@media (max-width: 860px) {
    .nav {
        display: none;
    }

    .nav-toggle {
        display: grid;
    }

    .header__actions .btn--primary {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding-top: clamp(56px, 8vw, 104px);
    padding-bottom: clamp(48px, 6vw, 80px);
    overflow: hidden;
}

/* Soft dot-grid that fades out — the only decorative layer on the page. */
.hero::before {
    content: "";
    position: absolute;
    inset: -10% -20% auto;
    height: 620px;
    background-image: radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 22%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 22%, #000 0%, transparent 72%);
    opacity: 0.7;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero h1 {
    margin-top: 26px;
    max-width: 15ch;
}

/* A one-word hero: the wordmark carries the whole block, so it gets more
   presence and tighter tracking than a sentence headline would. It is also the
   first thing in the hero, so vertical space comes from .hero's padding alone. */
.hero__wordmark {
    --wordmark-a: #f9b9e3;
    --wordmark-b: #04031a;

    margin-top: 0;
    font-size: clamp(3.5rem, 9.5vw, 6.25rem);
    letter-spacing: -0.055em;
    max-width: none;

    /* The gradient sits under the glyphs the whole time; hover just fades the
       solid ink out to reveal it, which is why this can transition at all —
       background-image itself is not animatable. */
    width: fit-content;
    margin-inline: auto;
    background-image: linear-gradient(90deg, var(--wordmark-a), var(--wordmark-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--text);
    transition: color 0.28s var(--ease);
}

/* #04031a is all but invisible on a near-black page, so the dark end of the
   ramp becomes the dark theme's own ink instead. */
[data-theme="dark"] .hero__wordmark {
    --wordmark-b: #f4f4f6;
}

/* Scoped to real pointers: on touch, :hover latches on after a tap. */
@media (hover: hover) {
    .hero__wordmark:hover {
        color: transparent;
    }
}

.hero .lede {
    margin-top: 22px;
    max-width: 60ch;
    text-align: center;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 18px;
    margin-top: 22px;
    font-size: 0.8125rem;
    color: var(--text-3);
}

.hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero__meta svg {
    width: 13px;
    height: 13px;
    color: var(--text-3);
}

/* --------------------------------------------------------------------------
   8. Stats strip
   -------------------------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-raised);
    overflow: hidden;
}

/* DOM order is dt then dd, as a definition list requires; the number reads
   first, so the visual order is reversed rather than the markup. */
.stat {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    padding: 26px 24px;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat dt {
    font-size: 0.8125rem;
    color: var(--text-3);
    margin-top: 6px;
}

.stat dd {
    font-size: clamp(1.5rem, 2.4vw, 1.875rem);
    font-weight: 600;
    letter-spacing: -0.036em;
    line-height: 1;
}

@media (max-width: 780px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat:nth-child(2n) {
        border-right: 0;
    }

    .stat:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }
}

/* --------------------------------------------------------------------------
   9. Feature strip
   -------------------------------------------------------------------------- */

.feature-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 4vw, 48px);
    padding-block: clamp(40px, 5vw, 56px);
    list-style: none;
    text-align: center;
}

.feature-strip li {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* --------------------------------------------------------------------------
   10. Pricing
   -------------------------------------------------------------------------- */

.pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin-inline: auto;
    align-items: start;
}

.plan {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--bg-raised);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

/* The plan we actually want people on gets the weight, not a colour. */
.plan--featured {
    border-color: var(--line-2);
    box-shadow: var(--shadow-lg);
}

.plan__badge {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    padding-inline: 10px;
    border-radius: var(--r-pill);
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-2);
}

.plan__name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-2);
}

.plan__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
}

.plan__price b {
    font-size: clamp(2.5rem, 5vw, 3.25rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
    text-decoration: line-through;
    text-decoration-color: var(--accent, #e53e3e);
    text-decoration-thickness: 3px;
    opacity: 0.65;
}

.plan__price span {
    font-size: 0.9375rem;
    color: var(--text-3);
}

/* The per-month rate is what makes the ladder comparable at a glance. */
.plan__rate {
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Launch Countdown
   Same inverted-card language as .cta-band — a solid ink block that flips
   with the theme — rather than a one-off palette of its own.
   -------------------------------------------------------------------------- */

.countdown-card {
    max-width: 720px;
    margin: 0 auto 48px;
    padding: clamp(32px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--bg-inverted);
    color: var(--text-inverted);
    text-align: center;
}

.countdown-card__header .eyebrow {
    color: var(--text-inverted-2);
}

.countdown-card__header h3 {
    margin-top: 10px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.03em;
}

.countdown-card__header p {
    margin-top: 10px;
    color: var(--text-inverted-2);
    font-size: 0.9375rem;
}

.countdown {
    display: inline-flex;
    align-items: flex-start;
    gap: clamp(6px, 2.5vw, 22px);
    margin-top: 28px;
}

.countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.countdown__val {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
}

.countdown__lbl {
    margin-top: 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-inverted-2);
}

/* Sits in the digit row, not the label row below it. */
.countdown__sep {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1;
    color: var(--text-inverted-2);
}

.plan--featured .plan__rate {
    color: var(--text-2);
    font-weight: 500;
}

.plan .btn {
    margin-top: 26px;
}

.plan__features {
    list-style: none;
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 13px;
}

.plan__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-2);
}

.plan__features svg {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    flex-shrink: 0;
    color: var(--text);
}

/* A limitation, not a feature — stated plainly rather than hidden. */
.plan__features li.is-off {
    color: var(--text-3);
}

.plan__features li.is-off svg {
    color: var(--text-3);
}

.pricing__fine {
    max-width: 560px;
    margin: 28px auto 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-3);
}

.pricing__fine a {
    text-decoration: underline;
    text-underline-offset: 2px;
    color: var(--text-2);
}

.checkout-error {
    display: none;
    max-width: 460px;
    margin-inline: auto;
    text-align: center;
    margin-top: 20px;
    padding: 11px 14px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    background: var(--bg-sunken);
    font-size: 0.8125rem;
    color: var(--text-2);
}

.checkout-error.is-shown {
    display: block;
}

/* --------------------------------------------------------------------------
   10b. Referrals
   -------------------------------------------------------------------------- */

.referral-bar {
    background: var(--bg-inverted);
    color: var(--text-inverted);
    font-size: 0.875rem;
}

.referral-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding-block: 10px;
}

.referral-bar p {
    margin: 0;
    color: var(--text-inverted-2);
}

.referral-bar b {
    color: var(--text-inverted);
    font-weight: 550;
}

.referral-bar code {
    font-family: var(--font-mono);
    font-size: 0.8125em;
    padding: 2px 7px;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--text-inverted) 12%, transparent);
    color: var(--text-inverted);
}

.referral-bar__clear {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text-inverted-2);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--r-sm);
    transition: color 0.16s var(--ease);
}

.referral-bar__clear:hover {
    color: var(--text-inverted);
}

.referral-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: start;
    max-width: 1000px;
    margin: clamp(48px, 6vw, 72px) auto 0;
    padding-top: clamp(40px, 5vw, 56px);
    border-top: 1px solid var(--line);
}

.referral-panel__intro h3 {
    margin: 14px 0 14px;
}

.referral-panel__intro p {
    color: var(--text-2);
    font-size: 0.9375rem;
    max-width: 42ch;
}

.referral-panel__intro b {
    color: var(--text);
    font-weight: 550;
}

.referral-panel__form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.referral-panel__row {
    display: flex;
    gap: 8px;
}

.referral-panel__row input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding-inline: 14px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    background: var(--bg-raised);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.referral-panel__row input::placeholder {
    color: var(--text-3);
    text-transform: none;
}

.referral-panel__row input:focus {
    outline: none;
    border-color: var(--text-3);
    box-shadow: 0 0 0 4px var(--bg-sunken);
}

.referral-panel__note {
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--text-3);
    min-height: 1.2em;
}

.referral-panel .keybox {
    margin-top: 16px;
}

.referral-panel__stats {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-3);
}

@media (max-width: 820px) {
    .referral-panel {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   11. FAQ
   -------------------------------------------------------------------------- */

.faq {
    max-width: 760px;
    margin-inline: auto;
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 4px;
    cursor: pointer;
    list-style: none;
    font-size: 1.0625rem;
    font-weight: 500;
    letter-spacing: -0.018em;
    transition: color 0.16s var(--ease);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary:hover {
    color: var(--text-2);
}

.faq summary::after {
    content: "";
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    border-right: 1.5px solid var(--text-3);
    border-bottom: 1.5px solid var(--text-3);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.24s var(--ease);
}

.faq details[open] summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.faq p {
    padding: 0 4px 24px;
    color: var(--text-2);
    max-width: 66ch;
}

.faq p + p {
    padding-top: 0;
    margin-top: -10px;
}

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */

.cta-band {
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--bg-inverted);
    color: var(--text-inverted);
    padding: clamp(40px, 6vw, 64px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-band h2 {
    max-width: 18ch;
    margin-inline: auto;
}

.cta-band p {
    margin: 18px auto 0;
    max-width: 48ch;
    color: var(--text-inverted-2);
}

/* The band is already inverted, so the button flips back the other way. */
.cta-band .btn--primary {
    margin-top: 30px;
    background: var(--text-inverted);
    color: var(--bg-inverted);
}

.cta-band .btn--primary:hover {
    background: var(--text-inverted-2);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.footer {
    border-top: 1px solid var(--line);
    padding-block: clamp(48px, 6vw, 72px) 36px;
    background: var(--bg-subtle);
}

.footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.footer__brand p {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-3);
    max-width: 30ch;
}

.footer h5 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
}

.footer ul {
    list-style: none;
    display: grid;
    gap: 11px;
}

.footer li a {
    font-size: 0.875rem;
    color: var(--text-2);
    transition: color 0.16s var(--ease);
}

.footer li a:hover {
    color: var(--text);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: clamp(40px, 5vw, 60px);
    padding-top: 26px;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    color: var(--text-3);
}

.footer__bottom p {
    max-width: 62ch;
}

@media (max-width: 820px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   14. Legal pages
   -------------------------------------------------------------------------- */

.legal-hero {
    padding-block: clamp(48px, 6vw, 80px) 40px;
    border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
    font-size: clamp(2.125rem, 4.6vw, 3rem);
    margin-top: 16px;
}

.legal-hero p {
    margin-top: 16px;
    color: var(--text-2);
    max-width: 60ch;
}

.legal-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 72px);
    padding-block: clamp(40px, 5vw, 64px) var(--section-y);
}

.legal-toc {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
}

.legal-toc h5 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 14px;
}

.legal-toc ol {
    list-style: none;
    display: grid;
    gap: 2px;
    counter-reset: toc;
}

.legal-toc a {
    display: block;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-3);
    transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.legal-toc a:hover {
    color: var(--text);
    background: var(--bg-sunken);
}

.legal-toc a.is-active {
    color: var(--text);
    background: var(--bg-sunken);
}

.prose {
    max-width: 68ch;
}

.prose h2 {
    font-size: 1.375rem;
    letter-spacing: -0.024em;
    margin-top: 48px;
    padding-top: 4px;
    scroll-margin-top: 96px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    font-size: 1.0625rem;
    margin-top: 28px;
}

.prose p,
.prose li {
    color: var(--text-2);
    font-size: 0.9688rem;
    line-height: 1.72;
}

.prose p {
    margin-top: 14px;
}

.prose ul,
.prose ol {
    margin-top: 14px;
    padding-left: 22px;
    display: grid;
    gap: 8px;
}

.prose li::marker {
    color: var(--text-3);
}

.prose strong {
    color: var(--text);
    font-weight: 550;
}

.prose a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--line-2);
    transition: text-decoration-color 0.16s var(--ease);
}

.prose a:hover {
    text-decoration-color: var(--text);
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    color: var(--text);
}

.callout {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-left: 2px solid var(--text);
    border-radius: var(--r-md);
    background: var(--bg-subtle);
}

.callout p {
    margin-top: 0;
    font-size: 0.9375rem;
}

.callout p + p {
    margin-top: 10px;
}

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
        max-height: none;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--line);
    }

    .legal-toc ol {
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 8px;
    }
}

/* --------------------------------------------------------------------------
   15. Order / success page
   -------------------------------------------------------------------------- */

.order {
    padding-block: clamp(56px, 8vw, 96px) var(--section-y);
}

.order__card {
    max-width: 620px;
    margin-inline: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--bg-raised);
    box-shadow: var(--shadow-md);
    padding: clamp(28px, 4vw, 44px);
    text-align: center;
}

.order__icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--accent-text);
}

.order__icon svg {
    width: 20px;
    height: 20px;
}

.order__card h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.25rem);
}

.order__card > p {
    margin-top: 14px;
    color: var(--text-2);
}

.keybox {
    margin-top: 30px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    background: var(--bg-subtle);
    padding: 20px;
    text-align: left;
}

.keybox__label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
}

.keybox__value {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.keybox__value code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: clamp(0.95rem, 2.6vw, 1.25rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
    white-space: nowrap;
}

.steps {
    counter-reset: step;
    list-style: none;
    margin-top: 30px;
    text-align: left;
    display: grid;
    gap: 18px;
}

.steps li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 14px;
    align-items: start;
    font-size: 0.9375rem;
    color: var(--text-2);
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
    font-family: var(--font-mono);
}

.steps b {
    color: var(--text);
    font-weight: 500;
}

.order__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.order__state {
    color: var(--text-3);
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   16. Utilities
   -------------------------------------------------------------------------- */

.dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 18%, transparent);
    flex-shrink: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--r-md);
    background: var(--accent);
    color: var(--accent-text);
    font-size: 0.875rem;
}

.skip-link:focus {
    left: 24px;
}

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
