/* =========================================================
   ELCT Placement Test — Design Tokens
   Palette: the ELCT logo's blue, a glassy light-blue accent,
   and neutral grays/white. Frosted-glass surfaces (backdrop-
   filter blur) are used for the top bar and a few highlighted
   panels to give the "glassy blue" look asked for.
   Headings: Sora (confident, geometric)
   Body/UI:  Inter
   Numerals (timer, palette, scores): JetBrains Mono
========================================================= */
:root {
    --c-primary:        #0B3AD1;   /* sampled directly from the ELCT logo */
    --c-primary-dark:   #071F70;
    --c-primary-light:  #4E74E8;
    --c-primary-tint:   #E8EEFC;   /* light wash of primary — selected states, subtle fills */
    --c-accent:         #4FC3F7;   /* glassy sky-blue — focus rings, glass highlights */
    --c-bg:             #EEF2FB;
    --c-surface:        #FFFFFF;
    --c-glass:          rgba(255, 255, 255, 0.6);
    --c-glass-strong:   rgba(255, 255, 255, 0.78);
    --c-glass-border:   rgba(255, 255, 255, 0.55);
    --c-border:         #D8DFEC;
    --c-text:           #16213A;
    --c-text-muted:     #5B6472;
    --c-success:        #1F9D55;
    --c-success-bg:     #E7F7ED;
    --c-warning:        #C98A12;
    --c-warning-bg:     #FBF1DD;
    --c-danger:         #D64545;
    --c-danger-bg:      #FCEAEA;

    --font-display: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(11, 58, 209, 0.08);
    --shadow-md: 0 6px 20px rgba(11, 58, 209, 0.10);
    --shadow-lg: 0 16px 40px rgba(7, 31, 112, 0.16);
    --shadow-glass: 0 8px 32px rgba(11, 58, 209, 0.14);
}

/* Frosted-glass utility — used for the top bar and a few highlighted
   panels. Falls back to a plain solid surface on browsers without
   backdrop-filter support (older Firefox/Android WebView), which is
   why every .glass user also sets a normal background as a base. */
.glass {
    background: var(--c-glass);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid var(--c-glass-border);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    background: linear-gradient(180deg, #E4ECFB 0%, #EEF2FB 45%, #F5F7FC 100%);
    background-attachment: fixed;
    color: var(--c-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* safety net: no single element should ever be able to force horizontal scroll on mobile */
}
html { overflow-x: hidden; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--c-primary-dark);
    line-height: 1.25;
    margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
a { color: var(--c-primary); }
:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Layout shells ---------- */
.page-wrap {
    flex: 1;
    width: 100%;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--c-glass-strong);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--c-glass-border);
    box-shadow: var(--shadow-glass);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-mark {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    align-items: center; justify-content: center;
    font-size: 15px;
}
.brand-text { font-family: var(--font-display); font-weight: 700; color: var(--c-primary-dark); font-size: 17px; }
.step-indicator {
    font-size: 13px;
    color: var(--c-text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
    text-decoration: none;
    line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-outline { background: #fff; color: var(--c-primary); border-color: var(--c-primary-light); }
.btn-outline:hover { background: var(--c-bg); }
.btn-ghost { background: transparent; color: var(--c-text-muted); }
.btn-ghost:hover { background: var(--c-border); }
.btn-success { background: var(--c-success); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-highlight {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 60%, var(--c-accent) 130%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(11, 58, 209, 0.35), 0 0 0 1px rgba(255,255,255,0.15) inset;
    animation: btnPulse 2.6s ease-in-out infinite;
}
.btn-highlight:hover {
    background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 60%, var(--c-primary-light) 130%);
    box-shadow: 0 8px 28px rgba(11, 58, 209, 0.45), 0 0 0 1px rgba(255,255,255,0.2) inset;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(11, 58, 209, 0.35), 0 0 0 1px rgba(255,255,255,0.15) inset; }
    50% { box-shadow: 0 6px 30px rgba(79, 195, 247, 0.55), 0 0 0 1px rgba(255,255,255,0.25) inset; }
}
@media (prefers-reduced-motion: reduce) {
    .btn-highlight { animation: none; }
}

/* ---------- Cards ---------- */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ---------- Landing page hero (50/50 split: text + video) ---------- */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 56px 0 40px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--c-primary-dark);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.hero-left h1 {
    font-size: clamp(28px, 3.6vw, 42px);
    max-width: 18ch;
}
.hero-left p.lead {
    font-size: 17px;
    color: var(--c-text-muted);
    max-width: 48ch;
    margin-bottom: 18px;
}
.hero-checklist {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hero-checklist li {
    position: relative;
    padding-left: 30px;
    font-size: 15px;
    color: var(--c-text);
    font-weight: 500;
}
.hero-checklist li::before {
    content: '\2713';
    position: absolute;
    left: 0; top: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary));
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--c-glass-border);
}
.hero-video-wrap iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}
.hero-video-placeholder {
    position: absolute; inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
}
.hero-video-placeholder .play-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    padding-left: 4px; /* optically center the play triangle */
}
.hero-video-placeholder p {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 32px 0;
}
.info-card {
    padding: 24px;
}
.info-card .info-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--c-bg);
    color: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    margin-bottom: 14px;
}
.info-card h3 { font-size: 16px; margin-bottom: 6px; }
.info-card p { font-size: 14px; color: var(--c-text-muted); margin: 0; }

.parts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14.5px;
}
.parts-table th, .parts-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
}
.parts-table th {
    font-family: var(--font-display);
    color: var(--c-primary-dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.parts-table td.points, .parts-table th.points { text-align: right; font-family: var(--font-mono); }

.marking-note {
    background: var(--c-primary-dark);
    color: #eaf1fb;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 32px 0;
}
.marking-note h3 { color: #fff; }
.marking-note .cefr-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.cefr-chip {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    flex: 1 1 140px;
}
.cefr-chip b { font-family: var(--font-mono); color: #fff; display: block; font-size: 15px; }

.start-block {
    text-align: center;
    padding: 40px 0 64px;
}
.start-block p { color: var(--c-text-muted); font-size: 14px; }

.highlight-card {
    padding: 24px 28px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: linear-gradient(135deg, var(--c-primary-tint) 0%, var(--c-glass) 100%);
    border: 1px solid var(--c-primary-light);
    border-left: 5px solid var(--c-primary);
    box-shadow: var(--shadow-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--c-text-muted);
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
}
.site-footer a { color: var(--c-text-muted); text-decoration: underline; }
