/* =================================================================
   Schnalz.net — Apple macOS-inspired design system
   Light + Dark mode · "Liquid Glass" · SF Pro system typography
   Accent: Apple blue (#0071e3 buttons · #0066cc/#2997ff links)
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
    /* Brand */
    --mint: #00d4aa;
    --teal: #2dd4bf;
    --indigo: #6366f1;
    --purple: #7c3aed;
    --accent-grad: #0071e3;
    --accent-grad-soft: rgba(0,113,227,0.12);

    /* Light theme (default) */
    --bg: #fbfbfd;
    --bg-elev: #ffffff;
    --bg-sunken: #f5f5f7;
    --text: #1d1d1f;
    --text-2: #65656b;
    --text-3: #5e5e66;
    --border: rgba(0,0,0,0.10);
    --border-2: rgba(0,0,0,0.06);
    --accent: #0066cc;
    --accent-2: #0071e3;
    --nav-bg: rgba(251,251,253,0.72);
    /* Navbar is a dark frosted bar in BOTH themes (like apple.com) → these stay constant */
    --nav-surface: rgba(18,18,20,0.85);
    --nav-link: rgba(255,255,255,0.8);
    --nav-line: rgba(255,255,255,0.16);
    --nav-fill: rgba(255,255,255,0.1);
    --glass-bg: rgba(255,255,255,0.55);
    --glass-brd: rgba(255,255,255,0.65);
    --glass-shadow: 0 8px 40px rgba(0,0,0,0.10);
    --shadow-sm: 0 2px 14px rgba(0,0,0,0.06);
    --shadow-md: 0 12px 44px -18px rgba(0,0,0,0.22);
    --hero-glow-1: rgba(0,113,227,0.18);
    --hero-glow-2: rgba(0,113,227,0.10);
    --code-tint: rgba(0,0,0,0.04);
    --btn: #0071e3; --btn-hover: #0077ed;
    --fill: rgba(0,0,0,0.05); --fill-hover: rgba(0,0,0,0.09);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #000000;
    --bg-elev: #1c1c1e;
    --bg-sunken: #111113;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --border: rgba(255,255,255,0.13);
    --border-2: rgba(255,255,255,0.07);
    --accent: #2997ff;
    --accent-2: #2997ff;
    --nav-bg: rgba(10,10,12,0.62);
    --nav-link: rgba(255,255,255,0.8);
    --glass-bg: rgba(40,40,46,0.45);
    --glass-brd: rgba(255,255,255,0.12);
    --glass-shadow: 0 8px 50px rgba(0,0,0,0.55);
    --shadow-sm: 0 2px 14px rgba(0,0,0,0.4);
    --shadow-md: 0 18px 50px -20px rgba(0,0,0,0.7);
    --hero-glow-1: rgba(0,113,227,0.20);
    --hero-glow-2: rgba(0,113,227,0.12);
    --code-tint: rgba(255,255,255,0.06);
    --fill: rgba(255,255,255,0.10); --fill-hover: rgba(255,255,255,0.16);
    color-scheme: dark;
}

/* Follow system preference when the user hasn't chosen manually */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg: #000000;
        --bg-elev: #1c1c1e;
        --bg-sunken: #111113;
        --text: #f5f5f7;
        --text-2: #a1a1a6;
        --text-3: #86868b;
        --border: rgba(255,255,255,0.13);
        --border-2: rgba(255,255,255,0.07);
        --accent: #2997ff;
        --accent-2: #2997ff;
        --nav-bg: rgba(10,10,12,0.62);
        --nav-link: rgba(255,255,255,0.8);
        --glass-bg: rgba(40,40,46,0.45);
        --glass-brd: rgba(255,255,255,0.12);
        --glass-shadow: 0 8px 50px rgba(0,0,0,0.55);
        --shadow-sm: 0 2px 14px rgba(0,0,0,0.4);
        --shadow-md: 0 18px 50px -20px rgba(0,0,0,0.7);
        --hero-glow-1: rgba(0,113,227,0.20);
        --hero-glow-2: rgba(0,113,227,0.12);
        --code-tint: rgba(255,255,255,0.06);
        --fill: rgba(255,255,255,0.10); --fill-hover: rgba(255,255,255,0.16);
        color-scheme: dark;
    }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Smooth in-page scrolling. This works ONLY because body uses `overflow-x: clip` (not hidden):
   `hidden` makes <body> a scroll container, which silently breaks smooth scroll on the viewport
   (anchors set the hash but never move) — clip clips identically without that side effect.
   Reduced-motion users get instant. Deep-link arrival is forced instant in the js handler. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 1.0625rem; /* 17px — Apple's body size (was browser-default 16px) */
    line-height: 1.47059;
    letter-spacing: -0.021em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Contain horizontal overflow WITHOUT making <body> a scroll container.
       `overflow-x: hidden` turns body into a scroller, which breaks anchor/chapter-nav
       scrolling in Safari (clicks set the hash but the page never moves). `clip` clips
       identically but creates no scroll container. `hidden` is the fallback for browsers
       without clip support (Safari <16). */
    overflow-x: hidden;
    overflow-x: clip;
}
/* CJK (Traditional Chinese, Hong Kong) — Apple's PingFang HK with graceful fallbacks */
html[lang^="zh"] body { font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC", "Noto Sans HK", "Microsoft JhengHei", "Helvetica Neue", system-ui, sans-serif; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(0,113,227,0.22); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.container-wide { max-width: 1280px; }
.container-narrow { max-width: 760px; margin: 0 auto; }   /* center even when used standalone (not combined with .container) */

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-tight { padding: clamp(3rem, 6vw, 5rem) 0; }
.bg-sunken { background: var(--bg-sunken); }
.bg-elev { background: var(--bg-elev); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.06; letter-spacing: -0.021em; color: var(--text); }
strong, b { font-weight: 600; } /* Apple uses semibold for inline emphasis, not browser-default bold (700) */

.display {
    font-size: clamp(2.7rem, 7.2vw, 5.6rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.022em;
}
.h-xl { font-size: clamp(2.1rem, 5vw, 3.75rem); letter-spacing: -0.021em; line-height: 1.07; }
.h-lg { font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: -0.019em; }
.h-md { font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.016em; }

.lead {
    font-size: clamp(1.125rem, 1.6vw, 1.3125rem); /* 18px → 21px — refined intro size, cleaner hierarchy under headings */
    line-height: 1.5;
    color: var(--text-2);
    font-weight: 400;
    letter-spacing: -0.018em;
}
.body-lg { font-size: 1.1rem; color: var(--text-2); line-height: 1.55; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }

.eyebrow {
    display: inline-block;
    font-size: 1.0625rem; /* 17px — Apple's eyebrows are ~body-size, not tiny (was 13px) */
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--accent);
    margin-bottom: 0.7rem;
}
.eyebrow-plain {
    display: inline-block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-3); letter-spacing: 0.04em; margin-bottom: 0.8rem;
}

.grad-text {
    color: var(--accent);
}

.center { text-align: center; }
.section-head { max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head p { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
    font-size: 0.92rem; font-weight: 500; letter-spacing: -0.01em;
    padding: 0.55rem 1.1rem; border-radius: 980px; border: 1px solid transparent;
    transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.2s ease;
    white-space: nowrap; cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    color: #fff; background: var(--btn);
}
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary {
    color: var(--accent); background: transparent; border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }   /* apple.com outlined-button hover: fills with the accent, text turns white */
.btn-ghost { color: var(--accent); background: transparent; padding-left: 0; padding-right: 0; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.btn-lg { padding: 0.55rem 1.1rem; font-size: 0.92rem; }   /* unified to navbar CTA size */

/* Apple-style inline text link with chevron */
.link-chevron {
    color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 0.15em;
}
.link-chevron::after { content: "›"; font-weight: 600; transition: transform 0.2s ease; }
.link-chevron:hover::after { transform: translateX(3px); }

/* ---------- Navbar (Liquid Glass) ---------- */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    background: var(--nav-surface);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--nav-line); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .nav { background: #18181a; }
}
.nav .container { max-width: 1080px; display: flex; align-items: center; justify-content: center; position: relative; height: 44px; }
.nav-logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.nav .nav-logo { margin-right: 2.2rem; color: var(--nav-link); font-weight: 400; font-size: 12px; letter-spacing: -0.01em; line-height: 1; }   /* wordmark uses the exact same font-style as the nav links */
.nav-logo img { width: 24px; height: 24px; filter: brightness(0); }   /* footer eagle: dark in light mode */
:root[data-theme="dark"] .nav-logo img { filter: none; }              /* footer eagle: white in dark mode */
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .nav-logo img { filter: none; } }
/* The nav bar is always dark → its eagle is always white (overrides the adaptive rules above; footer stays adaptive) */
.nav .nav-logo img { filter: none; opacity: 0.8; transition: opacity 0.2s ease; }
.nav .nav-logo:hover { color: #fff; }
.nav .nav-logo:hover img { opacity: 1; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; }
.nav-links li { display: flex; align-items: center; }   /* kill the inherited line-box strut so links sit on the true vertical centre */
.nav-links a { font-size: 12px; font-weight: 400; letter-spacing: -0.01em; line-height: 1; color: var(--nav-link); transition: color 0.32s cubic-bezier(.4,0,.6,1); }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 0.9rem; margin-left: 1.9rem; }   /* toggle sits inline after the links, same gap as between links */
/* Language switcher hidden — the automated language-suggestion banner covers switching.
   Kept in the DOM (display:none, still query-able) so the banner can read its href target. */
.lang-switch { display: none; }

/* Theme toggle */
.theme-toggle {
    border: none; background: none; padding: 4px;   /* borderless + minimal; padding is just hit-area */
    color: var(--nav-link); display: grid; place-items: center; cursor: pointer;
    transition: color 0.2s ease, transform 0.3s cubic-bezier(.2,.7,.2,1);
}
.theme-toggle:hover { color: #fff; }
.theme-toggle:active { transform: scale(0.9) rotate(20deg); }
.theme-toggle svg { width: 16px; height: 16px; }   /* sized to sit with the nav links */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme]) .theme-toggle .icon-moon { display: block; }
}

/* Mobile nav */
.nav-burger { display: none; width: 30px; height: 30px; border: none; background: none; position: relative; }
.nav-burger span { position: absolute; left: 5px; right: 5px; height: 1.5px; background: var(--nav-link); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-burger span:nth-child(1) { top: 11px; }
.nav-burger span:nth-child(2) { top: 18px; }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-burger { display: block; }
    .nav .container { justify-content: flex-start; }   /* logo left on mobile; links are an overlay */
    .nav-right { position: absolute; right: 22px; top: 0; bottom: 0; margin-left: 0; }   /* toggle + burger pinned right on mobile */
    .nav-links {
        position: fixed; top: 44px; left: 0; right: 0; bottom: 0; z-index: 999; margin-right: 0;
        height: calc(100vh - 44px); height: calc(100dvh - 44px);
        flex-direction: column; justify-content: center; gap: 1.8rem; overflow-y: auto;
        background: var(--bg); /* opaque so the menu fully covers page content */
        transform: translateX(100%); transition: transform 0.4s cubic-bezier(.2,.7,.2,1); padding: 2rem;
    }
    body.menu-open .nav-links { transform: translateX(0); }
    .nav-links a { font-size: 1.5rem; }
    .nav-links a, .nav-links a:hover, .nav-links a.active { color: var(--text); }   /* readable on the theme-bg overlay, not the dark bar */
    .nav-desktop-only { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(8rem, 16vh, 12rem) 0 clamp(4rem, 8vw, 7rem); text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* Soft glow via radial-gradient instead of filter:blur(90px) — the big blur is a Safari/WebKit
   performance killer (slow paint + scroll jank); a gradient looks the same and is cheap everywhere. */
.hero-glow { position: absolute; }
.hero-glow.g1 { width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; top: -16%; left: -12%; background: radial-gradient(circle, var(--hero-glow-1), transparent 70%); }
.hero-glow.g2 { width: 64vw; height: 64vw; max-width: 820px; max-height: 820px; top: -4%; right: -16%; background: radial-gradient(circle, var(--hero-glow-2), transparent 70%); }
.hero .container { position: relative; z-index: 1; }

.live-pill {
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0.4rem 0.95rem; border-radius: 980px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    font-size: 0.82rem; color: var(--text-2); margin-bottom: 1.8rem;
}
.live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(0,212,170,0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,212,170,0.5);} 70% { box-shadow: 0 0 0 8px rgba(0,212,170,0);} 100% { box-shadow: 0 0 0 0 rgba(0,212,170,0);} }
/* Heroes are above the fold — show immediately, no reveal/fade-in (consistent across all heroes) */
.hero .reveal, .page-hero .reveal, .app-hero .reveal,
.hero .reveal > *, .page-hero .reveal > *, .app-hero .reveal > * { opacity: 1 !important; transform: none !important; transition: none !important; }

.hero h1 { margin-bottom: 1.4rem; }
.hero .lead { max-width: 680px; margin: 0 auto 2rem; }
.cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.cta-note { margin-top: 1rem; font-size: 0.9rem; color: var(--text-3); }
.cta-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Stat strip — monochrome, Apple spec-sheet feel with hairline dividers */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(3rem, 6vw, 4.5rem); max-width: 920px; margin-left: auto; margin-right: auto; }
.stat-strip .cell { text-align: center; padding: 0.2rem 1.1rem; position: relative; }
.stat-strip .cell + .cell::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 56%; background: var(--border); }
.stat-strip .num { display: block; font-size: clamp(2.1rem, 4.4vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; color: var(--text); }
.stat-strip .label { display: block; font-size: 0.9rem; color: var(--text-2); margin-top: 0.65rem; line-height: 1.3; letter-spacing: -0.01em; }
.stat-strip a.cell { text-decoration: none; color: inherit; transition: color 0.2s ease; }   /* the Google Partner stat is a verification link */
.stat-strip a.cell:hover .num { color: var(--accent); }
@media (max-width: 640px) {
    .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 2.4rem 0; }
    .stat-strip .cell:nth-child(odd)::before { display: none; }   /* keep dividers only between the two columns */
}

/* ---------- Trusted-by logo wall ---------- */
.logo-wall-label { text-align: center; font-size: 0.78rem; font-weight: 500; color: var(--text-3); letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 2.5rem; }
.logo-wall { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.6rem 3.2rem; max-width: 660px; margin: 0 auto; }
/* Source logos are monochrome white SVGs (built for a dark theme); force a uniform
   silhouette per mode, with wordmarks and square badges optically size-matched. */
.logo-wall img { height: 27px; width: auto; max-width: 122px; opacity: 0.55; filter: brightness(0); transition: opacity 0.3s ease; }
.logo-wall img.is-badge { height: 42px; max-width: 64px; }
.logo-wall img.is-wide { height: 24px; max-width: 130px; }   /* extra-wide wordmark (Shinsegae): slightly shorter so max-width never squishes the aspect ratio */
.logo-wall img:hover { opacity: 0.85; }
:root[data-theme="dark"] .logo-wall img { filter: brightness(0) invert(1); opacity: 0.62; }
:root[data-theme="dark"] .logo-wall img:hover { opacity: 0.95; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .logo-wall img { filter: brightness(0) invert(1); opacity: 0.62; } }

/* ---------- Glass card ---------- */
.glass {
    background: var(--glass-bg); border: none;
    -webkit-backdrop-filter: saturate(150%) blur(20px); backdrop-filter: saturate(150%) blur(20px);
    box-shadow: var(--glass-shadow); border-radius: 26px;
}

/* ---------- Chapter pill-nav (section jump links — in-flow, NOT sticky) ---------- */
.chapter-nav { padding: 0.9rem 0; background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--border-2); }
.chapter-nav .track { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.chapter-nav .track::-webkit-scrollbar { display: none; }
.chapter-nav a { flex: 0 0 auto; font-size: 0.86rem; color: var(--text-2); padding: 0.42rem 0.95rem; border-radius: 980px; transition: background-color 0.2s ease, color 0.2s ease; }
.chapter-nav a:hover { color: var(--text); }
.chapter-nav a.active { background: var(--text); color: var(--bg); }
@media (max-width: 700px) { .chapter-nav .track { justify-content: flex-start; } }

/* ---------- Feature deep-dive rows (alternating) ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(4rem, 8vw, 7rem); }
.feature-row.reverse .feature-visual { order: -1; }
.feature-copy .eyebrow { margin-bottom: 1rem; }
.feature-copy h2 { margin-bottom: 1rem; }
.feature-copy p { color: var(--text-2); font-size: 1.12rem; line-height: 1.55; }
.feature-copy .feat-list { list-style: none; margin-top: 1.5rem; display: grid; gap: 0.8rem; }
.feature-copy .feat-list li { position: relative; padding-left: 1.9rem; color: var(--text-2); }
.feature-copy .feat-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat; }
.feature-visual { position: relative; min-height: 320px; border-radius: 28px; overflow: hidden; display: grid; place-items: center; padding: 2rem; }
/* Both mockup-card tints use the same Apple-blue accent (different corner positions for subtle variety). Class names kept for compatibility. */
.feature-visual.tint-mint { background: radial-gradient(120% 120% at 30% 20%, rgba(0,113,227,0.22), transparent 60%), var(--bg-sunken); }
.feature-visual.tint-purple { background: radial-gradient(120% 120% at 70% 20%, rgba(0,113,227,0.22), transparent 60%), var(--bg-sunken); }
@media (max-width: 800px) { .feature-row { grid-template-columns: 1fr; gap: 2rem; } .feature-row.reverse .feature-visual { order: 0; } }

/* ---------- Chiclet / tile grids ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.tile-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tile-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tile {
    background: var(--bg-elev); border: none; border-radius: 22px; box-shadow: var(--shadow-sm);
    padding: 1.9rem; transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s ease;
    position: relative; overflow: hidden;
}
a.tile:hover, .tile.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile .tile-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 1.1rem; background: var(--accent-grad-soft); }
.tile .tile-icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.7; }
.tile h3 { font-size: 1.2rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.tile p { color: var(--text-2); font-size: 0.98rem; line-height: 1.5; }
.tile .link-chevron { margin-top: 1rem; font-size: 0.92rem; }
@media (max-width: 900px) { .tile-grid, .tile-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tile-grid, .tile-grid.cols-2, .tile-grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- Apps "get to know" grid ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.app-card { display: flex; gap: 1.2rem; align-items: center; background: var(--bg-elev); border: none; border-radius: 22px; box-shadow: var(--shadow-sm); padding: 1.5rem; transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s ease; }
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.app-card img { width: 64px; height: 64px; border-radius: 15px; flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.app-card h3 { font-size: 1.12rem; margin-bottom: 0.2rem; }
.app-card p { color: var(--text-2); font-size: 0.9rem; line-height: 1.45; }
.app-card .badge { display: inline-block; margin-top: 0.4rem; font-size: 0.72rem; font-weight: 500; color: var(--accent); }
@media (max-width: 640px) { .apps-grid { grid-template-columns: 1fr; } }

/* ---------- App detail pages (hero · screenshots · store badges) ---------- */
.app-hero { text-align: center; padding: clamp(8rem, 16vh, 12rem) 0 clamp(2rem, 4vw, 3rem); margin-top: -6.7rem; position: relative; overflow: hidden; }   /* gradient extends up under the breadcrumb; negative margin keeps homepage start height */
.app-hero .container { position: relative; z-index: 1; }
.app-icon-lg { width: 120px; height: 120px; border-radius: 27px; margin: 0 auto 1.5rem; display: block; box-shadow: var(--shadow-md); }
.app-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 0.85rem; }
.app-sub { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text-2); max-width: 600px; margin: 0 auto 1.9rem; line-height: 1.45; letter-spacing: -0.015em; }
.app-badges { display: flex; gap: 0.9rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.app-badges img { height: 50px; width: auto; }
.app-spec { color: var(--text-3); font-size: 0.9rem; margin-top: 1.25rem; }
.app-soon { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.4rem; border-radius: 980px; background: var(--fill); color: var(--text-2); font-weight: 500; font-size: 0.98rem; }
.app-soon .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Screenshot showcase row (phone shots) */
.shots { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; padding: 0.5rem 0 1rem; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { display: none; }
.shots img { width: 240px; flex: 0 0 auto; border-radius: 28px; box-shadow: var(--shadow-md); scroll-snap-align: center; height: auto; }
@media (min-width: 820px) { .shots { justify-content: center; overflow: visible; } }

/* App index shelf — status + platform chips on .app-card */
.app-status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 600; padding: 0.22rem 0.65rem; border-radius: 980px; background: var(--fill); color: var(--text-3); }
.app-status.live { background: rgba(48,209,88,0.16); color: #1a8f3c; }
:root[data-theme="dark"] .app-status.live { color: #30d158; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .app-status.live { color: #30d158; } }
.app-chip { font-size: 0.72rem; color: var(--text-3); padding: 0.22rem 0.6rem; border-radius: 980px; background: var(--code-tint); }
.app-meta-row { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; margin-top: 0.7rem; }

/* ---------- Stats band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stats-band .num { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.03em; color: var(--accent); }
.stats-band .label { color: var(--text-3); font-size: 0.9rem; margin-top: 0.4rem; }
@media (max-width: 640px) { .stats-band { grid-template-columns: repeat(2, 1fr); gap: 2.4rem 1rem; } }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
.price-card { background: var(--bg-elev); border: none; border-radius: 24px; box-shadow: var(--shadow-sm); padding: 2rem; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.price-card.featured { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.price-card .tier { font-size: 0.85rem; color: var(--text-3); font-weight: 500; }
.price-card.featured .tier { color: var(--accent); }
.price-card .price { font-size: 2.4rem; font-weight: 600; letter-spacing: -0.03em; margin: 0.6rem 0 0.2rem; }
.price-card .price small { font-size: 0.95rem; font-weight: 400; color: var(--text-3); }
.price-card .spend { color: var(--text-2); font-size: 0.95rem; margin-bottom: 1.2rem; }
.price-card ul { list-style: none; display: grid; gap: 0.7rem; margin: 0 0 1.6rem; }
.price-card li { display: flex; gap: 0.6rem; color: var(--text-2); font-size: 0.95rem; }
.price-card li::before { content: ""; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/13px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/13px no-repeat; }
.price-card .btn { margin-top: auto; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* ---------- FAQ (native accordion) ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.4rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 1.12rem; font-weight: 500; letter-spacing: -0.02em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--text-3); transition: transform 0.3s ease; flex: 0 0 auto; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 0 1.4rem; color: var(--text-2); line-height: 1.6; max-width: 680px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: 32px; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; overflow: hidden; background: var(--bg-sunken); border: none; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--accent-grad-soft); opacity: 0.8; z-index: 0; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 0.8rem; }
.cta-band p { color: var(--text-2); max-width: 540px; margin: 0 auto 1.8rem; font-size: 1.1rem; }
.cta-band .cta-row { margin-top: 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.85rem; color: var(--text-2); margin-bottom: 0.4rem; font-weight: 500; }
.field input, .field select, .field textarea {
    width: 100%; padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--border);
    background: var(--bg-elev); color: var(--text); font-family: inherit; font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.18); }
.field textarea { min-height: 140px; resize: vertical; }
/* Custom-styled <select>: drop the native OS chevron, add our own + a muted placeholder. */
.field select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 2.8rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; background-size: 17px;
}
.field select:hover { border-color: var(--text-3); }
.field select:has(> option[value=""]:checked) { color: var(--text-3); }
.field select option { color: var(--text); background: var(--bg-elev); }

/* ---------- Prose (legal / about) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.6rem; margin: 2.4rem 0 0.8rem; }
.prose h3 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; }
.prose p, .prose li { color: var(--text-2); line-height: 1.7; margin-bottom: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.82rem; color: var(--text-3); padding-top: 5.5rem; position: relative; z-index: 1; }   /* sit above the hero gradient that now extends up behind it */
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { opacity: 0.5; margin: 0 0.4rem; }

/* ---------- Page hero (interior) ---------- */
/* Negative margin pulls the hero (and its gradient) UP under the breadcrumb, so the glow spans the
   whole top (breadcrumb included) with no seam; full padding keeps the pill at the homepage height. */
.page-hero { padding: clamp(8rem, 16vh, 12rem) 0 clamp(2.5rem, 5vw, 4rem); margin-top: -6.7rem; text-align: center; position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero.left { text-align: left; }
.page-hero .lead { max-width: 640px; margin-left: auto; margin-right: auto; margin-top: 1.2rem; }
.page-hero.left .lead { margin-left: 0; }
.page-hero .cta-row { margin-top: 2rem; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem; background: var(--bg-sunken); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-3); font-size: 0.9rem; line-height: 1.6; max-width: 320px; }
.social-links { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.social-link { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--fill); display: grid; place-items: center; font-size: 0.78rem; color: var(--text-2); transition: background-color 0.2s ease, color 0.2s ease; }
.social-link:hover { background: var(--fill-hover); color: var(--text); }
.footer-col h3 { font-size: 0.8rem; color: var(--text-3); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.65rem; }
.footer-col a { font-size: 0.9rem; color: var(--text-2); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--border-2); font-size: 0.82rem; color: var(--text-3); }
.footer-legal { display: flex; gap: 1.4rem; }
.footer-legal a:hover { color: var(--text); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal ---------- */
/* Reveal-on-scroll — premium ease-out + a subtle "grow into place" scale (Apple-style),
   GPU-only (transform/opacity, no blur/scroll-scrubbing → stays fast on Safari). */
.reveal { opacity: 0; transform: translateY(34px) scale(0.97); transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
/* A deep-linked section (or the reveal parent containing it) must show immediately —
   an anchor jumps to it before the scroll-reveal IntersectionObserver fires, else you land on a blank section */
.reveal:target, .reveal:has(:target),
.reveal:target > *, .reveal:has(:target) > * { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Staggered cascade — revealed card grids settle one card after another instead of all at once. */
.tile-grid.reveal, .apps-grid.reveal, .price-grid.reveal { opacity: 1; transform: none; }
.tile-grid.reveal > *, .apps-grid.reveal > *, .price-grid.reveal > * { opacity: 0; transform: translateY(30px) scale(0.97); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.tile-grid.reveal.in > *, .apps-grid.reveal.in > *, .price-grid.reveal.in > * { opacity: 1; transform: none; }
.tile-grid.reveal.in > :nth-child(2), .apps-grid.reveal.in > :nth-child(2), .price-grid.reveal.in > :nth-child(2) { transition-delay: 0.08s; }
.tile-grid.reveal.in > :nth-child(3), .apps-grid.reveal.in > :nth-child(3), .price-grid.reveal.in > :nth-child(3) { transition-delay: 0.16s; }
.tile-grid.reveal.in > :nth-child(4), .apps-grid.reveal.in > :nth-child(4), .price-grid.reveal.in > :nth-child(4) { transition-delay: 0.24s; }
.tile-grid.reveal.in > :nth-child(n+5), .apps-grid.reveal.in > :nth-child(n+5), .price-grid.reveal.in > :nth-child(n+5) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) { .reveal, .reveal > * { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ---------- Utilities ---------- */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
[id] { scroll-margin-top: 110px; }

/* ---------- Language suggestion banner ---------- */
.lang-banner {
    position: fixed; bottom: 24px; right: 22px; left: auto;
    width: min(330px, calc(100vw - 32px));
    padding: 1.15rem 1.25rem 1.2rem;
    background: var(--bg-elev); color: var(--text);
    border: 1px solid var(--border); border-radius: 18px;
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    z-index: 2000;
    font-size: 0.95rem; line-height: 1.45;
    animation: langBannerIn 0.42s cubic-bezier(.2,.7,.2,1) both;
}
.lang-banner__close {
    position: absolute; top: 10px; right: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0;
    background: none; border: 0; border-radius: 50%;
    color: var(--text-2); cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.lang-banner__close:hover { background: var(--fill); color: var(--text); }
.lang-banner__title { margin: 0 30px 0 0; font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.lang-banner__text { margin: 0.28rem 0 0; color: var(--text-2); font-size: 0.9rem; }
.lang-banner__actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.lang-banner__switch {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.55rem 1.1rem;
    background: var(--btn); color: #fff;
    border-radius: 980px; font-size: 0.9rem; font-weight: 500;
    text-decoration: none; white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s cubic-bezier(.2,.7,.2,1);
}
.lang-banner__switch:hover { background: var(--btn-hover); }
.lang-banner__switch:active { transform: scale(0.96); }
.lang-banner__stay {
    background: none; border: 0; padding: 0.55rem 0.3rem;
    color: var(--text-2); font-size: 0.88rem; cursor: pointer; white-space: nowrap;
    transition: color 0.2s ease;
}
.lang-banner__stay:hover { color: var(--text); }
.lang-banner :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@keyframes langBannerIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.lang-banner.is-leaving { animation: langBannerOut 0.22s ease forwards; }
@keyframes langBannerOut { to { opacity: 0; transform: translateY(12px); } }
body.menu-open .lang-banner { display: none; }   /* never float over the open mobile menu */
@media (max-width: 480px) {
    .lang-banner { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .lang-banner, .lang-banner.is-leaving { animation: none; } }
