/*
 * BirdNote — birdnote.app
 *
 * The palette is not "greens that look like the app": it is the app's own
 * tokens, lifted from iOS/BirdNote/DesignSystem/Theme/ColorTokens.swift, so a
 * birder who arrives here from the App Store and then opens the app sees the
 * same paper and the same green.
 *
 * The light set only, and fixed. A marketing page has one job — to be read on
 * a screen somebody arrived at from a link — and the warm paper is most of
 * what makes it read as a field notebook rather than a product page. `color-
 * scheme: light` is declared so the browser keeps scrollbars and form controls
 * light too, rather than dressing a cream page in dark furniture.
 *
 * Type is Nunito, the closest web face to SF Rounded — which is what every
 * label in the app is set in.
 */

:root {
    color-scheme: light;

    /* Greens — ColorTokens.primary / secondary / accent */
    --primary: #2D6A4F;
    --primary-hover: #245741;
    --secondary: #40916C;
    --accent: #52B788;

    /* Warm paper. The app is deliberately not white: cream reads as a
       notebook, and white read as a form. */
    --bg: #F4EFE3;
    --surface: #FAF6EC;
    --card: #FFFDF8;
    --elevated: #F7F0E1;
    --border: #EFE6D2;

    --text: #1B1B1B;
    --text-2: #6B7280;
    --text-3: #9CA3AF;

    --streak: #F97316;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --shadow: 0 1px 3px rgba(27, 27, 27, .05), 0 8px 24px rgba(27, 27, 27, .04);
    --shadow-lift: 0 2px 6px rgba(27, 27, 27, .07), 0 16px 40px rgba(27, 27, 27, .07);

    --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Nunito, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}
.container.narrow { max-width: 780px; }
.center { text-align: center; }

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1rem; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: .6rem;
}

.lede { font-size: 1.15rem; color: var(--text-2); max-width: 62ch; }
.center .lede { margin-inline: auto; }

.fineprint { font-size: .9rem; color: var(--text-3); }

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

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.1rem; }
.logo:hover { text-decoration: none; }
.logo-icon img { display: block; border-radius: 9px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: 0;
    color: var(--text);
    padding: 8px;
    cursor: pointer;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 999px;
    transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; transform: translateY(-1px); }
.nav-links .btn { color: #fff; }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

.appstore-btn { display: inline-block; }
.appstore-btn img { display: block; }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 56px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--secondary);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
    margin: 0 0 1.1rem;
}

.hero h1 { margin-bottom: 1rem; }
.hero-sub { font-size: 1.2rem; color: var(--text-2); max-width: 56ch; margin-bottom: 1.8rem; }
.hero-sub strong { color: var(--text); }
.hero-sub em { color: var(--secondary); font-style: normal; font-weight: 700; }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 1.8rem; }
.hero-note { font-size: .9rem; color: var(--text-3); }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.hero-tag {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: .82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
}

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: min(360px, 78%); filter: drop-shadow(0 24px 48px rgba(45, 106, 79, .28)); }
.hero-glow {
    position: absolute;
    inset: 8% 8% auto 8%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%,
        color-mix(in srgb, var(--accent) 42%, transparent),
        transparent 68%);
    filter: blur(6px);
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.story-section { background: var(--bg); }
.story-section p { font-size: 1.1rem; color: var(--text-2); max-width: 60ch; }
.story-section strong, .story-section em { color: var(--text); font-style: normal; font-weight: 700; }
.story-close {
    border-left: 3px solid var(--accent);
    padding-left: 18px;
    margin-top: 1.8rem;
    color: var(--text) !important;
}
.voice-section { background: var(--surface); border-block: 1px solid var(--border); }
.journal-section { background: var(--bg); }
.trail-section { background: var(--surface); border-block: 1px solid var(--border); }
.features-section { background: var(--bg); }
.how-section { background: var(--bg); }
.privacy-section { background: var(--surface); border-block: 1px solid var(--border); }
.faq-section { background: var(--bg); }
.cta-section { background: var(--surface); border-top: 1px solid var(--border); }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 20px; margin-top: 2.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card h3 { color: var(--text); }
.card p { color: var(--text-2); margin: 0; }
.card p em { color: var(--secondary); font-style: normal; font-weight: 700; }
.card-lg { padding: 30px; }

/* ---------- The voice demo ---------- */

.voice-demo {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 2.6rem auto 0;
    max-width: 420px;
    text-align: center;
}

.voice-bubble {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: #fff;
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: var(--shadow-lift);
}
/* The ring that goes green while the app is listening. */
.voice-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 28%, transparent);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: .55; transform: scale(.9); }
    50%      { opacity: 1;   transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
    .voice-dot { animation: none; }
    html { scroll-behavior: auto; }
}

.voice-arrow { color: var(--text-3); font-size: 1.4rem; line-height: 1; }

.voice-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 22px;
    box-shadow: var(--shadow);
    font-size: 1.05rem;
}
.voice-entry strong { color: var(--text); }
.voice-count { color: var(--primary); font-weight: 800; }
.voice-time { color: var(--text-3); font-size: .9rem; margin-left: auto; }

/* ---------- Steps ---------- */

.steps {
    list-style: none;
    padding: 0;
    margin: 2.4rem 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: step;
}
.step {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}
.step-n {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    color: var(--secondary);
    font-weight: 800;
    margin-bottom: 14px;
}
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--text-2); margin: 0; font-size: .96rem; }

/* ---------- Privacy checks ---------- */

.checks { list-style: none; padding: 0; margin: 2rem 0 1.4rem; display: grid; gap: 12px; }
.checks li {
    position: relative;
    padding-left: 34px;
    color: var(--text-2);
}
.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: 18px;
    height: 10px;
    border-left: 3px solid var(--primary);
    border-bottom: 3px solid var(--primary);
    transform: rotate(-45deg);
    border-radius: 2px;
}

/* ---------- FAQ ---------- */

.faq {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    flex: none;
}
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--text-2); margin: .9rem 0 0; }

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

.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 44px 0 56px; }
.footer-inner { display: grid; gap: 18px; justify-items: center; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-brand img { border-radius: 8px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.footer-links a { color: var(--text-2); font-size: .94rem; font-weight: 600; }
.footer-fine { color: var(--text-3); font-size: .88rem; margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .hero-art { order: -1; }
    .hero-art img { width: min(240px, 60%); }
}

@media (max-width: 720px) {
    .grid-2, .grid-3, .steps { grid-template-columns: 1fr; }

    .mobile-menu-btn { display: block; }
    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 8px 24px 20px;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; }
    .nav-links .btn { margin-top: 10px; justify-content: center; }
}
