/* ============================================================
   E Scapes — design tokens + site styles
   Playful & wondrous. Fredoka (display) + Nunito (body).
   ============================================================ */
:root {
  /* base */
  --cream: #fbf4ea;
  --cream-2: #f4e9da;
  --ink: #221c46;          /* deep indigo near-black */
  --ink-soft: #514a7a;
  --night: #0f0d28;        /* hero / footer */
  --night-2: #181541;

  /* multi-hue accents (each future world gets one) */
  --sun: #ffc24d;          /* gold */
  --coral: #ff7e5f;        /* coral */
  --aqua: #38c6cf;         /* aqua  (space) */
  --grape: #9a6be3;        /* grape (space) */
  --leaf: #5bc88a;         /* leaf  */

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 18px 50px -20px rgba(34, 28, 70, 0.35);
  --shadow-card: 0 12px 34px -16px rgba(34, 28, 70, 0.28);
  --maxw: 1180px;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
p { line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(255, 126, 95, 0.9);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(255, 126, 95, 0.9); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 44px);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  background: rgba(251, 244, 234, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px -16px rgba(34, 28, 70, 0.5);
  padding-top: 12px; padding-bottom: 12px;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
}
.nav-links a { color: #fff; opacity: 0.92; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav.scrolled .nav-links a { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 18px; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; }
.mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--grape), var(--aqua));
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5), 0 6px 16px -6px rgba(154,107,227,0.8);
  flex: none;
  overflow: hidden;
}
/* a little window + star inside the mark */
.mark::before {
  content: "";
  position: absolute; inset: 9px;
  border-radius: 5px;
  background:
    radial-gradient(circle at 70% 30%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 35% 65%, #fff 0 1.4px, transparent 2.4px),
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0));
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55);
}
.mark::after { /* mullion cross */
  content: "";
  position: absolute; inset: 9px;
  background:
    linear-gradient(transparent calc(50% - 0.8px), rgba(255,255,255,0.6) calc(50% - 0.8px) calc(50% + 0.8px), transparent calc(50% + 0.8px)),
    linear-gradient(90deg, transparent calc(50% - 0.8px), rgba(255,255,255,0.6) calc(50% - 0.8px) calc(50% + 0.8px), transparent calc(50% + 0.8px));
  border-radius: 5px;
}
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color 0.3s ease;
}
.wordmark-text .e { color: var(--sun); }
.nav.scrolled .wordmark-text { color: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--night);
}
.hero-stage { position: absolute; inset: 0; cursor: grab; }
.hero-stage.grabbing { cursor: grabbing; }
#hero-canvas { width: 100%; height: 100%; display: block; }

/* gradient veils so text stays legible over the 3D */
.hero-veil {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15,13,40,0.5) 0%, rgba(15,13,40,0) 24%, rgba(15,13,40,0) 58%, rgba(15,13,40,0.6) 100%),
    radial-gradient(120% 80% at 16% 72%, rgba(15,13,40,0.4), transparent 58%);
}
.world-fade {
  position: absolute; inset: 0; z-index: 4;
  background: #1ba6bd; opacity: 0; pointer-events: none;
  transition: opacity 0.42s ease;
}
.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 13%;
  padding: 0 clamp(20px, 6vw, 80px);
  z-index: 5;
  pointer-events: none;
  max-width: 880px;
}
.hero-content > * { pointer-events: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--aqua);
  background: rgba(56, 198, 207, 0.12);
  border: 1px solid rgba(56,198,207,0.4);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.92rem;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.05rem, 7.4vw, 5.6rem);
  font-weight: 600;
  margin-bottom: 18px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.45);
}
.hero h1 .pop { color: var(--sun); }
.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-hint {
  position: absolute;
  right: clamp(20px, 5vw, 56px);
  bottom: 13%;
  z-index: 5;
  color: rgba(255,255,255,0.62);
  font-size: 0.86rem;
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
  white-space: nowrap;
}
.hero-hint .ic { font-size: 1.1rem; }
@media (max-width: 720px) { .hero-hint { display: none; } }

/* ---------- scene dock ---------- */
.dock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 26px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: rgba(20, 17, 50, 0.55);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  max-width: calc(100vw - 40px);
  overflow-x: auto;
  scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }
.dock-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  padding: 0 6px 0 8px;
  white-space: nowrap;
}
.chip {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.78);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  position: relative;
}
.chip .swatch { width: 9px; height: 9px; border-radius: 50%; }
.chip.active { background: rgba(56,198,207,0.18); color: #fff; border-color: rgba(56,198,207,0.55); }
.chip.locked { color: rgba(255,255,255,0.5); cursor: default; }
.chip.locked:hover { color: rgba(255,255,255,0.78); }
.chip .soon {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.14);
  padding: 2px 6px;
  border-radius: 999px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section { position: relative; }
.section-pad { padding: clamp(72px, 11vh, 130px) 0; }
.kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- how it works ---------- */
.how { background: var(--cream); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 30px 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.step .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 22px;
}
.step h3 { font-size: clamp(1.24rem, 2.8vw, 1.42rem); margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 1.02rem; }
.step .blob { position: absolute; right: -38px; top: -38px; width: 120px; height: 120px; border-radius: 50%; opacity: 0.14; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- use cases ---------- */
.use { background: var(--cream-2); }
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.case {
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  color: #fff;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease;
}
.case:hover { transform: translateY(-5px); }
.case h3 { font-size: clamp(1.4rem, 3.6vw, 1.7rem); margin-bottom: 8px; }
.case p { opacity: 0.92; font-size: 1.02rem; max-width: 30ch; }
.case .tag {
  position: absolute; top: 24px; left: 28px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase;
  opacity: 0.8;
}
.case .deco { position: absolute; border-radius: 50%; }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about { background: var(--night); color: #fff; overflow: hidden; }
.about .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.about h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: 22px; }
.about .kicker { color: var(--sun); }
.about p { color: rgba(255,255,255,0.82); font-size: 1.12rem; margin-bottom: 18px; }
.about-stats { display: flex; gap: 38px; margin-top: 34px; flex-wrap: wrap; }
.stat .n { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.95rem, 5.2vw, 2.4rem); color: var(--aqua); }
.stat .l { color: rgba(255,255,255,0.6); font-size: 0.96rem; }
.about-art {
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 120% at 30% 20%, #2b2466, #14112e 70%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), var(--shadow-soft);
  display: grid; place-items: center;
}
.about-art .ring2 { position: absolute; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,0.16); }
.about-art .planet2 {
  width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(160deg, var(--grape), var(--aqua));
  box-shadow: 0 0 60px -10px rgba(154,107,227,0.7), inset -14px -10px 30px rgba(0,0,0,0.3);
}
.about-art .twinkle { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0.8; }
@media (max-width: 860px) { .about .container { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- contact ---------- */
.contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-copy h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 18px; }
.contact-copy p { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 26px; }
.contact-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-points li { display: flex; align-items: center; gap: 13px; font-weight: 600; }
.contact-points .ic {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 1rem;
}

.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-soft);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 13px 15px;
  border: 1.6px solid #e7dccb;
  border-radius: 13px;
  background: var(--cream);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  outline: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--grape);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(154,107,227,0.14);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--coral); }
.field .err { color: var(--coral); font-size: 0.84rem; margin-top: 6px; display: none; font-weight: 600; }
.field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  text-align: center;
  padding: 30px 10px;
}
.form-success .badge {
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--leaf); color: #fff;
  display: grid; place-items: center; font-size: 2rem;
  margin: 0 auto 18px;
  box-shadow: 0 12px 30px -10px rgba(91,200,138,0.9);
}
.form-success h3 { font-size: clamp(1.35rem, 3.4vw, 1.6rem); margin-bottom: 8px; }
.form-success p { color: var(--ink-soft); }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--night-2); color: #fff; padding: 60px 0 34px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 44px; }
.footer .tag { color: rgba(255,255,255,0.6); max-width: 30ch; margin-top: 16px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--aqua); margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; color: rgba(255,255,255,0.72); margin-bottom: 11px; transition: color 0.18s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: rgba(255,255,255,0.5); font-size: 0.9rem;
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed; top: 84px; right: 20px; z-index: 60; width: 234px;
  background: rgba(20, 17, 50, 0.82); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px;
  padding: 14px 16px 16px; color: #fff; box-shadow: var(--shadow-soft);
  font-family: var(--font-body);
}
.tweaks-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 14px; }
.tweaks-close { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0; }
.tweaks-close:hover { color: #fff; }
.tweak-row { display: flex; align-items: center; gap: 10px; }
.tweak-row label { font-size: 0.9rem; flex: 1; color: rgba(255,255,255,0.85); }
.tweak-row input[type="range"] { flex: 1.3; accent-color: var(--aqua); }
.tweak-val { font-family: var(--font-display); font-size: 0.85rem; width: 22px; text-align: right; color: var(--aqua); }

/* ============================================================
   SPLIT PORTAL  (the new front door — corporate L / kids R)
   ============================================================ */
.portal-body { background: #07060f; overflow: hidden; }
.portal {
  display: flex;
  height: 100svh;
  min-height: 560px;
  width: 100%;
}
.portal-half {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  color: #fff;
  display: flex;
  text-decoration: none;
  transition: flex-grow 0.65s cubic-bezier(0.4, 0, 0.15, 1), filter 0.55s ease;
  will-change: flex-grow;
}
.portal-half.left  { box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.14); }
.portal-half.right { box-shadow: inset  1px 0 0 rgba(255, 255, 255, 0.06); }
/* hover: grow the focused side, calm the other (only on hover-capable devices) */
@media (hover: hover) and (min-width: 821px) {
  .portal:has(.left:hover)  .left,
  .portal:has(.right:hover) .right { flex-grow: 1.42; }
  .portal:hover .portal-half { filter: saturate(0.78) brightness(0.8); }
  .portal:hover .portal-half:hover { filter: none; }
}

/* ---- scenery layers (pure CSS worlds beyond the glass) ---- */
.scene { position: absolute; inset: 0; pointer-events: none; }
.scene > * { position: absolute; }

/* shared horizon mist / sheen */
.sheen { left: -10%; right: -10%; height: 42%; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.10) 60%, rgba(255,255,255,0.18));
  mix-blend-mode: screen; opacity: 0.5; }

/* LEFT — calm dawn over still water & forest */
.scene-calm { background: linear-gradient(180deg, #11303b 0%, #1c4f54 38%, #356f63 62%, #6fa489 80%, #cfe3cf 100%); }
.scene-calm .sun {
  width: 240px; height: 240px; border-radius: 50%; left: 50%; bottom: 14%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,241,210,0.95) 0%, rgba(255,226,170,0.5) 38%, rgba(255,214,150,0) 70%);
}
.scene-calm .ridge {
  left: -5%; right: -5%; bottom: 30%; height: 240px;
  background: #173f3f;
  -webkit-mask-image: radial-gradient(120% 100% at 20% 100%, #000 60%, transparent 61%), radial-gradient(120% 100% at 72% 100%, #000 55%, transparent 56%);
  mask-image: radial-gradient(120% 100% at 20% 100%, #000 60%, transparent 61%), radial-gradient(120% 100% at 72% 100%, #000 55%, transparent 56%);
  opacity: 0.85;
}
.scene-calm .ridge.back { bottom: 34%; opacity: 0.45; background: #1f5350; filter: blur(1px); transform: scaleX(1.2); }
.scene-calm .water {
  left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(180deg, #6fa489 0%, #4f8270 30%, #2f5a55 100%);
}
.scene-calm .water::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  top: 0; width: 200px; height: 100%;
  background: linear-gradient(180deg, rgba(255,238,205,0.55), rgba(255,238,205,0));
  filter: blur(3px);
}

/* RIGHT — magical dusk, moon, hill */
.scene-magic { background: linear-gradient(180deg, #140a33 0%, #281657 40%, #5a2c79 68%, #b1517f 86%, #f0a06f 100%); }
.scene-magic .moon {
  width: 150px; height: 150px; border-radius: 50%; right: 16%; top: 14%;
  background: radial-gradient(circle at 38% 36%, #fff7e8, #ffe6c2 60%, #f6c98f 100%);
  box-shadow: 0 0 70px 18px rgba(255, 232, 196, 0.45);
}
.scene-magic .hill {
  left: -8%; right: -8%; bottom: 0; height: 32%;
  background: linear-gradient(180deg, #2a1850, #1c0f38);
  border-radius: 60% 60% 0 0 / 80px 80px 0 0;
}
.scene-magic .hill.back {
  bottom: 18%; height: 22%; opacity: 0.6; background: #3a2160;
  border-radius: 50% 50% 0 0 / 70px 70px 0 0; transform: scaleX(1.3);
}
.scene-magic .castle {
  bottom: 30%; left: 50%; transform: translateX(-50%);
  width: 120px; height: 92px;
  background:
    /* central keep */
    linear-gradient(#160c30, #160c30) calc(50% ) 100% / 34px 64px no-repeat,
    /* left tower */
    linear-gradient(#160c30, #160c30) 14% 100% / 22px 50px no-repeat,
    /* right tower */
    linear-gradient(#160c30, #160c30) 86% 100% / 22px 50px no-repeat;
  background-position: 50% 100%, 14% 100%, 86% 100%;
}
.scene-magic .castle::before,
.scene-magic .castle::after {
  content: ""; position: absolute; bottom: 64px; width: 0; height: 0;
}
.scene-magic .castle::before { left: 50%; transform: translateX(-50%);
  border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 26px solid #160c30; }

/* twinkles + sparkles + mist (JS-sprinkled) */
.spark { position: absolute; border-radius: 50%; background: #fff; pointer-events: none; }
.scene-magic .spark { box-shadow: 0 0 6px 1px rgba(255,240,200,0.8); animation: twinkle 3.2s ease-in-out infinite; }
.scene-calm .mote { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.7); filter: blur(0.5px); animation: drift 14s linear infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes drift { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 0.8; } 88% { opacity: 0.6; } 100% { transform: translate(34px, -60px); opacity: 0; } }

/* ---- window-pane overlay (you're looking through the glass) ---- */
.panes {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background:
    linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(20,16,40,0.42) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(0deg,  transparent calc(46% - 1.5px), rgba(20,16,40,0.42) calc(46% - 1.5px) calc(46% + 1.5px), transparent calc(46% + 1.5px));
  box-shadow: inset 0 0 0 10px rgba(18, 14, 36, 0.45), inset 0 0 120px 30px rgba(8, 6, 20, 0.55);
}
.portal-half .glow-veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 90% at 30% 78%, rgba(7,6,18,0.62), transparent 60%),
              linear-gradient(180deg, rgba(7,6,18,0.45) 0%, transparent 26%, transparent 54%, rgba(7,6,18,0.72) 100%);
}
.portal-half.right .glow-veil { background: radial-gradient(120% 90% at 70% 78%, rgba(7,6,18,0.6), transparent 60%),
              linear-gradient(180deg, rgba(7,6,18,0.4) 0%, transparent 26%, transparent 52%, rgba(7,6,18,0.72) 100%); }

/* ---- content ---- */
.portal-content {
  position: relative; z-index: 4;
  margin-top: auto;
  padding: clamp(34px, 6vh, 72px) clamp(30px, 5vw, 78px) clamp(48px, 8vh, 92px);
  max-width: 560px;
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.15, 1);
}
.portal-half.right .portal-content { align-items: flex-start; }
.portal-kicker {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.26);
  backdrop-filter: blur(6px); margin-bottom: 22px;
}
.portal-kicker .led { width: 7px; height: 7px; border-radius: 50%; }
.portal-half.left  .portal-kicker .led { background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.portal-half.right .portal-kicker .led { background: var(--sun);  box-shadow: 0 0 10px var(--sun); }
.portal-content h2 {
  font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.04; color: #fff;
  text-shadow: 0 6px 36px rgba(0,0,0,0.45); margin-bottom: 16px;
}
.portal-half.left  .portal-content h2 .accent { color: #bfeede; }
.portal-half.right .portal-content h2 .accent { color: var(--sun); }
.portal-content p {
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: rgba(255,255,255,0.88);
  max-width: 42ch; margin: 0 0 24px; text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}
.portal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.portal-tags span {
  font-family: var(--font-display); font-weight: 500; font-size: 0.86rem;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px); white-space: nowrap;
}
.portal-enter {
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
  display: inline-flex; align-items: center; gap: 11px;
  padding: 14px 28px; border-radius: 999px; color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, gap 0.2s ease;
}
.portal-half.left  .portal-enter { background: var(--aqua); color: #08312f; box-shadow: 0 14px 30px -12px rgba(56,198,207,0.9); }
.portal-half.right .portal-enter { background: var(--coral); box-shadow: 0 14px 30px -12px rgba(255,126,95,0.9); }
.portal-half:hover .portal-enter { transform: translateY(-2px); gap: 15px; }
.portal-enter .arr { transition: transform 0.2s ease; }
.portal-half:hover .portal-enter .arr { transform: translateX(3px); }

/* big faint label that sits behind, hints audience at a glance */
.portal-ghost {
  position: absolute; z-index: 4; top: clamp(96px, 16vh, 150px);
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.2rem); letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.portal-half.left  .portal-ghost { left: clamp(30px, 5vw, 78px); }
.portal-half.right .portal-ghost { right: clamp(30px, 5vw, 78px); }

/* ---- top brand bar ---- */
.portal-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center;
  padding-top: clamp(20px, 3.4vh, 34px); pointer-events: none;
}
.portal-top .wordmark { pointer-events: auto; }
.portal-top .tagline {
  margin-top: 9px; font-family: var(--font-display); font-weight: 500;
  font-size: 0.92rem; color: rgba(255,255,255,0.72); letter-spacing: 0.02em;
}
.portal-quote {
  position: fixed; top: clamp(18px, 3vh, 30px); right: clamp(20px, 4vw, 40px); z-index: 21;
  pointer-events: auto;
}

/* intro reveal (transform-only so resting state is always visible) */
.portal-half { animation: paneIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.portal-half.left  { animation-delay: 0.05s; }
.portal-half.right { animation-delay: 0.14s; }
.portal-content > * { animation: contentUp 0.7s ease both; }
.portal-half.left  .portal-content > * { animation-delay: 0.34s; }
.portal-half.right .portal-content > * { animation-delay: 0.42s; }
@keyframes paneIn { from { transform: scale(1.05); } to { transform: none; } }
@keyframes contentUp { from { transform: translateY(20px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .portal-half, .portal-content > *, .scene-magic .spark, .scene-calm .mote { animation: none !important; }
}

/* mobile: stack */
@media (max-width: 820px) {
  .portal { flex-direction: column; height: auto; min-height: 100svh; }
  .portal-half { min-height: 56svh; }
  .portal-half.left  { box-shadow: inset 0 -1px 0 rgba(255,255,255,0.14); }
  .portal-half.right { box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
  .portal-top .tagline { display: none; }
  .panes { box-shadow: inset 0 0 0 8px rgba(18,14,36,0.45), inset 0 0 90px 24px rgba(8,6,20,0.55); }
}

/* ---- corporate (left) panel: professional treatment, kids panel stays playful ---- */
.portal-half.left { font-family: "Hanken Grotesk", system-ui, sans-serif; }
.portal-half.left .portal-content h2 {
  font-family: "Newsreader", Georgia, serif; font-weight: 500; letter-spacing: -0.012em;
}
.portal-half.left .portal-content h2 .accent { color: #c2a36a; font-style: italic; }
.portal-half.left .portal-kicker {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  border-radius: 6px; letter-spacing: 0.16em; font-weight: 600;
}
.portal-half.left .portal-kicker .led { background: #6fae97; box-shadow: 0 0 10px #6fae97; }
.portal-half.left .portal-tags span { font-family: "Hanken Grotesk", system-ui, sans-serif; border-radius: 7px; }
.portal-half.left .portal-ghost { font-family: "Hanken Grotesk", system-ui, sans-serif; letter-spacing: 0.26em; }
.portal-half.left .portal-enter {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  border-radius: 10px; background: #2f6f60; color: #eafff8;
  box-shadow: 0 14px 30px -14px rgba(16, 56, 46, 0.85);
}

/* ---------- small screens: keep wrapped headings & copy comfortable ---------- */
@media (max-width: 600px) {
  .hero h1,
  .portal-content h2,
  .section-head h2,
  .about h2,
  .contact-copy h2 { line-height: 1.1; }
  .section-head { margin-bottom: 40px; }
  .section-head p,
  .about p,
  .contact-copy p { font-size: 1.05rem; }

  /* brand bar: left-align so the centered wordmark clears the "Get a quote" button */
  .portal-top { align-items: flex-start; padding-left: clamp(20px, 5vw, 30px); }
}
