/* ============================================================
   Coastal Processes — Stylesheet
   Palette: deep ocean blues, warm sand, cream
   ============================================================ */

:root {
  --deep: #0a2f4d;
  --ocean: #0f4c75;
  --ocean-2: #1b6ea8;
  --sea-light: #3f9fd4;
  --sand: #e6cfa4;
  --sand-deep: #d9bf95;
  --cream: #fbf7ef;
  --paper: #ffffff;
  --ink: #10222f;
  --ink-soft: #40566a;
  --line: #e3ddd1;
  --gold: #f2b544;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(10, 47, 77, 0.06);
  --shadow-md: 0 18px 50px rgba(10, 47, 77, 0.12);
  --shadow-lg: 0 30px 70px rgba(10, 47, 77, 0.18);

  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--deep);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--sea-light), var(--ocean));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(251, 247, 239, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(251, 247, 239, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 30px rgba(10, 47, 77, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--deep);
}

.brand-mark {
  color: var(--ocean);
  display: grid;
  place-items: center;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--deep);
}

.brand-text span {
  color: var(--ocean-2);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--ocean-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--ocean);
}

.nav-list a:hover::after,
.nav-list a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  background: var(--deep);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--ocean-2);
  color: #fff;
  box-shadow: 0 12px 28px rgba(27, 110, 168, 0.32);
}

.btn-primary:hover {
  background: var(--ocean);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 76, 117, 0.36);
}

.btn-ghost {
  background: transparent;
  color: var(--deep);
  border-color: rgba(10, 47, 77, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--ocean-2);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  overflow: hidden;
  background: linear-gradient(160deg, #fbf7ef 0%, #f4ead8 45%, #dcebdd 100%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 78% 30%, rgba(63, 159, 212, 0.16), transparent 55%),
    radial-gradient(ellipse at 20% 85%, rgba(230, 207, 164, 0.4), transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ocean-2);
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(2.9rem, 8vw, 5.4rem);
  font-weight: 600;
  line-height: 1.02;
  margin: 0 0 26px;
  color: var(--deep);
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ocean-2);
}

.hero-sub {
  max-width: 560px;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 54px;
}

.hero-stats {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--deep);
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(10, 47, 77, 0.28);
  border-radius: 16px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: var(--ocean-2);
  animation: scrollDot 1.8s infinite var(--ease);
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
  padding: 110px 0;
  position: relative;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 18px;
}

.section-desc {
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Intro ---------- */
.intro {
  background: var(--cream);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: start;
}

.intro-text .lead {
  font-size: 1.22rem;
  color: var(--deep);
  line-height: 1.65;
  margin-bottom: 22px;
}

.intro-text p {
  color: var(--ink-soft);
}

.intro-cards {
  display: grid;
  gap: 18px;
}

.mini-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(27, 110, 168, 0.35);
}

.mini-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(63, 159, 212, 0.16), rgba(230, 207, 164, 0.4));
  color: var(--ocean);
}

.mini-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 4px 0 2px;
  color: var(--deep);
}

.mini-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Processes ---------- */
.processes {
  background: linear-gradient(180deg, #f5efe3 0%, #fbf7ef 100%);
}

.process-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.tab {
  position: relative;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--ocean-2);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

.tab:hover {
  color: var(--ocean);
  background: rgba(27, 110, 168, 0.06);
}

.tab.is-active {
  color: var(--deep);
  background: rgba(27, 110, 168, 0.08);
}

.tab.is-active::after {
  transform: scaleX(1);
}

.process-panel {
  display: none;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-md);
}

.process-panel.is-active {
  display: grid;
  animation: fadeUp 0.55s var(--ease);
}

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

.process-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sea-light);
  margin: 0 0 8px;
}

.process-panel h3 {
  font-size: 2.1rem;
  margin: 0 0 16px;
}

.process-panel p {
  color: var(--ink-soft);
}

.check-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ocean-2);
  box-shadow: inset 0 0 0 3px var(--paper), 0 0 0 2px var(--ocean-2);
}

.panel-visual {
  display: grid;
  place-items: center;
  min-height: 220px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #0f4c75, #0a2f4d);
  color: #cfe7f4;
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.visual-caption {
  margin: 14px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(207, 231, 244, 0.75);
  text-align: center;
}

.visual-wave {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
  align-self: end;
}

.visual-wave span {
  position: absolute;
  bottom: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: radial-gradient(circle at 50% 100%, rgba(63, 159, 212, 0.55), transparent 70%);
  border-top: 2px solid rgba(207, 231, 244, 0.6);
  border-radius: 45%;
  animation: swell 6s linear infinite;
}

.visual-wave span:nth-child(2) { animation-duration: 8s; opacity: 0.6; bottom: 10px; }
.visual-wave span:nth-child(3) { animation-duration: 10s; opacity: 0.35; bottom: 20px; }

@keyframes swell {
  0% { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(-25%) rotate(360deg); }
}

.drift-svg {
  width: 100%;
  max-width: 320px;
  color: var(--sea-light);
}

.sand-build {
  position: relative;
  width: 200px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.grain {
  width: 18px;
  background: linear-gradient(180deg, #f2ddb6, #d9bf95);
  border-radius: 6px 6px 2px 2px;
  animation: dropIn 2.4s var(--ease) infinite;
}

.grain:nth-child(1) { height: 40px; animation-delay: 0s; }
.grain:nth-child(2) { height: 70px; animation-delay: 0.15s; }
.grain:nth-child(3) { height: 95px; animation-delay: 0.3s; }
.grain:nth-child(4) { height: 60px; animation-delay: 0.45s; }
.grain:nth-child(5) { height: 100px; animation-delay: 0.6s; }
.grain:nth-child(6) { height: 55px; animation-delay: 0.75s; }
.grain:nth-child(7) { height: 80px; animation-delay: 0.9s; }
.grain:nth-child(8) { height: 45px; animation-delay: 1.05s; }
.grain:nth-child(9) { height: 68px; animation-delay: 1.2s; }

@keyframes dropIn {
  0%, 100% { transform: translateY(6px); opacity: 0.85; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.cliff-cracks {
  position: relative;
  width: 180px;
  height: 120px;
  background: linear-gradient(180deg, #c9b79a, #8a7458);
  border-radius: 8px 30px 6px 6px;
  overflow: hidden;
}

.crack {
  position: absolute;
  top: 0;
  width: 2px;
  height: 0;
  background: #3d2f22;
  animation: crackGrow 3s var(--ease) infinite;
}

.crack:nth-child(1) { left: 40%; animation-delay: 0s; }
.crack:nth-child(2) { left: 65%; animation-delay: 1s; transform: rotate(8deg); }
.crack:nth-child(3) { left: 22%; animation-delay: 2s; transform: rotate(-6deg); }

@keyframes crackGrow {
  0% { height: 0; opacity: 0; }
  40% { height: 100%; opacity: 1; }
  100% { height: 100%; opacity: 1; }
}

/* ---------- Erosion ---------- */
.erosion {
  background: var(--deep);
  color: #e8f1f7;
}

.erosion .eyebrow {
  color: var(--sea-light);
}

.erosion .section-head h2 {
  color: #fff;
}

.erosion .section-desc {
  color: rgba(232, 241, 247, 0.7);
}

.erosion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.erosion-card {
  position: relative;
  padding: 38px 34px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.erosion-card::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 159, 212, 0.28), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.erosion-card:hover {
  transform: translateY(-6px);
  border-color: rgba(63, 159, 212, 0.5);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
}

.erosion-card:hover::before {
  opacity: 1;
}

.erosion-num {
  position: absolute;
  top: 26px;
  right: 30px;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.07);
  line-height: 1;
}

.erosion-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(63, 159, 212, 0.18);
  color: var(--sea-light);
  margin-bottom: 22px;
}

.erosion-card h3 {
  color: #fff;
  font-size: 1.4rem;
  margin: 0 0 12px;
}

.erosion-card p {
  margin: 0;
  color: rgba(232, 241, 247, 0.72);
  font-size: 0.95rem;
}

/* ---------- Landforms ---------- */
.landforms {
  background: var(--cream);
}

.landform-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 38px;
  box-shadow: var(--shadow-sm);
}

.switch-btn {
  padding: 11px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.switch-btn.is-active {
  color: #fff;
  background: var(--ocean-2);
  box-shadow: 0 8px 20px rgba(27, 110, 168, 0.3);
}

.landform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.landform-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  animation: fadeUp 0.5s var(--ease);
}

.landform-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(27, 110, 168, 0.32);
}

.landform-card .lf-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.lf-tag.erosional {
  background: rgba(27, 110, 168, 0.12);
  color: var(--ocean);
}

.lf-tag.depositional {
  background: rgba(217, 191, 149, 0.4);
  color: #8a6a2e;
}

.landform-card h3 {
  font-size: 1.32rem;
  margin: 0 0 10px;
}

.landform-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Interactive ---------- */
.interactive {
  background: linear-gradient(180deg, #fbf7ef, #f4ead8);
}

.interactive-wrap {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 34px;
  align-items: stretch;
}

.diagram-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.coast-diagram {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.marker {
  cursor: pointer;
  outline: none;
}

.marker circle {
  fill: var(--ocean-2);
  stroke: #fff;
  stroke-width: 3;
  transition: fill 0.25s var(--ease), transform 0.25s var(--ease);
  transform-box: fill-box;
  transform-origin: center;
}

.marker text {
  fill: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

.marker:hover circle,
.marker:focus circle,
.marker.is-active circle {
  fill: var(--gold);
  transform: scale(1.18);
}

.marker:focus circle {
  stroke: var(--deep);
}

.diagram-info {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
}

.diagram-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ocean-2);
  box-shadow: 0 0 0 0 rgba(27, 110, 168, 0.5);
  animation: pulse 2s infinite;
  flex: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(27, 110, 168, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(27, 110, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(27, 110, 168, 0); }
}

.info-content {
  animation: fadeUp 0.45s var(--ease);
}

.info-content .info-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sea-light);
  margin-bottom: 10px;
}

.info-content h3 {
  font-size: 1.7rem;
  margin: 0 0 12px;
}

.info-content p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ---------- Quiz ---------- */
.quiz {
  background: var(--deep);
}

.quiz .eyebrow {
  color: var(--sea-light);
}

.quiz .section-head h2 {
  color: #fff;
}

.quiz .section-desc {
  color: rgba(232, 241, 247, 0.7);
}

.quiz-container {
  max-width: 820px;
}

.quiz-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}

.quiz-progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.quiz-progress-bar {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--sea-light), var(--gold));
  border-radius: 0 3px 3px 0;
  transition: width 0.4s var(--ease);
}

.quiz-body {
  padding: 40px 44px 34px;
}

.quiz-count {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 241, 247, 0.6);
  margin: 0 0 14px;
}

.quiz-question {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: #fff;
  margin: 0 0 28px;
  line-height: 1.3;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 0.97rem;
  text-align: left;
  color: #e8f1f7;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease);
}

.quiz-option:hover:not(:disabled) {
  background: rgba(63, 159, 212, 0.16);
  border-color: rgba(63, 159, 212, 0.6);
  transform: translateX(4px);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option .opt-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
}

.quiz-option.correct {
  background: rgba(46, 160, 110, 0.22);
  border-color: #2ea06e;
}

.quiz-option.correct .opt-badge {
  background: #2ea06e;
}

.quiz-option.wrong {
  background: rgba(214, 84, 84, 0.2);
  border-color: #d65454;
}

.quiz-option.wrong .opt-badge {
  background: #d65454;
}

.quiz-feedback {
  min-height: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.quiz-feedback.good { color: #7fd7b0; }
.quiz-feedback.bad { color: #f0a3a3; }

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.quiz-score {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(232, 241, 247, 0.72);
}

.quiz-result {
  padding: 48px 44px;
  text-align: center;
  animation: fadeUp 0.5s var(--ease);
}

.result-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--sea-light) 0deg, rgba(255, 255, 255, 0.1) 0deg);
  position: relative;
  transition: background 0.5s var(--ease);
}

.result-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--deep);
}

.result-ring span {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
}

.quiz-result h3 {
  color: #fff;
  font-size: 1.7rem;
  margin: 0 0 10px;
}

.quiz-result p {
  color: rgba(232, 241, 247, 0.72);
  max-width: 420px;
  margin: 0 auto 26px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #071f33;
  color: rgba(232, 241, 247, 0.7);
  padding: 60px 0 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .brand-text {
  color: #fff;
}

.footer-brand .brand-text span {
  color: var(--sea-light);
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 320px;
  font-size: 0.9rem;
  color: rgba(232, 241, 247, 0.55);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: flex-start;
}

.footer-nav a {
  font-size: 0.9rem;
  color: rgba(232, 241, 247, 0.7);
  transition: color 0.25s var(--ease);
}

.footer-nav a:hover {
  color: var(--sea-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(232, 241, 247, 0.45);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .intro-grid,
  .interactive-wrap,
  .process-panel.is-active {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .process-panel {
    padding: 34px;
  }

  .landform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 84px 0;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 66px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    right: 20px;
    left: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    background: rgba(251, 247, 239, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav-list.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-list a {
    padding: 13px 16px;
    font-size: 0.98rem;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-stats {
    gap: 28px;
  }

  .erosion-grid,
  .landform-grid {
    grid-template-columns: 1fr;
  }

  .quiz-body {
    padding: 30px 24px 26px;
  }

  .quiz-result {
    padding: 40px 24px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .hero-stats {
    gap: 22px;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .landform-switch {
    width: 100%;
    flex-direction: column;
  }

  .switch-btn {
    width: 100%;
  }

  .quiz-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 14px;
  }

  .quiz-footer .btn {
    width: 100%;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
