/* ==========================================================================
   Reset, typography scale, shared primitives (buttons, chips, reveal, nav).
   Section-specific rules live in landing-sections.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

/* figure and blockquote carry a 40px UA side margin that silently narrows every
   screenshot and quote, most visibly on phones. */
figure, blockquote { margin: 0; }

/* Focus is a visible ring on every interactive element, in both modes. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Layout ------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--section-y); }
.section--sunk { background: var(--bg-sunk); }

/* --- Type scale --------------------------------------------------------- */

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.022em; }

.h-display {
    font-size: clamp(2rem, 4.6vw, 3.35rem);
    line-height: 1.12;
    letter-spacing: -.03em;
}
.h-section {
    font-size: clamp(1.65rem, 3.1vw, 2.4rem);
    line-height: 1.18;
    max-width: 20ch;
}
.h-sub { font-size: 1.0625rem; line-height: 1.45; font-weight: 600; }

.lede {
    margin: 0;
    font-size: clamp(1rem, 1.35vw, 1.125rem);
    line-height: 1.62;
    color: var(--ink-3);
    max-width: 58ch;
}
.body { margin: 0; color: var(--ink-3); line-height: 1.62; max-width: 62ch; }

.eyebrow {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Figures read as data, so they get tabular lining and a tighter track. */
.num {
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -.02em;
    font-weight: 700;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;          /* a wrapped CTA is a broken CTA */
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: var(--r);
    font: inherit;
    font-weight: 600;
    font-size: .9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease),
                transform .12s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }

.btn--ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink-4); background: var(--surface-2); }

.btn--lg { padding: 15px 28px; font-size: 1rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Chips -------------------------------------------------------------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-wash);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    font-size: .8125rem;
    font-weight: 600;
}

/* --- Product screenshot frame ------------------------------------------- */

.shot {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}
.shot img { width: 100%; height: auto; }
/* Screenshots are captured in the app's light theme, so in dark mode they are
   dimmed slightly rather than left glaring against a dark page. */
@media (prefers-color-scheme: dark) {
    .shot img { filter: brightness(.9) contrast(1.02); }
}

.shot-caption {
    margin: 10px 0 0;
    font-size: .8125rem;
    color: var(--ink-4);
}

/* --- Scroll reveal ------------------------------------------------------ */
/* Sequences content into view so a section reads in its intended order.
   Driven by IntersectionObserver in landing.js, never a scroll listener. */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn { transition: none; }
    .btn:active { transform: none; }
}

/* No-JS and pre-hydration safety: never leave content invisible. */
.no-js .reveal { opacity: 1; transform: none; }
