/*
 * Tide — the app's own palette, not the studio's black and white.
 * Values lifted from src/types/theme.ts so the site and the product cannot drift.
 */

:root {
    --ink-950: #08090b;
    --ink-900: #0c0e11;
    --ink-800: #16181c;
    --ink-700: #1e2127;
    --ink-600: #2a2e35;

    --cream: #f4f1ea;
    --cream-75: rgba(244, 241, 234, 0.75);
    --cream-55: rgba(244, 241, 234, 0.55);
    --cream-45: rgba(244, 241, 234, 0.45);
    --cream-30: rgba(244, 241, 234, 0.3);
    --cream-12: rgba(244, 241, 234, 0.12);
    --cream-08: rgba(244, 241, 234, 0.08);

    --sea-400: #7be3c1;
    --sea-500: #4fcba4;
    --ember-400: #ff8b5e;

    --measure: 40rem;
    --page: 68rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@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;
    }
}

body {
    margin: 0;
    background: var(--ink-950);
    color: var(--cream);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Every headline and every number is serif — the design's whole typographic idea. */
h1,
h2,
h3,
.serif {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

a {
    color: inherit;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.wrap {
    width: min(100% - 2.5rem, var(--page));
    margin-inline: auto;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    /*
     * Solid ink rather than a blur — the same call the app's tab bar makes.
     * It was 94% opaque, which let the text underneath read through it.
     */
    background: var(--ink-950);
    border-bottom: 1px solid var(--cream-08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.1rem;
}

.nav-logo {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.5rem;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    font-size: 0.875rem;
    color: var(--cream-55);
}

.nav-links a {
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--cream);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    padding-block: clamp(4rem, 12vw, 9rem) clamp(3rem, 8vw, 6rem);
    overflow: hidden;
}

/* The app's Glow, as a radial wash behind the headline. */
.hero::before {
    content: '';
    position: absolute;
    inset: -40% 0 auto;
    height: 120%;
    background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(123, 227, 193, 0.13), transparent 70%);
    pointer-events: none;
}

.hero > * {
    position: relative;
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sea-400);
    margin: 0 0 1.25rem;
}

.hero h1 {
    font-size: clamp(2.75rem, 8vw, 5.25rem);
    margin: 0 0 1.5rem;
    max-width: 18ch;
}

.hero h1 em {
    font-style: normal;
    color: var(--sea-400);
}

.lede {
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    color: var(--cream-75);
    max-width: var(--measure);
    margin: 0 0 2.5rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    transition:
        transform 0.15s,
        background 0.2s;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--sea-400);
    color: var(--ink-950);
}

.btn-primary:hover {
    background: var(--sea-500);
}

.btn-ghost {
    border-color: var(--cream-12);
    color: var(--cream-75);
}

.btn-ghost:hover {
    color: var(--cream);
    border-color: var(--cream-30);
}

.note {
    font-size: 0.8125rem;
    color: var(--cream-45);
    margin: 1.25rem 0 0;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

section {
    padding-block: clamp(3.5rem, 8vw, 6rem);
    /* Clears the sticky nav when arriving from an anchor link. */
    scroll-margin-top: 4.5rem;
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cream-45);
    margin: 0 0 2rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0 0 1rem;
    max-width: 20ch;
}

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

.card {
    background: var(--ink-900);
    border: 1px solid var(--cream-08);
    border-radius: 18px;
    padding: 1.75rem;
}

.card h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.card p {
    margin: 0;
    color: var(--cream-55);
    font-size: 0.9375rem;
}

.card .num {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.5rem;
    color: var(--sea-400);
    display: block;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.card.warm .num {
    color: var(--ember-400);
}

/* ── Promise ──────────────────────────────────────────────────────────────── */

.promise {
    background: var(--ink-900);
    border: 1px solid var(--cream-08);
    border-radius: 22px;
    padding: clamp(1.75rem, 5vw, 3rem);
}

.promise p {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.5rem, 3.5vw, 2.125rem);
    line-height: 1.3;
    margin: 0;
    max-width: 26ch;
}

.promise .quiet {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--cream-55);
    max-width: var(--measure);
    margin-top: 1.5rem;
}

/* ── Legal pages ──────────────────────────────────────────────────────────── */

.legal {
    padding-block: clamp(3rem, 7vw, 5rem);
}

.legal-inner {
    width: min(100% - 2.5rem, var(--measure));
    margin-inline: auto;
}

.legal h1 {
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    margin: 0 0 0.5rem;
}

.legal .updated {
    color: var(--cream-45);
    font-size: 0.875rem;
    margin: 0 0 3rem;
}

.legal h2 {
    font-size: 1.625rem;
    margin: 2.75rem 0 0.75rem;
    max-width: none;
}

.legal p,
.legal li {
    color: var(--cream-75);
    font-size: 0.9688rem;
}

.legal ul {
    padding-left: 1.1rem;
}

.legal li {
    margin-bottom: 0.5rem;
}

.legal strong {
    color: var(--cream);
    font-weight: 600;
}

.callout {
    background: var(--ink-900);
    border: 1px solid var(--cream-08);
    border-left: 2px solid var(--sea-400);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.callout p {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9063rem;
}

th,
td {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--cream-08);
    vertical-align: top;
}

th {
    color: var(--cream-45);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

td {
    color: var(--cream-75);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
    border-top: 1px solid var(--cream-08);
    padding-block: 2.5rem;
    margin-top: 3rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.75rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--cream-45);
}

.footer-inner a {
    color: var(--cream-55);
    text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
    color: var(--cream);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Visible focus for anyone not using a mouse. */
a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--sea-400);
    outline-offset: 3px;
}
