/* =========================================================
   DataGrade — Landing
   Design system + page styles
   ========================================================= */

:root {
    /* Colors */
    --bg:            #FAF9F6;
    --bg-elev:       #FFFFFF;
    --ink:           #15101F;
    --ink-soft:      #3F3852;
    --ink-muted:     #6F6783;
    --line:          #ECE7F2;
    --line-soft:     #F5F1FA;

    --violet-50:     #F5F1FF;
    --violet-100:    #EAE2FF;
    --violet-200:    #D2C2FF;
    --violet-400:    #9B7FF7;
    --violet-500:    #7C3AED;
    --violet-600:    #6320DD;
    --violet-700:    #4F18B6;
    --violet-900:    #2B0974;

    --coral-400:     #FB7185;
    --coral-500:     #F43F5E;
    --amber-400:     #FBBF24;
    --amber-500:     #F59E0B;
    --emerald-500:   #10B981;
    --emerald-50:    #ECFDF5;
    --rose-50:       #FFF1F2;

    /* Typography */
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;

    /* Radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-full: 999px;

    /* Shadows */
    --shadow-sm:  0 1px 2px rgba(21, 16, 31, 0.04), 0 1px 3px rgba(21, 16, 31, 0.06);
    --shadow-md:  0 4px 12px rgba(21, 16, 31, 0.06), 0 2px 4px rgba(21, 16, 31, 0.04);
    --shadow-lg:  0 24px 48px -12px rgba(99, 32, 221, 0.18), 0 8px 16px -8px rgba(21, 16, 31, 0.08);
    --shadow-xl:  0 40px 80px -20px rgba(99, 32, 221, 0.25), 0 16px 32px -16px rgba(21, 16, 31, 0.10);

    /* Easing */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =========================================================
   Reset
   ========================================================= */

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

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

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* =========================================================
   Utilities
   ========================================================= */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container { padding: 0 40px; }
}

.title-grad {
    background: linear-gradient(135deg, var(--violet-500) 0%, var(--coral-500) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--violet-50);
    color: var(--violet-700);
    border: 1px solid var(--violet-100);
    border-radius: var(--r-full);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.eyebrow--center { margin: 0 auto; }
.eyebrow__dot {
    width: 6px; height: 6px;
    background: var(--violet-500);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--violet-100);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--r-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.005em;
    transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
    white-space: nowrap;
    user-select: none;
}

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

.btn--primary {
    background: var(--ink);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
    background: var(--violet-600);
    box-shadow: var(--shadow-lg);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn--ghost:hover {
    background: var(--bg-elev);
    border-color: var(--violet-200);
    color: var(--violet-700);
}

.btn--lg {
    padding: 15px 28px;
    font-size: 15.5px;
}
.btn--sm {
    padding: 8px 14px;
    font-size: 13px;
}
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* =========================================================
   Background decoration
   ========================================================= */

.bg-decor {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(124, 58, 237, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 30%, transparent 75%);
}
.bg-blob {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
}
.bg-blob--1 {
    top: -200px; right: -100px;
    background: radial-gradient(circle, rgba(155, 127, 247, 0.55), transparent 70%);
    animation: blob-float 18s ease-in-out infinite;
}
.bg-blob--2 {
    top: 200px; left: -200px;
    background: radial-gradient(circle, rgba(251, 113, 133, 0.35), transparent 70%);
    animation: blob-float 22s ease-in-out infinite reverse;
}
@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.05); }
    66%      { transform: translate(-30px, 40px) scale(0.95); }
}

/* =========================================================
   Nav
   ========================================================= */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 249, 246, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.nav.is-scrolled {
    background: rgba(250, 249, 246, 0.85);
    border-bottom-color: var(--line);
}
.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav__links {
    display: none;
    gap: 32px;
}
@media (min-width: 1024px) {
    .nav__links { display: flex; }
}
.nav__links a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color .2s;
}
.nav__links a:hover { color: var(--violet-700); }
.nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background:
        linear-gradient(135deg, var(--violet-500) 0%, var(--coral-500) 100%);
    position: relative;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.brand__mark::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-mask:
        linear-gradient(135deg, transparent 45%, black 45%, black 55%, transparent 55%);
    mask:
        linear-gradient(135deg, transparent 45%, black 45%, black 55%, transparent 55%);
}
.brand__text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.01em;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    padding: 64px 0 96px;
}
@media (min-width: 1024px) {
    .hero { padding: 96px 0 120px; }
}

.hero__inner {
    display: grid;
    gap: 64px;
    align-items: center;
}
@media (min-width: 1024px) {
    .hero__inner {
        grid-template-columns: 1.05fr 1fr;
        gap: 80px;
    }
}

.hero__copy { max-width: 600px; }

.hero__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--ink);
    margin: 24px 0;
}

.hero__lead {
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 520px;
    margin-bottom: 36px;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.hero__bullets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
}
.hero__bullets li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
}
.hero__bullets svg {
    color: var(--emerald-500);
    flex-shrink: 0;
}

/* Demo card */
.hero__demo {
    position: relative;
    perspective: 1500px;
}

.quiz-card {
    background: var(--bg-elev);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xl);
    padding: 28px;
    transform: rotate(-1.5deg);
    transition: transform .8s var(--ease-out);
    position: relative;
    z-index: 2;
}
.quiz-card:hover { transform: rotate(0); }

@media (min-width: 1024px) {
    .quiz-card {
        padding: 32px;
        margin-left: 24px;
    }
}

.quiz-card__header { margin-bottom: 20px; }
.quiz-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.quiz-card__chip {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--violet-50);
    color: var(--violet-700);
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
}
.quiz-card__timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-muted);
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.quiz-card__progress {
    height: 4px;
    background: var(--line-soft);
    border-radius: var(--r-full);
    overflow: hidden;
}
.quiz-card__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--violet-500), var(--coral-500));
    border-radius: var(--r-full);
    transition: width .5s var(--ease-out);
}

.quiz-card__body { min-height: 260px; }

.quiz-q {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.35;
    color: var(--ink);
    margin-bottom: 18px;
}

.quiz-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    text-align: left;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 8px;
    transition: all .2s var(--ease-out);
    position: relative;
}
.quiz-choice:hover:not(:disabled) {
    border-color: var(--violet-400);
    background: var(--violet-50);
    color: var(--ink);
    transform: translateX(2px);
}

.quiz-choice__bullet {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: white;
    flex-shrink: 0;
    transition: all .2s;
    position: relative;
}
.quiz-choice:hover:not(:disabled) .quiz-choice__bullet {
    border-color: var(--violet-400);
}

.quiz-choice.is-selected {
    border-color: var(--violet-500);
    background: var(--violet-50);
    color: var(--ink);
}
.quiz-choice.is-selected .quiz-choice__bullet {
    border-color: var(--violet-500);
    background: var(--violet-500);
}
.quiz-choice.is-selected .quiz-choice__bullet::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: white;
    border-radius: 50%;
}

.quiz-choice.is-correct {
    border-color: var(--emerald-500);
    background: var(--emerald-50);
    color: var(--ink);
}
.quiz-choice.is-correct .quiz-choice__bullet {
    border-color: var(--emerald-500);
    background: var(--emerald-500);
}
.quiz-choice.is-correct .quiz-choice__bullet::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.quiz-choice.is-wrong {
    border-color: var(--coral-500);
    background: var(--rose-50);
    color: var(--ink);
}
.quiz-choice.is-wrong .quiz-choice__bullet {
    border-color: var(--coral-500);
    background: var(--coral-500);
}
.quiz-choice.is-wrong .quiz-choice__bullet::after {
    content: "✕";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: white;
    font-size: 11px;
    font-weight: 800;
}

.quiz-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.quiz-card__hint {
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 500;
}

/* Floating labels around the quiz card */
.floating-label {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    box-shadow: var(--shadow-md);
    z-index: 3;
    animation: float-bob 4s ease-in-out infinite;
}
.floating-label--top {
    top: -16px;
    right: 24px;
    color: var(--emerald-500);
}
.floating-label--bottom {
    bottom: -18px;
    left: 16px;
    color: var(--coral-500);
    animation-delay: -2s;
}
@keyframes float-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* =========================================================
   Strip (stats)
   ========================================================= */

.strip {
    padding: 32px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-elev);
}
.strip__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 24px;
}
.strip__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}
.strip__num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.strip__lbl {
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 500;
}
.strip__sep {
    display: none;
    width: 1px;
    height: 32px;
    background: var(--line);
}
@media (min-width: 768px) {
    .strip__sep { display: block; }
}

/* =========================================================
   Section heads
   ========================================================= */

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}
.section-head__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 20px 0 16px;
}
.section-head__lead {
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    color: var(--ink-soft);
    line-height: 1.6;
}

/* =========================================================
   Features (Bento)
   ========================================================= */

.features { padding: 96px 0; }

.bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
@media (min-width: 768px) {
    .bento {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(220px, auto);
    }
    .bento__card--lg {
        grid-column: span 2;
    }
}

.bento__card {
    position: relative;
    padding: 28px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s var(--ease-out);
    overflow: hidden;
}
.bento__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--violet-200);
}
.bento__card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--violet-500), var(--coral-500));
    opacity: 0;
    transition: opacity .35s;
}
.bento__card:hover::before { opacity: 1; }

.bento__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--violet-50);
    color: var(--violet-600);
    margin-bottom: 18px;
}
.bento__card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 8px;
}
.bento__card h3 em {
    font-style: italic;
    color: var(--violet-600);
    font-weight: 700;
}
.bento__card p {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.bento__visual {
    margin-top: 20px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--r-md);
    border: 1px solid var(--line-soft);
    font-family: var(--font-body);
    font-size: 13px;
}
.csv-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.6fr;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line-soft);
}
.csv-row:last-child { border-bottom: none; }
.csv-row--head {
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
}

.bento__pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--r-full);
    font-size: 12.5px;
    font-weight: 600;
}
.pill--violet { background: var(--violet-50); color: var(--violet-700); }
.pill--coral  { background: var(--rose-50); color: var(--coral-500); }

/* =========================================================
   Workflow (steps)
   ========================================================= */

.workflow {
    padding: 96px 0;
    background: linear-gradient(180deg, transparent, var(--bg-elev) 60%, transparent);
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    counter-reset: step;
}
@media (min-width: 768px) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.step {
    position: relative;
    padding: 36px 28px 32px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step__num {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    color: var(--violet-500);
    background: var(--violet-50);
    padding: 4px 10px;
    border-radius: var(--r-full);
    margin-bottom: 18px;
    letter-spacing: 0.05em;
}
.step h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 10px;
}
.step p {
    color: var(--ink-soft);
    line-height: 1.6;
}

/* =========================================================
   Final CTA
   ========================================================= */

.cta { padding: 96px 0; }

.cta__card {
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(155, 127, 247, 0.5), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(251, 113, 133, 0.4), transparent 50%),
        linear-gradient(135deg, #1A0F2E 0%, #2B0974 100%);
    border-radius: var(--r-xl);
    padding: 72px 48px;
    overflow: hidden;
    color: white;
}
.cta__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}
.cta__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: white;
    margin-bottom: 16px;
}
.cta__title .title-grad {
    background: linear-gradient(135deg, #FCD34D 0%, var(--coral-400) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.cta__lead {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.125rem;
    margin-bottom: 32px;
}
.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.cta .btn--primary {
    background: white;
    color: var(--ink);
}
.cta .btn--primary:hover {
    background: var(--bg);
    color: var(--violet-700);
}
.cta .btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
}
.cta .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: white;
}

.cta__decor {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 90%);
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--line);
}
.footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (min-width: 768px) {
    .footer__inner {
        grid-template-columns: 1.4fr 2fr;
    }
}
.footer__brand p {
    color: var(--ink-muted);
    font-size: 14px;
    margin-top: 12px;
    max-width: 280px;
}
.footer__links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.footer__links h4 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.footer__links a {
    display: block;
    font-size: 14px;
    color: var(--ink-soft);
    padding: 4px 0;
    transition: color .2s;
}
.footer__links a:hover { color: var(--violet-700); }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-muted);
}
.footer__heart .heart {
    color: var(--coral-500);
    animation: heart-beat 1.6s ease-in-out infinite;
    display: inline-block;
}
@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* =========================================================
   Reveal animations on scroll
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Language switcher (FR / EN / 中)
   ========================================================= */

/* Deux variantes coexistent :
   - .lang-switch (sans .--full) = toggle cyclique 1 bouton.
     Le <a> est transparent, le span .lang-switch__btn porte la pille.
     Utilisé sur la nav landing et la sidebar prof (compact).
   - .lang-switch--full = toggle 3 positions (FR · EN · 中).
     Container <div> avec 3 <a> internes. La langue courante a
     `.is-active`. Utilisé sur les pages auth pour la découvrabilité
     (un visiteur chinois voit 中 et clique directement). */

/* ========== Toggle cyclique (par défaut) ========== */
.lang-switch:not(.lang-switch--full) {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    user-select: none;
}
.lang-switch:not(.lang-switch--full) .lang-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 28px;
    padding: 0 14px;
    border-radius: var(--r-full);
    background: var(--violet-50);
    border: 1px solid var(--violet-100);
    color: var(--violet-700);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out), color 0.15s var(--ease-out), transform 0.1s var(--ease-out);
}
.lang-switch:not(.lang-switch--full):hover .lang-switch__btn {
    background: var(--violet-100);
    border-color: var(--violet-200);
}
.lang-switch:not(.lang-switch--full):active .lang-switch__btn {
    transform: scale(0.94);
}

/* ========== Toggle 3-positions (variant 'auth') ========== */
.lang-switch--full {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--violet-50);
    border: 1px solid var(--violet-100);
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.lang-switch--full .lang-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 26px;
    padding: 0 12px;
    border-radius: var(--r-full);
    color: var(--ink-muted);
    background: transparent;
    border: none;
    text-decoration: none;
    transition: color 0.15s var(--ease-out), background 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.lang-switch--full .lang-switch__btn:hover {
    color: var(--violet-700);
    background: rgba(255, 255, 255, 0.55);
}
.lang-switch--full .lang-switch__btn.is-active,
.lang-switch--full .lang-switch__btn.is-active:hover {
    background: var(--bg-elev);
    color: var(--violet-700);
    box-shadow: 0 1px 3px rgba(99, 32, 221, 0.18), 0 1px 2px rgba(21, 16, 31, 0.06);
    cursor: default;
}

/* Variant: floating top-right (login / forgot-password / etc.) */
.lang-switch--auth {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 10;
}

/* Variant: in the prof sidebar (own row above footer) */
.sidebar__lang {
    display: flex;
    justify-content: center;
    padding: 0 16px 12px;
}
.lang-switch--sidebar {
    /* defaults inherited */
}

/* Variant: in the landing nav (small nudge for spacing) */
.lang-switch--nav {
    margin-right: 8px;
}

@media (max-width: 720px) {
    .lang-switch--auth {
        top: 12px;
        right: 12px;
    }
    /* Sur mobile, le logomark seul suffit — le mot "DataGrade" prend ~110 px
       qui sont décisifs pour faire tenir nav-links + lang-switch + 2 boutons
       sur une ligne sans wrap moche. Scopé à .nav uniquement (la marque
       reste pleine taille sur les pages auth, footer, sidebar etc.). */
    .nav .brand__text { display: none; }
    /* Compactage du switcher dans la nav landing pour ne pas faire déborder
       la barre quand on a aussi "Espace prof" + "Espace élève" à droite. */
    .lang-switch--nav {
        padding: 2px;
        gap: 2px;
        font-size: 12px;
        margin-right: 4px;
    }
    .lang-switch--nav .lang-switch__btn {
        min-width: 28px;
        height: 24px;
        padding: 0 8px;
    }
}

/* Cran de plus petit : ≤ 480px (téléphones type iPhone SE / Android moyen).
   On laisse la barre wrapper sur deux lignes plutôt que d'écraser tout —
   sinon les boutons "Espace prof" / "Espace élève" passent en mode pile. */
@media (max-width: 540px) {
    .nav__inner {
        height: auto;
        padding: 12px 0;
        flex-wrap: wrap;
        gap: 10px;
    }
    .nav__actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .lang-switch--nav { margin-right: 0; }
    .nav__actions .btn--ghost,
    .nav__actions .btn--primary {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* =========================================================
   Sidebar prof — compactage du switcher de langue sur mobile
   ========================================================= */
/* Sur ≤ 900px la sidebar passe horizontale (icônes only) ; le switcher
   occupait ~130px qui poussaient le footer (avatar) hors-vue. On le
   compacte fortement et on le force flex-shrink: 0 pour qu'il ne se fasse
   pas écraser par .sidebar__nav qui est en flex: 1. */
@media (max-width: 900px) {
    .sidebar__lang {
        padding: 0;
        flex-shrink: 0;
    }
    .lang-switch--sidebar {
        padding: 2px;
        gap: 2px;
        font-size: 11.5px;
    }
    .lang-switch--sidebar .lang-switch__btn {
        min-width: 26px;
        height: 22px;
        padding: 0 6px;
    }
}
/* Cran de plus : sur les très petits écrans (≤ 380px) on cache complètement
   le switcher dans la topbar prof — l'utilisateur peut toujours changer
   la langue depuis /prof/settings.php (où le switcher reste pleine taille). */
@media (max-width: 380px) {
    .sidebar__lang { display: none; }
}
