/* ==========================================================================
   Spanish Tutor Now with Ángel — Apple-inspired redesign
   Palette: wine · warm black · beige · white · gold
   ========================================================================== */

:root {
  --white:     #ffffff;
  --beige:     #f4eee2;   /* light section bg (Apple's #f5f5f7, warmed) */
  --beige-2:   #ece2d1;
  --black:     #16120f;   /* warm near-black (dark tiles + text) */
  --black-2:   #221c17;

  --ink:       #1c1815;   /* primary text */
  --ink-soft:  #4b423b;
  --ink-mute:  #86796d;

  --wine:      #6a1330;
  --wine-deep: #490c21;
  --wine-soft: #8a2145;

  --gold:      #c19a4d;
  --gold-deep: #9a7a30;
  --gold-bright:#e4c37e;

  --cream:     #f6ecd9;   /* text on dark */

  --accent:    var(--wine);
  --accent-ink:#ffffff;

  --line:      rgba(28, 24, 21, 0.12);
  --line-soft: rgba(28, 24, 21, 0.07);
  --line-gold: rgba(193, 154, 77, 0.42);

  --shadow:    0 30px 70px rgba(28, 16, 10, 0.14);
  --shadow-sm: 0 10px 30px rgba(28, 16, 10, 0.08);

  --radius:    28px;   /* Apple-large rounding */
  --radius-md: 20px;
  --radius-sm: 12px;

  --nav-h:     52px;
  --ease-out:  cubic-bezier(.28,.11,.32,1);

  --wrong:     #a3372b;
  --right:     #3f6b4e;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--ink);
}
p { margin: 0; }
em { font-style: normal; color: var(--wine); }

.container { width: min(1120px, 100% - 3rem); margin-inline: auto; }
section { position: relative; }
.section-pad { padding-block: clamp(4.5rem, 9vw, 8rem); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

[hidden] { display: none !important; }

/* ---------- Buttons (Apple pill style) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .85rem 1.5rem;
  border-radius: 980px;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--wine); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--wine); background: rgba(106,19,48,.04); }
.btn-sm { padding: .5rem 1.1rem; font-size: .9rem; }

/* Apple-style inline text link with chevron */
.text-link {
  display: inline-flex; align-items: center; gap: .15rem;
  color: var(--wine); font-weight: 500; font-size: 1.02rem;
}
.text-link::after { content: "›"; font-size: 1.25em; line-height: 0; transform: translateY(.04em); transition: transform .3s var(--ease-out); }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover::after { transform: translateX(3px) translateY(.04em); }

/* ---------- Nav (slim frosted, Apple-style) ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(244, 238, 226, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-out), background .4s var(--ease-out);
}
.nav.is-solid { border-bottom-color: var(--line-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: .55rem; line-height: 1; }
.nav-logo-icon { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; gap: 1px; }
.nav-logo-name { font-weight: 600; font-size: .95rem; letter-spacing: -0.02em; }
.nav-logo-tutor { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link { font-size: .82rem; font-weight: 400; color: var(--ink-soft); transition: color .25s; }
.nav-link:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 17px; height: 17px; }

/* ---------- Hero (Apple centered) ---------- */
.hero {
  background: var(--beige);
  text-align: center;
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  overflow: clip;
}
.hero-inner { max-width: 900px; margin-inline: auto; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 500; color: var(--gold-deep);
  margin-bottom: 1rem; letter-spacing: -0.01em;
}
.hero-kicker .dot { display: none; }
.hero-title {
  font-size: clamp(2.7rem, 7vw, 5.2rem);
  font-weight: 600; line-height: 1.03; letter-spacing: -0.035em;
  max-width: 16ch; margin-inline: auto; text-wrap: balance;
}
.wave-word { display: inline-block; white-space: nowrap; }
.wave-letter {
  display: inline-block; will-change: transform;
  animation: heroWave 3s ease-in-out infinite;
}
@keyframes heroWave {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.14em); }
}
/* Gold-shifting wave: movement + animated wine→gold gradient per letter */
.wave-letter.is-gold {
  background: linear-gradient(90deg,
    var(--wine) 0%, var(--wine-soft) 18%, var(--gold-deep) 38%,
    var(--gold-bright) 50%, var(--gold-deep) 62%, var(--wine-soft) 82%, var(--wine) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: heroWave 3s ease-in-out infinite, heroHue 7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .wave-letter { animation: none; }
  .wave-letter.is-gold { animation: none; }
}

.hero-title em {
  background: linear-gradient(90deg,
    var(--wine) 0%, var(--wine-soft) 18%, var(--gold-deep) 38%,
    var(--gold-bright) 50%, var(--gold-deep) 62%, var(--wine-soft) 82%, var(--wine) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: heroHue 7s linear infinite;
}
@keyframes heroHue {
  to { background-position: 220% center; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title em { animation: none; }
}
.hero-sub {
  margin: 1.4rem auto 0;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 400; color: var(--ink-soft);
  max-width: 42ch; letter-spacing: -0.015em; line-height: 1.35;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; justify-content: center; margin-top: 2rem; }
.hero-showcase {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hero-showcase img,
.hero-showcase-video {
  width: 100%; height: clamp(280px, 42vw, 520px); object-fit: cover; display: block;
}
@media (prefers-reduced-motion: reduce) {
  .hero-showcase-video { display: none; }
  .hero-showcase { background: center / cover no-repeat url("assets/img/hero-showcase.webp?v=20260732"); }
}

/* Scroll-linked subtle zoom */
[data-zoom] { will-change: transform; transform-origin: center center; }
.hero-meta {
  display: flex; gap: clamp(1.5rem, 5vw, 4rem); flex-wrap: wrap; justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.hero-meta-item { display: flex; flex-direction: column; gap: .2rem; }
.hero-meta-num { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; color: var(--wine); }
.hero-meta-label { font-size: .85rem; color: var(--ink-mute); }

/* ---------- Section heads ---------- */
.eyebrow {
  font-size: .95rem; font-weight: 600; color: var(--gold-deep);
  letter-spacing: -0.01em; margin-bottom: .6rem; display: block;
}
.section-head { max-width: 720px; margin-bottom: 3.5rem; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.section-head p { margin-top: 1rem; color: var(--ink-soft); font-size: clamp(1.05rem, 1.8vw, 1.3rem); letter-spacing: -0.015em; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Level divider (marks a new CEFR level within a page) ---------- */
.level-divider {
  display: flex; align-items: center; gap: 1.1rem;
  background: var(--wine); color: #fff;
  border-radius: var(--radius-md);
  padding: 1.2rem 1.7rem;
  margin-bottom: 2.6rem;
  box-shadow: 0 14px 30px rgba(106,19,48,.18);
}
.level-divider-badge {
  flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--gold); color: var(--black); font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
}
.level-divider-copy { display: flex; flex-direction: column; gap: .1rem; }
.level-divider-eyebrow { font-weight: 600; font-size: .98rem; letter-spacing: -0.01em; color: var(--gold-bright); }
.level-divider-copy p { color: rgba(246,236,217,.78); font-size: .9rem; }

/* ---------- About ---------- */
.about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about-figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-figure img { aspect-ratio: 4/5; object-fit: cover; object-position: center top; width: 100%; }
.about-figure-badge {
  position: absolute; left: 1.1rem; bottom: 1.1rem;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  border-radius: 980px; padding: .55rem 1rem; font-size: .82rem; font-weight: 500;
}
.about-num { font-size: .95rem; font-weight: 600; color: var(--gold-deep); margin-bottom: .8rem; display: block; }
.about-copy h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 1.3rem; }
.about-copy p { color: var(--ink-soft); margin-bottom: 1.1rem; font-size: 1.08rem; letter-spacing: -0.012em; }
.about-copy p:last-of-type { margin-bottom: 1.6rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.about-tag { font-size: .84rem; padding: .45rem 1rem; border-radius: 980px; background: var(--beige); color: var(--ink-soft); }

.about-stats { display: flex; flex-wrap: wrap; gap: 2.4rem; margin-top: 2rem; padding-top: 1.8rem; border-top: 1px solid var(--line-soft); }
.about-stat { display: flex; flex-direction: column; gap: .15rem; }
.about-stat-num { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; color: var(--wine); display: flex; align-items: center; gap: .4rem; }
.about-stat-num .stars { color: var(--gold); font-size: 1.1rem; letter-spacing: .05em; }
.about-stat-num .stat-icon { width: 1.5rem; height: 1.5rem; color: var(--gold); flex-shrink: 0; }
.about-stat-label { font-size: .84rem; color: var(--ink-mute); }

/* ---------- How it works ---------- */
.how { background: var(--beige); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step {
  background: var(--white); border-radius: var(--radius-md); padding: 2.2rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.step-num {
  font-size: 1rem; font-weight: 600; color: var(--gold-bright);
  background: var(--wine); width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.4rem;
}
.step h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: .6rem; }
.step p { color: var(--ink-mute); font-size: .98rem; }

/* ---------- Levels ---------- */
.levels { background: var(--white); }
.levels-illustration { max-width: 640px; margin: 0 auto 1rem; }
.levels-illustration img { width: 100%; height: auto; mix-blend-mode: multiply; }
.levels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.level-card {
  position: relative; background: var(--beige); border-radius: var(--radius-md);
  padding: 2rem; overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), background .4s var(--ease-out);
}
/* Golden light reflection traveling around the border */
.level-card > * { position: relative; z-index: 1; }
.level-card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--angle),
    transparent 0deg, transparent 30deg,
    var(--gold) 58deg, var(--gold-bright) 74deg, #fff7e6 82deg,
    var(--gold-bright) 90deg, var(--gold) 106deg,
    transparent 140deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .45s var(--ease-out);
  animation: cardBorderSpin 3.2s linear infinite;
}
.level-card:hover {
  transform: translateY(-5px); background: var(--white);
  box-shadow: 0 0 0 1px var(--line-gold), 0 20px 45px rgba(193,154,77,.16), var(--shadow-sm);
}
.level-card:hover::before { opacity: 1; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes cardBorderSpin { to { --angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .level-card::before { animation: none; }
}
.level-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: var(--wine); color: var(--gold-bright); box-shadow: 0 0 0 1px var(--line-gold);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; margin-bottom: 1.2rem;
}
.level-card h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: .5rem; }
.level-card .level-topic { color: var(--ink-mute); font-size: .92rem; margin-bottom: 1rem; min-height: 2.6rem; }
.level-card--soon { cursor: default; }
.level-card--soon:hover { transform: none; background: var(--beige); box-shadow: none; }
.level-card--soon:hover::before { opacity: 0; }
.level-card--soon .level-tag { background: var(--line); color: var(--ink-mute); box-shadow: none; }
.level-card--soon h3, .level-card--soon .level-topic { opacity: .6; }
.level-card--soon .level-link { color: var(--ink-mute); }
.level-card--soon .level-link .arrow { display: none; }
.level-card .level-link { font-size: .9rem; font-weight: 500; color: var(--wine); display: inline-flex; align-items: center; gap: .3rem; }
.level-card .level-link .arrow { transition: transform .3s var(--ease-out); }
.level-card:hover .level-link .arrow { transform: translateX(4px); }

/* ---------- Reviews ---------- */
.reviews { background: var(--beige); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review-card {
  background: var(--white); border-radius: var(--radius-md); padding: 1.9rem;
  display: flex; flex-direction: column; gap: .9rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.review-head { display: flex; align-items: center; gap: .8rem; }
.review-avatar {
  width: 2.8rem; height: 2.8rem; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(150deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: var(--gold-bright); font-weight: 600; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px var(--line-gold);
}
.review-meta { display: flex; flex-direction: column; }
.review-name { font-weight: 600; font-size: 1rem; letter-spacing: -0.015em; }
.review-date { font-size: .78rem; color: var(--ink-mute); }
.review-country { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--ink-mute); }
.review-flag { width: 20px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); flex-shrink: 0; }
.review-stars { color: var(--gold); font-size: 1rem; letter-spacing: .08em; }
.review-text { color: var(--ink-soft); font-size: .96rem; line-height: 1.55; }
.reviews-source {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.3rem; color: var(--ink-mute); font-size: .88rem; font-weight: 500;
}
.preply-logo { height: 22px; width: auto; opacity: .82; transition: opacity .3s var(--ease-out); }
.reviews-source:hover { color: var(--ink-soft); }
.reviews-source:hover .preply-logo { opacity: 1; }

.reviews-cta { text-align: center; margin-top: 2.8rem; }

/* ---------- Final CTA (dark Apple tile) ---------- */
.cta-final {
  background: var(--black);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(3.5rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset: -60% -10% auto -10%; height: 500px;
  background: radial-gradient(50% 60% at 50% 0%, rgba(193,154,77,.18), transparent 70%);
}
.cta-final h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600; letter-spacing: -0.03em; max-width: 20ch; margin-inline: auto; position: relative; }
.cta-final h2 em { background: linear-gradient(120deg, var(--gold-bright), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-final p { color: rgba(246,236,217,.72); margin-top: 1rem; max-width: 44ch; margin-inline: auto; font-size: 1.15rem; position: relative; }
.cta-final .hero-actions { justify-content: center; position: relative; margin-top: 2.2rem; }
.cta-final .btn-primary { background: var(--gold); color: var(--black); }
.cta-final .btn-primary:hover { background: var(--gold-bright); }
.cta-final .btn-ghost { border-color: rgba(246,236,217,.3); color: #fff; }
.cta-final .btn-ghost:hover { border-color: var(--gold-bright); background: rgba(246,236,217,.08); }

/* ---------- Footer ---------- */
.footer { padding-block: 2.5rem; background: var(--beige); border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.6rem; }
.footer-links a { font-size: .85rem; color: var(--ink-mute); }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: .82rem; color: var(--ink-mute); }

/* ==========================================================================
   Level pages
   ========================================================================== */
.level-hero {
  position: relative; overflow: hidden;
  background: var(--black); color: var(--cream);
  padding-top: calc(var(--nav-h) + 3.5rem); padding-bottom: 3.5rem;
}
.level-hero::before {
  content: ""; position: absolute; inset: -60% -10% auto auto; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(193,154,77,.18), transparent 70%); pointer-events: none;
}
.level-hero > .container { position: relative; }

/* Video cover variant */
.level-hero--video {
  min-height: 58vh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3rem;
}
.level-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.level-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(22,18,15,.72) 0%, rgba(22,18,15,.86) 100%),
    linear-gradient(100deg, rgba(74,12,34,.55) 0%, rgba(22,18,15,.2) 60%);
}
.level-hero--video::before { z-index: 1; }
.level-hero--video > .container { position: relative; z-index: 2; width: min(1120px, 100% - 3rem); }
@media (prefers-reduced-motion: reduce) {
  .level-hero-video { display: none; }
}

/* Image carousel (Resources) */
.img-carousel {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.img-carousel-track {
  display: flex; transition: transform .55s cubic-bezier(.65,0,.35,1);
}
.img-carousel-slide { flex: 0 0 100%; min-width: 0; }
.img-carousel-slide img {
  width: 100%; height: clamp(280px, 42vw, 480px); object-fit: cover; display: block;
}
.img-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,18,15,.42); backdrop-filter: blur(6px); color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.img-carousel-arrow:hover { background: rgba(22,18,15,.66); }
.img-carousel-arrow svg { width: 22px; height: 22px; }
.img-carousel-arrow--prev { left: clamp(.6rem, 2vw, 1.2rem); }
.img-carousel-arrow--next { right: clamp(.6rem, 2vw, 1.2rem); }
.img-carousel-dots {
  position: absolute; left: 0; right: 0; bottom: clamp(.8rem, 2vw, 1.3rem);
  display: flex; gap: .5rem; justify-content: center;
}
.img-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.5); transition: background .2s ease, transform .2s ease;
}
.img-carousel-dot.is-active { background: #fff; transform: scale(1.25); }
@media (max-width: 640px) {
  .img-carousel-arrow { width: 38px; height: 38px; }
  .img-carousel-arrow svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .img-carousel-track { transition: none; }
}

/* Embedded game (Villa Ñ) */
.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1a1410;
}
.game-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* En móvil el juego necesita una banda extra bajo la escena: sus controles
   táctiles se anclan al marco, y sin ese hueco taparían el mapa. */
@media (max-width: 700px) {
  .game-frame { aspect-ratio: 3 / 4; max-height: 88vh; }
}

/* Visual-novel style mini game */
.vn-shell {
  max-width: 680px; margin: 0 auto; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.8rem, 4vw, 2.8rem);
}
.vn-progress { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1.8rem; }
.vn-progress-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--beige-2); transition: background .2s ease; }
.vn-progress-dot.is-current { background: var(--gold); transform: scale(1.2); }
.vn-progress-dot.is-done { background: var(--wine); }
.vn-scene { text-align: center; }
.vn-avatar { font-size: 2.6rem; margin-bottom: .7rem; }
.vn-speaker { font-weight: 600; color: var(--wine); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.vn-bubble {
  background: var(--beige); border-radius: var(--radius-md);
  padding: 1.3rem 1.6rem; font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 1.7rem;
}
.vn-options { display: flex; flex-direction: column; gap: .8rem; text-align: left; }
.vn-option {
  padding: 1rem 1.3rem; border-radius: var(--radius-sm); border: 2px solid var(--beige-2);
  background: #fff; cursor: pointer; font-size: 1.02rem; font-family: inherit; color: var(--ink);
  transition: border-color .2s ease, background .2s ease; text-align: left;
}
.vn-option:hover:not(:disabled) { border-color: var(--gold); }
.vn-option:disabled { cursor: default; opacity: .6; }
.vn-option.is-correct { border-color: #2f9e57; background: #eafaf0; opacity: 1; }
.vn-option.is-incorrect { border-color: #c1473a; background: #fdecea; opacity: 1; }
.vn-feedback {
  margin-top: 1.1rem; padding: .95rem 1.15rem; border-radius: var(--radius-sm);
  font-size: .96rem; text-align: left;
}
.vn-feedback--incorrect { background: #fdecea; color: #8a2b22; }
.vn-final .vn-avatar { font-size: 3rem; }

/* Lightbox: click-to-enlarge overlay for gallery images */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.2rem, 5vw, 3rem);
  background: rgba(14, 10, 8, .88); backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%; max-height: 100%; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); object-fit: contain;
}
.lightbox-close {
  position: absolute; top: clamp(1rem, 3vw, 1.6rem); right: clamp(1rem, 3vw, 1.6rem);
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); color: #fff;
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,.24); }
.lightbox-close svg { width: 20px; height: 20px; }

/* Lesson mascot: floating clip that appears briefly, then fades away */
.mascot-widget {
  position: fixed; right: clamp(1rem, 3vw, 1.8rem); bottom: clamp(1rem, 3vw, 1.8rem);
  width: clamp(120px, 16vw, 168px); aspect-ratio: 1 / 1;
  border-radius: 50%; overflow: hidden;
  box-shadow: var(--shadow); border: 3px solid var(--paper, #fff);
  background: var(--paper-soft, #f4ede2);
  z-index: 40; pointer-events: none;
  opacity: 0; transform: translateY(14px) scale(.92);
  transition: opacity .55s ease, transform .55s ease;
}
.mascot-widget.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.mascot-video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .mascot-widget { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-widget { display: none; }
}

/* Static image cover variant */
.level-hero--media {
  min-height: 44vh; display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3rem;
}
.level-hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 68% 40%; z-index: 0;
}
.level-hero-media--blur { filter: blur(7px); transform: scale(1.06); }
/* Darker on the left (behind the text), clearer on the right (shows the laptop) */
.level-hero--media .level-hero-veil {
  background:
    linear-gradient(90deg, rgba(20,16,13,.92) 0%, rgba(20,16,13,.78) 40%, rgba(20,16,13,.42) 78%, rgba(20,16,13,.28) 100%),
    linear-gradient(180deg, rgba(74,12,34,.35) 0%, rgba(20,16,13,.15) 40%, rgba(20,16,13,.5) 100%);
}
.level-hero--media::before { z-index: 1; }
.level-hero--media > .container { position: relative; z-index: 2; width: min(1120px, 100% - 3rem); }
@media (max-width: 720px) {
  .level-hero--media .level-hero-veil {
    background: linear-gradient(180deg, rgba(20,16,13,.7) 0%, rgba(20,16,13,.82) 100%);
  }
}
.level-hero-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.level-badge {
  font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em;
  background: var(--gold); color: var(--black); width: 3.2rem; height: 3.2rem;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.level-crumb { font-size: .85rem; color: rgba(246,236,217,.65); }
.level-crumb a { color: rgba(246,236,217,.65); text-decoration: underline; text-underline-offset: 3px; }
.level-crumb a:hover { color: var(--gold-bright); }
.level-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 600; letter-spacing: -0.03em; max-width: 18ch; text-wrap: balance; color: #fff; }
.level-hero h1 em { background: linear-gradient(120deg, var(--gold-bright), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.level-hero .level-cefr { color: var(--gold-bright); font-size: .95rem; margin-top: .7rem; }
.level-hero-sub { margin-top: 1.4rem; max-width: 62ch; color: rgba(246,236,217,.82); font-size: 1.15rem; letter-spacing: -0.012em; }

.level-nav-strip { display: flex; gap: .55rem; margin-top: 2.2rem; flex-wrap: wrap; }
.level-nav-strip a {
  font-size: .85rem; font-weight: 500; padding: .5rem 1.05rem; border-radius: 980px;
  border: 1px solid rgba(246,236,217,.25); color: rgba(246,236,217,.85); background: rgba(255,255,255,.05);
  transition: all .25s var(--ease-out);
}
.level-nav-strip a.is-current { background: var(--gold); color: var(--black); border-color: var(--gold); }
.level-nav-strip a:hover:not(.is-current) { border-color: var(--gold-bright); color: var(--gold-bright); }
.level-nav-strip .is-soon {
  font-size: .85rem; font-weight: 500; padding: .5rem 1.05rem; border-radius: 980px;
  border: 1px solid rgba(246,236,217,.12); color: rgba(246,236,217,.4); cursor: default;
}

/* Lesson picker (dropdown to jump between lessons within a level) */
.lesson-picker { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 1.7rem 0; }
.lesson-picker-label { font-size: .82rem; font-weight: 600; color: rgba(246,236,217,.65); }
.lesson-select {
  padding: .65rem 2.4rem .65rem 1.1rem; border-radius: 980px;
  border: 1px solid rgba(246,236,217,.3); background-color: rgba(255,255,255,.07);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6ecd9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px;
  color: #fff; font-size: .92rem; font-weight: 600; letter-spacing: -0.01em;
  appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 100%;
  transition: border-color .25s;
}
.lesson-select:hover { border-color: var(--gold-bright); }
.lesson-select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.lesson-select option { color: #16120f; }

/* Prev / next lesson pager */
.lesson-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 0; flex-wrap: wrap; }
.lesson-pager a {
  display: flex; flex-direction: column; gap: .3rem; max-width: 320px;
  padding: 1.2rem 1.5rem; border-radius: var(--radius-md); background: var(--beige);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.lesson-pager a:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.lesson-pager-next { margin-left: auto; text-align: right; align-items: flex-end; }
.pager-dir { font-size: .78rem; color: var(--ink-mute); font-weight: 600; }
.pager-title { font-size: 1.02rem; font-weight: 600; color: var(--wine); letter-spacing: -0.015em; }

/* ---------- Multi-lesson pages (table of contents + lesson blocks) ---------- */
.lesson-toc { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 3.5rem; }
.lesson-toc a {
  font-size: .85rem; font-weight: 600; padding: .6rem 1.15rem; border-radius: 980px;
  background: var(--beige); color: var(--ink-soft); transition: background .25s, color .25s;
}
.lesson-toc a:hover { background: var(--wine); color: #fff; }

/* ---------- Vocabulary sets ---------- */
.vocab-room { max-width: 900px; padding-top: 3.4rem; }
.vocab-room:first-of-type { padding-top: 0; }
.vocab-room + .vocab-room { border-top: 1px solid var(--line-soft); }
.vocab-room-head { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.vocab-room-es { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 600; letter-spacing: -0.02em; }
.vocab-room-en { font-size: .95rem; color: var(--ink-mute); font-style: italic; }

.vocab-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.vocab-card {
  display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center;
  background: var(--beige); border-radius: var(--radius-md); padding: 1.5rem 1rem;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s var(--ease-out);
}
.vocab-card:hover { transform: translateY(-4px); background: var(--white); box-shadow: var(--shadow-sm); }
.vocab-badge {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: linear-gradient(150deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: var(--gold-bright); box-shadow: 0 0 0 1px var(--line-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
}
.vocab-es { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.vocab-en { font-size: .82rem; color: var(--ink-mute); font-style: italic; }

.vocab-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 4rem; }
.vocab-gallery img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.lesson { max-width: 760px; padding-top: 4rem; }
.lesson:first-of-type { padding-top: 0; }
.lesson + .lesson { border-top: 1px solid var(--line-soft); }
.lesson-num {
  font-size: .85rem; font-weight: 600; color: var(--gold-deep);
  display: block; margin-bottom: .6rem;
}
.lesson-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 1.6rem; }

.lesson-quiz-box { background: var(--beige); border-radius: var(--radius); padding: clamp(1.6rem, 3.5vw, 2.4rem); margin-top: 2.2rem; }
.lesson-quiz-box .quiz-label { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 1.4rem; display: block; }
.lesson-quiz-box .exercise-set { gap: 1rem; }

.theory { max-width: 760px; }
.theory h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 1.2rem; margin-top: 2.8rem; }
.theory h2:first-child { margin-top: 0; }
.theory p { color: var(--ink-soft); margin-bottom: 1.1rem; font-size: 1.06rem; letter-spacing: -0.012em; }
.theory ul { margin: 1.2rem 0; display: flex; flex-direction: column; gap: .7rem; }
.theory ul li { padding-left: 1.5rem; position: relative; color: var(--ink-soft); }
.theory ul li::before { content: "›"; position: absolute; left: 0; color: var(--gold-deep); font-weight: 700; font-size: 1.2em; line-height: 1; }

.rule-box { background: var(--beige); border-radius: var(--radius-md); padding: 1.7rem 1.9rem; margin: 1.7rem 0; }
.rule-box .rule-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-deep); font-weight: 700; margin-bottom: .9rem; display: block; }
.rule-box table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.rule-box th, .rule-box td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line-soft); }
.rule-box th { color: var(--ink-mute); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }

.example-list { display: flex; flex-direction: column; gap: 1rem; margin: 1.7rem 0; }
.example {
  display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap;
  padding: 1.1rem 1.4rem; background: var(--white); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--wine); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.example .es { font-weight: 600; letter-spacing: -0.01em; }
.example .en { color: var(--ink-mute); font-size: .92rem; }

.tip-box { background: var(--beige); border-radius: var(--radius-md); padding: 1.6rem 1.9rem; margin: 2rem 0; display: flex; gap: 1rem; align-items: flex-start; }
.tip-box .tip-icon { font-size: 1.3rem; line-height: 1.3; }
.tip-box p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* ---------- Reading passages + comprehension Q&A ---------- */
.reading-image { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); margin: 1.7rem 0 2.2rem; }
.reading-image img { width: 100%; height: auto; display: block; }
.reading-passage {
  background: var(--beige); border-radius: var(--radius-md);
  padding: clamp(1.6rem, 3.5vw, 2.4rem); margin: 1.7rem 0 2.6rem;
}
.reading-passage p { color: var(--ink-soft); font-size: 1.06rem; line-height: 1.8; letter-spacing: -0.012em; margin-bottom: 1.15rem; }
.reading-passage p:last-child { margin-bottom: 0; }

.qa-list { display: flex; flex-direction: column; gap: .9rem; max-width: 760px; }
.qa-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; transition: border-color .25s;
}
.qa-item[open] { border-color: var(--line-gold); }
.qa-item summary {
  cursor: pointer; padding: 1.1rem 1.5rem; font-weight: 600; font-size: 1rem; letter-spacing: -0.012em;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::after {
  content: "Show answer"; flex-shrink: 0; font-size: .82rem; font-weight: 600;
  color: var(--wine); background: var(--beige); padding: .4rem .85rem; border-radius: 980px;
}
.qa-item[open] summary::after { content: "Hide answer"; }
.qa-item[open] summary { border-bottom: 1px solid var(--line-soft); }
.qa-answer { padding: 1.1rem 1.5rem; color: var(--ink-soft); background: rgba(63,107,78,.06); font-size: .98rem; }
.qa-answer strong { color: var(--ink); }

/* ---------- Exercises ---------- */
.practice { background: var(--beige); }
.practice-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2.6rem; }
.exercise-set { display: flex; flex-direction: column; gap: 1.2rem; max-width: 760px; }
.exercise { background: var(--white); border: 1px solid transparent; border-radius: var(--radius-md); padding: 1.6rem 1.8rem; transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.exercise-q { font-weight: 600; margin-bottom: 1rem; font-size: 1.04rem; letter-spacing: -0.015em; }
.exercise-q .qnum { color: var(--wine); margin-right: .4rem; }
.choice-group { display: flex; flex-wrap: wrap; gap: .7rem; }
.choice {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem;
  border: 1px solid var(--line); border-radius: 980px; cursor: pointer; font-size: .95rem;
  transition: border-color .25s, background .25s;
}
.choice:hover { border-color: var(--ink-mute); }
.choice input { accent-color: var(--wine); }
.choice:has(input:checked) { border-color: var(--wine); background: rgba(106,19,48,.05); }
.fill-input { width: 100%; max-width: 340px; padding: .8rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--beige); font-size: 1rem; }
.fill-input:focus { outline: 2px solid var(--wine); outline-offset: 1px; }
.exercise-feedback { margin-top: 1rem; padding: .8rem 1.1rem; border-radius: var(--radius-sm); font-size: .92rem; display: none; }
.exercise-feedback.is-shown { display: block; }
.exercise.is-correct { border-color: var(--right); }
.exercise.is-correct .exercise-feedback { display: block; background: rgba(63,107,78,.1); color: var(--right); }
.exercise.is-incorrect { border-color: var(--wrong); }
.exercise.is-incorrect .exercise-feedback { display: block; background: rgba(163,55,43,.08); color: var(--wrong); }

.practice-actions { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.practice-score { font-weight: 600; font-size: 1.05rem; padding: .6rem 1.2rem; border-radius: 980px; background: var(--white); border: 1px solid var(--line); display: none; }
.practice-score.is-shown { display: inline-flex; align-items: center; gap: .4rem; }

.level-cta {
  background: var(--black); color: var(--cream); border-radius: var(--radius);
  padding: 2.4rem; margin-top: 3rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.level-cta h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; max-width: 26ch; color: #fff; }
.level-cta p { color: rgba(246,236,217,.7); margin-top: .4rem; font-size: .96rem; }
.level-cta .btn-primary { background: var(--gold); color: var(--black); }
.level-cta .btn-primary:hover { background: var(--gold-bright); }

/* ---------- Exam promo card (links to the standalone exam page) ---------- */
.exam-promo-section { background: var(--beige); }
.exam-promo {
  position: relative; display: flex; align-items: center; gap: 1.8rem;
  background: var(--black); color: var(--cream); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.6rem) clamp(1.6rem, 4vw, 3rem); overflow: hidden;
  text-decoration: none; isolation: isolate;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.exam-promo:hover { transform: translateY(-4px); box-shadow: 0 20px 45px rgba(193,154,77,.22); }
.exam-promo::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--angle),
    transparent 0deg, transparent 30deg,
    var(--gold) 58deg, var(--gold-bright) 74deg, #fff7e6 82deg,
    var(--gold-bright) 90deg, var(--gold) 106deg,
    transparent 140deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .6; animation: cardBorderSpin 3.2s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .exam-promo::before { animation: none; } }
.exam-promo > * { position: relative; z-index: 1; }
.exam-promo-icon {
  flex-shrink: 0; width: 4.4rem; height: 4.4rem; border-radius: 50%;
  background: rgba(246,196,83,.12); box-shadow: 0 0 0 1px var(--line-gold);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.exam-promo-body { flex: 1; min-width: 220px; }
.exam-promo-body .eyebrow { color: var(--gold-bright); }
.exam-promo-body h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; letter-spacing: -0.02em; color: #fff; margin-bottom: .5rem; }
.exam-promo-body p { color: rgba(246,236,217,.72); font-size: .98rem; max-width: 54ch; }
.exam-promo-cta {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gold); color: var(--black); font-weight: 600; font-size: .96rem;
  padding: .85rem 1.5rem; border-radius: 980px; transition: background .3s, transform .3s;
}
.exam-promo-cta .arrow { transition: transform .3s var(--ease-out); }
.exam-promo:hover .exam-promo-cta { background: var(--gold-bright); }
.exam-promo:hover .exam-promo-cta .arrow { transform: translateX(4px); }
@media (max-width: 700px) {
  .exam-promo { flex-direction: column; text-align: center; }
  .exam-promo-cta { width: 100%; justify-content: center; }
}

/* ---------- Exam completion: congratulations + booking invite ---------- */
.exam-congrats {
  display: none;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--wine) 0%, #2a0d18 62%, var(--black) 100%);
  color: #fff; border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 2.8rem); margin-top: 2rem; text-align: center;
}
.exam-congrats.is-shown { display: block; animation: examCongratsIn .55s var(--ease-out); }
.exam-congrats-icon { font-size: 2.4rem; margin-bottom: .9rem; }
.exam-congrats h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: .7rem; color: #fff; }
.exam-congrats p { color: rgba(246,236,217,.82); font-size: 1.02rem; max-width: 58ch; margin: 0 auto 1.7rem; }
.exam-congrats .btn-primary { background: var(--gold); color: var(--black); }
.exam-congrats .btn-primary:hover { background: var(--gold-bright); }
@keyframes examCongratsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Level Test
   ========================================================================== */
.test-section { background: var(--beige); }
.test-shell {
  max-width: 720px; margin-inline: auto;
  background: var(--white); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 3rem); box-shadow: var(--shadow-sm);
}
.test-screen { animation: qFade .45s var(--ease-out); }
@keyframes qFade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Intro */
.test-intro { text-align: center; }
.test-intro h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 1rem; }
.test-intro p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto 1.2rem; font-size: 1.05rem; }
.test-facts { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1.6rem 0 2rem; }
.test-fact { font-size: .84rem; padding: .5rem 1rem; border-radius: 980px; background: var(--beige); color: var(--ink-soft); }

/* Quiz header: progress + meta */
.test-top { margin-bottom: 1.8rem; }
.test-progress { height: 8px; border-radius: 980px; background: var(--beige-2); overflow: hidden; }
.test-progress-bar { height: 100%; width: 0%; border-radius: 980px; background: linear-gradient(90deg, var(--wine), var(--gold)); transition: width .4s var(--ease-out); }
.test-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .8rem; font-size: .82rem; color: var(--ink-mute); }
.test-meta .test-level-tag { font-weight: 600; color: var(--wine); }
.test-timer { font-variant-numeric: tabular-nums; }

/* Question */
.q-prompt { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; margin-bottom: 1.4rem; }
.q-passage { background: var(--beige); border-left: 3px solid var(--gold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.2rem; margin-bottom: 1.2rem; color: var(--ink-soft); font-size: .98rem; font-style: italic; }
.q-options { display: flex; flex-direction: column; gap: .7rem; }
.q-option {
  display: flex; align-items: center; gap: .7rem; padding: .9rem 1.15rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 1rem; transition: border-color .2s, background .2s;
}
.q-option:hover { border-color: var(--ink-mute); }
.q-option.is-picked { border-color: var(--wine); background: rgba(106,19,48,.05); }
.q-option input { accent-color: var(--wine); flex-shrink: 0; }
.q-fill input { width: 100%; max-width: 360px; padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--beige); font-size: 1.05rem; }
.q-fill input:focus { outline: 2px solid var(--wine); outline-offset: 1px; }

/* Order (word chips) */
.order-answer {
  min-height: 3rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .8rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); margin-bottom: 1rem;
}
.order-answer:empty::before { content: "Tap the words in order…"; color: var(--ink-mute); font-size: .9rem; }
.order-pool { display: flex; flex-wrap: wrap; gap: .5rem; }
.order-chip {
  padding: .55rem 1rem; border-radius: 980px; border: 1px solid var(--line);
  background: var(--white); font-size: .98rem; cursor: pointer; transition: transform .2s, border-color .2s, background .2s;
}
.order-chip:hover { border-color: var(--wine); }
.order-chip.in-answer { background: var(--wine); color: #fff; border-color: var(--wine); }

/* Match (columns) */
.match-list { display: flex; flex-direction: column; gap: .8rem; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; align-items: center; }
.match-left { font-weight: 600; padding: .7rem 1rem; background: var(--beige); border-radius: var(--radius-sm); font-size: .98rem; }
.match-select { padding: .7rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font-size: .96rem; }
.match-select:focus { outline: 2px solid var(--wine); outline-offset: 1px; }

/* Actions */
.test-actions { display: flex; justify-content: flex-end; margin-top: 2rem; }
.test-note { font-size: .8rem; color: var(--ink-mute); margin-top: 1rem; text-align: center; }

/* Result */
.test-result { text-align: center; }
.result-eyebrow { font-size: .95rem; font-weight: 600; color: var(--gold-deep); margin-bottom: .8rem; display: block; }
.result-badge {
  width: 6.5rem; height: 6.5rem; margin: 0 auto 1.2rem; border-radius: 50%;
  background: linear-gradient(150deg, var(--wine), var(--wine-deep));
  color: var(--gold-bright); display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 600; letter-spacing: -0.02em; box-shadow: 0 0 0 1px var(--line-gold), var(--shadow-sm);
}
.result-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.025em; margin-bottom: .6rem; }
.result-desc { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 2rem; font-size: 1.05rem; }
.result-bars { display: flex; flex-direction: column; gap: .7rem; max-width: 420px; margin: 0 auto 2.2rem; text-align: left; }
.result-bar-row { display: grid; grid-template-columns: 2.2rem 1fr 2.8rem; align-items: center; gap: .7rem; font-size: .85rem; }
.result-bar-lvl { font-weight: 600; color: var(--wine); }
.result-bar-track { height: 9px; border-radius: 980px; background: var(--beige-2); overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: 980px; background: linear-gradient(90deg, var(--wine), var(--gold)); width: 0%; transition: width .8s var(--ease-out); }
.result-bar-row.is-untested { opacity: .5; }
.result-bar-pct { color: var(--ink-mute); text-align: right; font-variant-numeric: tabular-nums; }
.result-cta { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.result-retry { background: none; border: none; color: var(--ink-mute); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.result-retry:hover { color: var(--ink); }

@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-figure img { aspect-ratio: 16/10; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .levels-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .vocab-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open .nav-links {
    display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(244,238,226,0.95); backdrop-filter: blur(20px);
    flex-direction: column; padding: 1.5rem; gap: 1.2rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
  }
  .steps-grid { grid-template-columns: 1fr; }
  .levels-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .vocab-grid { grid-template-columns: 1fr 1fr; }
  .vocab-gallery { grid-template-columns: 1fr; }
  .hero-title { max-width: 100%; }
  .level-cta { flex-direction: column; align-items: flex-start; }
  .practice-head { flex-direction: column; align-items: flex-start; }
  .match-row { grid-template-columns: 1fr; gap: .4rem; }
}
