/* Navitals — shared styles for all pages */

/* Fredoka, self-hosted (no request to Google). One variable file per subset covers weights
   300–700. Licence: fonts/Fredoka-OFL.txt (SIL Open Font License 1.1). */
@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/fredoka-latin-ext.woff') format('woff');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/fredoka-latin.woff') format('woff');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Day: the summer map. Night (system dark mode): the app's night map, and dark glass. */
:root {
    --ground: #93CC3E;
    --red: #FB2A2A;            /* route, heart */
    --red-ui: #E02B26;         /* buttons, accents: white text on it passes contrast */
    --accent: #E02B26;
    --kicker: #C4221C;
    --ink: #13230C;
    --text-2: #33422A;
    --text-3: #24331C;
    --muted: #4A5A40;
    --glass: rgba(255, 255, 255, 0.76);
    --glass-line: rgba(255, 255, 255, 0.75);
    --glass-shadow: rgba(18, 48, 0, 0.2);
    --chip: rgba(19, 35, 12, 0.06);
    --chip-line: rgba(19, 35, 12, 0.1);
    --tint: rgba(19, 35, 12, 0.05);
    --outline: rgba(19, 35, 12, 0.22);
    --nav-active: rgba(19, 35, 12, 0.08);
    --bezel: #0F170B;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ground: #0E1A10;
        --accent: #FF4A40;
        --kicker: #FF7A72;
        --ink: #F4F8F1;
        --text-2: #C3CEBC;
        --text-3: #E3EADF;
        --muted: #9FB096;
        --glass: rgba(12, 20, 13, 0.64);
        --glass-line: rgba(255, 255, 255, 0.1);
        --glass-shadow: rgba(0, 0, 0, 0.45);
        --chip: rgba(255, 255, 255, 0.07);
        --chip-line: rgba(255, 255, 255, 0.1);
        --tint: rgba(255, 255, 255, 0.06);
        --outline: rgba(255, 255, 255, 0.22);
        --nav-active: rgba(255, 255, 255, 0.1);
        --bezel: #000000;
    }
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--ground);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--kicker); }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
p, li { text-wrap: pretty; }
h1, h2, h3 { font-weight: 600; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }
main, .site-header, .site-footer { position: relative; }

.accent { color: var(--accent); }
/* Keeps a short headline phrase on one line. */
.nowrap { white-space: nowrap; }

/* ---------- The live trail map (trailmap.js draws into it) ---------- */
/* lvh, not vh: on phones the map must not be regenerated each time the toolbar shows or hides.
   vw, not %: the width includes the scrollbar, so a short page without one gets the same map as the others. */
.trail-map { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; }

/* ---------- Glass ---------- */
.glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid var(--glass-line);
    box-shadow: 0 24px 64px var(--glass-shadow);
}

/* ---------- Nav ---------- */
.site-header { padding-top: 20px; }
.site-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; padding: 8px 8px 8px 10px; border-radius: 30px;
    box-shadow: 0 10px 34px var(--glass-shadow);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 23px; padding: 2px 6px 2px 2px; }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 12px rgba(20, 52, 0, 0.25); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 16px; font-weight: 500; }
.site-nav a { color: var(--text-2); text-decoration: none; padding: 12px 16px; border-radius: 999px; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--nav-active); }
.nav-pages { display: contents; }
.site-nav .nav-cta { margin-left: 6px; color: #ffffff; background: var(--red-ui); font-weight: 600; padding: 12px 20px; }
.site-nav .nav-cta:hover { color: #ffffff; opacity: 0.92; }

/* ---------- Buttons, pills ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 18px; text-decoration: none;
    padding: 16px 26px; border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-outline { color: var(--ink); font-weight: 500; padding: 15px 24px; border: 1.5px solid var(--outline); }
.btn-outline:hover { color: var(--ink); background: var(--chip); }
.btn-soft { color: var(--ink); background: var(--chip); border: 1.5px solid var(--outline); }
.btn-soft:hover { color: var(--ink); }

.app-store-badge { display: inline-block; transition: transform 0.2s ease, opacity 0.2s ease; }
.app-store-badge:hover { transform: translateY(-2px); opacity: 0.9; }
.app-store-badge img { height: 54px; width: auto; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; font-weight: 500; color: var(--text-3); }
.pill { color: var(--ink); text-decoration: none; padding: 9px 14px; border-radius: 999px; background: var(--chip); border: 1px solid var(--chip-line); }
a.pill { padding: 12px 16px; }
a.pill:hover { color: var(--ink); background: var(--nav-active); }

.eyebrow-pill {
    display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--kicker);
    padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(251, 42, 42, 0.11);
}
a.eyebrow-pill { text-decoration: none; transition: background 0.2s ease; }
a.eyebrow-pill:hover { color: var(--kicker); background: rgba(251, 42, 42, 0.17); }
.kicker { font-size: 15px; font-weight: 600; color: var(--kicker); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Devices ---------- */
/* An iPhone screenshot in a plain bezel. Screenshots keep their status bar, as in the app. */
.phone { width: 244px; border: 9px solid var(--bezel); border-radius: 46px; overflow: hidden; background: var(--bezel); box-shadow: 0 36px 80px rgba(10, 30, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.3); }
.phone img { width: 100%; height: auto; }
.phone.large { width: 280px; border-width: 10px; border-radius: 52px; }
/* Stand-ins until real screenshots exist: striped, with a tag, so they can't pass for the real thing. */
.placeholder {
    display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; text-align: center;
    padding: 24px; color: rgba(255, 255, 255, 0.8); font-size: 14px; line-height: 1.5;
    background: repeating-linear-gradient(135deg, #0B0F0A 0 14px, #161E13 14px 28px);
}
.placeholder::before {
    content: 'Screenshot placeholder'; padding: 4px 10px; border-radius: 999px;
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: #0B0F0A; background: #FFD43B;
}
.phone.placeholder { padding: 16px; }
.watch.placeholder { padding: 14px; gap: 8px; }
.watch.placeholder::before, .devices-visual .phone.placeholder::before { content: 'Placeholder'; }
/* Same outer size as a framed 600 × 1304 screenshot. */
.phone.placeholder { height: 509px; }
.phone.large.placeholder { height: 585px; }
.watch { width: 150px; height: 184px; border-radius: 42px; border: 7px solid #232B20; box-shadow: 0 24px 50px rgba(10, 30, 0, 0.45); font-size: 13px; }

/* ---------- Home hero ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 44px; padding-bottom: 96px; }
.hero-card { flex: 1 1 520px; min-width: 0; max-width: 640px; padding: 44px 44px 40px; border-radius: 36px; box-shadow: 0 30px 80px var(--glass-shadow); container-type: inline-size; }
/* Sized to the card, not the window: "Mind your heart." is 7.3 em wide, so 13.6cqi fills the
   card's content box and the gap on its right matches the card padding on its left. */
.hero h1 { font-size: clamp(32px, 5.6vw, 80px); font-size: min(80px, 13.6cqi); line-height: 1; letter-spacing: -0.01em; margin: 22px 0; }
.hero .lead { max-width: 540px; font-size: 20px; line-height: 1.55; color: var(--text-2); margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }
.hero-visual { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; position: relative; padding-bottom: 24px; }
.hero-visual .watch { position: absolute; left: calc(50% - 250px); bottom: 0; }

/* ---------- Spotlights ---------- */
.spot { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 56px; padding-bottom: 56px; scroll-margin-top: 16px; }
.spot.reverse { flex-direction: row-reverse; }
.spot-card { flex: 1 1 440px; min-width: 0; padding: 40px; border-radius: 32px; }
.spot-visual { flex: 1 1 440px; min-width: 0; display: flex; justify-content: center; }
.spot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.spot-head .kicker { color: var(--muted); }
.spot-no { font-size: 56px; line-height: 1; font-weight: 600; color: var(--accent); }
.spot h2 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.08; margin: 14px 0 16px; text-wrap: balance; }
.spot-head + h2 { margin-top: 18px; }
.spot-card > p { font-size: 18px; line-height: 1.6; color: var(--text-2); margin-bottom: 26px; }
.profiles { margin: -8px 0 22px; }
.profiles .pill:first-child { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checklist li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 13px 16px; border-radius: 16px; background: var(--tint);
    font-size: 17px; line-height: 1.5; color: var(--text-3);
}
.checklist svg { flex: none; margin-top: 3px; stroke: var(--accent); }


.see-all { padding-top: 40px; text-align: center; }
.see-all .glass { padding: 32px 32px 36px; border-radius: 32px; }
.see-all p { font-size: 20px; line-height: 1.55; color: var(--text-3); margin-bottom: 22px; }
.see-all svg { stroke: var(--accent); }

/* ---------- Features page ---------- */
.page-header { padding-top: 48px; padding-bottom: 32px; }
.page-header .glass { padding: 44px 40px 36px; border-radius: 36px; text-align: center; box-shadow: 0 30px 80px var(--glass-shadow); }
.page-header .eyebrow-pill { padding: 8px 16px; }
.page-header h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -0.01em; margin: 20px 0 16px; }
.page-header .lead { max-width: 620px; margin: 0 auto; font-size: 19px; line-height: 1.6; color: var(--text-2); }
.page-header .pill-row { justify-content: center; margin-top: 26px; }

.devices { margin-top: 48px; scroll-margin-top: 16px; }
.devices-panel { border-radius: 36px; padding: 56px 40px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; box-shadow: 0 30px 80px var(--glass-shadow); }
.devices-copy { flex: 1 1 360px; min-width: 0; }
.devices h2 { font-size: 44px; line-height: 1.05; margin-bottom: 12px; }
.devices-copy > p { font-size: 18px; line-height: 1.6; color: var(--text-2); margin-bottom: 28px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 999px; background: var(--chip); }
.segmented button {
    min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 0; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 500; background: transparent; color: var(--text-3);
}
.segmented button[aria-pressed="true"] { font-weight: 600; background: var(--ink); color: var(--ground); }
.segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.device-detail h3 { font-size: 22px; margin: 28px 0 8px; }
.device-detail p { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.devices-visual { flex: 1 1 480px; min-width: 0; min-height: 420px; display: flex; align-items: center; justify-content: center; }
.devices-visual .phone { width: 196px; border-width: 8px; border-radius: 40px; }
.devices-visual .phone.placeholder { height: 407px; padding: 16px; }
.devices-visual .watch { width: 220px; height: 268px; border-radius: 60px; border-width: 10px; font-size: 14px; }
.ipad-frame { width: 100%; max-width: 440px; aspect-ratio: 4 / 3; border-radius: 28px; border: 12px solid #232B20; box-shadow: 0 30px 70px rgba(10, 30, 0, 0.4); }
.mac-frame {width: 100%; max-width: 540px; aspect-ratio: 16 / 10; border-radius: 16px; border: 10px solid #232B20; box-shadow: 0 30px 70px rgba(10, 30, 0, 0.4); }
[hidden] { display: none !important; }

.section-title { font-size: 40px; line-height: 1.1; }
.all { padding-top: 112px; scroll-margin-top: 16px; }
.all-head { max-width: 520px; margin: 0 auto 32px; padding: 22px 28px; border-radius: 28px; text-align: center; box-shadow: none; }
.all-head p { font-size: 18px; color: var(--text-2); margin-top: 6px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.feature-tile { padding: 18px 20px; border-radius: 18px; box-shadow: none; }
.feature-tile h3 { font-size: 17px; }
.feature-tile p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text-2); }

.changelog { max-width: 860px; margin: 0 auto; padding: 112px 24px 0; scroll-margin-top: 16px; }
.changelog .glass { padding: 40px; border-radius: 32px; }
.changelog .section-title { margin-bottom: 28px; }
.release { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.release-version { flex: 0 0 110px; font-size: 26px; font-weight: 600; color: var(--accent); }
.release-body { flex: 1 1 280px; min-width: 0; padding-left: 24px; border-left: 3px solid var(--red); }
.release-date { font-size: 14px; font-weight: 500; color: var(--muted); }
.release-body ul { margin-top: 10px; padding-left: 18px; font-size: 17px; line-height: 1.7; color: var(--text-3); }

/* ---------- Text pages (privacy policy, support) ---------- */
.text-page { padding-top: 48px; padding-bottom: 72px; }
.text-header { padding: 40px; border-radius: 32px; margin-bottom: 16px; }
.text-header h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.01em; margin: 12px 0 20px; text-wrap: balance; }
.text-header .lead { font-size: 19px; line-height: 1.6; color: var(--text-2); }
.text-meta { margin-top: 16px; font-size: 14px; color: var(--muted); }
.text-page .checklist { margin-top: 24px; }
.prose-card { padding: 32px; border-radius: 28px; scroll-margin-top: 16px; box-shadow: none; }
.prose-card + .prose-card { margin-top: 16px; }
.prose-card h2 { font-size: 22px; line-height: 1.3; margin-bottom: 12px; }
.prose-card p, .prose-card li { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.prose-card p + p, .prose-card ul + p, .prose-card p + ul { margin-top: 12px; }
.prose-card ul { padding-left: 20px; }
.prose-card li + li { margin-top: 4px; }
.prose-card strong { color: var(--ink); font-weight: 600; }
.prose-card .btn { margin-top: 20px; }
.thanks { margin-top: 24px; text-align: center; }
.thanks span { display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 15px; color: var(--text-2); box-shadow: none; }

/* ---------- Closing CTA + footer ---------- */
.cta { padding-top: 112px; padding-bottom: 40px; }
.cta-card { border-radius: 36px; padding: 64px 32px; text-align: center; background: var(--red-ui); color: #ffffff; box-shadow: 0 30px 80px rgba(120, 10, 0, 0.3); }
.cta-card svg { margin: 0 auto; }
.cta-card h2 { font-size: clamp(36px, 4.8vw, 60px); line-height: 1.05; margin: 14px 0 12px; }
.cta-card p { font-size: 20px; line-height: 1.5; margin-bottom: 30px; }
.cta-card .app-store-badge { margin: 0 auto; }

.site-footer { padding-top: 16px; padding-bottom: 48px; }
.footer-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px 14px; border-radius: 30px; font-size: 15px; color: var(--text-2); box-shadow: none; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.footer-links a { color: var(--text-3); text-decoration: none; padding: 12px 14px; border-radius: 999px; }
.footer-links a:hover { color: var(--ink); background: var(--chip); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; font-size: 14px; text-align: center; }

@media (max-width: 600px) {
    /* The four nav items don't fit one phone-width line. The CTA joins the brand, and the three
       page links get the row below to themselves, in equal thirds. */
    .site-bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 8px; border-radius: 26px; }
    .brand { font-size: clamp(19px, 5.4vw, 23px); }
    .site-nav { display: contents; font-size: clamp(14px, 4vw, 16px); }
    .site-nav .nav-cta { grid-area: 1 / 2; margin-left: 0; padding: 12px clamp(14px, 4.5vw, 20px); white-space: nowrap; }
    .nav-pages { grid-area: 2 / 1 / 3 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .nav-pages a { justify-self: center; padding: 10px clamp(8px, 3vw, 14px); white-space: nowrap; }

    .hero { padding-top: 28px; padding-bottom: 48px; gap: 40px; }
    .hero-card, .spot-card, .text-header { padding: 28px 22px; border-radius: 28px; }
    .page-header .glass { padding: 32px 20px 28px; }
    .page-header h1 { font-size: clamp(30px, 9vw, 42px); }
    h1 .nowrap { white-space: normal; }
    .hero-visual .watch { left: 0; transform: scale(0.8); transform-origin: bottom left; }
    .spot { gap: 32px; padding-top: 36px; padding-bottom: 36px; }
    .devices-panel { padding: 32px 20px; }
    .prose-card { padding: 24px 20px; border-radius: 20px; }
    .text-header h1 { font-size: clamp(32px, 9.6vw, 40px); }
}

/* Page switches cross-fade instead of cutting over (Chrome 126+, Safari 18.2+; elsewhere they just navigate).
   The map is the same on every page, so only the content and the route visibly change. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-group(root) { animation-duration: 0.2s; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .app-store-badge { transition: none; }
}
