/* Friends with Modems website.
   System fonts only and no third-party requests: the site keeps the same promise as the apps. */

:root {
    color-scheme: light dark;

    --paper: #f8f6f1;
    --paper-deep: #f0ece3;
    --surface: #ffffff;
    --ink: #121815;
    --ink-soft: #4a5550;
    --ink-faint: #7d8782;
    --line: rgba(18, 24, 21, 0.1);
    --line-strong: rgba(18, 24, 21, 0.2);

    /* Matches Theme.Colors in StudioKit's DesignSystem. */
    --felt: #1a6b3d;
    --felt-deep: #0c3f23;
    --felt-night: #082b18;
    --felt-ink: #17633a;
    --card-red: #b3242a;
    --gold: #a9833a;
    --gold-light: #e8cc8f;
    --on-dark: #f4f1ea;
    --on-dark-soft: rgba(244, 241, 234, 0.72);

    --shadow-sm: 0 1px 2px rgba(18, 24, 21, 0.05), 0 4px 14px -4px rgba(18, 24, 21, 0.08);
    --shadow-lg: 0 2px 6px rgba(18, 24, 21, 0.05), 0 40px 80px -30px rgba(18, 24, 21, 0.35);

    --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --radius: 24px;
    --radius-lg: 40px;
    --page: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Dark palette: follows the system setting unless a host page stamps data-theme (light or dark). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --paper: #0d100e;
        --paper-deep: #131815;
        --surface: #171c19;
        --ink: #efece5;
        --ink-soft: #b1b8b2;
        --ink-faint: #7f8882;
        --line: rgba(239, 236, 229, 0.09);
        --line-strong: rgba(239, 236, 229, 0.18);
        --felt-ink: #6fcb95;
        --card-red: #e3585d;
        --gold: #d7b36b;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0d100e;
    --paper-deep: #131815;
    --surface: #171c19;
    --ink: #efece5;
    --ink-soft: #b1b8b2;
    --ink-faint: #7f8882;
    --line: rgba(239, 236, 229, 0.09);
    --line-strong: rgba(239, 236, 229, 0.18);
    --felt-ink: #6fcb95;
    --card-red: #e3585d;
    --gold: #d7b36b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.125rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

a { color: var(--felt-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--felt-ink); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}
h1 { font-size: clamp(3rem, 8vw, 7rem); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; }
h3 { font-size: 1.45rem; letter-spacing: -0.01em; }
em { font-style: italic; }
p { margin: 0 0 1em; text-wrap: pretty; }

.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 20;
    background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

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

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 920px; }

.eyebrow {
    display: inline-block;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--felt-ink);
    margin-bottom: 1.25rem;
}
.lede { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--ink-soft); max-width: 34em; letter-spacing: -0.005em; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- Header ---------- */

.site-header {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
    background: color-mix(in srgb, var(--paper) 78%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) {
    .site-header { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--ink); text-decoration: none;
    font-family: var(--serif); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.15;
}
.brand img { width: 30px; height: 30px; flex: none; }

.site-header .brand + .brand-tagline {
    margin-right: auto; padding-left: 16px; border-left: 1px solid var(--line-strong);
    font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink-soft); white-space: nowrap;
}
@media (max-width: 960px) { .brand-tagline { display: none; } }
.footer-tagline { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-soft); margin: 18px 0 6px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
    color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500;
    padding: 0 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a.nav-cta { background: var(--ink); color: var(--paper); margin-left: 8px; min-height: 38px; padding: 0 16px; }
.site-nav a.nav-cta:hover { opacity: 0.88; }

@media (max-width: 640px) {
    .hide-narrow { display: none !important; }
    .brand span { font-size: 0.95rem; max-width: 12ch; }
    .site-nav a { padding: 0 10px; }
}

/* ---------- Buttons & chips ---------- */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 54px; padding: 0 28px; border-radius: 999px;
    font-weight: 600; font-size: 1.02rem; text-decoration: none; letter-spacing: -0.005em;
    background: var(--ink); color: var(--paper);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button.secondary:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.button.light { background: #fff; color: #0c1a12; }
.button.ghost-light { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.button.ghost-light:hover { background: rgba(255, 255, 255, 0.16); }
.button.is-static, .button.is-static:hover { transform: none; box-shadow: inset 0 0 0 1.5px var(--line); cursor: default; background: var(--paper-deep); color: var(--ink-soft); }
.button .arrow { transition: transform 0.25s var(--ease); }
.button:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.25rem; }
.center .actions { justify-content: center; }


.chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em;
    padding: 6px 12px; border-radius: 999px;
    background: var(--paper-deep); color: var(--ink-soft);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.chip.live::before { background: #3ecf7a; opacity: 1; box-shadow: 0 0 0 3px rgba(62, 207, 122, 0.25); }
.chip.on-dark { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.9); }

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

section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-head { max-width: 46rem; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head.center { margin-inline: auto; }
.band { background: var(--paper-deep); }

.fine { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.fine-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-sm); }
.fine-item svg { width: 30px; height: 30px; stroke: var(--felt-ink); margin-bottom: 22px; }
.fine-item h3 { font-size: 1.2rem; font-family: var(--sans); letter-spacing: -0.01em; font-weight: 650; line-height: 1.3; }
.fine-item p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }
@media (max-width: 1000px) { .fine { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .fine { grid-template-columns: 1fr; } }

/* ---------- Home hero ---------- */

.hero { padding: clamp(24px, 3.5vw, 44px) 0 0; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none;
    background:
        radial-gradient(40% 50% at 50% 30%, color-mix(in srgb, var(--felt) 16%, transparent), transparent 70%),
        radial-gradient(30% 30% at 80% 10%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%);
}
.hero .wrap { position: relative; }
.hero h1 em { color: var(--felt-ink); font-weight: 500; }
.hero .lede { margin-top: 1.75rem; }

/* App carousel: a scroll-snap track, so it swipes natively; site.js adds the arrows and tab syncing. */
.carousel { max-width: 1120px; margin: 0 auto; }
/* The app tabs and arrows float over the top of the slide as frosted glass, leaving the page above free. */
.carousel-stage { position: relative; }
.carousel-bar {
    position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px;
    padding: 4px; border-radius: 999px;
}
.glass {
    color: #fff; background: rgba(8, 14, 11, 0.34); border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
}
@media (prefers-reduced-transparency: reduce) { .glass { background: rgba(8, 14, 11, 0.86); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.app-tabs {
    display: flex; justify-content: space-between; gap: 2px; min-width: 0;
    overflow-x: auto; scrollbar-width: none; position: relative;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab {
    display: inline-flex; align-items: center; gap: 8px; flex: none;
    min-height: 40px; padding: 0 14px 0 5px; border-radius: 999px;
    color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 0.92rem; font-weight: 500; white-space: nowrap;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.app-tab img { width: 30px; height: 30px; border-radius: 8px; outline: 1px solid rgba(255, 255, 255, 0.2); outline-offset: -1px; }
.app-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.app-tab[aria-current="true"] { background: #fff; color: #0c1a12; }
/* Twenty apps: only the current tab shows its name; the others are icons (named by aria-label and a tooltip). */
.app-tab span { display: none; }
.app-tab { padding: 0 5px; }
.app-tab[aria-current="true"] span { display: inline; }
.app-tab[aria-current="true"] { padding-right: 14px; }
/* The arrows need site.js; without it they keep their space but stay hidden, and the track still swipes. */
.carousel:not(.is-enhanced) .slide-nav-btn { visibility: hidden; }
.slide-nav-btn {
    width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
    background: transparent; color: inherit; transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.slide-nav-btn svg { width: 16px; height: 16px; }
.slide-nav-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); transform: scale(1.06); }
.slide-nav-btn:disabled { opacity: 0.35; cursor: default; }

.carousel-track {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; position: relative; border-radius: var(--radius-lg);
}
.carousel-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .carousel-track { scroll-behavior: smooth; } }

.slide {
    --a: #23864f; --b: #1a6b3d; --c: #0c3f23; --d: #082b18;
    position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
    aspect-ratio: 16 / 8.6; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px),
        radial-gradient(70% 90% at 50% 20%, var(--a) 0%, var(--b) 38%, var(--c) 78%, var(--d) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -60px 120px rgba(0, 0, 0, 0.25);
}
.slide .scene { position: absolute; inset: 0; z-index: 0; }
.slide .phone {
    position: absolute; left: 50%; top: 15%; width: 29%; transform: translateX(-50%);
    filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.45));
    transition: transform 0.6s var(--ease);
}
.slide .scene:hover .phone { transform: translateX(-50%) translateY(-6px); }
.slide .prop { position: absolute; width: 14%; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.3)); }
.slide .c1 { left: 9%;  top: 22%; rotate: -16deg; }
.slide .c2 { left: 21%; top: 14%; rotate: -6deg; }
.slide .c3 { left: 4%;  top: 52%; rotate: -28deg; width: 12%; }
.slide .c4 { right: 20%; top: 13%; rotate: 8deg; }
.slide .c5 { right: 7%;  top: 28%; rotate: 18deg; }
.slide .c6 { right: 12%; top: 54%; rotate: 32deg; width: 12%; }

.slide-caption {
    position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 1;
    display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 16px; border-radius: 24px;
    background: rgba(8, 14, 11, 0.5); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
@media (prefers-reduced-transparency: reduce) { .slide-caption { background: rgba(8, 14, 11, 0.88); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.slide-caption .icon { width: 56px; height: 56px; border-radius: 13px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.slide-caption .text { flex: 1; min-width: 0; }
.slide-caption h2 { font-size: 1.55rem; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 2px; color: #fff; }
.slide-caption p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 1rem; line-height: 1.4; }
.slide-caption .button { flex: none; min-height: 48px; }
.slide-caption .chip { flex: none; }

@media (max-width: 760px) {
    .carousel-bar { top: 10px; left: 10px; right: 10px; gap: 2px; }
    .slide-nav-btn { width: 38px; height: 38px; }
    .slide { aspect-ratio: 4 / 5.4; border-radius: 28px; }
    .slide .phone { width: 58%; top: 13%; }
    .slide .prop { width: 26%; }
    .slide .c2, .slide .c4 { display: none; }
    .slide .c1 { left: -5%; top: 20%; }
    .slide .c5 { right: -5%; top: 24%; }
    .slide .c3 { left: -3%; top: 44%; width: 23%; }
    .slide .c6 { right: -3%; top: 46%; width: 23%; }
    .slide-caption { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; gap: 12px; padding: 14px; }
    .slide-caption .icon { width: 48px; height: 48px; }
    .slide-caption .text { flex: 1 1 calc(100% - 64px); }
    .slide-caption h2 { font-size: 1.35rem; }
    .slide-caption .chip { display: none; }
    .slide-caption .button { width: 100%; }
}

/* ---------- Vision ---------- */

.vision-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.vision-grid .sticky { position: sticky; top: 112px; }
.beliefs { counter-reset: belief; }
.belief { padding: 36px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; gap: 0 16px; }
.belief:last-child { border-bottom: 1px solid var(--line); }
.belief::before {
    counter-increment: belief; content: counter(belief, decimal-leading-zero);
    font-family: var(--serif); font-size: 1rem; color: var(--gold); padding-top: 0.35em; font-feature-settings: "tnum";
}
.belief h3 { font-size: 1.6rem; margin-bottom: 0.4em; }
.belief p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) {
    .vision-grid { grid-template-columns: 1fr; }
    .vision-grid .sticky { position: static; }
}

.quote-section { padding-top: 0; }
.quote {
    margin: 0 auto; max-width: 58rem; text-align: center;
    font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.15; letter-spacing: -0.025em;
}
.quote em { color: var(--felt-ink); }
.quote-mark { display: flex; justify-content: center; gap: 10px; margin-bottom: 36px; font-size: 1.3rem; font-family: var(--serif); }
.quote-mark span:nth-child(even) { color: var(--card-red); }

/* ---------- Apps grid ---------- */

.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
    --a: #23864f; --b: #1a6b3d; --c: #0c3f23;
    position: relative; overflow: hidden; border-radius: 32px; isolation: isolate;
    display: flex; flex-direction: column; min-height: 340px; padding: 32px;
    text-decoration: none; color: #fff;
    background: radial-gradient(110% 90% at 100% 110%, var(--a), var(--b) 50%, var(--c));
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.tile .icon { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 24px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15); }
.tile h3 { font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 0.3em; color: #fff; }
.tile p { color: rgba(255, 255, 255, 0.8); margin-bottom: 1.5rem; flex: 1; }
.tile .tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tile .more { font-weight: 600; color: #fff; }
.tile .more::after { content: "\2192"; display: inline-block; margin-left: 6px; transition: transform 0.3s var(--ease); }
.tile:hover .more::after { transform: translateX(4px); }
.tile .ghost {
    position: absolute; right: -24px; bottom: -40px; width: 180px; opacity: 0.12; z-index: -1; rotate: -12deg;
    transition: rotate 0.6s var(--ease), opacity 0.4s var(--ease);
}
.tile:hover .ghost { rotate: -4deg; opacity: 0.18; }
/* Twenty apps: a wide first tile fills three columns evenly (2+1, then rows of 3); two columns also need a wide last tile. */
.app-grid .tile:first-child { grid-column: span 2; }
@media (max-width: 960px) { .app-grid { grid-template-columns: 1fr 1fr; } .app-grid .tile:last-child { grid-column: span 2; } }
@media (max-width: 620px) { .app-grid { grid-template-columns: 1fr; } .app-grid .tile:first-child, .app-grid .tile:last-child { grid-column: auto; } .tile { min-height: 0; } }

/* ---------- Roadmap ---------- */

.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.roadmap::before {
    content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px;
    background: linear-gradient(90deg, var(--felt-ink), var(--line-strong) 40%, transparent);
}
.stop { position: relative; padding: 44px 32px 0 0; }
.stop::before {
    content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%;
    background: var(--paper-deep); border: 2px solid var(--line-strong);
}
.stop.now::before { background: var(--felt); border-color: var(--felt); box-shadow: 0 0 0 6px color-mix(in srgb, var(--felt) 18%, transparent); }
.stop .when { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.stop.now .when { color: var(--felt-ink); }
.stop h3 { margin: 12px 0 0.4em; font-size: 1.5rem; }
.stop p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }
@media (max-width: 900px) {
    .roadmap { grid-template-columns: 1fr; gap: 36px; padding-left: 36px; }
    .roadmap::before { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto;
        background: linear-gradient(180deg, var(--felt-ink), var(--line-strong) 40%, transparent); }
    .stop { padding: 0; }
    .stop::before { left: -36px; top: 4px; }
}

/* ---------- Studio ---------- */

#studio { padding-top: clamp(32px, 4.8vw, 64px); }
.studio { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.studio .body p { font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.6; }
.studio .body p:first-child { color: var(--ink); }
.signature { display: flex; align-items: center; gap: 14px; margin-top: 2rem; color: var(--ink-soft); font-size: 0.98rem; }
.signature img { width: 40px; height: 40px; }
@media (max-width: 860px) { .studio { grid-template-columns: 1fr; } }

/* ---------- Closing call to action ---------- */

.closing { padding-top: 0; }
.closing-panel {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); text-align: center; color: #fff;
    padding: clamp(72px, 10vw, 136px) var(--gutter);
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px),
        radial-gradient(70% 100% at 50% 0%, #23864f, var(--felt) 35%, var(--felt-deep) 75%, var(--felt-night));
    box-shadow: var(--shadow-lg);
}
.closing-panel h2 { color: #fff; font-size: clamp(2.6rem, 6vw, 5rem); }
.closing-panel h2 em { color: var(--gold-light); font-weight: 500; }
.closing-panel .lede { color: var(--on-dark-soft); margin-inline: auto; }
.closing-panel .actions { justify-content: center; }
.closing-panel .card { position: absolute; width: clamp(90px, 12vw, 150px); filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.35)); opacity: 0.95; }
.closing-panel .k1 { left: -2%; bottom: -12%; rotate: 18deg; }
.closing-panel .k2 { right: -1%; top: -10%; rotate: -24deg; }
@media (max-width: 700px) { .closing-panel .card { display: none; } }

/* ---------- Product pages ---------- */

.product-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.product-hero::before {
    content: ""; position: absolute; inset: -30% -10% auto; height: 800px; pointer-events: none;
    background: radial-gradient(40% 50% at 70% 30%, color-mix(in srgb, var(--accent, var(--felt)) 18%, transparent), transparent 70%);
}
.product-hero .wrap { position: relative; }
.product-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.product-title { display: flex; align-items: center; gap: 18px; margin-bottom: 2rem; }
.product-title .icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: var(--shadow-lg); flex: none; }
.product-hero h1 { font-size: clamp(3rem, 7vw, 6rem); }
.product-hero h1 em { color: var(--accent-ink, var(--felt-ink)); font-weight: 500; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .product-hero h1 em { color: var(--accent-ink-dark, var(--accent-ink, var(--felt-ink))); }
}
:root[data-theme="dark"] .product-hero h1 em { color: var(--accent-ink-dark, var(--accent-ink, var(--felt-ink))); }
.showcase {
    position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 4.6;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px),
        var(--showcase, radial-gradient(70% 90% at 50% 20%, #23864f, var(--felt) 40%, var(--felt-deep) 80%, var(--felt-night)));
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.showcase .phone { position: absolute; left: 50%; top: 10%; width: 62%; translate: -50% 0; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.45)); }
.showcase .card { position: absolute; width: 26%; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.3)); }
.showcase .s1 { left: -4%; top: 44%; rotate: -18deg; }
.showcase .s2 { right: -5%; top: 20%; rotate: 16deg; }
@media (max-width: 900px) {
    .product-grid { grid-template-columns: 1fr; }
    .showcase { max-width: 520px; }
}

.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.game {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.game:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.game .suit { font-size: 1.7rem; line-height: 1; margin-bottom: 22px; display: block; font-family: var(--serif); }
.game .suit.red { color: var(--card-red); }
.game::after {
    content: attr(data-suit); position: absolute; right: -10px; bottom: -44px;
    font-family: var(--serif); font-size: 9rem; line-height: 1; opacity: 0.045; pointer-events: none;
}
.game h3 { margin-bottom: 0.35em; font-size: 1.6rem; }
.game p { margin: 0; color: var(--ink-soft); font-size: 1.04rem; }
@media (max-width: 960px) { .games { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .games { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 40px 36px 40px 0; border-bottom: 1px solid var(--line); }
.feature:not(:nth-child(3n + 1)) { padding-left: 36px; border-left: 1px solid var(--line); }
.feature svg { width: 32px; height: 32px; stroke: var(--felt-ink); margin-bottom: 20px; }
.feature h3 { font-size: 1.25rem; font-family: var(--sans); letter-spacing: -0.01em; font-weight: 650; margin-bottom: 0.45em; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 1.04rem; }
@media (max-width: 900px) {
    .features { grid-template-columns: 1fr 1fr; }
    .feature, .feature:not(:nth-child(3n + 1)) { padding: 36px 24px 36px 0; border-left: 0; }
    .feature:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 600px) {
    .features { grid-template-columns: 1fr; }
    .feature:nth-child(even) { padding-left: 0; border-left: 0; }
}

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: clamp(32px, 4vw, 48px); box-shadow: var(--shadow-sm); }
.plan.pro {
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(232, 204, 143, 0.18), transparent 60%),
        linear-gradient(160deg, #13301f, #0a1f13);
    color: var(--on-dark); border-color: rgba(232, 204, 143, 0.35); box-shadow: var(--shadow-lg);
}
.plan .plan-name { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--felt-ink); }
.plan.pro .plan-name { color: var(--gold-light); }
.plan .price { font-family: var(--serif); font-size: clamp(2.6rem, 4vw, 3.4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin: 12px 0 6px; }
.plan .price-note { color: var(--ink-soft); margin: 0; }
.plan.pro .price, .plan.pro h3 { color: #fff; }
.plan.pro .price-note, .plan.pro li { color: var(--on-dark-soft); }
.plan ul { list-style: none; padding: 0; margin: 28px 0 0; }
.plan li { padding: 14px 0 14px 36px; border-top: 1px solid var(--line); position: relative; }
.plan.pro li { border-color: rgba(255, 255, 255, 0.1); }
.plan li::before {
    content: ""; position: absolute; left: 4px; top: 21px; width: 14px; height: 8px;
    border-left: 2.5px solid var(--felt-ink); border-bottom: 2.5px solid var(--felt-ink); transform: rotate(-45deg);
}
.plan.pro li::before { border-color: var(--gold-light); }
.plan .note { margin: 28px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold-light); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

.privacy-card {
    display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: clamp(32px, 4vw, 48px);
    max-width: 1040px; margin: 0 auto; box-shadow: var(--shadow-sm);
}
.privacy-card .seal {
    width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--felt) 26%, transparent), color-mix(in srgb, var(--felt) 10%, transparent));
}
.privacy-card .seal svg { width: 44px; height: 44px; stroke: var(--felt-ink); }
.privacy-card h3 { font-size: 1.9rem; margin-bottom: 0.3em; }
.privacy-card p { margin: 0; color: var(--ink-soft); }
@media (max-width: 760px) { .privacy-card { grid-template-columns: 1fr; } }

/* Product page section bar, sticky under the site header. */
.subnav {
    position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 9;
    background: color-mix(in srgb, var(--paper) 84%, transparent);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-transparency: reduce) { .subnav { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.subnav .wrap { display: flex; align-items: center; gap: 24px; min-height: 52px; }
.subnav-title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; flex: none; }
.subnav-title img { width: 26px; height: 26px; border-radius: 7px; }
.subnav-links { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.subnav-links::-webkit-scrollbar { display: none; }
.subnav-links a {
    color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; white-space: nowrap;
    padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px;
}
.subnav-links a:hover { color: var(--ink); }
[id] { scroll-margin-top: 132px; }
@media (max-width: 760px) {
    .subnav .wrap { gap: 12px; }
    .subnav-title span { display: none; }
    .subnav-links { margin-left: 0; }
}

.plan-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 1.75rem; color: var(--ink-faint); font-size: 0.95rem; max-width: 34em; }
.plan-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; stroke: var(--ink-faint); }

.glance { padding: 0 0 clamp(64px, 9vw, 112px); }
.glance-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.glance-item { padding: 28px 24px; border-left: 1px solid var(--line); }
.glance-item:first-child { border-left: 0; padding-left: 0; }
.glance-item dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.glance-item dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
@media (max-width: 900px) {
    .glance-grid { grid-template-columns: 1fr 1fr; }
    .glance-item, .glance-item:first-child { padding: 22px 16px 22px 0; border-left: 0; border-top: 1px solid var(--line); }
    .glance-item:nth-child(-n + 2) { border-top: 0; }
    .glance-item:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
}

.screens {
    --a: #23864f; --b: #1a6b3d; --c: #0c3f23; --d: #082b18;
    color: #fff; overflow: hidden;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px),
        radial-gradient(70% 90% at 50% 0%, var(--a), var(--b) 40%, var(--c) 80%, var(--d));
}
.screens .eyebrow { color: rgba(255, 255, 255, 0.75); }
.screens h2 { color: #fff; }
.screens .lede { color: rgba(255, 255, 255, 0.78); }
.gallery {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: clamp(20px, 3vw, 40px);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; max-width: 300px; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.4)); }
.gallery figcaption { text-align: center; margin: 22px auto 0; max-width: 18em; color: rgba(255, 255, 255, 0.85); font-size: 1rem; line-height: 1.45; }
.gallery-note { margin: 40px 0 0; text-align: center; font-size: 0.92rem; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 760px) { .gallery { grid-auto-columns: 68%; } }

.faq-section .faq { max-width: 50rem; margin: 0 auto; }

/* ---------- Prose pages (privacy, support) ---------- */

.page-hero { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
.prose-section { padding-top: 0; }
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -0.02em; margin-top: 2.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose .updated { color: var(--ink-faint); font-size: 0.95rem; }
.summary-card {
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--felt); border-radius: 20px;
    padding: 28px 32px; box-shadow: var(--shadow-sm); font-size: 1.2rem; margin-bottom: 1rem;
}
.summary-card p:last-child { margin: 0; }

.support-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 32px;
    padding: clamp(32px, 4vw, 44px); box-shadow: var(--shadow-sm); position: sticky; top: 112px;
}
.contact-card h2 { font-size: 2rem; }
.contact-card .button { margin-top: 0.5rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
    cursor: pointer; list-style: none; padding: 26px 48px 26px 0; position: relative;
    font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; position: absolute; right: 6px; top: 50%; translate: 0 -50%;
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--paper-deep); font-size: 1.3rem; font-weight: 400; color: var(--ink-soft);
    transition: rotate 0.25s var(--ease);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--ink-soft); padding-right: 48px; }
@media (max-width: 860px) {
    .support-grid { grid-template-columns: 1fr; }
    .contact-card { position: static; }
}

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

.site-footer { border-top: 1px solid var(--line); padding: 72px 0 0; font-size: 1rem; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 3fr 0.8fr; gap: 40px; }
.footer-grid > :nth-child(2) ul { display: grid; grid-template-columns: repeat(4, max-content); column-gap: 36px; }
.footer-grid h4 {
    margin: 0 0 16px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }
.footer-promise { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--ink); margin: 0; max-width: 20em; }
.footer-legal {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
    margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 0.9rem;
}
.wordmark {
    font-family: var(--serif); font-weight: 600; letter-spacing: -0.045em; line-height: 0.8;
    font-size: clamp(3rem, 7.2vw, 6.75rem); white-space: nowrap; text-align: center;
    margin: 48px 0 0; padding-bottom: 0.06em;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 14%, transparent), transparent 95%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    user-select: none;
}
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 3fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-grid > :nth-child(2) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
    .wordmark { white-space: normal; font-size: 3rem; line-height: 0.9; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
    .rise { animation: rise 0.9s var(--ease) both; }
    .rise.d1 { animation-delay: 0.08s; }
    .rise.d2 { animation-delay: 0.16s; }
    .rise.d3 { animation-delay: 0.26s; }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } }

    .float { animation: float 7s ease-in-out infinite alternate; }
    .float.f2 { animation-duration: 8s; animation-delay: -2s; }
    .float.f3 { animation-duration: 9s; animation-delay: -4s; }
    @keyframes float { to { translate: 0 -12px; } }

    @supports (animation-timeline: view()) {
        .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
        @keyframes reveal { from { opacity: 0; transform: translateY(32px); } }
    }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
