/* ==========================================================================
   EMPIRICA — Design System & Floating Dynamic Island Navigation
   Minimal, warm, comfortable aesthetic with 5 themes from PLAN.md.
   ========================================================================== */

/* ---------- 1. Design Tokens & 5 Themes from PLAN.md ---------- */
:root,
[data-theme="dark"] {
  /* Mocha Dark (Default) */
  --bg: #15110e;
  --surface: #1e1814;
  --surface-2: #27201a;
  --ink: #f3e9dd;
  --muted: #a8957f;
  --line: #34291f;
  --accent: #d4a27a;
  --accent-hover: #e3ab7e;
  --on: #1a120c;
  --g1: rgba(190, 95, 60, 0.22);
  --g2: rgba(70, 100, 160, 0.16);
  --g3: rgba(160, 70, 90, 0.18);
  color-scheme: dark;
}

[data-theme="light"] {
  /* Mocha Light */
  --bg: #f4ede4;
  --surface: #fbf7f1;
  --surface-2: #f2e9dc;
  --ink: #3b2a20;
  --muted: #8a7565;
  --line: #e3d6c6;
  --accent: #8b5e3c;
  --accent-hover: #734c2f;
  --on: #fff8ef;
  --g1: rgba(210, 150, 100, 0.25);
  --g2: rgba(200, 170, 130, 0.2);
  --g3: rgba(230, 180, 150, 0.2);
  color-scheme: light;
}

[data-theme="sage"] {
  /* Sage */
  --bg: #eef0e6;
  --surface: #f7f8f1;
  --surface-2: #edf0e4;
  --ink: #2e3a2c;
  --muted: #7a8672;
  --line: #d9ddc9;
  --accent: #5f7a52;
  --accent-hover: #4e6742;
  --on: #f7f8f1;
  --g1: rgba(140, 170, 110, 0.25);
  --g2: rgba(190, 200, 150, 0.2);
  --g3: rgba(180, 210, 170, 0.2);
  color-scheme: light;
}

[data-theme="rose"] {
  /* Rose Sand */
  --bg: #f6ebe7;
  --surface: #fcf5f2;
  --surface-2: #f4e3dd;
  --ink: #46302e;
  --muted: #946f69;
  --line: #ead6d0;
  --accent: #b0605a;
  --accent-hover: #984f4a;
  --on: #fff6f3;
  --g1: rgba(220, 140, 130, 0.25);
  --g2: rgba(230, 180, 160, 0.2);
  --g3: rgba(240, 190, 180, 0.2);
  color-scheme: light;
}

[data-theme="ink"] {
  /* Midnight Ink */
  --bg: #12161b;
  --surface: #1a2027;
  --surface-2: #242c36;
  --ink: #e6ebf0;
  --muted: #8d9aa8;
  --line: #2a333c;
  --accent: #8fb3d9;
  --accent-hover: #a5c5e8;
  --on: #12181d;
  --g1: rgba(80, 120, 190, 0.22);
  --g2: rgba(120, 80, 170, 0.14);
  --g3: rgba(60, 150, 170, 0.16);
  color-scheme: dark;
}

/* ---------- 2. Base & Typography ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

/* Soft ambient mesh gradient glow (non-blocking) */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 25%, var(--g1), transparent 70%),
    radial-gradient(45% 40% at 85% 75%, var(--g2), transparent 70%),
    radial-gradient(45% 40% at 15% 85%, var(--g3), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, 3%) scale(1.08); }
}

main, footer, dialog {
  position: relative;
  z-index: 2;
}

h1, h2, h3, h4, .brand, .word {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

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

.muted {
  color: var(--muted);
}

/* ---------- 3. DYNAMIC ISLAND FLOATING NAVIGATION ---------- */
.dynamic-island-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
  padding: 0 16px;
}

.dynamic-island {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 12px 8px 18px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: 9999px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 1040px;
  width: auto;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1),
              box-shadow 0.25s,
              background-color 0.3s;
}

.dynamic-island:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
}

.brand svg {
  display: block;
  transition: transform 0.3s ease;
}

.brand:hover svg {
  transform: rotate(12deg) scale(1.08);
}

.island-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}

.island-nav a {
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 999px;
}

.island-nav a:hover,
.island-nav a.on {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.link {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.2s;
}

.link:hover {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--on);
  border: 0;
  border-radius: 9999px;
  padding: 9px 20px;
  font: 500 14.5px Inter, -apple-system, sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.big {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 9999px;
  font-weight: 600;
}

/* Theme Dropdown Toggle Button */
.theme {
  position: relative;
}

.icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.icon:hover {
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  border-color: var(--accent);
  transform: rotate(20deg);
}

.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1001;
  animation: menuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-menu.open {
  display: flex !important;
}

@keyframes menuPop {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: 0;
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 10px;
  font: 500 14px Inter, -apple-system, sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.18s, color 0.18s;
}

.theme-menu button:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.theme-menu button[aria-checked="true"] {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  font-weight: 600;
  color: var(--accent);
}

.theme-menu i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ---------- 4. HERO SECTION & MOTION SCENES REEL ---------- */
.hero {
  position: relative;
  text-align: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 130px 24px 60px;
}

.logo-slot {
  width: min(200px, 44vw);
  aspect-ratio: 1;
  margin: 0 auto 20px;
}

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font: 700 clamp(40px, 7.5vw, 80px) / 1.02 Fraunces, Georgia, serif;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
}

.hero p {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  font-size: clamp(17px, 2.3vw, 21px);
  color: var(--muted);
  margin: 0 auto 36px;
  max-width: 680px;
  line-height: 1.6;
}

/* Motion Scenes Reel Stage */
.stage {
  position: relative;
  max-width: 980px;
  margin: 50px auto 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 2 / 1;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  background: #241913;
}

.stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.stage > img.on {
  opacity: 1;
}

.cap {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 18px;
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(20, 12, 8, 0.6);
  color: #f3e9dd;
  font-size: 14.5px;
  max-width: 65%;
  text-align: left;
}

.cap b {
  color: #e0b88f;
  margin-right: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reel {
  position: absolute;
  right: 18px;
  bottom: 24px;
  display: flex;
  gap: 6px;
}

.reel button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 4px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.reel button.on {
  background: #e0b88f;
  width: 20px;
}

/* ---------- 5. FLYING LOGO & SCROLL STORY ---------- */
#fly {
  position: fixed;
  left: 0;
  top: 0;
  width: 200px;
  height: 200px;
  transform-origin: 0 0;
  z-index: 30;
  pointer-events: none;
  cursor: pointer;
  will-change: transform;
}

#fly .logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent));
}

#fly .rings {
  position: absolute;
  inset: 0;
}

#fly .rings i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: fring 3s ease-out infinite;
}

#fly .rings i + i {
  animation-delay: 1.5s;
}

@keyframes fring {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

.story {
  position: relative;
}

.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px 40px;
}

.st-text {
  position: relative;
  height: 100%;
  max-height: 440px;
}

.ch {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
  pointer-events: none;
}

.ch.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.ch h2 {
  font: 700 clamp(30px, 4.6vw, 52px) / 1.04 Fraunces, serif;
  letter-spacing: -0.03em;
  margin: 0;
}

.ch p {
  color: var(--muted);
  font: 500 18px / 1.65 Fraunces, serif;
  margin: 0;
}

.ch .small,
.ch .chips {
  font-family: Inter, sans-serif;
}

.st-stage {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #241913;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.st-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.st-stage img.on {
  opacity: 1;
}

.rail {
  position: absolute;
  right: max(10px, 1.5vw);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail button {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: 0;
  padding: 0;
  background: var(--line);
  cursor: pointer;
  transition: all 0.3s;
}

.rail button.on {
  background: var(--accent);
  height: 22px;
}

.swatches {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.swatches button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s;
}

.swatches button:hover {
  transform: scale(1.12);
}

.swatches button[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- 6. THREE PATHS: IGCSE, NATIONAL, PSYCHOTHERAPY ---------- */
.sec {
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 24px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.sec h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  margin: 0 0 32px;
  line-height: 1.12;
}

.lead {
  font: 500 19px / 1.7 Fraunces, serif;
  color: var(--muted);
  max-width: 800px;
  margin: 0 0 36px;
}

.ptabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.ptab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
}

.ptab:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.ptab[aria-selected="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.ptab b {
  font: 600 18px Fraunces, serif;
  display: block;
}

.ptab span {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #241913;
}

/* Teacher Sub-tabs */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  font: 500 14px Inter, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.tab[aria-selected="true"] {
  background: var(--accent);
  color: var(--on);
  border-color: var(--accent);
  font-weight: 600;
}

.teacher {
  display: flex;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.teacher img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--line);
}

.teacher h3 {
  margin: 0;
  font-size: 26px;
}

.teacher .role {
  margin: 4px 0 8px;
  color: var(--accent);
  font-weight: 500;
  font-size: 14.5px;
}

.teacher p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Course Cards Grid */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.course {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.course:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.course-banner {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #241913;
}

.course-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  margin: 0;
  padding: 0;
}

.banner-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(16, 10, 6, 0.72);
  color: #f3e9dd;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 4px 12px;
  font: 500 12px Inter, sans-serif;
  letter-spacing: 0.02em;
}

.course-body {
  padding: 20px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.course h4 {
  margin: 0;
  font: 600 20px Fraunces, serif;
  overflow-wrap: anywhere;
}

.course p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.course-footer {
  padding: 0 20px 20px;
}

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

/* ---------- 7. PSYCHOTHERAPY SECTION ---------- */
.sub {
  font: 600 26px Fraunces, serif;
  margin: 38px 0 16px;
}

/* Three steps to your session — numbered badges, bordered cards, wrapped text */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 20px 20px;
  transition: border-color 0.25s, transform 0.25s;
  overflow-wrap: anywhere;
}

.steps li:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.steps li img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 4px;
  background: #241913;
}

.steps li b {
  position: absolute;
  top: 26px;
  left: 26px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on);
  font: 600 14px Inter, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.steps li h3 {
  margin: 0;
  font-size: 19px;
}

.steps li p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.th-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.th-hero::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(40% 40% at 30% 40%, var(--mc, var(--g1)), transparent 70%);
  transition: background 0.7s;
  pointer-events: none;
}

.th-hero > * {
  position: relative;
}

.th-hero > img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.th-hero h3 {
  font: 700 clamp(28px, 4vw, 44px) / 1.05 Fraunces, serif;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.moods,
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.mood-msg {
  min-height: 52px;
  color: var(--muted);
  margin: 6px 0 14px;
  font-size: 15px;
}

.fchip {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font: 500 13px Inter, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.fchip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.fchip.hit,
.fchip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on);
  border-color: var(--accent);
}

.tcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s, border-color 0.25s;
}

.tcard:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.tcard h4 {
  margin: 0;
  font: 600 20px Fraunces, serif;
}

.tcard p {
  margin: 0;
}

.thead {
  display: flex;
  gap: 14px;
  align-items: center;
}

.tbio {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.av {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--line);
}

.privacy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.pv {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}

.pv b {
  font: 600 18px Fraunces, serif;
  display: block;
}

.pv p {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 8. ABOUT & FEATURE CARDS ---------- */
.about {
  max-width: 1080px;
  text-align: center;
}

.cards3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 36px;
  text-align: left;
}

.feat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s;
}

.feat:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feat img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 18px;
  background: #241913;
}

.feat h3 {
  font-size: 21px;
  margin: 0 0 8px;
}

.feat p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- 9. FAQ & RIGHTS SECTION ---------- */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  transition: border-color 0.2s;
}

.faq details:hover {
  border-color: var(--accent);
}

.faq summary {
  cursor: pointer;
  font: 600 18.5px Fraunces, serif;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "→";
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(90deg);
}

.faq p {
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.6;
  font-size: 15px;
}

.rights h3 {
  font: 600 24px Fraunces, serif;
  margin: 0 0 16px;
}

.rights p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 14px;
}

/* ---------- 10. FOOTER ---------- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 32px max(24px, 5vw);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link:hover {
  color: var(--ink);
}

.sep {
  opacity: 0.5;
}

.replay-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font: 500 13px Inter, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.replay-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* ---------- 11. DIALOGS (COURSE PRICING & BOOKING) ---------- */
dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  position: fixed;
  inset: 0;
  margin: auto;
}

dialog::backdrop {
  background: rgba(10, 6, 3, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dlg-content h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

/* Sign-up-required dialog */
.auth-dlg {
  text-align: center;
}

.auth-dlg .cta {
  flex-direction: column;
  margin-top: 22px;
}

.auth-dlg .auth-logo {
  display: block;
  margin: 0 auto 6px;
}

.auth-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.auth-x:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.price {
  font: 600 30px Fraunces, serif;
  margin: 20px 0;
  color: var(--accent);
}

/* ---------- 12. SPLASH INTRO SCREEN ---------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg);
  background: var(--bg);
  display: grid;
  place-items: center;
  text-align: center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
}

#intro.done {
  transform: translateY(-100%);
  pointer-events: none;
}

#intro .stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

#intro .intro-logo {
  animation: pop 1s cubic-bezier(0.2, 1.5, 0.4, 1) both,
             glow 2s ease-in-out 1s infinite alternate;
}

@keyframes pop {
  from { transform: scale(0) rotate(-90deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes glow {
  to { filter: drop-shadow(0 0 22px var(--accent)); }
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: ring 2.6s ease-out infinite;
}

.ring:nth-child(2) { animation-delay: 0.8s; }
.ring:nth-child(3) { animation-delay: 1.6s; }

@keyframes ring {
  0% { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(5); opacity: 0; }
}

.word {
  font-size: 46px;
  letter-spacing: -0.02em;
}

.word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: up 0.6s forwards;
}

@keyframes up {
  to { opacity: 1; transform: none; }
}

#intro .line {
  color: var(--muted);
  margin: 0;
  opacity: 0;
  animation: up 0.8s 1.9s forwards;
  padding: 0 20px;
  font-size: 16px;
}

#skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 16px;
  font: 500 13px Inter, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 3;
}

#skip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* ---------- 13. SCROLL REVEALS & RESPONSIVE ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 860px) {
  .island-nav {
    display: none;
  }
  .dynamic-island {
    padding: 6px 10px 6px 14px;
    gap: 14px;
  }
  .pin {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px;
    padding-top: 110px;
  }
  .st-stage {
    order: 1;
    aspect-ratio: 16 / 9;
  }
  .st-text {
    order: 2;
    max-height: none;
  }
  .th-hero {
    grid-template-columns: 1fr;
  }
  .strip {
    grid-template-columns: 1fr;
  }
  .teacher {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    animation-delay: 0s !important;
    transition: none !important;
  }
  #intro {
    display: none !important;
  }
}
