/* ─────────────────────────────────────────────────────────────
   WAVES OF WORDS — Design tokens, 4 palettes, globals
   ───────────────────────────────────────────────────────────── */

:root {
  /* Type — Speaker Kit system (sitewide) */
  --f-display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --f-editorial: "Fraunces", "Instrument Serif", Georgia, serif;
  --f-body: "DM Sans", "Inter Tight", -apple-system, system-ui, sans-serif;
  --f-script: "Fraunces", Georgia, serif;
  --f-hand: "Fraunces", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-thai: "Noto Sans Thai", "Sarabun", "DM Sans", sans-serif;
  --f-thai-display: "Noto Serif Thai", "Sarabun", "Fraunces", serif;

  /* Layout */
  --gutter: clamp(20px, 4vw, 64px);
  --maxw: 1440px;

  /* Palette — Speaker Kit (Navy / Cream / Coral / Yellow / Electric Blue) */
  --wow-pink:    #FF4D8D;
  --wow-teal:    #FFD23F;
  --wow-gold:    #FFD23F;
  --wow-coral:   #FF4D8D;
  --wow-purple:  #2348FF;
  --wow-ink:     #0A1B4D;
  --wow-paper:   #FFFFFF;
  --wow-paper-2: #DCEBFF;
  --wow-line:    #0A1B4D;
  --wow-accent:    var(--wow-purple);
  --wow-accent-2:  var(--wow-pink);
  --wave-1: #DCEBFF;
  --wave-2: #FFD23F;
  --wave-3: #2348FF;
  --wave-4: #0A1B4D;
}

/* Palette 1 — default Speaker Kit (inherits :root) */
body[data-palette="1"] { }

/* Palette 2 — Thai Royal Purple (deep purple + lavender + pops of pink/gold) */
body[data-palette="2"] {
  --wow-pink:    #FF3FA0;
  --wow-teal:    #FFD60A;
  --wow-gold:    #F2C94C;
  --wow-coral:   #FFB800;
  --wow-purple:  #6B2C91;
  --wow-ink:     #2A0F4F;       /* deep royal purple — used as dark bg */
  --wow-paper:   #F5EEFA;       /* light lavender paper */
  --wow-paper-2: #E6D6F2;
  --wow-accent:    var(--wow-purple);
  --wow-accent-2:  var(--wow-pink);
  --wave-1: #f0d6ff; --wave-2: #c89cf2; --wave-3: #8d4fc7; --wave-4: #2A0F4F;
}

/* Palette 3 — Andaman (bright blue + hot pink + bold yellow + white) */
body[data-palette="3"] {
  --wow-pink:    #FF2D87;       /* hot pink */
  --wow-teal:    #FFD23F;       /* bold yellow */
  --wow-gold:    #FFD23F;
  --wow-coral:   #FF6B4A;
  --wow-purple:  #2348FF;       /* bright electric blue primary */
  --wow-ink:     #0A1F4F;       /* deep navy text */
  --wow-paper:   #FFFFFF;       /* white background */
  --wow-paper-2: #E8F0FF;       /* soft blue tint */
  --wow-accent:    var(--wow-purple);
  --wow-accent-2:  var(--wow-pink);
  --wave-1: #DCEBFF; --wave-2: #7FC1FF; --wave-3: #2348FF; --wave-4: #0A1F4F;
}

/* Palette 4 — Petal (hot pink + light pink + black + white) */
body[data-palette="4"] {
  --wow-pink:    #FF1F8F;
  --wow-teal:    #FFB8DC;
  --wow-gold:    #FFD6E8;
  --wow-coral:   #FF1F8F;
  --wow-purple:  #000000;
  --wow-ink:     #0A0A0A;
  --wow-paper:   #FFFFFF;
  --wow-paper-2: #FFEAF4;
  --wow-accent:    var(--wow-pink);
  --wow-accent-2:  var(--wow-ink);
  --wave-1: #FFD6E8; --wave-2: #FFB8DC; --wave-3: #FF1F8F; --wave-4: #0A0A0A;
}
body[data-palette="3"] .pill { background: rgba(255,255,255,.14); color: #FFFFFF; }


* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--wow-paper);
  color: var(--wow-ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
}

body[data-lang="th"] { font-family: var(--f-thai); }
body[data-lang="th"] .display { font-family: var(--f-thai-display); letter-spacing: 0; line-height: 1.05; }
body[data-lang="th"] .editorial { font-family: var(--f-thai-display); font-style: normal; line-height: 1.15; }
body[data-lang="th"] .hand { font-family: var(--f-thai); font-weight: 600; }
body[data-lang="th"] .script { font-family: var(--f-thai); font-style: normal; font-weight: 500; }

#root { min-height: 100vh; display: flex; flex-direction: column; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ───── Display type ───── */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: none;
}

.editorial {
  font-family: var(--f-editorial);
  font-style: italic;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.script {
  font-family: var(--f-editorial);
  font-style: italic;
  font-weight: 500;
}

.hand {
  font-family: var(--f-editorial);
  font-style: italic;
  font-weight: 500;
}

/* ───── Argyle pattern utility — hot pink + pure white ───── */
.argyle-bg {
  background-color: var(--wow-pink);
  background-image:
    linear-gradient(45deg, transparent 49%, rgba(255,255,255,.95) 49%, rgba(255,255,255,.95) 51%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, rgba(255,255,255,.95) 49%, rgba(255,255,255,.95) 51%, transparent 51%),
    linear-gradient(45deg, #FFFFFF 25%, transparent 25%, transparent 75%, #FFFFFF 75%),
    linear-gradient(-45deg, #FFFFFF 25%, transparent 25%, transparent 75%, #FFFFFF 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 0, 0 0, 20px 20px;
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;   /* touch-friendly */
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* RULE: hover state must always contrast its surroundings — never let a button
   disappear by matching its background. Light fill + dark text on hover. */
.btn-pink { background: var(--wow-pink); color: white; }
.btn-pink:hover { background: #F3E8FF; color: #3B0764; }
.btn-ink  { background: var(--wow-ink); color: var(--wow-paper); }
.btn-ink:hover  { background: #F3E8FF; color: #3B0764; }
.btn-paper { background: var(--wow-paper); color: var(--wow-ink); }
.btn-paper:hover { background: #F3E8FF; color: #3B0764; }
.btn-purple { background: var(--wow-purple); color: white; }
.btn-purple:hover { background: #F3E8FF; color: #3B0764; }
.btn-outline { border: 1.5px solid currentColor; }
.btn-outline:hover { background: #F3E8FF; color: #3B0764; border-color: #3B0764; }

.btn-arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ───── Section frame ───── */
section.bleed { padding: clamp(72px, 10vw, 140px) var(--gutter); }
section.bleed-tight { padding: clamp(56px, 7vw, 96px) var(--gutter); }
.container { max-width: var(--maxw); margin: 0 auto; width: 100%; }

/* ───── Photo slot defaults ───── */
image-slot {
  --slot-bg: rgba(10,10,31,.06);
  --slot-fg: rgba(10,10,31,.5);
  display: block; width: 100%; height: 100%;
  background: var(--slot-bg);
  position: relative; overflow: hidden;
}

/* Caption under photos — handwritten style */
.photo-caption {
  font-family: var(--f-hand);
  font-size: 19px; line-height: 1.1;
  color: var(--wow-ink);
  margin-top: 12px;
  display: flex; gap: 8px; align-items: flex-start;
}
.photo-caption::before {
  content: "↳";
  font-family: var(--f-body); font-size: 14px;
  color: var(--wow-pink); margin-top: 4px;
}

/* Pull quote */
.pull-quote {
  font-family: var(--f-editorial);
  font-style: italic; font-weight: 500;
  line-height: 1.05; letter-spacing: -0.015em;
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex; gap: 48px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
}

/* Argyle pulse */
@keyframes argyleDrift {
  from { background-position: 0 0, 0 0, 0 0, 20px 20px; }
  to   { background-position: 40px 40px, 40px -40px, 40px 40px, 60px -20px; }
}
.argyle-bg.drift { animation: argyleDrift 18s linear infinite; }

/* Tag pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(10,10,31,.08); color: var(--wow-ink);
}
.pill.on-ink { background: rgba(255,255,255,.12); color: var(--wow-paper); }
.pill.pink { background: var(--wow-pink); color: white; }
.pill.teal { background: var(--wow-teal); color: var(--wow-ink); }
.pill.gold { background: var(--wow-gold); color: var(--wow-ink); }
.pill.coral { background: var(--wow-coral); color: var(--wow-ink); }
.pill.purple { background: var(--wow-purple); color: white; }

/* Argyle divider */
.argyle-divider {
  height: 14px;
  background-image:
    linear-gradient(45deg, var(--wow-pink) 25%, transparent 25%, transparent 75%, var(--wow-pink) 75%),
    linear-gradient(-45deg, var(--wow-pink) 25%, transparent 25%, transparent 75%, var(--wow-pink) 75%);
  background-color: var(--wow-paper);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}

/* Selection */
::selection { background: var(--wow-pink); color: white; }
html { scrollbar-color: var(--wow-pink) var(--wow-paper-2); }

/* ─────────────────────────────────────────────────────────────
   Wave footer — animated SVG strip before the <footer>
   ───────────────────────────────────────────────────────────── */
.wave-footer {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
  background: var(--wow-paper);
}
.wave-footer svg {
  position: absolute; left: 0; bottom: 0;
  width: 200%; height: 100%;
  display: block; will-change: transform;
}
.wave-footer .w1 { animation: waveDrift 22s linear infinite;         opacity: .85; }
.wave-footer .w2 { animation: waveDrift 16s linear infinite reverse; opacity: .85; }
.wave-footer .w3 { animation: waveDrift 12s linear infinite;         opacity: .95; }
.wave-footer .w4 { animation: waveDrift  9s linear infinite reverse; opacity: 1; }

@keyframes waveDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 1024px) {
  .wave-footer svg { width: 200%; min-width: 200%; }
  .wave-footer { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .wave-footer svg { animation: none; }
}

/* ─────────────────────────────────────────────────────────────
   Contact-page tall wave bed — same shapes as .wave-footer,
   ~4x taller, anchored to the bottom of the contact section.
   Words ride the crests; form + headline sit ABOVE it.
   ───────────────────────────────────────────────────────────── */
.contact-wave-bed {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(620px, 70vh, 900px);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  line-height: 0;
}
.contact-wave-bed .cwb-svg {
  position: absolute; left: 0; bottom: 0;
  width: 200%; height: 100%;
  display: block; will-change: transform;
}
.contact-wave-bed .cwb-w1 { animation: waveDrift 26s linear infinite;         opacity: .85; }
.contact-wave-bed .cwb-w2 { animation: waveDrift 19s linear infinite reverse; opacity: .9;  }
.contact-wave-bed .cwb-w3 { animation: waveDrift 14s linear infinite;         opacity: .95; }
.contact-wave-bed .cwb-w4 { animation: waveDrift 10s linear infinite reverse; opacity: 1;   }

/* Floating word currents — share the bed's full box & viewBox so the
   text paths scale identically to the wave shapes and ride the crests. */
.contact-wave-bed .cwb-words { position: absolute; inset: 0; }

@media (max-width: 1024px) {
  .contact-wave-bed { height: clamp(480px, 60vh, 700px); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-wave-bed .cwb-svg { animation: none; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — iPad portrait, iPad landscape, tablet, mobile
   The base layout targets desktop. Below collapses to fit.
   ───────────────────────────────────────────────────────────── */

/* iPad-landscape and narrow desktop (≤1180px) */
@media (max-width: 1180px) {
  :root { --gutter: clamp(20px, 3.6vw, 48px); }
}

/* iPad portrait (~768–1024px) */
@media (max-width: 1024px) {
  .nav-center { display: none !important; }
  .nav-mobile-btn { display: inline-flex !important; }
  .grid-3, .grid-4, .grid-5, .grid-7 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .hide-tablet { display: none !important; }
}

/* Tablet & smaller phones */
@media (max-width: 760px) {
  html, body { font-size: 16px; }
  .grid-3, .grid-4, .grid-5, .grid-7, .grid-6 { grid-template-columns: 1fr !important; }
  .hide-mobile { display: none !important; }
  .stack-mobile { flex-direction: column !important; align-items: flex-start !important; }
  .text-mobile-l { font-size: clamp(48px, 14vw, 80px) !important; }
}

/* Touch-friendly form controls everywhere */
input, select, textarea {
  min-height: 44px;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--wow-ink); color: var(--wow-paper);
  display: flex; flex-direction: column;
  padding: 24px var(--gutter);
  transform: translateY(-100%);
  transition: transform .35s ease;
  overflow-y: auto;
}
.mobile-menu-overlay.open { transform: translateY(0); }

/* Letter design (program page) */
.letter-paper {
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(43,15,79,.08) 31px 32px),
    linear-gradient(180deg, #FFFFFF, #FFFFFF);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(0,0,0,.04),
    0 30px 60px -20px rgba(0,0,0,.18),
    0 0 0 1px rgba(43,15,79,.08);
  padding: clamp(40px, 6vw, 80px);
  position: relative;
  font-family: var(--f-script);
}
.letter-paper::before {
  content: "";
  position: absolute; top: 24px; left: 60px;
  width: 1px; height: calc(100% - 48px);
  background: rgba(255,77,77,.2);
}
.letter-paper h1, .letter-paper h2 {
  font-family: var(--f-editorial);
  font-style: italic;
  font-weight: 600;
}
.letter-paper p {
  font-family: var(--f-script);
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 1em;
  color: #2A0F4F;
}
.letter-stamp {
  position: absolute; top: 32px; right: 32px;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 3px solid var(--wow-pink);
  color: var(--wow-pink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 11px; line-height: 1.2;
  text-align: center; text-transform: uppercase;
  letter-spacing: .08em;
  transform: rotate(-12deg);
  background: rgba(255,255,255,.6);
  padding: 12px;
}

/* Palette swatch dots */
.palette-dot {
  display: inline-block;
  width: 36px; height: 36px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--wow-paper);
  outline: 2px solid transparent;
  transition: outline-color .15s, transform .15s;
}
.palette-dot:hover { transform: scale(1.08); }
.palette-dot.active { outline-color: var(--wow-ink); }
.palette-dot .stripe {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.palette-dot .stripe span { display: block; }

/* Top bar palette/lang controls */
.chrome-controls {
  display: inline-flex; align-items: center; gap: 12px;
}
.chrome-controls .lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10,10,31,.06);
  font-size: 13px; font-weight: 600;
  min-height: 36px;
  transition: background .15s;
}
.chrome-controls .lang-btn:hover { background: rgba(10,10,31,.12); }
.chrome-controls .palette-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: rgba(10,10,31,.06);
  font-size: 12px; font-weight: 700;
  min-height: 36px;
  letter-spacing: .04em;
}
.chrome-controls .palette-btn:hover { background: rgba(10,10,31,.12); }

/* Palette popover */
.palette-popover {
  position: absolute; top: 56px; right: 0;
  background: var(--wow-paper);
  border: 1px solid rgba(10,10,31,.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,.18);
  padding: 16px;
  width: 280px;
  z-index: 60;
}
.palette-popover-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}
.palette-popover-row:hover { background: rgba(10,10,31,.05); }
.palette-popover-row.active { background: var(--wow-paper-2); }

/* Animations */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }

/* Footer inline links — used in subscribe + meta rows */
.footer-link {
  color: var(--wow-paper);
  opacity: .82;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s, opacity .2s;
  font-family: var(--f-body);
}
.footer-link:hover {
  color: var(--wow-pink);
  border-bottom-color: var(--wow-pink);
  opacity: 1;
}

/* ───── Nav link (calibri, all caps) ───── */
.nav-link {
  font-family: var(--f-mono) !important;
  text-transform: uppercase !important;
  letter-spacing: .12em !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
}

/* ───── Big Apply CTA in nav ───── */
.btn-apply-nav {
  padding: 14px 32px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase;
  font-family: var(--f-mono);
}

/* compact chrome controls — apply button pinned far right with extra breathing room on wide screens */
.chrome-controls { gap: 10px !important; }
.chrome-controls .btn-apply-nav { margin-left: clamp(8px, 2vw, 28px) !important; }
.chrome-controls .lang-btn,
.chrome-controls .palette-btn {
  padding: 4px 10px !important;
  font-size: 11px !important;
  min-height: 28px !important;
  opacity: .9;
}
.chrome-controls .palette-btn-swatchonly {
  padding: 4px !important;
  border-radius: 50% !important;
  width: 30px; height: 30px;
  justify-content: center;
}
.chrome-controls .palette-btn .palette-dot { width: 18px !important; height: 18px !important; }

/* Apply CTA wobble on hover */
@keyframes applyWobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-4deg) scale(1.04); }
  30% { transform: rotate(4deg) scale(1.04); }
  45% { transform: rotate(-3deg) scale(1.04); }
  60% { transform: rotate(3deg) scale(1.04); }
  75% { transform: rotate(-2deg) scale(1.03); }
}
.btn-apply-wobble { transform-origin: center; transition: transform .2s ease; }
.btn-apply-wobble:hover { animation: applyWobble .7s ease-in-out infinite; }

/* ───── Thai flag sway above hero ───── */
@keyframes flagSway {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-4px); }
}
.thai-flag-hero {
  animation: flagSway 4.5s ease-in-out infinite;
  transform-origin: top left;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.18));
}

/* ───── Intro Hero (animated fullscreen pop-up) ───── */
.intro-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--wow-ink);
  color: var(--wow-paper);
  padding: clamp(24px, 4vw, 56px) clamp(20px, 4vw, 56px) clamp(80px, 8vw, 120px);
}
/* Saved gradient look — used by .intro-hero-classic AND layered above the
   image on .intro-hero-v2 for warmth and to preserve the palette. */
.intro-hero::before {
  content: "";
  position: absolute; inset: -20%;
  background:
    radial-gradient(60% 60% at 20% 30%, color-mix(in oklab, var(--wow-pink) 55%, transparent), transparent 60%),
    radial-gradient(50% 50% at 80% 70%, color-mix(in oklab, var(--wow-teal) 50%, transparent), transparent 60%),
    radial-gradient(40% 40% at 60% 20%, color-mix(in oklab, var(--wow-purple) 60%, transparent), transparent 60%);
  animation: introBlob 14s ease-in-out infinite alternate;
  filter: blur(40px);
  z-index: 1;
  mix-blend-mode: screen;
  opacity: .55;
}
.intro-hero-classic::before { opacity: 1; mix-blend-mode: normal; }

/* V2 — image background with slow Ken Burns + dark vignette */
.intro-hero-v2 .intro-hero-bg {
  position: absolute; inset: 0;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  animation: heroImgIn 1.6s cubic-bezier(.2,.7,.2,1) forwards, heroKenBurns 22s ease-in-out 1.6s infinite alternate;
  z-index: 0;
}
.intro-hero-v2 .intro-hero-tint {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(10,10,31,.55) 0%, rgba(10,10,31,.35) 40%, rgba(10,10,31,.85) 100%),
    radial-gradient(80% 60% at 50% 40%, transparent 0%, rgba(10,10,31,.55) 100%);
  pointer-events: none;
}

/* Phase 0 — WAVES OF WORDS logo flash, then disperses */
.intro-logo-flash {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  pointer-events: none;
  animation: logoFlashOut 2.4s cubic-bezier(.5,0,.8,.2) forwards;
}
.intro-logo-word {
  font-family: var(--f-display);
  font-size: clamp(48px, 11vw, 180px);
  line-height: .9; letter-spacing: -.01em;
  color: #FFFFFF;
  text-shadow: 0 8px 60px rgba(255,63,160,.5);
  opacity: 0;
  transform: scale(.7);
  animation: logoIn .9s cubic-bezier(.2,.9,.2,1.2) .2s forwards;
}
.intro-logo-sub {
  margin-top: 14px;
  font-family: var(--f-editorial); font-style: italic;
  font-size: clamp(16px, 2.2vw, 28px);
  color: var(--wow-gold);
  opacity: 0;
  animation: logoSubIn .8s ease .7s forwards;
}
@keyframes logoIn { to { opacity: 1; transform: scale(1); } }
@keyframes logoSubIn { to { opacity: 1; } }
@keyframes logoFlashOut {
  0%, 65% { opacity: 1; filter: blur(0); transform: scale(1); }
  100% { opacity: 0; filter: blur(14px); transform: scale(1.15); pointer-events: none; }
}
@keyframes heroImgIn { to { opacity: 1; } }
@keyframes heroKenBurns {
  0% { transform: scale(1.08) translate(0,0); }
  100% { transform: scale(1.18) translate(-1.5%, -1%); }
}

.intro-hero-inner { position: relative; z-index: 3; text-align: center; max-width: 1200px; width: 100%; }
.intro-line { display: block; opacity: 0; transform: translateY(40px) scale(.94); animation: introPop .9s cubic-bezier(.2,.9,.2,1.1) forwards; }
/* V1 (classic) timings */
.intro-hero-classic .intro-line.l1 { animation-delay: .15s; }
.intro-hero-classic .intro-line.l2 { animation-delay: .55s; }
.intro-hero-classic .intro-line.l3 { animation-delay: .95s; }
.intro-hero-classic .intro-line.l4 { animation-delay: 1.4s; }
/* V2 timings — wait for logo flash to finish (~2.4s) */
.intro-hero-v2 .intro-line.l1 { animation-delay: 2.4s; }
.intro-hero-v2 .intro-line.l2 { animation-delay: 2.7s; }
.intro-hero-v2 .intro-line.l3 { animation-delay: 3.05s; }
.intro-hero-v2 .intro-line.l4 { animation-delay: 3.5s; }
.intro-hero-v2 .intro-line.l5 { animation-delay: 3.9s; }
.intro-hero-classic .intro-cta { opacity: 0; animation: introPop .8s cubic-bezier(.2,.9,.2,1.1) 1.85s forwards; }
.intro-hero-v2 .intro-cta { opacity: 0; animation: introPop .8s cubic-bezier(.2,.9,.2,1.1) 4.35s forwards; }
.intro-apply-btn { animation: applyPulse 2.4s ease-in-out 5s infinite; }
@keyframes applyPulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 18px 50px -10px rgba(255,63,160,.6); }
  50% { transform: translateY(-3px) scale(1.04); box-shadow: 0 24px 60px -8px rgba(255,63,160,.85); }
}
.intro-scroll { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); opacity: 0; animation: introFade 1s ease forwards; animation-delay: 4.8s; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--wow-paper); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.intro-hero-classic .intro-scroll { animation-delay: 2.4s; }
.intro-scroll-line { display: block; width: 1px; height: 36px; background: currentColor; animation: scrollNudge 1.8s ease-in-out infinite; }
.intro-scroll-arrow { display: block; font-size: 16px; line-height: 1; animation: scrollNudge 1.8s ease-in-out infinite; }
@keyframes introPop { 0% { opacity: 0; transform: translateY(40px) scale(.94); } 60% { opacity: 1; transform: translateY(-4px) scale(1.02); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introFade { to { opacity: .85; } }
@keyframes scrollNudge { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(8px); opacity: 1; } }
@keyframes introBlob {
  0% { transform: scale(1) rotate(0); }
  100% { transform: scale(1.15) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-line, .intro-cta, .intro-scroll, .intro-logo-flash,
  .intro-logo-word, .intro-logo-sub, .intro-apply-btn,
  .intro-hero-v2 .intro-hero-bg { opacity: 1; animation: none; transform: none; }
  .intro-hero::before { animation: none; }
  .intro-logo-flash { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   Palette 3 (Andaman / electric blue) — global contrast fixes
   Background of body and most sections becomes blue, so any
   blue-on-blue text needs to flip to white or yellow.
   ───────────────────────────────────────────────────────────── */
body[data-palette="3"] .nav-link,
body[data-palette="3"] header button { color: #FFFFFF !important; }
body[data-palette="3"] header { background: #0A1B4D !important; color: #FFFFFF !important; }
body[data-palette="3"] header a,
body[data-palette="3"] header span { color: #FFFFFF; }

body[data-palette="3"] .btn-outline { color: #FFFFFF !important; border-color: #FFFFFF !important; }
body[data-palette="3"] .btn-outline:hover { background: #FFFFFF !important; color: #2348FF !important; border-color: #FFFFFF !important; }
body[data-palette="3"] .btn-paper { background: #FFFFFF !important; color: #2348FF !important; }
body[data-palette="3"] .btn-purple { background: #FFD23F !important; color: #0A1B4D !important; }
body[data-palette="3"] .btn-ink { background: #0A1B4D !important; color: #FFFFFF !important; }

body[data-palette="3"] .footer-link,
body[data-palette="3"] footer { color: #FFFFFF !important; }
body[data-palette="3"] footer a { color: #FFD23F; }

body[data-palette="3"] .chrome-controls .lang-btn,
body[data-palette="3"] .chrome-controls .palette-btn {
  background: rgba(255,255,255,.16) !important; color: #FFFFFF !important;
}
body[data-palette="3"] .palette-popover { background: #0A1B4D !important; color: #FFFFFF !important; border-color: rgba(255,255,255,.2) !important; }
body[data-palette="3"] .palette-popover-row,
body[data-palette="3"] .palette-popover-row * { color: #FFFFFF !important; }
body[data-palette="3"] .palette-popover-row.active { background: rgba(255,255,255,.12) !important; }

body[data-palette="3"] .photo-caption { color: #FFFFFF !important; }
body[data-palette="3"] .pill { background: rgba(255,255,255,.18) !important; color: #FFFFFF !important; }
body[data-palette="3"] .pill.pink,
body[data-palette="3"] .pill.coral { background: #FF4D8D !important; color: #FFFFFF !important; }
body[data-palette="3"] .pill.teal,
body[data-palette="3"] .pill.gold { background: #FFD23F !important; color: #0A1B4D !important; }

body[data-palette="3"] .letter-paper { background: #FFFFFF !important; color: #0A1B4D !important; }
body[data-palette="3"] .letter-paper p,
body[data-palette="3"] .letter-paper h1,
body[data-palette="3"] .letter-paper h2 { color: #0A1B4D !important; }

/* Hover states on nav links */
body[data-palette="3"] .nav-link:hover { color: #FFD23F !important; }

/* Mobile menu already on ink bg — keep readable */
body[data-palette="3"] .mobile-menu-overlay { background: #0A1B4D !important; }

/* ─────────────────────────────────────────────────────────────
   Print stylesheet — used by "Save as PDF" on the apply
   success dashboard. Hides nav/footer/animated chrome so the
   saved PDF is just the application summary.
   ───────────────────────────────────────────────────────────── */
@media print {
  header, footer, .wave-footer, .mobile-menu-overlay,
  .intro-scroll, .palette-popover, .chrome-controls,
  .btn-apply-nav, .nav-mobile-btn { display: none !important; }
  body, html { background: #FFFFFF !important; color: #000000 !important; }
  section { padding: 16px 24px !important; background: #FFFFFF !important; }
  .btn { display: none !important; }
  .display, h1, h2, h3, p, li, span { color: #000000 !important; }
  a { color: #000000 !important; text-decoration: underline; }
  @page { margin: 12mm; }
}

/* ─────────────────────────────────────────────────────────────
   Apply button pinned to the very edge of the nav
   ───────────────────────────────────────────────────────────── */
header > div { padding-right: 12px !important; }
.btn-apply-nav { margin-right: 0 !important; }

/* ─────────────────────────────────────────────────────────────
   Mobile nav collapse — keep only logo, language, apply-now,
   and hamburger. Hide center nav links + palette swatch button.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .chrome-controls .palette-btn,
  .palette-popover { display: none !important; }
  .btn-apply-nav { padding: 12px 16px !important; font-size: 13px !important; }
}
@media (max-width: 760px) {
  .btn-apply-nav { padding: 10px 14px !important; font-size: 12px !important; }
}

/* ─────────────────────────────────────────────────────────────
   WORLD-CLASS RESPONSIVE LAYER
   Methodical page-by-page override of inline grid styles, hero
   sizes, padding, marquee, footer columns, calendars, and
   contact map. Targets:
     · Tablet portrait (≤1024px)
     · Phone (≤640px)
     · Small phone (≤380px)
   Uses attribute selectors against inline `style="grid-template-
   columns: …"` because most pages set columns inline.
   ───────────────────────────────────────────────────────────── */

/* ── TABLET PORTRAIT (iPad portrait + landscape phones) ── */
@media (max-width: 1024px) {
  /* Soften every section's vertical padding so content fits */
  section.bleed       { padding: clamp(48px, 7vw, 96px) var(--gutter) !important; }
  section.bleed-tight { padding: clamp(36px, 5vw, 64px) var(--gutter) !important; }

  /* Any 3, 4, 5, 6, 7-col repeat → 2 cols */
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(6"],
  [style*="grid-template-columns: repeat(7"] {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }

  /* Asymmetric 2-col splits → single column on tablet portrait */
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.5fr"],
  [style*="grid-template-columns: 1.15fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Program calendar header */
  [style*="grid-template-columns: 120px 1fr 2fr 60px"] {
    grid-template-columns: 90px 1fr !important;
    row-gap: 8px !important;
  }
  [style*="grid-template-columns: 120px 1fr 2fr 60px"] > *:nth-child(n+3) {
    grid-column: 1 / -1 !important;
  }

  /* Hero — shrink display text, drop min-height to a comfortable hero */
  .intro-hero { min-height: 88vh !important; padding-bottom: clamp(96px, 12vw, 140px) !important; }
  .intro-logo-word { font-size: clamp(40px, 9vw, 96px) !important; }

  /* Marquee — slow + smaller */
  .marquee-track { gap: 28px !important; font-size: 22px !important; animation-duration: 50s !important; }

  /* Letter paper (program) — less inset on tablet */
  .letter-paper { padding: clamp(28px, 4.5vw, 56px) !important; }
  .letter-paper::before { left: 36px !important; }
  .letter-stamp { width: 96px !important; height: 96px !important; font-size: 9px !important; top: 18px !important; right: 18px !important; }

  /* Footer columns: 4-col → 2-col */
  footer [style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 28px !important;
  }
}

/* ── PHONE (≤640px) ── */
@media (max-width: 640px) {
  html, body { font-size: 15.5px; }
  :root { --gutter: 18px; }

  /* Nuclear option: every grid collapses to single column */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  /* Program calendar overrides reset cleanly */
  [style*="grid-template-columns: 120px 1fr 2fr 60px"] > * {
    grid-column: 1 / -1 !important;
  }

  /* Sections — tighter padding */
  section.bleed       { padding: 48px 18px !important; }
  section.bleed-tight { padding: 36px 18px !important; }
  section             { padding: 36px 18px !important; }

  /* Hero — fit and resize for phone portrait */
  .intro-hero { min-height: 92vh !important; padding: 24px 18px 96px !important; }
  .intro-hero h1.display { font-size: clamp(40px, 11vw, 60px) !important; }
  .intro-line.l1 { font-size: 14px !important; }
  .intro-sublines .editorial { font-size: clamp(18px, 5vw, 26px) !important; }
  .intro-cta { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .intro-cta .btn { padding: 16px 24px !important; font-size: 16px !important; justify-content: center; }
  .intro-logo-word { font-size: clamp(36px, 12vw, 64px) !important; }
  .intro-logo-sub  { font-size: 11px !important; }

  /* Big display headings — clamp aggressively */
  .display { font-size: clamp(36px, 11vw, 64px) !important; line-height: .95 !important; }
  h1.display, h2.display { letter-spacing: -.005em !important; }
  .editorial { font-size: clamp(22px, 6vw, 32px) !important; }

  /* Pull quotes + script */
  .pull-quote { font-size: clamp(22px, 6vw, 32px) !important; }
  .script, .hand { font-size: 17px !important; }

  /* Marquee */
  .marquee-track { font-size: 16px !important; gap: 22px !important; animation-duration: 35s !important; }

  /* Letter paper */
  .letter-paper { padding: 24px 18px !important; border-radius: 12px !important; }
  .letter-paper::before { display: none !important; }
  .letter-stamp { position: static !important; transform: none !important; margin: 0 0 18px !important; width: 92px !important; height: 92px !important; }
  .letter-paper p { font-size: 16px !important; line-height: 1.55 !important; }

  /* Buttons full-width when stacked */
  .btn { padding: 14px 22px !important; font-size: 14px !important; }

  /* Pitch tiles — reduce min-height */
  [style*="min-height: 280px"] { min-height: 200px !important; }

  /* Wave footer slimmer */
  .wave-footer { height: 110px !important; }

  /* Footer — single column, generous spacing */
  footer [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Nav — keep hamburger + logo + apply + language only */
  .chrome-controls .palette-btn,
  .palette-popover { display: none !important; }
  .btn-apply-nav { padding: 8px 12px !important; font-size: 11px !important; letter-spacing: .08em !important; }
  header > div { padding: 10px 14px !important; gap: 6px !important; }

  /* Mobile menu nav text */
  .mobile-menu-overlay { padding: 18px var(--gutter) !important; }
  .mobile-menu-overlay nav button { font-size: 28px !important; padding: 16px 6px !important; }

  /* Photo collages / image rows */
  figure { height: auto !important; }
  image-slot { min-height: 200px; }

  /* Contact wave bed shorter */
  .contact-wave-bed { height: 360px !important; }

  /* CTA card paddings */
  [style*="border-radius: 26px"] { border-radius: 18px !important; }
}

/* ── SMALL PHONE (≤380px) ── */
@media (max-width: 380px) {
  html, body { font-size: 15px; }
  .display { font-size: clamp(32px, 11vw, 52px) !important; }
  .btn-apply-nav { padding: 7px 10px !important; font-size: 10px !important; }
  .chrome-controls .lang-btn { padding: 6px 10px !important; font-size: 11px !important; }
}

/* ── LANDSCAPE PHONE / SHORT VIEWPORTS — hero shouldn't dominate ── */
@media (max-height: 600px) and (max-width: 1024px) {
  .intro-hero { min-height: 560px !important; }
}


/* ─────────────────────────────────────────────────────────────
   Hero "Waves of Words Internship" — fancy title with rolling
   wave shimmer, sits HIGHER on the page.
   ───────────────────────────────────────────────────────────── */
.intro-hero-v2 { align-items: flex-start !important; padding-top: clamp(110px, 14vh, 180px) !important; }
.wow-internship-title {
  position: relative;
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 2px;
  overflow: hidden;
}
.wow-internship-text {
  position: relative; z-index: 2;
  background: linear-gradient(90deg,
    #B59CFF 0%,
    #8B6FE8 25%,
    #FFFFFF 50%,
    #8B6FE8 75%,
    #B59CFF 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 2px 24px rgba(139,111,232,.55);
  animation: wowTitleHue 8s ease-in-out infinite;
}
.wow-internship-shimmer {
  position: absolute; left: -30%; top: 0; bottom: 0; width: 30%;
  z-index: 3; pointer-events: none;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255,255,255,.0) 30%,
    rgba(255,255,255,.85) 50%,
    rgba(181,156,255,.0) 70%,
    transparent 100%);
  filter: blur(2px);
  animation: wowTitleWave 5.5s ease-in-out 3.2s infinite;
}
@keyframes wowTitleHue {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes wowTitleWave {
  0%   { left: -30%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

/* ─────────────────────────────────────────────────────────────
   Nav APPLY NOW — when page is scrolled, glow + auto-wiggle +
   sparkle to pull the eye.
   ───────────────────────────────────────────────────────────── */
.btn-apply-attention {
  position: relative;
  box-shadow:
    0 0 0 0 rgba(255,63,160,.55),
    0 8px 24px -6px rgba(255,63,160,.55) !important;
  animation: applyGlow 2.2s ease-in-out infinite, applyNudge 60s ease-in-out infinite !important;
}
.btn-apply-attention:hover { animation: applyWobble .7s ease-in-out infinite !important; }
@keyframes applyGlow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255,63,160,.0),
      0 8px 24px -6px rgba(255,63,160,.55);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(255,63,160,.0),
      0 10px 36px -4px rgba(255,63,160,.95),
      0 0 18px 2px rgba(255,200,230,.7);
  }
}
@keyframes applyNudge {
  0%, 96%, 100% { transform: rotate(0) scale(1); }
  97% { transform: rotate(-5deg) scale(1.06); }
  98% { transform: rotate(5deg) scale(1.06); }
  99% { transform: rotate(-3deg) scale(1.04); }
}
.btn-apply-sparkle {
  position: absolute;
  top: -6px; right: -6px;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,.95), 0 0 14px rgba(255,63,160,.9);
  animation: sparkleSpin 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sparkleSpin {
  0%, 100% { transform: rotate(0) scale(.9); opacity: .6; }
  50%      { transform: rotate(180deg) scale(1.2); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-apply-attention,
  .btn-apply-sparkle,
  .wow-internship-shimmer,
  .wow-internship-text { animation: none !important; }
}

/* ─────────────────────────────────────────────────────────────
   FinalCTA — mega Apply button with dancing sparkles
   ───────────────────────────────────────────────────────────── */
.cta-mega-btn {
  position: relative;
  box-shadow:
    0 18px 50px -10px rgba(255,63,160,.6),
    0 0 0 0 rgba(255,63,160,.0);
  animation: ctaMegaPulse 2.4s ease-in-out infinite, ctaMegaSway 4s ease-in-out infinite;
  transform-origin: center;
}
.cta-mega-btn:hover {
  animation: applyWobble .7s ease-in-out infinite;
}
@keyframes ctaMegaPulse {
  0%, 100% {
    box-shadow:
      0 18px 50px -10px rgba(255,63,160,.55),
      0 0 0 0 rgba(255,63,160,0);
  }
  50% {
    box-shadow:
      0 24px 70px -8px rgba(255,63,160,.95),
      0 0 0 14px rgba(255,63,160,.0),
      0 0 22px 4px rgba(255,200,230,.65);
  }
}
@keyframes ctaMegaSway {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-3px) rotate(-1.2deg); }
  75% { transform: translateY(-3px) rotate(1.2deg); }
}
.cta-sparkle {
  position: absolute;
  font-size: 22px;
  color: var(--wow-pink);
  text-shadow: 0 0 10px rgba(255,255,255,.9), 0 0 18px rgba(255,63,160,.9);
  pointer-events: none;
}
.cta-sparkle-1 { top: -18px; left: -14px;  animation: sparkleSpin 2.6s ease-in-out infinite; }
.cta-sparkle-2 { top: -8px;  right: -18px; animation: sparkleSpin 3.1s ease-in-out .4s infinite; font-size: 18px; color: var(--wow-gold); }
.cta-sparkle-3 { bottom: -16px; left: 30%; animation: sparkleSpin 2.2s ease-in-out .9s infinite; font-size: 16px; color: var(--wow-purple); }

/* ─────────────────────────────────────────────────────────────
   Custom cursor — a blue ocean wave instead of the default arrow
   ───────────────────────────────────────────────────────────── */
html, body {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='28' viewBox='0 0 34 28'><defs><linearGradient id='g' x1='0' x2='1' y1='0' y2='1'><stop offset='0%25' stop-color='%2300C2FF'/><stop offset='60%25' stop-color='%23006EE6'/><stop offset='100%25' stop-color='%23002C66'/></linearGradient></defs><path d='M2 18 C 8 6, 14 24, 20 12 C 25 4, 30 14, 32 10 L 30 22 C 24 26, 18 18, 12 24 C 8 26, 4 24, 2 24 Z' fill='url(%23g)' stroke='%23FFFFFF' stroke-width='1.2' stroke-linejoin='round'/><path d='M5 14 C 10 8, 16 20, 22 10' fill='none' stroke='%23BEEBFF' stroke-width='1' opacity='.8'/></svg>") 2 4, auto;
}
button, a, [role="button"], .btn, input[type="submit"], input[type="button"] {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='38' height='32' viewBox='0 0 38 32'><defs><linearGradient id='g' x1='0' x2='1' y1='0' y2='1'><stop offset='0%25' stop-color='%2300E0FF'/><stop offset='60%25' stop-color='%23008CFF'/><stop offset='100%25' stop-color='%23003D99'/></linearGradient></defs><path d='M2 20 C 9 6, 16 26, 23 12 C 28 4, 33 16, 36 11 L 33 24 C 26 30, 19 20, 12 26 C 8 28, 4 26, 2 26 Z' fill='url(%23g)' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round'/><path d='M6 16 C 12 10, 18 22, 25 12' fill='none' stroke='%23DFF6FF' stroke-width='1.2' opacity='.9'/></svg>") 4 6, pointer;
}
