:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1b2433;
  --muted: #66738a;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --accent: #0ea5e9;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --grad: linear-gradient(135deg, #4338ca 0%, #7c3aed 60%, #0ea5e9 130%);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.08);
  --shadow-md: 0 6px 20px rgba(16,24,40,.08), 0 2px 6px rgba(16,24,40,.05);
  --shadow-lg: 0 20px 45px rgba(16,24,40,.12), 0 8px 18px rgba(16,24,40,.07);
  --radius: 18px;
  --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.site-header { position: relative; }

/* Only the nav bar sticks to the top; the hero scrolls away normally */
.site-header nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(16,24,40,.06);
  box-shadow: 0 1px 0 rgba(16,24,40,.03);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.site-header nav.hidden { transform: translateY(-100%); }

.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1160px; margin: 0 auto; padding: 13px 24px; gap: 16px;
}.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 17px;
  box-shadow: 0 4px 10px rgba(80,70,230,.35);
}
.logo span.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
nav ul { list-style: none; display: flex; gap: 4px; align-items: center; }
nav ul a {
  position: relative; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600;
  padding: 9px 14px; border-radius: 10px; transition: color .18s, background .18s;
}
nav ul a:hover { color: var(--ink); background: rgba(16,24,40,.05); }
nav ul a.active { color: var(--brand); background: rgba(79,70,229,.08); }
nav ul a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--brand);
}

.hamburger {
  display: none; background: none; border: 1px solid rgba(16,24,40,.15); cursor: pointer;
  flex-direction: column; gap: 5px; padding: 8px 9px; border-radius: 10px;
}
.hamburger span { width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px; }

/* ===== Hero ===== */
.hero {
  position: relative; color: #fff; text-align: center; overflow: hidden;
  padding: 104px 24px 120px;
}
.hero .glow {
  position: absolute; inset: 0; background: var(--grad);
}
.hero .glow::before {
  content: ""; position: absolute; top: -30%; left: -10%; width: 60%; height: 130%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 55%);
}
.hero .glow::after {
  content: ""; position: absolute; bottom: -40%; right: -10%; width: 70%; height: 120%;
  background: radial-gradient(circle at 70% 70%, rgba(14,165,233,.35), transparent 55%);
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); color: #fff;
  padding: 7px 16px; border-radius: 40px; margin-bottom: 20px; backdrop-filter: blur(6px);
}
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin-bottom: 18px; }
.hero p { font-size: clamp(16px, 2.2vw, 19px); max-width: 660px; margin: 0 auto; color: rgba(255,255,255,.9); }
.hero .cta-row { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 13px 26px; border-radius: 40px; font-weight: 700; font-size: 15px; cursor: pointer;
  border: none; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.4); }
.btn-primary:hover { background: #4338ca; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(79,70,229,.45); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #0f172a; transform: translateY(-2px); }

/* ===== Sections ===== */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); background: rgba(79,70,229,.08); padding: 6px 14px; border-radius: 40px; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.03em; color: var(--ink); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 17px; }
.section-head.light h2 { color: #fff; }
.section-head.light p { color: rgba(255,255,255,.8); }
.section-head.light .kicker { background: rgba(255,255,255,.16); color: #fff; }

/* ===== Cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid rgba(16,24,40,.04);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .img { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .img img { transform: scale(1.07); }
.card .img .badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.92); color: var(--brand); backdrop-filter: blur(4px);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 30px;
}
.card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.card .latin { font-style: italic; color: #9aa6ba; font-size: 13px; margin: 1px 0 10px; }
.card p { font-size: 15px; color: var(--muted); }
.card .foot { margin-top: auto; padding-top: 14px; }

/* ===== Filters / search ===== */
.filters { text-align: center; margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.filters .btn {
  border: 1px solid rgba(16,24,40,.1); background: var(--surface); color: var(--muted);
  border-radius: 30px; padding: 9px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.filters .btn.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 16px rgba(79,70,229,.3); }
.search-box { max-width: 440px; margin: 0 auto 30px; position: relative; }
.search-box input {
  width: 100%; padding: 14px 20px 14px 46px; border: 1px solid rgba(16,24,40,.12); border-radius: 40px;
  font-size: 15px; outline: none; background: var(--surface); transition: border .2s, box-shadow .2s;
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.search-box::before {
  content: ""; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border: 2px solid var(--muted); border-radius: 50%;
}
.search-box::after {
  content: ""; position: absolute; left: 31px; top: 55%; width: 7px; height: 2px;
  background: var(--muted); transform: rotate(45deg); transform-origin: left; border-radius: 2px;
}

/* ===== Panels & items ===== */
.panel {
  background: var(--surface); border-radius: var(--radius); padding: 24px 26px;
  box-shadow: var(--shadow-md); border: 1px solid rgba(16,24,40,.04);
}
.route-item { border-left: 3px solid var(--brand); }
.two-col, .three-col { display: grid; gap: 22px; }
.two-col { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.three-col { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.route-item h3, .fact-item h3, .panel h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.route-item p, .fact-item p, .panel p { font-size: 15px; color: var(--muted); }

.fact-item.light { border-left: 3px solid #fbbf24; background: rgba(255,255,255,.08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.fact-item.light h3 { color: #fbbf24; }
.fact-item.light p { color: rgba(255,255,255,.88); }

/* ===== Dark section ===== */
.dark-section { background: var(--ink); position: relative; }
.dark-section::before {
  content: ""; position: absolute; inset: 0; background:
    radial-gradient(circle at 15% 20%, rgba(124,58,237,.25), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(14,165,233,.25), transparent 45%);
}

/* ===== Map ===== */
.map-wrap { text-align: center; margin-top: 14px; }
.map-wrap svg {
  max-width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-md);
  border: 1px solid rgba(16,24,40,.06);
}

/* ===== Quiz ===== */
.quiz-card {
  max-width: 640px; margin: 0 auto; background: var(--surface); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid rgba(16,24,40,.04);
}
.quiz-card .q { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 18px; letter-spacing: -.01em; }
.quiz-progress { height: 6px; background: rgba(16,24,40,.08); border-radius: 6px; overflow: hidden; margin-bottom: 22px; }
.quiz-progress .fill { height: 100%; background: var(--grad); width: 0; transition: width .3s; }
.quiz-opt {
  display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; margin-bottom: 10px; padding: 14px 16px;
  border: 1px solid rgba(16,24,40,.12); border-radius: var(--radius-sm); background: #fbfcfe; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.quiz-opt .opt-letter {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: rgba(16,24,40,.06);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted);
}
.quiz-opt:hover { border-color: var(--brand); background: #f5f4ff; }
.quiz-opt.correct { border-color: var(--success); background: #f0fdf6; color: #047857; }
.quiz-opt.correct .opt-letter { background: var(--success); color: #fff; }
.quiz-opt.wrong { border-color: var(--danger); background: #fef2f2; color: #b91c1c; }
.quiz-opt.wrong .opt-letter { background: var(--danger); color: #fff; }
.quiz-opt:disabled { cursor: default; }
.quiz-score { text-align: center; margin-top: 16px; font-weight: 700; color: var(--brand); }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.contact-form { background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-lg); border: 1px solid rgba(16,24,40,.04); }
.contact-form label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 13px 15px; margin-bottom: 16px; border: 1px solid rgba(16,24,40,.14); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; outline: none; transition: border .2s, box-shadow .2s; background: #fbfcfe;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79,70,229,.1); background: #fff; }
.info-card { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); border: 1px solid rgba(16,24,40,.06); }
.info-card h3 { color: var(--ink); font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.info-card p { font-size: 15px; color: var(--muted); }
.info-card a { color: var(--brand); text-decoration: none; font-weight: 600; }

/* ===== Toast ===== */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 26px; border-radius: 40px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 200; font-size: 15px; box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Footer ===== */
footer { background: #0b1220; color: rgba(255,255,255,.72); padding: 48px 24px 0; }
.footer-cols { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 30px; padding-bottom: 34px; }
footer h4 { color: #fff; margin-bottom: 12px; font-size: 15px; font-weight: 800; }
footer p { font-size: 14px; line-height: 1.6; }
footer a { color: rgba(255,255,255,.72); text-decoration: none; display: block; margin-bottom: 8px; font-size: 14px; transition: color .18s; }
footer a:hover { color: #fff; }
.footer-bottom { text-align: center; font-size: 13px; border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; max-width: 1160px; margin: 0 auto; }

/* Responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  nav ul {
    display: none; position: absolute; top: 100%; left: 12px; right: 12px;
    flex-direction: column; background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 1px solid rgba(16,24,40,.06); padding: 12px; gap: 4px;
  }
  nav ul.open { display: flex; }
  nav ul a { padding: 12px 14px; }
  .hamburger { display: flex; }
  section { padding: 52px 0; }
  .hero { padding: 80px 22px 96px; }
}
