/* ---------- tokens ---------- */
:root {
    /* accent (warm blue) */
    --accent: oklch(0.80 0.12 230);
    --accent-deep: oklch(0.60 0.14 235);
    --accent-glow: color-mix(
        in oklch,
        var(--accent) 25%,
        transparent
    );
    --on-accent: #0b0d10;

    /* surfaces (warm dark) */
    --bg: #0a0806;
    --bg-2: #0f0d0a;
    --bg-3: #1a1510;
    --fg: #f4f1ea;
    --fg-dim: #b8b0a3;
    --fg-mute: #6b6558;
    --line: rgba(255, 255, 255, 0.06);
    --line-strong: rgba(255, 255, 255, 0.14);
    --card: rgba(255, 255, 255, 0.03);

    --space: 1.5rem;
    --section-y: clamp(5rem, 10vw, 9rem);

    --f-display: "Space Grotesk", sans-serif;
    --f-body: "Inter", sans-serif;
    --f-mono: "JetBrains Mono", monospace;
}

/* ---------- light theme ---------- */
[data-theme="light"] {
    --accent: oklch(0.55 0.14 235);
    --accent-deep: oklch(0.45 0.12 245);
    --accent-glow: none;
    --on-accent: #ffffff;

    --bg: #f8f5f0;
    --bg-2: #f0ece4;
    --bg-3: #e8e2d8;
    --fg: #1a1614;
    --fg-dim: #5a5550;
    --fg-mute: #8a8580;
    --line: rgba(0, 0, 0, 0.06);
    --line-strong: rgba(0, 0, 0, 0.12);
    --card: rgba(0, 0, 0, 0.02);
}

/* ---------- base ---------- */
* {
    box-sizing: border-box;
}
html,
body {
    margin: 0;
    padding: 0;
}
body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
h1,
h2,
h3,
h4 {
    font-family: var(--f-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.05;
}
p {
    margin: 0;
}
a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 3vw, 2.5rem);
}

/* ---------- nav ---------- */
nav.top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: color-mix(in oklch, var(--bg) 75%, transparent);
    border-bottom: 1px solid var(--line);
}
nav.top .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}
.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(
        135deg,
        oklch(0.80 0.12 230),
        oklch(0.60 0.14 235)
    );
    display: grid;
    place-items: center;
    color: #0b0d10;
    font-weight: 800;
    font-size: 14px;
}
[data-theme="light"] .brand-mark {
    background: linear-gradient(
        135deg,
        oklch(0.80 0.12 230),
        oklch(0.60 0.14 235)
    );
}
.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 14px;
    color: var(--fg-dim);
}
.nav-links a:hover {
    color: var(--fg);
}
.nav-cta {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    font-size: 14px;
    transition:
        transform 0.15s,
        box-shadow 0.2s;
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
@media (max-width: 990px) {
    .nav-links {
        display: none;
    }
}

/* ---------- hamburger menu ---------- */
.hamburger-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--fg-dim);
    cursor: pointer;
    place-items: center;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
}
.hamburger-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.hamburger-btn svg {
    width: 20px;
    height: 20px;
}
.hamburger-btn .close-icon {
    display: none;
}
.hamburger-btn.open .hamburger-icon {
    display: none;
}
.hamburger-btn.open .close-icon {
    display: block;
}

@media (max-width: 990px) {
    .hamburger-btn {
        display: grid;
    }
}

.mobile-menu {
    display: none;
    position: absolute;
    inset: 64px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line-strong);
    padding: 0.75rem 1.5rem;
    z-index: 49;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: color-mix(in oklch, var(--bg) 98%, transparent);
}
.mobile-menu.open {
    display: block;
    animation: menuSlide 0.2s ease;
}
.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-menu-links a {
    display: block;
    padding: 0.75rem 0.75rem;
    color: var(--fg-dim);
    font-size: 15px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.mobile-menu-links a:hover {
    color: var(--fg);
    background: var(--card);
}
@keyframes menuSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.mobile-menu-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--line);
}
.mobile-cta {
    display: block;
    padding: 0.75rem 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    background: var(--accent);
    color: var(--on-accent);
    transition: transform 0.15s, box-shadow 0.2s;
}
.mobile-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -10px var(--accent-glow);
}
@media (max-width: 520px) {
    .nav-cta {
        display: none;
    }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    padding: calc(6rem + 64px) 0 var(--section-y);
    overflow: hidden;
}
.hero .container {
    position: relative;
    z-index: 2;
}

.mesh-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    mask-image: radial-gradient(
        ellipse at 70% 40%,
        black 20%,
        transparent 75%
    );
    -webkit-mask-image: radial-gradient(
        ellipse at 70% 40%,
        black 20%,
        transparent 75%
    );
}
.mesh-bg {
    background-image:
        linear-gradient(color-mix(in oklch, var(--accent) 35%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in oklch, var(--accent) 35%, transparent) 1px, transparent 1px);
    background-size: 48px 48px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--f-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-dim);
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--card);
}
.eyebrow .pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

h1.hero-title {
    font-size: clamp(2.6rem, 7vw, 5.4rem);
    margin: 1.5rem 0 1.25rem;
    max-width: 18ch;
    text-wrap: balance;
}
h1.hero-title .accent {
    background: linear-gradient(
        180deg,
        var(--accent) 0%,
        var(--accent-deep) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
    font-weight: 500;
}

.hero-sub {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: var(--fg-dim);
    max-width: 56ch;
    line-height: 1.55;
    margin-bottom: 2.25rem;
    text-wrap: pretty;
}

.hero-cta-btn {
    display: inline-block;
    padding: 0.95rem 1.6rem;
    background: var(--accent);
    color: var(--on-accent);
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition:
        transform 0.15s,
        box-shadow 0.2s;
}
.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px -10px var(--accent-glow);
}

.signup-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    font-size: 13px;
    color: var(--fg-mute);
    font-family: var(--f-mono);
}
.signup-note svg {
    width: 14px;
    height: 14px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-cta-btn {
        padding: 0.8rem 1.3rem;
        font-size: 14px;
    }
    .hero .hero-grid div[style*="display: flex"] {
        gap: 0.7rem;
    }
}

@media (max-width: 560px) {
    .hero-cta-btn {
        padding: 0.7rem 1.2rem;
        font-size: 14px;
    }
    .hero .hero-grid div[style*="display: flex"] {
        gap: 0.6rem;
    }
}

@media (max-width: 470px) {
    .hero-cta-btn {
        padding: 0.55rem 0.9rem;
        font-size: 13px;
    }
    .hero .hero-grid div[style*="display: flex"] {
        gap: 0.4rem;
        flex-direction: column;
    }
    .hero-cta-btn:last-child {
        width: 100%;
    }
    .nav-cta {
        padding: 0.4rem 0.7rem;
        font-size: 12px;
    }
}

[data-theme="light"] .phone {
    background: #e8e2d8;
    border-color: #d4cdc4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
[data-theme="light"] .phone::before {
    background: #c4bdb2;
}
[data-theme="light"] .phone-screen {
    background:
        radial-gradient(
            circle at 30% 0%,
            color-mix(in oklch, var(--accent) 10%, #f5f0e8) 0%,
            #f5f0e8 55%
        ),
        #f5f0e8;
    color: #1a1614;
}
[data-theme="light"] .phone-status {
    color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .phone-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .phone-avatar {
    color: #ffffff;
}
[data-theme="light"] .phone-avatar::after {
    border-color: #f5f0e8;
}
[data-theme="light"] .phone-header .sub {
    color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .bubble.them {
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .bubble.me {
    color: #ffffff;
}
[data-theme="light"] .bubble .translated {
    color: rgba(0, 0, 0, 0.55);
    border-top-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .phone-input {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .phone-input .mic {
    color: #ffffff;
}

/* ---------- phone mockup ---------- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 640px;
}
@media (max-width: 600px) {
    .hero-visual {
        min-height: auto;
    }
    .phone {
        width: min(320px, 90vw);
        height: auto;
        aspect-ratio: 1 / 2;
        border-width: 6px;
        border-radius: 32px;
    }
}
.phone {
    width: 320px;
    height: 640px;
    border-radius: 42px;
    background: #0a0c11;
    border: 10px solid #1a1d24;
    padding: 0;
    position: relative;
    box-shadow:
        0 40px 80px -30px rgba(0, 0, 0, 0.6),
        0 0 120px -20px var(--accent-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.phone::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    border-radius: 12px;
    background: #000;
    z-index: 5;
}

.phone-screen {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 30% 0%,
            color-mix(in oklch, var(--accent) 12%, #0a0c11) 0%,
            #0a0c11 55%
        ),
        #0a0c11;
    display: flex;
    flex-direction: column;
    font-family: var(--f-body);
    color: #f0ecdf;
    font-size: 13px;
}
.phone-status {
    display: flex;
    justify-content: space-between;
    padding: 14px 26px 4px;
    font-size: 11px;
    font-family: var(--f-mono);
    color: rgba(255, 255, 255, 0.7);
}
.phone-header {
    padding: 1.8rem 1.1rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.phone-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--accent),
        var(--accent-deep)
    );
    display: grid;
    place-items: center;
    color: #0a0c11;
    font-weight: 700;
    font-size: 15px;
    position: relative;
    flex-shrink: 0;
}
.phone-avatar::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    border: 2px solid #0a0c11;
}
.phone-header .name {
    font-weight: 600;
    font-size: 14px;
}
.phone-header .sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--f-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.phone-chat {
    flex: 1;
    overflow: hidden;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.bubble {
    max-width: 82%;
    padding: 0.6rem 0.85rem;
    border-radius: 16px;
    font-size: 12.5px;
    line-height: 1.4;
    animation: bubbleIn 0.4s ease both;
}
.bubble.them {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border-top-left-radius: 4px;
}
.bubble.me {
    align-self: flex-end;
    background: var(--accent);
    color: #0a0c11;
    border-top-right-radius: 4px;
    font-weight: 500;
}
.bubble small {
    display: block;
    font-family: var(--f-mono);
    font-size: 9px;
    opacity: 0.55;
    margin-top: 3px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.bubble.me small {
    color: rgba(0, 0, 0, 0.55);
}
.bubble .translated {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-style: italic;
}
@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
    }
}

.phone-input {
    margin: 0.4rem 0.8rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}
.phone-input .mic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: grid;
    place-items: center;
    color: #0a0c11;
    margin-left: auto;
}

/* dynamic language cycle: fade bubble text + sub label, but keep bubble shells stable */
.phone-cycle-fade {
    transition: opacity 0.35s ease;
}
.phone-cycle-fade.is-out {
    opacity: 0;
}

/* ---------- section headers ---------- */
section {
    padding: var(--section-y) 0;
    position: relative;
}
.section-label {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.section-label::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--accent);
}
h2.section-title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    max-width: 22ch;
    margin-bottom: 1rem;
    text-wrap: balance;
}
.section-sub {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: var(--fg-dim);
    max-width: 58ch;
    margin-bottom: 3.5rem;
    text-wrap: pretty;
}

/* ---------- problem stats ---------- */
.problem {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 3rem 0 0;
}
@media (max-width: 800px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}
.stat {
    padding: 1.6rem 0 0;
    border-top: 1px solid var(--line-strong);
}
.stat .num {
    font-family: var(--f-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 600;
    line-height: 1;
    background: linear-gradient(
        180deg,
        var(--fg) 0%,
        var(--accent) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.9rem;
    letter-spacing: -0.04em;
}
.stat .copy {
    color: var(--fg-dim);
    font-size: 15px;
    max-width: 34ch;
    line-height: 1.5;
}

/* ---------- features ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
.feature {
    padding: 1.8rem 1.6rem 2rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    position: relative;
    transition:
        border-color 0.2s,
        transform 0.25s;
    overflow: hidden;
}
.feature:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.feature::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s;
}
.feature:hover::before {
    opacity: 1;
}
.feature::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}
.feature:hover::after {
    transform: scaleX(1);
}
.feature .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: color-mix(in oklch, var(--accent) 12%, transparent);
    border: 1px solid
        color-mix(in oklch, var(--accent) 30%, transparent);
    display: grid;
    place-items: center;
    color: var(--accent);
    margin-bottom: 1.2rem;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.feature:hover .icon-box {
    background: color-mix(in oklch, var(--accent) 22%, transparent);
    border-color: var(--accent);
}
.feature h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}
.feature p {
    color: var(--fg-dim);
    font-size: 14.5px;
    line-height: 1.55;
}
.feature.wide {
    grid-column: span 2;
}
@media (max-width: 900px) {
    .feature.wide {
        grid-column: span 2;
    }
}
@media (max-width: 600px) {
    .feature.wide {
        grid-column: span 1;
    }
}
.feature-tag {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 0.25rem 0.55rem;
    border: 1px solid
        color-mix(in oklch, var(--accent) 35%, transparent);
    border-radius: 999px;
}

/* ---------- how it works (animated cards) ---------- */
.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}
@media (max-width: 1000px) {
    .how-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 560px) {
    .how-grid {
        grid-template-columns: 1fr;
    }
}

.how-card {
    position: relative;
    padding: 1.75rem 1.5rem 1.6rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    animation: howIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1)
        var(--d, 0s) forwards;
    transition:
        border-color 0.2s,
        transform 0.25s;
}
.how-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.how-card:hover .how-ico {
    color: var(--accent);
    border-color: var(--accent);
}
@keyframes howIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.how-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}
.how-card:hover::after {
    transform: scaleX(1);
}
.how-num {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--fg-mute);
    margin-bottom: 1.25rem;
}
.how-ico {
    width: 52px;
    height: 52px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--fg-dim);
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}
.how-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.how-card p {
    font-size: 14px;
    color: var(--fg-dim);
    line-height: 1.55;
}

/* ---------- languages (typewriter) ---------- */
.languages {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.typer {
    position: relative;
    margin-top: 3rem;
    padding: 4rem 2rem 0;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background:
        radial-gradient(
            ellipse at 20% 0%,
            color-mix(in oklch, var(--accent) 16%, transparent),
            transparent 55%
        ),
        radial-gradient(
            ellipse at 90% 100%,
            color-mix(
                in oklch,
                var(--accent-deep) 22%,
                transparent
            ),
            transparent 55%
        ),
        linear-gradient(180deg, var(--bg-2), var(--bg));
    text-align: center;
    min-height: 360px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.typer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.4;
    mask-image: radial-gradient(
        ellipse at 50% 40%,
        transparent 30%,
        black 80%
    );
    -webkit-mask-image: radial-gradient(
        ellipse at 50% 40%,
        transparent 30%,
        black 80%
    );
    pointer-events: none;
}
.typer > * {
    position: relative;
    z-index: 1;
}
.typer-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid
        color-mix(in oklch, var(--accent) 40%, transparent);
    background: color-mix(in oklch, var(--accent) 10%, var(--bg-2));
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
}
.typer-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}
.typer-line {
    font-family: var(--f-display);
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--fg);
    min-height: 1.3em;
    letter-spacing: -0.025em;
    max-width: 22ch;
    text-wrap: balance;
    margin-bottom: 0.75rem;
}
.typer-line .typer-text {
    background: linear-gradient(
        180deg,
        var(--fg) 40%,
        color-mix(in oklch, var(--accent) 60%, var(--fg))
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.typer-caret {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background: var(--accent);
    margin-left: 6px;
    vertical-align: middle;
    animation: blink 1s steps(2) infinite;
    box-shadow: 0 0 12px var(--accent);
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}
.typer-en {
    margin-top: 0.5rem;
    font-family: var(--f-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-mute);
}
.typer-ticker {
    margin-top: auto;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
    overflow: hidden;
    mask-image: linear-gradient(
        90deg,
        transparent,
        black 12%,
        black 88%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent,
        black 12%,
        black 88%,
        transparent
    );
}
.typer-ticker-track {
    display: flex;
    gap: 3rem;
    animation: tickerScroll 38s linear infinite;
    width: max-content;
}
.typer-ticker-item {
    font-family: var(--f-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg-dim);
    display: flex;
    align-items: center;
    gap: 3rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.typer-ticker-item.active {
    color: var(--accent);
}
.typer-ticker-item::after {
    content: "•";
    color: var(--fg-mute);
    font-size: 8px;
}
@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ---------- CAPS ---------- */
.caps-wrap {
    max-width: 820px;
    margin: 0 auto;
}
.caps-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.caps-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
    color: var(--fg);
    font-size: 15px;
}
.caps-list li .check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--accent) 20%, transparent);
    border: 1px solid var(--accent);
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 11px;
    margin-top: 2px;
}
.caps-list li strong {
    display: block;
    margin-bottom: 2px;
}
.caps-list li span {
    color: var(--fg-dim);
    font-size: 13.5px;
}

/* ---------- final CTA ---------- */
.final {
    padding: var(--section-y) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.final::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 50%,
        color-mix(in oklch, var(--accent) 18%, transparent),
        transparent 60%
    );
    pointer-events: none;
}
.final .container {
    position: relative;
}
.final h2 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    max-width: 18ch;
    margin: 0 auto 1.25rem;
    text-wrap: balance;
}
.final p {
    font-size: 1.15rem;
    color: var(--fg-dim);
    max-width: 52ch;
    margin: 0 auto 2.5rem;
}

.final .section-label {
    justify-content: center;
    display: inline-flex;
}

/* ---------- signup form ---------- */
.signup {
    display: flex;
    gap: 0.6rem;
    max-width: 560px;
    padding: 0.45rem;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    margin: 0 auto;
}
.signup:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.signup-fields {
    display: flex;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}
.signup-fields input:first-child {
    border-right: 1px solid var(--line);
}
.signup input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--fg);
    font-family: var(--f-body);
    font-size: 15px;
    padding: 0.7rem 0.9rem;
}
.signup input::placeholder {
    color: var(--fg-mute);
}
.signup button {
    padding: 0.7rem 1.35rem;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition:
        transform 0.15s,
        box-shadow 0.2s;
    white-space: nowrap;
}
.signup button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.signup button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* mobile: stack button below the name+email row so nothing clips */
@media (max-width: 560px) {
    .signup {
        flex-direction: column;
        gap: 0.4rem;
    }
    .signup-fields {
        width: 100%;
    }
    .signup-fields input:first-child {
        max-width: none;
    }
    .signup button {
        width: 100%;
        padding: 0.85rem 1.2rem;
    }
}

@media (max-width: 520px) {
    .signup-fields {
        flex-direction: column;
        gap: 0;
    }
    .signup-fields input:first-child {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

.signup-success {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.2rem;
    background: color-mix(in oklch, var(--accent) 15%, var(--bg-2));
    border: 1px solid var(--accent);
    border-radius: 14px;
    max-width: 560px;
    margin: 0 auto;
    animation: slideIn 0.4s ease;
    text-align: left;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.signup-success .check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    display: grid;
    place-items: center;
    font-weight: 700;
    flex-shrink: 0;
}
.signup-success strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}
.signup-success small {
    color: var(--fg-dim);
    font-size: 13px;
}

@keyframes shake {
    0%,
    100% {
        transform: none;
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}

/* ---------- footer ---------- */
footer {
    border-top: 1px solid var(--line);
    padding: 2.5rem 0;
    font-size: 13px;
    color: var(--fg-mute);
    font-family: var(--f-mono);
    letter-spacing: 0.05em;
}
footer .inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}


/* ---------- motion-safety ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .how-card {
        opacity: 1;
        transform: none;
    }
}

/* ========== PROTOTYPE SHARED COMPONENTS ========== */

/* ---------- Theme Toggle ---------- */
.theme-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--fg-dim);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.theme-btn svg {
    width: 18px;
    height: 18px;
}
.theme-btn .sun-icon {
    display: none;
}
.theme-btn .moon-icon {
    display: block;
}
[data-theme="light"] .theme-btn .moon-icon {
    display: none;
}
[data-theme="light"] .theme-btn .sun-icon {
    display: block;
}

/* ---------- App Navigation ---------- */
.app-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: color-mix(in oklch, var(--bg) 75%, transparent);
    border-bottom: 1px solid var(--line);
    padding: 0 1.5rem;
}

.app-nav .inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.app-nav .page-title {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.app-nav .nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.app-nav .nav-back {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-dim);
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
.app-nav .nav-back:hover {
    color: var(--fg);
    background: var(--card);
}
.nav-spacer {
    width: 72px;
}
@media (max-width: 720px) {
    .app-nav .page-title {
        margin-left: auto;
    }
}
@media (max-width: 520px) {
    .app-nav .nav-back,
    .nav-spacer {
        display: none;
    }
    .app-nav .page-title {
        margin-left: 0;
        flex: 1;
        text-align: center;
    }
}

/* ---------- Page Header ---------- */
.page-header {
    padding: 2.5rem 0 1.5rem;
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--fg-dim);
    font-size: 1rem;
    max-width: 60ch;
}

/* ---------- Card Components ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--f-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-badge {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in oklch, var(--accent) 15%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
}

/* Lesson Card Specific */
.lesson-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lesson-card .lesson-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 12px;
    color: var(--fg-mute);
    font-family: var(--f-mono);
}

.lesson-card .lesson-title {
    font-family: var(--f-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.2;
}

.lesson-card .lesson-desc {
    color: var(--fg-dim);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.lesson-card .progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: auto;
}

.lesson-card .progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.lesson-card .card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Learner Card (Teacher Dashboard) */
.learner-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
}

.learner-card .learner-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.learner-card .learner-name {
    font-weight: 600;
    font-size: 15px;
}

.learner-card .learner-meta {
    font-size: 13px;
    color: var(--fg-dim);
    font-family: var(--f-mono);
}

.learner-card .learner-struggle {
    font-size: 13px;
    color: #ff6b6b;
    margin-top: 0.25rem;
    line-height: 1.5;
}

.learner-card .confidence-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confidence-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.confidence-dot.high { background: #4ade80; }
.confidence-dot.medium { background: #fbbf24; }
.confidence-dot.low { background: #ff6b6b; }

/* ---------- Button Variants ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border: 0;
    border-radius: 10px;
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px -10px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-3);
    color: var(--fg);
    border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--fg-dim);
    padding: 0.5rem 0.8rem;
}

.btn-ghost:hover {
    color: var(--fg);
    background: var(--card);
}

.btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 13px;
}

.btn-lg {
    padding: 0.9rem 1.6rem;
    font-size: 15px;
}

.btn-outline {
    padding: 0.65rem 1rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--fg-dim);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--fg);
    transform: translateY(-1px);
}

/* ---------- Form Elements ---------- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-dim);
    letter-spacing: 0.02em;
}

.form-select,
.form-input {
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--fg);
    font-family: var(--f-body);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-select:focus,
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6558' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Language Selector Specific */
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.language-option {
    padding: 0.75rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--card);
}

.language-option:hover {
    border-color: var(--accent);
}

.language-option.selected {
    border-color: var(--accent);
    background: color-mix(in oklch, var(--accent) 12%, transparent);
}

.language-option .lang-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0.25rem;
}

.language-option .lang-native {
    font-size: 11px;
    color: var(--fg-dim);
    font-family: var(--f-mono);
}

/* ---------- Tab System ---------- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--line);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--fg-dim);
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -2px;
}

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

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Progress Indicators ---------- */
.progress-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) var(--progress, 0%), var(--bg-3) 0%);
    display: grid;
    place-items: center;
    position: relative;
}

.progress-circle::before {
    content: "";
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg);
}

.progress-circle .progress-text {
    position: absolute;
    font-weight: 700;
    font-size: 16px;
    color: var(--fg);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-3);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent));
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Status Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.badge-success {
    background: color-mix(in oklch, #4ade80 15%, transparent);
    color: #4ade80;
    border: 1px solid color-mix(in oklch, #4ade80 30%, transparent);
}

.badge-warning {
    background: color-mix(in oklch, #fbbf24 15%, transparent);
    color: #fbbf24;
    border: 1px solid color-mix(in oklch, #fbbf24 30%, transparent);
}

.badge-danger {
    background: color-mix(in oklch, #ff6b6b 15%, transparent);
    color: #ff6b6b;
    border: 1px solid color-mix(in oklch, #ff6b6b 30%, transparent);
}

.badge-info {
    background: color-mix(in oklch, var(--accent) 15%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
}

/* ---------- Chat/Message Components ---------- */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--accent);
    color: var(--bg);
}

.message.tutor .message-avatar {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: var(--bg);
}

.message-bubble {
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.message.user .message-bubble {
    background: var(--accent);
    color: var(--bg);
    border-bottom-right-radius: 4px;
}

.message.tutor .message-bubble {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.message-meta {
    font-size: 10px;
    color: var(--fg-mute);
    font-family: var(--f-mono);
    margin-top: 0.4rem;
    letter-spacing: 0.05em;
}

.message.user .message-meta {
    text-align: right;
}

/* ---------- Quick Access Questions ---------- */
.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.quick-question-btn {
    padding: 0.6rem 1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--fg-dim);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.quick-question-btn:hover {
    border-color: var(--accent);
    color: var(--fg);
    background: color-mix(in oklch, var(--accent) 8%, transparent);
}

/* ---------- Teacher Dashboard Specific ---------- */
.teacher-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.25rem;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: center;
}

.stat-card .stat-value {
    font-family: var(--f-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--fg-dim);
    font-family: var(--f-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------- Misc Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.gap-1 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    .app-nav .inner {
        padding: 0 1rem;
    }
    
    .learner-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .lesson-card .card-actions {
        flex-direction: column;
    }
    
    .teacher-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .teacher-stats {
        grid-template-columns: 1fr;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Mobile touch target sizing ---------- */
@media (max-width: 768px) {
    .quick-question-btn {
        padding: 0.75rem 1.1rem;
        font-size: 14px;
    }
    .btn-sm {
        padding: 0.65rem 1rem;
        font-size: 14px;
    }
    .btn-ghost {
        padding: 0.65rem 0.9rem;
    }
}

/* ========== PAGE TRANSITIONS ========== */
body {
    animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ========== DEMO INDICATOR ========== */
.demo-banner {
    background: linear-gradient(90deg, var(--accent), var(--accent-deep));
    color: var(--bg);
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: var(--f-mono);
}

.demo-banner a {
    color: var(--bg);
    text-decoration: underline;
    margin-left: 0.5rem;
}

.demo-banner a:hover {
    opacity: 0.8;
}

/* ========== PRINT STYLES ========== */
@media print {
    .app-nav,
    .demo-banner,
    .btn,
    .quick-questions,
    .signup-note {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card,
    .lesson-card {
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}
