/* =========================================================
   Nookab — landing page
   Light (cream) + dark (near-black) themes via [data-theme]
   ========================================================= */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

    --radius: 22px;
    --radius-lg: 32px;
    --container: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --nav-h: 72px;

    /* light theme (default) */
    --bg: #f5f0eb;
    --bg-2: #ede8e2;
    --surface: #ffffff;
    --surface-2: #faf7f3;
    --text: #141a16;
    --text-2: #4b544e;
    --muted: #7d847e;
    --line: rgba(20, 26, 22, .09);
    --line-2: rgba(20, 26, 22, .16);
    --brand: #2d5a27;
    --brand-deep: #0c4429;
    --brand-ink: #ffffff;
    --accent: #2d5a27;
    --accent-soft: #e4f0e1;
    --glow-1: rgba(77, 140, 66, .28);
    --glow-2: rgba(156, 178, 168, .45);
    --der: #2563eb;
    --die: #db2777;
    --das: #059669;
    --weak: #dc2626;
    --learn: #f59e0b;
    --practice: #3b82f6;
    --mastered: #0891b2;
    --shadow-sm: 0 1px 2px rgba(20, 26, 22, .06), 0 4px 14px -6px rgba(20, 26, 22, .12);
    --shadow-md: 0 2px 4px rgba(20, 26, 22, .04), 0 18px 40px -18px rgba(20, 26, 22, .22);
    --shadow-lg: 0 40px 90px -30px rgba(20, 40, 25, .4), 0 20px 40px -24px rgba(20, 26, 22, .25);
    --nav-bg: rgba(245, 240, 235, .72);
    --grain-opacity: .05;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #070a08;
    --bg-2: #0c110e;
    --surface: #111713;
    --surface-2: #161e19;
    --text: #edf2ee;
    --text-2: #b3bdb6;
    --muted: #7b877f;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .15);
    --brand: #a6dc9b;
    --brand-deep: #0c4429;
    --brand-ink: #08160b;
    --accent: #a6dc9b;
    --accent-soft: rgba(166, 220, 155, .1);
    --glow-1: rgba(78, 160, 90, .25);
    --glow-2: rgba(30, 90, 60, .35);
    --der: #60a5fa;
    --die: #f472b6;
    --das: #34d399;
    --weak: #f87171;
    --learn: #fbbf24;
    --practice: #60a5fa;
    --mastered: #22d3ee;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px -6px rgba(0, 0, 0, .5);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
    --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 20px 40px -24px rgba(0, 0, 0, .6);
    --nav-bg: rgba(7, 10, 8, .66);
    --grain-opacity: .07;
    color-scheme: dark;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

html:not(.lenis) {
    scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
    height: auto;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    transition: background-color .5s ease, color .5s ease;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

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

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

.i {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--brand);
    color: var(--brand-ink);
    font-weight: 600;
}

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

.grain {
    position: fixed;
    inset: -50%;
    z-index: 999;
    pointer-events: none;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 200;
    background: linear-gradient(90deg, var(--das), var(--accent), var(--der));
    transform-origin: 0 50%;
    transform: scaleX(var(--sp, 0));
}

/* ---------- type ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 1.5px;
    background: currentColor;
    opacity: .6;
}

.eyebrow.center,
.center .eyebrow {
    justify-content: center;
}

.hero-eyebrow::before {
    display: none;
}

.section-head {
    max-width: 760px;
    margin-bottom: clamp(48px, 7vw, 88px);
}

.section-head.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.3rem, 5.4vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -.035em;
    font-variation-settings: 'opsz' 96;
}

.serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -.01em;
    color: var(--accent);
}

.section-lead {
    margin-top: 22px;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--text-2);
    max-width: 620px;
}

.center .section-lead {
    margin-left: auto;
    margin-right: auto;
}

.section-lead a {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
}

.t-der {
    color: var(--der);
    font-weight: 700;
}

.t-die {
    color: var(--die);
    font-weight: 700;
}

.t-das {
    color: var(--das);
    font-weight: 700;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    transition: transform .35s var(--ease-out), background-color .3s, box-shadow .35s, color .3s;
    white-space: nowrap;
}

.btn-sm {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.btn-primary {
    background: var(--brand);
    color: var(--brand-ink);
    box-shadow: 0 8px 24px -10px var(--glow-1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px var(--glow-1);
}

.btn-ghost {
    padding-left: 8px;
    color: var(--text);
}

.btn-ghost:hover .play-ring {
    transform: scale(1.08);
    background: var(--brand);
    color: var(--brand-ink);
}

.play-ring {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    color: var(--accent);
    transition: transform .4s var(--ease-spring), background-color .3s, color .3s;
}

.play-ring .i {
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

.play-badge {
    display: inline-block;
    border-radius: 9px;
    background: #000;
    transition: transform .35s var(--ease-out), filter .35s;
}

.play-badge img {
    height: 54px;
    width: auto;
}

.play-badge:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .25));
}

.play-badge-lg img {
    height: 64px;
}

.pill {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---------- nav ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px var(--gutter);
    transition: padding .4s var(--ease-out), transform .45s var(--ease-out);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    height: 56px;
    padding: 0 10px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color .4s, border-color .4s, box-shadow .4s, backdrop-filter .4s;
}

.nav.is-scrolled .nav-inner {
    background: var(--nav-bg);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
}

.nav.is-hidden {
    transform: translateY(-110%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand-deep);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.brand-mark svg {
    width: 26px;
    height: 26px;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-2);
    transition: color .25s, background-color .25s;
}

.nav-links a:hover,
.nav-links a.is-current {
    color: var(--text);
    background: var(--line);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.menu-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text);
    transition: background-color .25s;
}

.theme-toggle:hover,
.menu-btn:hover {
    background: var(--line);
}

.theme-toggle .i {
    position: absolute;
    width: 19px;
    height: 19px;
    transition: transform .6s var(--ease-spring), opacity .3s;
}

.theme-toggle .i-moon,
:root[data-theme="dark"] .theme-toggle .i-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(.5);
}

:root[data-theme="dark"] .theme-toggle .i-moon {
    opacity: 1;
    transform: none;
}

.menu-btn {
    display: none;
}

.menu-btn .i-close {
    display: none;
}

.menu-btn[aria-expanded="true"] .i-open {
    display: none;
}

.menu-btn[aria-expanded="true"] .i-close {
    display: block;
}

/* ---------- phone mockup ---------- */
.phone {
    --pw: 300px;
    position: relative;
    width: var(--pw);
    flex-shrink: 0;
    transform-style: preserve-3d;
}

.phone-body {
    position: relative;
    padding: calc(var(--pw) * .032);
    border-radius: calc(var(--pw) * .155);
    background: linear-gradient(150deg, #3a403c 0%, #121513 40%, #0a0b0a 100%);
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 255, 255, .14),
        inset 0 0 0 3px #050605,
        var(--shadow-lg);
}

.phone-body::before,
.phone-body::after {
    content: '';
    position: absolute;
    right: -2.5px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, #1b1f1c, #3a403c);
}

.phone-body::before {
    top: 20%;
    height: 9%;
}

.phone-body::after {
    top: 32%;
    height: 14%;
}

.phone-screen {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--pw) * .125);
    aspect-ratio: 600 / 1303;
    background: #f5f0eb;
    transform: translateZ(1px);
}

.phone-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 32%);
    mix-blend-mode: screen;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3D thickness slices (added by JS) */
.phone-slice {
    position: absolute;
    inset: 0;
    border-radius: calc(var(--pw) * .155);
    background: #0d0f0e;
    transform: translateZ(calc(var(--z) * -1px));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    pointer-events: none;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--nav-h) + 48px) 0 80px;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.blob-1 {
    width: 46vw;
    height: 46vw;
    max-width: 720px;
    max-height: 720px;
    right: -8vw;
    top: -6vw;
    background: radial-gradient(circle, var(--glow-1), transparent 65%);
    animation: drift 18s ease-in-out infinite alternate;
}

.blob-2 {
    width: 38vw;
    height: 38vw;
    max-width: 560px;
    max-height: 560px;
    left: -10vw;
    bottom: -12vw;
    background: radial-gradient(circle, var(--glow-2), transparent 65%);
    animation: drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    to {
        transform: translate(6vw, 4vw) scale(1.15);
    }
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 0%, transparent 75%);
    opacity: .7;
}

.glyph {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--text);
    opacity: .05;
    line-height: 1;
    user-select: none;
    animation: bob-t 9s ease-in-out infinite alternate;
}

:root[data-theme="dark"] .glyph {
    opacity: .06;
}

.g1 { left: 6%; top: 18%; font-size: 120px; }
.g2 { left: 38%; top: 9%; font-size: 64px; animation-delay: -2s; }
.g3 { left: 47%; bottom: 14%; font-size: 150px; animation-delay: -4s; }
.g4 { right: 4%; top: 62%; font-size: 80px; animation-delay: -1s; }
.g5 { left: 22%; bottom: 6%; font-size: 90px; animation-delay: -6s; }
.g6 { right: 30%; top: 4%; font-size: 52px; animation-delay: -3s; }
.g7 { right: 8%; bottom: 4%; font-size: 70px; animation-delay: -5s; }

@keyframes bob-t {
    to {
        transform: translateY(-24px) rotate(6deg);
    }
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 24px;
}

.hero-eyebrow {
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    letter-spacing: .02em;
    text-transform: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 26px;
}

.pulse-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--das);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--das);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 750;
    font-size: clamp(3rem, 6.6vw, 6.4rem);
    line-height: .95;
    letter-spacing: -.035em;
    font-variation-settings: 'opsz' 96;
}

.hero-title .line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    padding-bottom: .06em;
    margin-bottom: -.06em;
}

.hero-title .line-inner {
    display: block;
}

.hero-title .serif {
    font-size: 1.08em;
    letter-spacing: -.02em;
    padding-right: .06em;
}

.hero-sub {
    margin-top: 28px;
    max-width: 520px;
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    color: var(--text-2);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 36px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 34px;
    list-style: none;
    font-size: 14.5px;
    color: var(--text-2);
}

.hero-proof li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-proof .i {
    width: 18px;
    height: 18px;
    padding: 3px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    stroke-width: 3;
}

/* hero intro (pure CSS, so it never depends on JS) */
html.js .hero-title .line-inner {
    animation: line-up 1.1s var(--ease-out) both;
}

html.js .hero-title .line:nth-child(2) .line-inner {
    animation-delay: .1s;
}

html.js [data-intro] {
    animation: fade-up 1s var(--ease-out) both;
}

html.js .hero-eyebrow { animation-delay: .05s; }
html.js .hero-sub { animation-delay: .3s; }
html.js .hero-cta { animation-delay: .42s; }
html.js .hero-proof { animation-delay: .54s; }

@keyframes line-up {
    from {
        transform: translateY(105%) rotate(3deg);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* hero stage (3D) */
.hero-stage {
    position: relative;
    height: min(720px, 82vh);
    perspective: 1600px;
    perspective-origin: 50% 40%;
}

.stage-tilt {
    --rx: 8deg;
    --ry: -18deg;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 1.2s var(--ease-out);
}

.phone-hero {
    --pw: min(310px, 30vw);
}

html.js .phone-hero {
    animation: phone-in 1.6s .15s var(--ease-out) both;
}

@keyframes phone-in {
    from {
        opacity: 0;
        transform: translateY(120px) rotateX(35deg) rotateZ(-6deg);
    }
}

.word-card {
    position: absolute;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 2px;
    min-width: 200px;
    padding: 14px 18px 14px 20px;
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    font-family: var(--font-display);
    overflow: hidden;
}

.word-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--card-c, #7c3aed);
}

.word-card.is-der { --card-c: var(--der); }
.word-card.is-die { --card-c: var(--die); }
.word-card.is-das { --card-c: var(--das); }

.wc-article {
    font-weight: 700;
    font-size: 15px;
    color: var(--card-c);
}

.wc-word {
    font-weight: 700;
    font-size: 23px;
    letter-spacing: -.02em;
}

.word-card:not([class*="is-"]) .wc-word {
    grid-column: 1 / 3;
}

.wc-tag {
    justify-self: end;
    align-self: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--das);
    background: color-mix(in srgb, var(--das) 13%, transparent);
}

.wc-tag.tag-verb {
    color: #7c3aed;
    background: color-mix(in srgb, #7c3aed 13%, transparent);
}

.wc-trans {
    grid-column: 1 / -1;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--muted);
}

.wc-1 { left: 0; top: 14%; translate: 0 0 70px; }
.wc-2 { right: -2%; top: 30%; translate: 0 0 40px; }
.wc-3 { left: 4%; bottom: 22%; translate: 0 0 90px; }
.wc-4 { right: 2%; bottom: 8%; translate: 0 0 55px; }

.chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    font-weight: 700;
    font-size: 14.5px;
}

.chip-mastered {
    right: 10%;
    top: 6%;
    color: var(--mastered);
    translate: 0 0 110px;
}

.chip-streak {
    left: 14%;
    bottom: 4%;
    translate: 0 0 80px;
}

.chip-streak .i {
    color: #f59e0b;
    fill: #f59e0b;
}

html.js .word-card,
html.js .chip {
    animation: card-in 1s var(--ease-spring) both, bob 6s ease-in-out infinite alternate;
}

html.js .wc-1 { animation-delay: .7s, 1.7s; }
html.js .wc-2 { animation-delay: .82s, 2.4s; }
html.js .wc-3 { animation-delay: .94s, 1.9s; }
html.js .wc-4 { animation-delay: 1.06s, 2.8s; }
html.js .chip-mastered { animation-delay: 1.2s, 2.2s; }
html.js .chip-streak { animation-delay: 1.3s, 3s; }

@keyframes card-in {
    from {
        opacity: 0;
        transform: scale(.6) translateY(30px);
    }
}

@keyframes bob {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-14px);
    }
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border-radius: 999px;
    border: 1.5px solid var(--line-2);
}

.scroll-cue span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 4px;
    background: var(--text-2);
    animation: cue 1.8s var(--ease-out) infinite;
}

@keyframes cue {
    to {
        transform: translateY(14px);
        opacity: 0;
    }
}

/* ---------- marquee ---------- */
.marquee-section {
    position: relative;
    padding: 40px 0 20px;
    overflow: hidden;
}

.marquee {
    --skew: 0deg;
    display: flex;
    overflow: hidden;
    padding: 14px 0;
    transform: rotate(-2deg) skewX(var(--skew));
    border-block: 1px solid var(--line);
    background: var(--surface);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-alt {
    transform: rotate(1.2deg) skewX(var(--skew));
    margin-top: -6px;
    background: var(--bg-2);
}

.marquee-track {
    display: flex;
    flex-shrink: 0;
    animation: marquee 48s linear infinite;
}

.marquee-alt .marquee-track {
    animation-direction: reverse;
    animation-duration: 56s;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

.mw {
    display: inline-flex;
    align-items: baseline;
    gap: .3em;
    padding: 0 28px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.6vw, 2.8rem);
    letter-spacing: -.03em;
    white-space: nowrap;
    color: var(--text);
}

.mw::after {
    content: '✦';
    margin-left: 56px;
    font-size: .45em;
    color: var(--muted);
    align-self: center;
}

.mw b {
    font-weight: 700;
}

.mw.der b { color: var(--der); }
.mw.die b { color: var(--die); }
.mw.das b { color: var(--das); }

.mw .flag {
    align-self: center;
    width: .78em;
    height: .52em;
    margin-right: .18em;
    border-radius: 4px;
}

/* English words: the eye-catcher of the band */
.mw.en {
    color: var(--accent);
}

/* German words without an article */
.mw.de {
    color: var(--text-2);
}

/* ---------- manifesto ---------- */
.manifesto {
    padding: clamp(110px, 16vw, 200px) 0;
    text-align: center;
}

.manifesto-text {
    max-width: 1000px;
    margin: 0 auto;
    font-family: var(--font-display);
    font-weight: 650;
    font-size: clamp(1.8rem, 4.2vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -.03em;
}

.manifesto-text .w {
    opacity: var(--o, 1);
    transition: opacity .15s linear;
}

.manifesto-text .w.hl {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

/* ---------- how it works ---------- */
.how {
    padding: clamp(60px, 10vw, 120px) 0;
}

.how-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.how-step {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    opacity: .28;
    transition: opacity .6s var(--ease-out);
}

.how-step:first-child {
    min-height: 60vh;
    justify-content: flex-start;
}

.how-step.is-active {
    opacity: 1;
}

.step-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 64px;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 16px;
}

.how-step h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-bottom: 16px;
}

.how-step p {
    color: var(--text-2);
    font-size: 1.1rem;
}

.how-step strong {
    color: var(--text);
}

.how-inline-shot {
    display: none;
}

.how-sticky {
    position: relative;
}

.how-phone-wrap {
    position: sticky;
    top: calc(50vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    height: 600px;
    perspective: 1400px;
}

.how-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-1), transparent 65%);
    filter: blur(30px);
}

.phone-how {
    --pw: 270px;
    transform: rotateY(-10deg) rotateX(4deg);
    transition: transform 1s var(--ease-out);
}

.how-phone-wrap:hover .phone-how {
    transform: rotateY(0) rotateX(0);
}

.screen-stack img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
}

.screen-stack img.is-active {
    opacity: 1;
    transform: none;
}

.how-dots {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.how-dots li {
    width: 6px;
    height: 6px;
    border-radius: 6px;
    background: var(--line-2);
    transition: height .5s var(--ease-out), background-color .4s;
}

.how-dots li.is-active {
    height: 28px;
    background: var(--accent);
}

/* ---------- articles / flip cards ---------- */
.articles {
    padding: clamp(80px, 12vw, 160px) 0;
}

.flip-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2.5vw, 32px);
    perspective: 1600px;
}

.flip-card {
    position: relative;
    aspect-ratio: 4 / 4.6;
    text-align: left;
    cursor: pointer;
}

.flip-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 1s var(--ease-out);
}

.flip-card:hover .flip-inner {
    transform: rotateY(-8deg) rotateX(4deg);
}

.flip-card.is-flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 3vw, 36px);
    border-radius: var(--radius-lg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
}

.flip-front {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.flip-front::before {
    content: '';
    position: absolute;
    right: -30%;
    bottom: -30%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--card-c) 22%, transparent), transparent 70%);
}

.flip-card.is-der { --card-c: var(--der); }
.flip-card.is-die { --card-c: var(--die); }
.flip-card.is-das { --card-c: var(--das); }

.fc-article {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    color: var(--card-c);
}

.fc-word {
    margin-top: auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    letter-spacing: -.03em;
    line-height: 1;
}

.fc-tag {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.flip-back {
    transform: rotateY(180deg);
    background: linear-gradient(150deg, var(--card-c), color-mix(in srgb, var(--card-c) 60%, #000));
    color: #fff;
    justify-content: flex-end;
    gap: 6px;
    box-shadow: var(--shadow-lg);
}

.fc-trans {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    letter-spacing: -.03em;
    margin-bottom: auto;
}

.fc-meta {
    font-size: 14px;
    opacity: .85;
}

.fc-meta b {
    font-weight: 700;
    opacity: 1;
}

.articles-extra {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: clamp(40px, 6vw, 72px);
}

.mini-feature {
    display: flex;
    gap: 14px;
    color: var(--text-2);
    font-size: 15.5px;
}

.mini-feature b {
    color: var(--text);
}

.mini-feature .i {
    width: 40px;
    height: 40px;
    padding: 9px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------- practice (horizontal) ---------- */
.practice {
    position: relative;
    background: var(--bg-2);
    border-block: 1px solid var(--line);
}

.practice-pin {
    overflow-x: auto;
    scrollbar-width: none;
}

.practice-pin::-webkit-scrollbar {
    display: none;
}

.practice-pin.is-pinned {
    overflow: hidden;
}

.practice-track {
    display: flex;
    width: max-content;
}

.practice-panel {
    flex-shrink: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 20px) var(--gutter) 40px;
}

.practice-intro {
    width: min(560px, 46vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
    box-sizing: content-box;
}

.practice-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    font-weight: 600;
    color: var(--muted);
}

.practice-hint .i {
    animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
    50% {
        transform: translateX(6px);
    }
}

.mode-panel {
    width: 100vw;
    display: grid;
    grid-template-columns: minmax(0, 460px) auto;
    justify-content: center;
    gap: clamp(40px, 8vw, 140px);
    position: relative;
}

.mode-panel::before {
    content: '';
    position: absolute;
    right: 8%;
    top: 50%;
    width: 520px;
    height: 520px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--mode) 22%, transparent), transparent 65%);
    pointer-events: none;
}

.mode-copy {
    max-width: 440px;
    position: relative;
}

.mode-num {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(5rem, 11vw, 9rem);
    line-height: .85;
    letter-spacing: -.05em;
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--mode) 70%, transparent);
    margin-bottom: 20px;
}

.mode-copy h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    letter-spacing: -.035em;
    line-height: 1;
}

.mode-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    color: var(--mode);
    margin: 8px 0 18px;
}

.mode-copy p:not(.mode-tagline) {
    color: var(--text-2);
    font-size: 1.08rem;
}

.mode-points {
    display: inline-block;
    margin-top: 26px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    color: var(--mode);
    background: color-mix(in srgb, var(--mode) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--mode) 30%, transparent);
}

.mode-visual {
    perspective: 1400px;
}

.phone-mode {
    --pw: min(290px, 26vw);
    transform: rotateY(-16deg) rotateX(6deg) rotateZ(1deg);
    transition: transform 1s var(--ease-out);
}

.mode-panel:hover .phone-mode {
    transform: rotateY(-4deg) rotateX(2deg);
}

/* ---------- mastery ---------- */
.mastery {
    padding: clamp(100px, 14vw, 180px) 0;
}

.meter-card {
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.meter {
    position: relative;
    padding-top: 54px;
}

.meter-track {
    position: relative;
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-2);
}

.meter-zone {
    height: 100%;
    opacity: .22;
}

.z-learn { width: 40%; background: var(--learn); }
.z-practice { width: 50%; background: var(--practice); }
.z-master { width: 10%; background: var(--mastered); }

.meter-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: calc(var(--p) * 1%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--learn) 0%, var(--practice) 55%, var(--mastered) 100%);
    background-size: calc(10000% / max(var(--p), 1)) 100%;
}

.meter-thumb {
    position: absolute;
    top: 0;
    left: calc(var(--p) * 1%);
    transform: translateX(-50%);
}

.meter-value {
    display: grid;
    place-items: center;
    min-width: 52px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    position: relative;
}

.meter-value::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: inherit;
    transform: rotate(45deg);
    border-radius: 2px;
}

.tiers {
    display: grid;
    grid-template-columns: 4fr 5fr 2.4fr;
    gap: 12px;
    margin-top: 22px;
}

.tier {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    transition: background-color .4s, transform .5s var(--ease-spring);
}

.tier.is-current {
    background: color-mix(in srgb, var(--tc) 12%, transparent);
    transform: translateY(-3px);
}

.t-learn { --tc: var(--learn); }
.t-practice { --tc: var(--practice); }
.t-master { --tc: var(--mastered); }

.tier-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--tc);
    background: color-mix(in srgb, var(--tc) 14%, transparent);
}

.tier b {
    display: block;
    font-family: var(--font-display);
    font-size: 17px;
}

.tier span:not(.tier-icon) {
    font-size: 13.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.mastery-grid {
    display: grid;
    grid-template-columns: 1.1fr .8fr 1.1fr;
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
    margin-top: clamp(40px, 6vw, 80px);
}

.weak-card,
.mix-card {
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
}

.weak-card h3,
.mix-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 16px 0 12px;
}

.mix-card h3 {
    margin-top: 0;
}

.weak-card p,
.mix-card p {
    color: var(--text-2);
    font-size: 15.5px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge-weak {
    color: var(--weak);
    background: color-mix(in srgb, var(--weak) 12%, transparent);
}

.proof-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.proof-list li {
    display: flex;
    gap: 14px;
    font-size: 14.5px;
    color: var(--muted);
}

.proof-list li>span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.proof-list b {
    display: block;
    color: var(--text);
    font-size: 15.5px;
}

.weak-visual {
    display: flex;
    justify-content: center;
    perspective: 1400px;
}

.phone-tilt-l {
    --pw: min(280px, 100%);
    transform: rotateY(14deg) rotateX(4deg);
}

.mix-bar {
    display: flex;
    gap: 4px;
    height: 46px;
    margin-top: 26px;
}

.mix-seg {
    display: flex;
    align-items: center;
    padding: 0 10px;
    width: calc(var(--w) * 1%);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    color: #fff;
    transform-origin: left;
}

.seg-weak { background: var(--weak); }
.seg-learn { background: var(--learn); color: #1a1405; }
.seg-practice { background: var(--practice); }
.seg-master { background: var(--mastered); }

.mix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}

.mix-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mix-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

html.js .mix-seg {
    transform: scaleX(0);
    transition: transform 1.1s var(--ease-out);
}

html.js .mix-seg:nth-child(2) { transition-delay: .12s; }
html.js .mix-seg:nth-child(3) { transition-delay: .24s; }
html.js .mix-seg:nth-child(4) { transition-delay: .36s; }

html.js .mix-card.is-in .mix-seg {
    transform: none;
}

/* ---------- features bento ---------- */
.features {
    padding: clamp(80px, 12vw, 160px) 0;
}

.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.tile {
    --mx: 50%;
    --my: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    isolation: isolate;
    transition: transform .5s var(--ease-out), border-color .4s, box-shadow .5s;
}

.tile::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(400px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%);
    opacity: 0;
    transition: opacity .4s;
}

.tile:hover {
    transform: translateY(-4px);
    border-color: var(--line-2);
    box-shadow: var(--shadow-md);
}

.tile:hover::before {
    opacity: 1;
}

.tile-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.tile-head .i {
    color: var(--accent);
}

.tile h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.tile p {
    color: var(--text-2);
    font-size: 15px;
}

.tile-streak,
.tile-stats,
.tile-xlsx,
.tile-notify {
    grid-column: span 2;
}

/* streak strip */
.week {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: auto;
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.week-flame {
    display: grid;
    justify-items: center;
    padding-right: 20px;
    border-right: 1px solid var(--line-2);
    line-height: 1.1;
}

.week-flame .i {
    width: 26px;
    height: 26px;
    color: #f59e0b;
    fill: #f59e0b;
}

.week-flame b {
    font-family: var(--font-display);
    font-size: 30px;
    font-variant-numeric: tabular-nums;
}

.week-flame span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.week-dots {
    flex: 1;
    display: flex;
    justify-content: space-between;
    list-style: none;
    position: relative;
}

.week-dots::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    top: 14px;
    height: 2px;
    background: var(--line-2);
}

.week-dots li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.week-dots i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--line-2);
    transition: background-color .4s, border-color .4s, transform .5s var(--ease-spring);
}

.week-dots i::after {
    content: '';
    width: 10px;
    height: 6px;
    border: solid #fff;
    border-width: 0 0 2.5px 2.5px;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform .4s var(--ease-spring);
}

.week.is-in li[data-s="done"] i {
    background: #2d5a27;
    border-color: #2d5a27;
    transform: scale(1.06);
}

:root[data-theme="dark"] .week.is-in li[data-s="done"] i {
    background: #3f8a36;
    border-color: #3f8a36;
}

.week.is-in li[data-s="done"] i::after {
    transform: rotate(-45deg) translate(1px, -1px) scale(1);
}

.week.is-in li[data-s="miss"] i {
    border-color: var(--weak);
}

.week-dots li[data-s="miss"] i::after {
    width: 10px;
    height: 0;
    border: 0;
    border-top: 2.5px solid var(--weak);
    transform: scale(0);
}

.week.is-in li[data-s="miss"] i::after {
    transform: scale(1);
}

.week-dots li:nth-child(1) i { transition-delay: .1s; }
.week-dots li:nth-child(2) i { transition-delay: .2s; }
.week-dots li:nth-child(3) i { transition-delay: .3s; }
.week-dots li:nth-child(4) i { transition-delay: .4s; }
.week-dots li:nth-child(5) i { transition-delay: .5s; }
.week-dots li:nth-child(6) i { transition-delay: .6s; }
.week-dots li:nth-child(7) i { transition-delay: .7s; }

/* goal ring */
.tile-goal {
    align-items: flex-start;
}

.ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 6px auto 4px;
}

.ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring circle {
    fill: none;
    stroke-width: 10;
}

.ring-bg {
    stroke: var(--bg-2);
}

.ring-fg {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--p));
    transition: stroke-dashoffset 1.6s var(--ease-out);
}

.ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding-top: 54px;
    gap: 4px;
}

.ring-label b {
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.ring-label span {
    color: var(--muted);
    font-weight: 500;
}

/* blitz */
.blitz {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.blitz-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    background: color-mix(in srgb, var(--cc) 10%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--cc) 20%, transparent);
    transition: transform .4s var(--ease-spring);
}

.blitz-chip .i {
    color: var(--cc);
}

.blitz-chip:hover {
    transform: translateX(6px);
}

.c-blue { --cc: #3b82f6; }
.c-violet { --cc: #8b5cf6; }
.c-green { --cc: #10b981; }
.c-red { --cc: #ef4444; }

/* stats bars */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    margin-top: auto;
    padding-top: 10px;
}

.bars i {
    flex: 1;
    height: calc(var(--h) * 1%);
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent));
    transform-origin: bottom;
    transform: scaleY(.04);
    transition: transform 1s var(--ease-out);
}

.bars.is-in i {
    transform: none;
}

.bars i:nth-child(n) { transition-delay: calc(var(--i, 0) * 50ms); }

/* xlsx */
.sheet {
    margin-top: auto;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    overflow: hidden;
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

.sheet-row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr .8fr;
    border-top: 1px solid var(--line);
    transition: transform .7s var(--ease-out), opacity .7s;
}

.sheet-row span {
    padding: 9px 12px;
    border-left: 1px solid var(--line);
}

.sheet-row span:first-child {
    border-left: 0;
}

/* one shared column grid for every row, so the borders always line up */
@supports (grid-template-columns: subgrid) {
    .sheet {
        display: grid;
        grid-template-columns: auto auto auto;
    }

    .sheet-row {
        grid-column: 1 / -1;
        grid-template-columns: subgrid;
    }
}

.sheet-row.head {
    border-top: 0;
    background: color-mix(in srgb, #107c41 14%, var(--surface));
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}

html.js .sheet-row:not(.head) {
    opacity: 0;
    transform: translateX(-16px);
}

html.js .tile-xlsx.is-in .sheet-row {
    opacity: 1;
    transform: none;
}

.tile-xlsx.is-in .sheet-row:nth-child(2) { transition-delay: .2s; }
.tile-xlsx.is-in .sheet-row:nth-child(3) { transition-delay: .35s; }
.tile-xlsx.is-in .sheet-row:nth-child(4) { transition-delay: .5s; }

/* keys */
.keys {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
}

kbd {
    display: grid;
    place-items: center;
    width: 44px;
    height: 48px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    box-shadow: 0 3px 0 var(--line-2);
    transition: transform .12s, box-shadow .12s, background-color .2s, color .2s;
    cursor: default;
    user-select: none;
}

kbd:hover,
kbd.is-pressed {
    transform: translateY(3px);
    box-shadow: 0 0 0 var(--line-2);
    background: var(--accent);
    color: var(--brand-ink);
}

/* tts */
.tts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.tts-word {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 21px;
    letter-spacing: -.02em;
}

.wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
}

.wave i {
    width: 3.5px;
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transform: scaleY(.25);
}

.tile-tts.is-in .wave i,
.tile-tts:hover .wave i {
    animation: wave 1s ease-in-out infinite;
}

.wave i:nth-child(2) { animation-delay: -.2s !important; }
.wave i:nth-child(3) { animation-delay: -.5s !important; }
.wave i:nth-child(4) { animation-delay: -.1s !important; }
.wave i:nth-child(5) { animation-delay: -.7s !important; }
.wave i:nth-child(6) { animation-delay: -.3s !important; }
.wave i:nth-child(7) { animation-delay: -.6s !important; }

@keyframes wave {
    50% {
        transform: scaleY(1);
    }
}

/* toasts */
.toasts {
    display: grid;
    gap: 8px;
}

.toast {
    display: flex;
    flex-direction: column;
    padding: 12px 16px 12px 52px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 14px;
    color: var(--text-2);
    position: relative;
    transition: transform .8s var(--ease-spring), opacity .6s;
}

.toast::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    border-radius: 8px;
    background: var(--brand-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 17V7l10 10V7'/%3E%3C/svg%3E") center / 15px no-repeat;
}

.toast b {
    color: var(--text);
    font-size: 14.5px;
}

html.js .toast {
    opacity: 0;
    transform: translateY(-14px) scale(.96);
}

html.js .tile-notify.is-in .toast {
    opacity: 1;
    transform: none;
}

.tile-notify.is-in .toast:nth-child(2) {
    transition-delay: .25s;
}

/* ---------- film ---------- */
.film {
    padding: clamp(60px, 10vw, 140px) 0;
}

.film-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0c1410;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    transform-origin: 50% 0;
}

.film-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    background: radial-gradient(circle at center, rgba(0, 0, 0, .1), rgba(0, 0, 0, .45));
    transition: opacity .5s;
}

.film-play-btn {
    display: grid;
    place-items: center;
    width: clamp(72px, 9vw, 104px);
    height: clamp(72px, 9vw, 104px);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform .5s var(--ease-spring), background-color .3s;
}

.film-play-btn .i {
    width: 34%;
    height: 34%;
    margin-left: 6%;
}

.film-play:hover .film-play-btn {
    transform: scale(1.1);
    background: rgba(255, 255, 255, .28);
}

.film-play-label {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

.film-frame.is-playing .film-play {
    opacity: 0;
    pointer-events: none;
}

/* ---------- privacy (always dark band) ---------- */
.privacy {
    --p-bg: #0b2016;
    --p-text: #eef4ef;
    --p-muted: #a3b8aa;
    --p-line: rgba(255, 255, 255, .1);
    --p-accent: #a6dc9b;
    position: relative;
    padding: clamp(90px, 13vw, 170px) 0;
    background:
        radial-gradient(800px 500px at 85% 10%, rgba(120, 200, 120, .14), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(40, 120, 90, .25), transparent 60%),
        var(--p-bg);
    color: var(--p-text);
    overflow: hidden;
}

:root[data-theme="dark"] .privacy {
    --p-bg: #0b1410;
    border-block: 1px solid var(--line);
}

.privacy .eyebrow,
.privacy .serif {
    color: var(--p-accent);
}

.privacy .section-lead {
    color: var(--p-muted);
}

.privacy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 90px);
    align-items: center;
}

.airplane {
    margin-top: 40px;
    max-width: 440px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--p-line);
}

.airplane-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--p-line);
    font-weight: 600;
}

.switch {
    position: relative;
    width: 54px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    transition: background-color .35s;
}

.switch span {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    transition: transform .45s var(--ease-spring);
}

.switch[aria-checked="true"] {
    background: var(--p-accent);
}

.switch[aria-checked="true"] span {
    transform: translateX(22px);
}

.airplane-list {
    list-style: none;
    display: grid;
    gap: 2px;
    margin-top: 10px;
}

.airplane-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 2px;
    color: var(--p-muted);
    font-size: 15px;
}

.airplane-list li::after {
    content: var(--works-label, 'works');
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--p-bg);
    background: var(--p-accent);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .3s, transform .5s var(--ease-spring);
}

.airplane.is-on .airplane-list li {
    color: var(--p-text);
}

.airplane.is-on .airplane-list li::after {
    opacity: 1;
    transform: none;
}

.airplane.is-on .airplane-list li:nth-child(2)::after { transition-delay: .1s; }
.airplane.is-on .airplane-list li:nth-child(3)::after { transition-delay: .2s; }
.airplane.is-on .airplane-list li:nth-child(4)::after { transition-delay: .3s; }
.airplane.is-on .airplane-list li:nth-child(5)::after { transition-delay: .4s; }

.privacy-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.p-card {
    padding: 26px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--p-line);
    transition: background-color .4s, transform .5s var(--ease-out);
}

.p-card:hover {
    background: rgba(255, 255, 255, .07);
    transform: translateY(-4px);
}

.p-card:nth-child(even) {
    translate: 0 40px;
}

.p-card .i {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    color: var(--p-accent);
    background: rgba(166, 220, 155, .1);
    margin-bottom: 18px;
}

.p-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -.02em;
    margin-bottom: 8px;
}

.p-card p {
    color: var(--p-muted);
    font-size: 15px;
}

/* ---------- numbers ---------- */
.numbers {
    padding: clamp(70px, 10vw, 120px) 0;
    border-bottom: 1px solid var(--line);
}

.numbers-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.num {
    display: grid;
    gap: 4px;
    padding-left: 22px;
    border-left: 1px solid var(--line-2);
}

.num b {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -.05em;
    font-variant-numeric: tabular-nums;
}

.num small {
    font-size: .5em;
    letter-spacing: 0;
    color: var(--accent);
    vertical-align: .55em;
}

.num>span {
    color: var(--muted);
    font-size: 15px;
}

/* ---------- faq ---------- */
.faq {
    padding: clamp(90px, 13vw, 160px) 0;
}

.faq-layout {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(40px, 6vw, 90px);
    align-items: start;
}

.faq-layout .section-head {
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.faq-list {
    border-top: 1px solid var(--line-2);
}

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

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    letter-spacing: -.015em;
    transition: color .25s;
}

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

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

.faq-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    transition: transform .5s var(--ease-spring), background-color .3s, border-color .3s;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 1.8px;
    margin: -.9px 0 0 -6px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .4s var(--ease-out);
}

.faq-icon::after {
    transform: rotate(90deg);
}

.faq-item[open] .faq-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--brand-ink);
    transform: rotate(180deg);
}

.faq-item[open] .faq-icon::after {
    transform: rotate(0);
}

.faq-body {
    padding: 0 60px 26px 0;
    color: var(--text-2);
}

.faq-item[open] .faq-body {
    animation: fade-up .5s var(--ease-out);
}

/* ---------- cta ---------- */
.cta {
    padding: 0 var(--gutter) clamp(80px, 10vw, 120px);
}

.cta-card {
    position: relative;
    max-width: calc(var(--container) + 80px);
    margin: 0 auto;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: clamp(40px, 6vw, 80px);
    border-radius: clamp(28px, 4vw, 48px);
    background: linear-gradient(140deg, #0c4429 0%, #133a24 45%, #0a2016 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.cta-glow {
    position: absolute;
    z-index: -1;
    width: 700px;
    height: 700px;
    right: -150px;
    top: -200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 220, 155, .35), transparent 65%);
    filter: blur(20px);
}

.cta-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 20% 50%, #000, transparent 70%);
    mask-image: radial-gradient(ellipse at 20% 50%, #000, transparent 70%);
}

.cta-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    margin-bottom: 28px;
}

.cta-mark svg {
    width: 46px;
    height: 46px;
}

.cta-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 5.6vw, 4.8rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.cta-title .serif {
    color: #a6dc9b;
}

.cta-copy p {
    margin: 22px 0 32px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .75);
    max-width: 400px;
}

.cta-phones {
    position: relative;
    height: 100%;
    min-height: 420px;
    perspective: 1600px;
}

.cta-phone {
    --pw: min(220px, 18vw);
    position: absolute;
    top: 50%;
    left: 50%;
}

.cp-1 { margin: -230px 0 0 -270px; transform: rotateY(18deg) rotateZ(-8deg); }
.cp-2 { margin: -260px 0 0 -110px; z-index: 2; }
.cp-3 { margin: -200px 0 0 60px; transform: rotateY(-18deg) rotateZ(8deg); }

/* ---------- footer ---------- */
.footer {
    padding: 70px 0 30px;
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand p {
    margin-top: 14px;
    color: var(--muted);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.3rem;
}

.footer-cols {
    display: flex;
    gap: clamp(36px, 6vw, 90px);
    flex-wrap: wrap;
}

.footer-cols h4 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-cols a {
    display: block;
    padding: 4px 0;
    font-size: 15px;
    color: var(--text-2);
    transition: color .2s;
}

.footer-cols a:hover {
    color: var(--accent);
}

.footer-word {
    margin: 40px 0 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(5rem, 22vw, 20rem);
    line-height: .8;
    letter-spacing: -.06em;
    text-align: center;
    background: linear-gradient(180deg, var(--line-2), transparent 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--muted);
}

/* ---------- modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: var(--gutter);
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 6, .82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: fade-in .3s ease both;
}

.modal-box {
    position: relative;
    width: min(1100px, 100%);
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
    animation: modal-in .5s var(--ease-out) both;
}

.modal-box video {
    width: 100%;
    height: 100%;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .5);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.96);
    }
}

/* ---------- reveal on scroll (only once JS is running) ---------- */
html.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
    transition-delay: var(--rd, 0s);
}

html.reveal-ready [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* flip cards entrance */
html.reveal-ready .flip-card {
    opacity: 0;
    transform: translateY(60px) rotateX(-20deg);
    transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
}

html.reveal-ready .flip-card.is-in {
    opacity: 1;
    transform: none;
}

html.reveal-ready .flip-card:nth-child(2) { transition-delay: .12s; }
html.reveal-ready .flip-card:nth-child(3) { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .tile-streak,
    .tile-stats,
    .tile-xlsx,
    .tile-notify {
        grid-column: span 2;
    }

    .mastery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .weak-visual {
        grid-row: span 2;
        order: 2;
    }

    .weak-card {
        order: 1;
    }

    .mix-card {
        order: 3;
    }
}

@media (max-width: 960px) {
    :root {
        --nav-h: 64px;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 4px);
        left: var(--gutter);
        right: var(--gutter);
        flex-direction: column;
        gap: 2px;
        padding: 10px;
        border-radius: 22px;
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transform: translateY(-10px) scale(.98);
        pointer-events: none;
        transition: opacity .3s, transform .4s var(--ease-out);
    }

    .nav-links.is-open {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 14px 16px;
        font-size: 16px;
    }

    .menu-btn {
        display: grid;
    }

    .nav.menu-open .nav-inner {
        background: var(--nav-bg);
        border-color: var(--line);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .hero {
        padding-top: calc(var(--nav-h) + 40px);
    }

    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }

    .hero-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-cta,
    .hero-proof {
        justify-content: center;
    }

    .hero-stage {
        height: 560px;
        margin-top: 10px;
    }

    .phone-hero {
        --pw: 250px;
    }

    .word-card {
        min-width: 0;
        padding: 10px 14px 10px 16px;
    }

    .wc-word {
        font-size: 18px;
    }

    .wc-1 { left: 2%; }
    .wc-2 { right: 0; }
    .wc-3 { left: 0; }
    .wc-4 { right: 0; }

    .scroll-cue {
        display: none;
    }

    /* how: no sticky phone, inline shots instead */
    .how-layout {
        grid-template-columns: 1fr;
    }

    .how-sticky {
        display: none;
    }

    .how-step,
    .how-step:first-child {
        min-height: 0;
        opacity: 1;
        max-width: 560px;
        margin: 0 auto 80px;
        text-align: center;
        align-items: center;
    }

    .how-inline-shot {
        display: block;
        width: min(270px, 70vw);
        height: auto;
        aspect-ratio: 1016 / 2206;
        object-fit: cover;
        object-position: top;
        margin-top: 32px;
        border-radius: 30px;
        border: 8px solid #0f1210;
        box-shadow: var(--shadow-lg);
    }

    .flip-row,
    .articles-extra {
        grid-template-columns: 1fr;
    }

    .flip-row {
        max-width: 420px;
        margin: 0 auto;
    }

    .flip-card {
        aspect-ratio: 16 / 10;
    }

    /* practice: vertical stack */
    .practice-pin {
        overflow: visible;
    }

    .practice-track {
        flex-direction: column;
        width: auto;
    }

    .practice-panel {
        min-height: 0;
        padding: 80px var(--gutter);
    }

    .practice-intro {
        width: auto;
        padding: 100px var(--gutter) 20px;
        align-items: center;
        text-align: center;
        box-sizing: border-box;
    }

    .practice-hint {
        display: none;
    }

    .mode-panel {
        width: auto;
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .mode-panel::before {
        right: 50%;
        top: 70%;
        transform: translate(50%, -50%);
        width: min(400px, 100vw);
        height: min(400px, 100vw);
    }

    .phone-mode {
        --pw: min(260px, 68vw);
    }

    .privacy-layout,
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-layout .section-head {
        position: static;
    }

    .numbers-row {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 44px;
    }

    .cta-card {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .cta-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cta-phones {
        width: 100%;
        min-height: 400px;
        margin-top: 80px;
    }

    .cta-phone {
        --pw: min(180px, 38vw);
    }

    .cp-1 { margin: -170px 0 0 calc(var(--pw) * -1.35); }
    .cp-2 { margin: -200px 0 0 calc(var(--pw) * -.5); }
    .cp-3 { margin: -150px 0 0 calc(var(--pw) * .35); }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .nav-cta {
        display: none;
    }

    .hero-stage {
        height: 470px;
    }

    .phone-hero {
        --pw: 210px;
    }

    /* keep all four cards (German + English), just smaller and tucked into the corners */
    .word-card {
        padding: 8px 11px 8px 13px;
        column-gap: 6px;
        border-radius: 13px;
    }

    .wc-word {
        font-size: 16px;
    }

    .wc-article {
        font-size: 13px;
    }

    .wc-trans {
        font-size: 12px;
    }

    .wc-meta .wc-tag {
        display: none;
    }

    .wc-1 { left: 0; top: 13%; translate: 0 0 30px; }
    .wc-2 { right: 0; top: 33%; translate: 0 0 20px; }
    .wc-3 { left: 0; bottom: 27%; translate: 0 0 40px; }
    .wc-4 { right: 0; bottom: 11%; translate: 0 0 25px; }

    .chip {
        font-size: 13px;
        padding: 8px 12px;
    }

    .chip-mastered { right: 2%; }
    .chip-streak { left: 2%; }

    .bento {
        grid-template-columns: 1fr;
    }

    .tile-streak,
    .tile-stats,
    .tile-xlsx,
    .tile-notify {
        grid-column: auto;
    }

    .week {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .week-flame {
        border-right: 0;
        padding-right: 0;
        grid-auto-flow: column;
        justify-content: start;
        align-items: center;
        gap: 8px;
    }

    .week {
        padding: 16px 14px;
    }

    .week-dots {
        gap: 6px;
    }

    .week-dots i {
        width: 24px;
        height: 24px;
    }

    .week-dots i::after {
        width: 8px;
        height: 5px;
        border-width: 0 0 2px 2px;
    }

    .week-dots::before {
        top: 11px;
        left: 12px;
        right: 12px;
    }

    .mastery-grid {
        grid-template-columns: 1fr;
    }

    .weak-visual {
        grid-row: auto;
    }

    .tiers {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    /* keep the percentages: share space by weight, but never narrower than the label */
    .mix-seg {
        flex: var(--w) 1 0;
        width: auto;
        min-width: 38px;
        padding: 0;
        justify-content: center;
        font-size: 11.5px;
    }

    .privacy-cards {
        grid-template-columns: 1fr;
    }

    .p-card:nth-child(even) {
        translate: none;
    }

    .faq-body {
        padding-right: 0;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }

    .stage-tilt {
        transform: rotateX(4deg) rotateY(-12deg);
    }

    .marquee-track {
        animation: none !important;
    }
}

/* =========================================================
   Legal pages (privacy / terms)
   ========================================================= */
.legal-wrap {
    padding: calc(var(--nav-h) + 70px) 0 100px;
}

.legal-hero {
    max-width: 820px;
    margin: 0 auto 50px;
}

.legal-hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.legal-page {
    max-width: 820px;
    margin: 0 auto;
    color: var(--text-2);
    font-size: 16.5px;
    line-height: 1.75;
}

.legal-page>h1:first-child {
    display: none;
}

.legal-page h2 {
    margin: 52px 0 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: var(--text);
}

.legal-page h3 {
    margin: 30px 0 10px;
    font-family: var(--font-display);
    font-weight: 650;
    font-size: 1.2rem;
    color: var(--text);
}

.legal-page p,
.legal-page ul,
.legal-page ol {
    margin-bottom: 16px;
}

.legal-page ul,
.legal-page ol {
    padding-left: 22px;
}

.legal-page li {
    margin-bottom: 8px;
}

.legal-page strong {
    color: var(--text);
}

.legal-page a {
    color: var(--accent);
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.legal-page .last-updated {
    display: inline-block;
    margin-bottom: 28px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0 24px;
    font-size: 15px;
}

.legal-page th,
.legal-page td {
    padding: 10px 12px;
    border: 1px solid var(--line-2);
    text-align: left;
    vertical-align: top;
}

.legal-page th {
    background: var(--surface);
    color: var(--text);
}

.legal-footer {
    padding: 30px var(--gutter);
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.legal-footer a {
    color: var(--accent);
}

.btn-ghost-text {
    color: var(--text-2);
}

.btn-ghost-text:hover {
    color: var(--text);
    background: var(--line);
}

@media (max-width: 640px) {
    .btn-ghost-text {
        display: none;
    }
}

/* =========================================================
   Languages: German + English
   ========================================================= */
:root {
    --verb: #7c3aed;
    --adj: #d97706;
    --noun: #0891b2;
}

:root[data-theme="dark"] {
    --verb: #a78bfa;
    --adj: #fbbf24;
    --noun: #22d3ee;
}

.flag {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--line-2);
}

/* hero language pills */
.lang-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    font-weight: 600;
    font-size: 15px;
    transition: transform .4s var(--ease-spring), border-color .3s, background-color .3s;
}

.lang-pill:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--surface);
}

html.js .lang-pills { animation-delay: .36s; }
html.js .hero-cta { animation-delay: .46s; }
html.js .hero-proof { animation-delay: .56s; }

.hero-cta {
    margin-top: 30px;
}

/* hero word cards: flag + tag */
.wc-meta {
    justify-self: end;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wc-meta .flag {
    width: 20px;
    height: 14px;
}

.wc-tag.tag-adj {
    color: var(--adj);
    background: color-mix(in srgb, var(--adj) 14%, transparent);
}

.word-card.wc-4 {
    --card-c: var(--adj);
}

/* language switcher */
.lang-switch-wrap {
    display: flex;
    justify-content: center;
    margin: -30px 0 56px;
}

.lang-switch {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: var(--bg-2);
    border: 1px solid var(--line);
}

.lang-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px 11px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-2);
    position: relative;
    transition: color .3s, background-color .35s, box-shadow .35s;
}

.lang-tab:hover {
    color: var(--text);
}

.lang-tab.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.lang-tab .flag {
    filter: saturate(.4);
    opacity: .7;
    transition: filter .3s, opacity .3s;
}

.lang-tab.is-active .flag {
    filter: none;
    opacity: 1;
}

/* auto-cycle progress line under the active tab */
.lang-tab::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    opacity: .55;
}

.lang-switch.is-cycling .lang-tab.is-active::after {
    animation: tab-progress var(--cycle, 7s) linear forwards;
}

@keyframes tab-progress {
    to {
        transform: scaleX(1);
    }
}

.lang-panel.is-active {
    animation: fade-up .8s var(--ease-out) both;
}

.lang-title {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -.03em;
}

.lang-lead {
    max-width: 640px;
    margin: 14px auto clamp(36px, 5vw, 56px);
    text-align: center;
    color: var(--text-2);
    font-size: 1.08rem;
}

.flip-card.is-verb { --card-c: var(--verb); }
.flip-card.is-adj { --card-c: var(--adj); }
.flip-card.is-noun { --card-c: var(--noun); }

.flip-card.is-verb .fc-article,
.flip-card.is-adj .fc-article,
.flip-card.is-noun .fc-article {
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

@media (max-width: 960px) {
    .lang-pills {
        justify-content: center;
    }

    .lang-switch-wrap {
        margin-top: -20px;
    }
}

@media (max-width: 480px) {
    .lang-tab {
        padding: 10px 14px 10px 12px;
        font-size: 14px;
        gap: 8px;
    }
}

.tts-word {
    transition: opacity .25s;
}

/* hero background: extra German/English glyphs + faint flags */
.g8 { left: 3%; bottom: 24%; font-size: 72px; animation-delay: -7s; }
.g9 { right: 2%; top: 20%; font-size: 96px; animation-delay: -2.5s; }
.g10 { left: 56%; bottom: 3%; font-size: 58px; animation-delay: -4.5s; }
.g11 { left: 15%; top: 5%; font-size: 64px; animation-delay: -1.5s; }
.g12 { right: 46%; top: 14%; font-size: 50px; animation-delay: -6.5s; }

.glyph-flag {
    position: absolute;
    width: 58px;
    height: 38px;
    border-radius: 7px;
    opacity: .16;
    animation: bob-t 10s ease-in-out infinite alternate;
}

:root[data-theme="dark"] .glyph-flag {
    opacity: .2;
}

.gf-de { left: 4%; bottom: 36%; rotate: -10deg; animation-delay: -3s; }
.gf-gb { left: 31%; top: 9%; rotate: 8deg; animation-delay: -6s; }

.hero-sub strong {
    color: var(--text);
    font-weight: 600;
}

/* import/export: part-of-speech colors */
.t-verb { color: var(--verb); font-weight: 700; }
.t-adj { color: var(--adj); font-weight: 700; }
.t-noun { color: var(--noun); font-weight: 700; }

/* "German only" badge on the special characters tile */
.only-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 4px 10px 4px 7px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--text-2);
}

.only-badge .flag {
    width: 16px;
    height: 11px;
}

.tile-keys .tile-head {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
}

.tile-keys .only-badge {
    margin-left: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .gf-gb { left: 70%; top: 6%; }
    .g10, .g12 { display: none; }
}

/* film: poster + YouTube iframe (loaded on click) */
.film-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-frame iframe,
.modal-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.modal-player {
    position: absolute;
    inset: 0;
}


/* =========================================================
   Multi-language (English · বাংলা · Deutsch)
   ========================================================= */
html.i18n-pending body {
    visibility: hidden;
}

/* language dropdown in the nav */
.lang-menu {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px 0 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--text);
    transition: background-color .25s;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
    background: var(--line);
}

.lang-btn .i {
    width: 18px;
    height: 18px;
}

.lang-btn .lang-chev {
    width: 14px;
    height: 14px;
    opacity: .6;
    transition: transform .3s var(--ease-out);
}

.lang-btn[aria-expanded="true"] .lang-chev {
    transform: rotate(180deg);
}

.lang-list {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 120;
    min-width: 184px;
    padding: 6px;
    list-style: none;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    animation: fade-up .3s var(--ease-out);
}

.lang-list[hidden] {
    display: none;
}

.lang-list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    color: var(--text);
    transition: background-color .2s;
}

.lang-list button:hover,
.lang-list button:focus-visible {
    background: var(--line);
    outline: none;
}

.lang-list button small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted);
}

.lang-list button[aria-checked="true"] {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.lang-list button[aria-checked="true"] small {
    color: var(--accent);
}

.lang-list button[lang="bn"] span {
    font-family: 'Hind Siliguri', 'Nirmala UI', 'Noto Sans Bengali', sans-serif;
}

/* ---------- Bangla typography ---------- */
:root:lang(bn) {
    --font-display: 'Bricolage Grotesque', 'Anek Bangla', 'Hind Siliguri', 'Nirmala UI', sans-serif;
    --font-body: 'Inter', 'Hind Siliguri', 'Nirmala UI', 'Noto Sans Bengali', system-ui, sans-serif;
    --font-serif: 'Instrument Serif', 'Tiro Bangla', 'Nirmala UI', serif;
}

/* tight tracking breaks Bengali conjuncts and vowel signs */
:root:lang(bn) body * {
    letter-spacing: normal !important;
}

:root:lang(bn) body {
    line-height: 1.75;
}

:root:lang(bn) .hero-title {
    font-size: clamp(2.3rem, 4.5vw, 4.3rem);
    line-height: 1.22;
}

:root:lang(bn) .hero-title .line {
    white-space: normal;
    padding-bottom: .18em;
    margin-bottom: -.12em;
}

:root:lang(bn) .section-title,
:root:lang(bn) .cta-title,
:root:lang(bn) .manifesto-text {
    line-height: 1.3;
}

:root:lang(bn) .section-title {
    font-size: clamp(2rem, 4.6vw, 3.8rem);
}

:root:lang(bn) .manifesto-text {
    font-size: clamp(1.6rem, 3.6vw, 3rem);
}

:root:lang(bn) .how-step h3,
:root:lang(bn) .lang-title,
:root:lang(bn) .tile h3,
:root:lang(bn) .weak-card h3,
:root:lang(bn) .mix-card h3,
:root:lang(bn) .mode-copy h3 {
    line-height: 1.35;
}

:root:lang(bn) .mode-tagline,
:root:lang(bn) .footer-brand p {
    line-height: 1.5;
}

/* German words run long: let the hero lines wrap on small screens */
@media (max-width: 640px) {
    :root:lang(de) .hero-title .line {
        white-space: normal;
    }

    .lang-btn .lang-chev {
        display: none;
    }

    .lang-btn {
        padding: 0 9px;
    }
}

/* small phones (≈320–400px): keep the nav pill, tables and tiles inside the screen */
@media (max-width: 400px) {
    .nav-inner {
        gap: 6px;
        padding: 0 4px 0 10px;
    }

    .brand {
        gap: 8px;
        font-size: 18px;
        min-width: 0;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    .brand-mark svg {
        width: 22px;
        height: 22px;
    }

    .nav-actions {
        gap: 0;
    }

    .theme-toggle,
    .menu-btn {
        width: 36px;
        height: 36px;
    }

    .lang-btn {
        height: 36px;
        gap: 4px;
        padding: 0 6px;
    }

    .tile {
        padding: 22px 18px;
    }

    .sheet {
        font-size: 12.5px;
    }

    .sheet-row span {
        padding: 8px 8px;
    }

    .sheet-row.head {
        font-size: 10.5px;
    }
}
