/* ===========================================================
   app-page.css — shared skeleton for the per-app pages.

   Every page under /apps/ loads this file and then overrides the
   theme tokens in its own <style> block, so the structure stays
   identical while the skin belongs entirely to the app.

   Tokens a page is expected to set:
     --bg, --bg-2, --surface, --surface-2, --line
     --ink, --ink-2, --ink-3
     --accent, --on-accent, --accent-soft
     --radius, --radius-lg, --font, --font-display
   =========================================================== */

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

:root {
    /* Neutral fallbacks — every page overrides these. */
    --bg: #ffffff;
    --bg-2: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #fbfbfd;
    --line: rgba(0, 0, 0, 0.1);
    --ink: #1d1d1f;
    --ink-2: #4b4b52;
    --ink-3: #77777e;
    --accent: #0071e3;
    --on-accent: #ffffff;
    --accent-soft: rgba(0, 113, 227, 0.12);

    --radius: 14px;
    --radius-lg: 26px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font);

    --wrap: 980px;
    --ease: cubic-bezier(0.28, 0, 0.49, 1);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -0.011em;
    overflow-x: hidden;
}

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

a { color: inherit; }

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 22px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 18px;
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.skip-link:focus { top: 12px; }

/* ===========================================================
   App bar — deliberately quiet: the app owns the page
   =========================================================== */
.appbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
}

.appbar .wrap {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.appbar a {
    text-decoration: none;
    color: var(--ink-2);
    font-size: 14px;
    letter-spacing: -0.01em;
    transition: color 0.25s var(--ease);
}

.appbar a:hover { color: var(--ink); }

.appbar-home {
    font-weight: 650;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.appbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
    position: relative;
    padding: clamp(56px, 9vw, 104px) 0 clamp(44px, 7vw, 80px);
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 860px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }
}

.app-icon {
    width: clamp(88px, 14vw, 116px);
    height: clamp(88px, 14vw, 116px);
    border-radius: 23.5%;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 18px 44px -14px rgba(0, 0, 0, 0.34);
    margin-bottom: 26px;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7.4vw, 68px);
    line-height: 1.03;
    letter-spacing: -0.035em;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-sub {
    font-size: clamp(19px, 2.6vw, 24px);
    line-height: 1.35;
    color: var(--ink-2);
    letter-spacing: -0.02em;
    max-width: 22em;
    margin-bottom: 26px;
}

.hero-lede {
    font-size: 17px;
    line-height: 1.62;
    color: var(--ink-2);
    max-width: 34em;
    margin-bottom: 32px;
}

/* ===========================================================
   App Store button
   =========================================================== */
.store-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 13px 24px 13px 20px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
    box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}

.store-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px -14px color-mix(in srgb, var(--accent) 90%, transparent);
}

.store-btn:active { transform: translateY(0); }

.store-btn svg {
    width: 19px;
    height: 19px;
    flex: none;
    fill: currentColor;
}

.store-btn small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.72;
    line-height: 1.2;
    margin-bottom: 1px;
}

.store-btn-text { text-align: left; line-height: 1.15; }

.store-note {
    font-size: 14px;
    color: var(--ink-3);
}

/* Used instead of .store-btn while an app is still in development —
   the layout matches, so nothing shifts when the real link goes in. */
.store-soon {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 13px 24px;
    border-radius: 999px;
    border: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--line));
    background: transparent;
    color: var(--ink-2);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.store-soon svg {
    width: 19px;
    height: 19px;
    flex: none;
    fill: currentColor;
    opacity: 0.7;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 550;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

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

/* ===========================================================
   Fact chips
   =========================================================== */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    list-style: none;
}

.chips li {
    font-size: 13px;
    font-weight: 550;
    letter-spacing: -0.005em;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 13px;
}

/* ===========================================================
   Sections
   =========================================================== */
.section {
    padding: clamp(52px, 8vw, 92px) 0;
}

.section-alt { background: var(--bg-2); }

.section-head {
    max-width: 40em;
    margin-bottom: clamp(30px, 4vw, 46px);
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 14px;
}

.section-head p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* Answer block — a short, quotable paragraph. Written so an assistant
   reading the page can lift a correct answer straight out of it. */
.answer {
    font-size: clamp(20px, 2.8vw, 26px);
    line-height: 1.5;
    letter-spacing: -0.022em;
    color: var(--ink);
    max-width: 26em;
}

.answer strong { font-weight: 650; }

/* ===========================================================
   Feature grid
   =========================================================== */
.features {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    list-style: none;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 24px 26px;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.feature:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.45);
}

.feature h3 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.018em;
    margin-bottom: 9px;
}

.feature p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
}

.feature-mark {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    margin-bottom: 18px;
    opacity: 0.9;
}

/* ===========================================================
   Screens / steps list
   =========================================================== */
.steps {
    display: grid;
    gap: 2px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--line);
}

.steps > li,
.steps > div {
    background: var(--surface);
    padding: 20px 24px;
    display: grid;
    gap: 4px 20px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 700px) {
    .steps > li,
    .steps > div { grid-template-columns: 190px minmax(0, 1fr); }
}

.steps dt,
.steps .step-name {
    font-weight: 650;
    font-size: 15px;
    letter-spacing: -0.015em;
}

.steps dd,
.steps .step-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* ===========================================================
   Privacy strip
   =========================================================== */
.strip {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: clamp(28px, 4vw, 44px);
}

.strip h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.4vw, 32px);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 14px;
    font-weight: 700;
}

.strip p {
    font-size: 17px;
    line-height: 1.62;
    color: var(--ink-2);
    max-width: 44em;
}

.strip-points {
    display: grid;
    gap: 14px 32px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-top: 26px;
    list-style: none;
}

.strip-points li {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
    padding-left: 22px;
    position: relative;
}

.strip-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
}

/* ===========================================================
   Tech tags
   =========================================================== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
}

.tags li {
    font-size: 13px;
    font-weight: 550;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 12px;
    background: var(--surface);
}

/* ===========================================================
   FAQ — <details>, so it works with no JavaScript at all
   =========================================================== */
.faq {
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 20px 44px 20px 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.018em;
    position: relative;
    transition: color 0.25s var(--ease);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary:hover { color: var(--accent); }

.faq summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -6px;
    border-right: 2px solid var(--ink-3);
    border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg);
    transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.faq details > div {
    padding: 0 0 22px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 46em;
}

.faq details > div p + p { margin-top: 12px; }

/* ===========================================================
   Closing CTA
   =========================================================== */
.closer {
    text-align: center;
    padding: clamp(60px, 9vw, 108px) 0;
}

.closer h2 {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.032em;
    font-weight: 700;
    margin-bottom: 16px;
}

.closer p {
    font-size: 18px;
    color: var(--ink-2);
    margin-bottom: 30px;
}

.closer .store-row { justify-content: center; }

/* ===========================================================
   Footer
   =========================================================== */
.foot {
    border-top: 1px solid var(--line);
    padding: 34px 0 46px;
    font-size: 14px;
    color: var(--ink-3);
}

.foot .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    align-items: center;
    justify-content: space-between;
}

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.foot a {
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.25s var(--ease);
}

.foot a:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* ===========================================================
   Shared stage helper — the box a page draws its signature
   visual into. Each page styles the contents itself.
   =========================================================== */
.stage {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .stage { will-change: transform; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
