/* Bangkok Tails — bangkoktails.com, version 1
   Golden Hour palette, taken from the BKK TODAY group plate. */

:root {
  --teak-night: #2B1F14;   /* text, footer */
  --old-teak: #874C1B;     /* headings */
  --lantern: #DB791E;      /* buttons */
  --golden-hour: #EFA24A;  /* highlights */
  --honey-light: #F2BD70;  /* cards */
  --rice-paper: #FBF1DF;   /* background */
  --skytrain-teal: #4F7A7A;/* links, accents */
  --tuk-green: #5E9A3A;    /* small touches only */

  /* One stack per role. Latin uses the first font; Thai and Chinese
     characters fall through to the Thai and Chinese fonts automatically. */
  --font-display: "Fraunces", "Noto Serif Thai", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Instrument Sans", "Anuphan", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;

  --radius: 18px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--rice-paper);
  color: var(--teak-night);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--skytrain-teal); text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--golden-hour); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Thai needs room for stacked vowels and tone marks */
:lang(th) { line-height: 1.7; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.4; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--lantern); color: var(--teak-night);
  padding: 0.6rem 1rem; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  background: var(--lantern);
  color: var(--teak-night);
  font-family: var(--font-body);
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  box-shadow: 0 6px 20px -8px rgba(43, 31, 20, 0.6);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--golden-hour); transform: translateY(-1px); }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Top bar ---------- */

.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px max(16px, 3vw);
}

.wordmark img {
  height: clamp(28px, 4vw, 40px);
  width: auto;
  border-radius: 5px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.55);
}

.lang {
  display: flex; gap: 2px; padding: 4px;
  background: rgba(43, 31, 20, 0.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 999px;
}
.lang button {
  font: 600 0.95rem/1 var(--font-body);
  color: var(--rice-paper);
  background: transparent;
  border: 0; border-radius: 999px;
  padding: 0.55em 0.85em;
  cursor: pointer;
}
.lang button:hover { background: rgba(251, 241, 223, 0.15); }
.lang button[aria-pressed="true"] { background: var(--lantern); color: var(--teak-night); }

/* ---------- 1. Opening ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  overflow: hidden;
  background: var(--teak-night);
  color: var(--rice-paper);
  isolation: isolate;
}

.hero picture, .hero picture img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero picture img {
  object-fit: cover;
  object-position: 50% 55%;
  transform-origin: 50% 55%;
  animation: push-in 10s ease-out forwards;
}
/* the whole painting sits behind the words, not just the image inside it */
.hero picture { z-index: -2; }
@keyframes push-in { from { transform: scale(1); } to { transform: scale(1.04); } }

/* warm dark gradient for the text, plus a light one behind the top bar */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(43, 31, 20, 0.55) 0%, rgba(43, 31, 20, 0) 16%),
    linear-gradient(to top, rgba(43, 31, 20, 0.94) 0%, rgba(43, 31, 20, 0.7) 18%, rgba(43, 31, 20, 0) 45%);
}

.hero-text {
  align-self: end;
  text-align: center;
  padding: 0 max(16px, 4vw) clamp(28px, 6vh, 64px);
  display: grid; justify-items: center; gap: 0.9rem;
}

.hero h1 {
  font-weight: 560;
  font-variation-settings: "SOFT" 70, "WONK" 1;
  font-size: clamp(2.3rem, 4.1vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--rice-paper);
  text-shadow: 0 2px 24px rgba(43, 31, 20, 0.6);
  max-width: 24ch;
}
@media (min-width: 900px) { .hero h1 { max-width: none; } }
/* "Street Five" is the crew's name: Golden Hour gold, never split over two lines */
.hero h1 .crew-name { color: var(--golden-hour); white-space: nowrap; }

.hero .echo {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  color: var(--honey-light);
}
.hero .btn { margin-top: 0.4rem; }

/* Phones and portrait screens: the tall v03 plate. The sky fills the top
   half of that painting, so the words sit there and the crew stays clear. */
@media (max-aspect-ratio: 4/5) {
  .hero::before {
    background: linear-gradient(to bottom, rgba(43, 31, 20, 0.85) 0%, rgba(43, 31, 20, 0.55) 30%, rgba(43, 31, 20, 0) 52%);
  }
  .hero-text { align-self: start; padding-top: clamp(84px, 13vh, 130px); }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 3.6rem); }
  html[lang="zh-Hans"] .hero h1 { font-size: clamp(1.9rem, 8vw, 3.2rem); }
}

/* Chinese headline breaks only at its comma, never mid-word */
html[lang="zh-Hans"] .hero h1 { word-break: keep-all; }

/* ---------- Section titles ---------- */

section[id] { scroll-margin-top: 16px; }

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }

.section-head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section-head h2 {
  font-weight: 620;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: clamp(2.6rem, 1.2rem + 6vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--old-teak);
}
.section-head .echo {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--skytrain-teal);
}

/* "tuk-tuk-tuk": three small green dots under each title */
.tuk-dots { display: flex; justify-content: center; gap: 9px; margin-top: 1.1rem; }
.tuk-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--tuk-green); }

/* In Thai and Chinese the page speaks one language, so the Thai echo lines go */
html:not([lang="en"]) .echo { display: none; }

/* ---------- 2. Meet the crew ---------- */

.crew-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}

.card {
  background: var(--honey-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 14px 30px -18px rgba(135, 76, 27, 0.55);
}
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-body { padding: 1.1rem 1.15rem 1.4rem; display: grid; gap: 0.45rem; align-content: start; }

.card h3 {
  font-weight: 640;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--old-teak);
}
.card .th-name { font-family: var(--font-display); font-weight: 450; font-size: 0.72em; }
html[lang="th"] .th-name { display: none; }

.card .line { font-size: 0.98rem; }
.card .say {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "SOFT" 80, "WONK" 1;
  font-size: 1.12rem;
  line-height: 1.35;
}
.card .say:empty { display: none; }

/* Thai and Chinese fonts have no true italic; avoid the computer-slanted fake */
html[lang="th"] .card .say, html[lang="zh-Hans"] .card .say,
html[lang="th"] .story-text .quiet, html[lang="zh-Hans"] .story-text .quiet,
.card .say [lang="th"] { font-style: normal; }

/* Small phones: picture beside the words, so five cards don't become a long scroll */
@media (max-width: 559px) {
  .card { flex-direction: row; align-items: stretch; }
  .card img { width: 38%; flex: none; align-self: stretch; }
  .card-body { padding: 0.95rem 1rem 1.05rem; }
  .card h3 { font-size: 1.35rem; }
  .card .say { font-size: 1.02rem; }
}

/* ---------- 3. Watch ---------- */

.watch { background: var(--teak-night); color: var(--rice-paper); }
.watch .section-head h2 { color: var(--golden-hour); }
.watch .section-head .echo { color: var(--honey-light); }

.video-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(18px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.video-frame {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  background: #1c140d;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
}
.video-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  transition: transform 0.6s ease, filter 0.3s ease;
}
.video-frame:hover img { transform: scale(1.03); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-frame .play {
  position: absolute; left: 14px; top: 14px;   /* top-left corner, clear of the characters and title text */
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--lantern);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  display: none;
}
.video-frame .play::after {
  content: ""; position: absolute; left: 27px; top: 21px;
  border-style: solid; border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent var(--teak-night);
}
.video.has-video .play { display: block; }

.video-frame .soon {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(43, 31, 20, 0.78);
  color: var(--honey-light);
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em;
  padding: 0.35em 0.8em; border-radius: 999px;
}
.video:not(.has-video) .video-frame img { filter: saturate(0.85) brightness(0.85); }
.video.has-video .video-frame img { object-position: 50% 50%; }
.video.has-video .soon { display: none; }

.video .kicker {
  margin-top: 1rem;
  font-size: 0.82rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--golden-hour);
}
.video h3 {
  margin-top: 0.25rem;
  font-weight: 560;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  color: var(--rice-paper);
}

.subscribe { text-align: center; margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- 4. The story ---------- */

.story-text {
  max-width: 40rem; margin-inline: auto;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.45rem);
  line-height: 1.65;
}
html[lang="en"] .story-text p:first-child::first-letter {
  float: left;
  font-weight: 650;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 4.1em;
  line-height: 0.82;
  margin: 0.06em 0.1em 0 0;
  color: var(--lantern);
}
.story-text .quiet {
  margin-top: 1.4rem;
  font-style: italic;
  color: var(--old-teak);
  text-align: center;
}

/* ---------- 5. Footer ---------- */

.footer {
  background: var(--teak-night);
  color: rgba(251, 241, 223, 0.78);
  padding-block: 3.5rem 2.5rem;
  font-size: 0.95rem;
}
.footer-inner { display: grid; gap: 1.6rem; justify-items: center; text-align: center; }
.footer .wordmark img { height: 40px; }
.footer a { color: var(--honey-light); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.6rem; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.copyright { color: rgba(251, 241, 223, 0.55); font-size: 0.88rem; }

/* ---------- Gentle reveal (only when JavaScript is on) ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduce motion: no push-in, no fades ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero picture img { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .video-frame img { transition: none; }
  .btn:hover, .video-frame:hover img { transform: none; }
}

/* ---------- Crew links on the home page ---------- */

.card .more {
  margin-top: 0.35rem; justify-self: start;
  font-weight: 650; font-size: 0.95rem;
  color: var(--old-teak); text-decoration: none;
  border-bottom: 2px solid var(--lantern);
}
.card .more:hover { color: var(--teak-night); border-color: var(--teak-night); }

/* ---------- Character pages (crew/*.html) ---------- */

.page-top {
  background: var(--teak-night);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, 3vw);
}
.page-top .back { color: var(--honey-light); font-weight: 600; text-decoration: none; font-size: 0.98rem; }
.page-top .back:hover { color: var(--golden-hour); }

.char-hero { background: var(--teak-night); color: var(--rice-paper); padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.char-hero .wrap { display: grid; gap: clamp(1.4rem, 4vw, 3rem); align-items: center; }
@media (min-width: 760px) { .char-hero .wrap { grid-template-columns: minmax(0, 360px) 1fr; } }
.char-hero img { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: 0 20px 44px -20px rgba(0,0,0,0.8); }
.char-hero .kicker { font-size: 0.82rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--golden-hour); }
.char-hero h1 {
  margin-top: 0.4rem;
  font-weight: 600; font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: clamp(2.6rem, 1.4rem + 5vw, 5rem); line-height: 1; letter-spacing: -0.015em;
  color: var(--rice-paper);
}
.char-hero h1 .th-name { font-weight: 450; font-size: 0.5em; color: var(--honey-light); }
.char-hero .tagline { margin-top: 0.8rem; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--honey-light); max-width: 34rem; }
.char-hero .say {
  margin-top: 1.1rem; font-family: var(--font-display); font-style: italic;
  font-variation-settings: "SOFT" 80, "WONK" 1;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem); line-height: 1.35; color: var(--rice-paper);
}
.char-hero .say [lang="th"] { font-style: normal; }

.char-body { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.char-body .wrap { display: grid; gap: clamp(1.8rem, 4vw, 3rem); align-items: start; }
@media (min-width: 960px) { .char-body .wrap { grid-template-columns: 1fr 320px; } .infobox { order: 2; position: sticky; top: 20px; } }

.infobox { background: var(--honey-light); border-radius: var(--radius); padding: 1.2rem 1.25rem 1.3rem; box-shadow: 0 14px 30px -18px rgba(135, 76, 27, 0.55); }
.infobox h2 { font-size: 1.25rem; color: var(--old-teak); margin-bottom: 0.7rem; }
.infobox dl { margin: 0; display: grid; gap: 0.7rem; }
.infobox dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--old-teak); }
.infobox dd { margin: 0.1rem 0 0; font-size: 0.98rem; line-height: 1.45; }

.article { max-width: 44rem; }
.article section + section { margin-top: clamp(2rem, 4vw, 2.8rem); }
.article h2 {
  font-weight: 620; font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); line-height: 1.1; color: var(--old-teak);
  padding-bottom: 0.4rem; border-bottom: 2px solid rgba(135, 76, 27, 0.18); margin-bottom: 0.9rem;
}
.article p + p { margin-top: 0.85rem; }
.article ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.article li::marker { color: var(--lantern); }
.article .lead { font-family: var(--font-display); font-variation-settings: "SOFT" 40; font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); line-height: 1.6; }

.real { background: #fff8ec; border: 1px solid rgba(79, 122, 122, 0.35); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.6rem); }
.real h2 { color: var(--skytrain-teal); border-color: rgba(79, 122, 122, 0.25); }
.real .note { margin-top: 1rem; font-size: 0.95rem; color: #5a4a3a; }
.real sup a { text-decoration: none; font-weight: 700; }
.sources { margin-top: 1.1rem; font-size: 0.9rem; }
.sources ol { margin: 0.4rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
.sources h3 { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--skytrain-teal); }

.tip { margin-top: 1rem; padding: 0.8rem 1rem; border-left: 4px solid var(--tuk-green); background: rgba(94, 154, 58, 0.08); border-radius: 0 10px 10px 0; font-size: 0.97rem; }

.watch-link { display: inline-flex; margin-top: 0.4rem; }

.crew-nav { border-top: 2px solid rgba(135, 76, 27, 0.15); padding-block: 1.6rem 2.6rem; }
.crew-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.crew-nav a {
  display: inline-block; padding: 0.5em 1.1em; border-radius: 999px;
  background: var(--honey-light); color: var(--teak-night); font-weight: 600; text-decoration: none;
}
.crew-nav a[aria-current="page"] { background: var(--lantern); }
.crew-nav a:hover { background: var(--golden-hour); }
.crew-nav p { text-align: center; margin-bottom: 0.9rem; font-family: var(--font-display); font-size: 1.3rem; color: var(--old-teak); }

.fiction-note { text-align: center; font-size: 0.9rem; color: #6b5a48; max-width: 40rem; margin: 0 auto 0.8rem; }

/* ---------- Events page (events.html) ---------- */

.ev-hero { position: relative; overflow: hidden; background: var(--teak-night); color: var(--rice-paper); padding-top: clamp(1.8rem, 5vw, 3.5rem); }
.ev-hero .wrap { position: relative; z-index: 1; }
.ev-hero .kicker { font-size: 0.82rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--golden-hour); }
.ev-hero h1 {
  margin-top: 0.4rem;
  font-weight: 600; font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: clamp(2.5rem, 1.3rem + 5vw, 5rem); line-height: 1; letter-spacing: -0.015em;
  max-width: 14ch;
}
.ev-hero .tagline { margin-top: 0.9rem; font-size: clamp(1.08rem, 1rem + 0.5vw, 1.3rem); color: var(--honey-light); max-width: 36rem; }

/* full moon, top right of the picture, and its glow */
.ev-moon {
  position: absolute; right: clamp(16px, 8vw, 140px); top: clamp(16px, 4vw, 40px);
  width: clamp(54px, 9vw, 96px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff8e6 0 45%, #f6d9a0 75%, #efc27a 100%);
  box-shadow: 0 0 40px 10px rgba(242, 189, 112, 0.28), 0 0 120px 40px rgba(242, 189, 112, 0.12);
  opacity: 0.9;
}

/* the water */
.ev-water {
  position: relative; overflow: hidden;
  height: clamp(96px, 14vw, 150px); margin-top: clamp(1.8rem, 5vw, 3rem);
  background: linear-gradient(to bottom, #35504f 0%, #233837 50%, #1a2928 100%);
}
/* moon's reflection, below the moon */
.ev-water::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  right: calc(clamp(16px, 8vw, 140px) + clamp(54px, 9vw, 96px) / 2 - 60px); width: 120px;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255, 240, 205, 0.3), transparent 75%);
}
/* shimmer: short streaks of light that slide slowly sideways */
.ev-water::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 180px);
  background-image:
    radial-gradient(ellipse 26px 1.5px at 50% 50%, rgba(242, 189, 112, 0.45), transparent),
    radial-gradient(ellipse 16px 1px at 50% 50%, rgba(251, 241, 223, 0.35), transparent);
  background-size: 180px 22px, 110px 15px;
  background-position: 0 4px, 40px 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%);
          mask-image: linear-gradient(to bottom, transparent, #000 25%);
  animation: ev-shimmer 26s linear infinite, ev-glint 7s ease-in-out infinite alternate;
}
@keyframes ev-shimmer { to { transform: translateX(-180px); } }
@keyframes ev-glint { from { opacity: 0.55; } to { opacity: 1; } }

/* krathong: <i> drifts across, <b> bobs and carries the candle */
.ev-water i {
  position: absolute; left: -40px; top: var(--top); z-index: 1;
  animation: ev-drift var(--d) linear var(--delay) infinite;
}
.ev-water b { position: relative; display: block; width: 24px; height: 18px; animation: ev-bob 5s ease-in-out infinite alternate; }
.ev-water b::before { /* the raft of leaves */
  content: ""; position: absolute; left: 0; bottom: 0; width: 24px; height: 8px;
  border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: radial-gradient(ellipse at 50% 20%, #8fbf63, #3f6b2a 70%);
}
.ev-water b::after { /* the candle flame */
  content: ""; position: absolute; left: 9px; bottom: 6px; width: 6px; height: 9px;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 70%, #fff6d8 0 30%, #EFA24A 60%, #DB791E);
  box-shadow: 0 0 10px 4px rgba(239, 162, 74, 0.55), 0 0 26px 10px rgba(239, 162, 74, 0.18);
  animation: ev-flicker 2.3s ease-in-out infinite alternate;
}
@keyframes ev-drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 80px)); } }
@keyframes ev-bob { from { transform: translateY(-2px) rotate(-3deg); } to { transform: translateY(2px) rotate(3deg); } }
@keyframes ev-flicker { from { opacity: 0.8; transform: scale(0.94); } to { opacity: 1; transform: scale(1.04); } }

/* the water rests while it is off screen */
.ev-hero.rest .ev-water::after, .ev-hero.rest .ev-water i,
.ev-hero.rest .ev-water b, .ev-hero.rest .ev-water b::after { animation-play-state: paused; }

/* the calendar */
.ev-list { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.ev-month + .ev-month { margin-top: clamp(2.5rem, 6vw, 4rem); }
.ev-month > h2 {
  font-weight: 620; font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); line-height: 1.1; color: var(--old-teak);
  padding-bottom: 0.4rem; border-bottom: 2px solid rgba(135, 76, 27, 0.18); margin-bottom: clamp(1.2rem, 3vw, 1.8rem);
}

.ev-card {
  background: #fff8ec; border: 1px solid rgba(135, 76, 27, 0.16); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 14px 30px -18px rgba(135, 76, 27, 0.55);
  scroll-margin-top: 16px;
}
.ev-card + .ev-card { margin-top: clamp(1.4rem, 3vw, 2rem); }

.ev-head {
  background: var(--honey-light);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(0.9rem, 3vw, 1.5rem); align-items: center;
  padding: clamp(1rem, 3vw, 1.5rem);
}
.ev-date {
  display: grid; justify-items: center; gap: 0.1rem;
  min-width: 5.4rem; padding: 0.7rem 0.6rem;
  background: var(--teak-night); color: var(--rice-paper); border-radius: 14px; text-align: center;
}
.ev-date .d { font-family: var(--font-display); font-weight: 640; font-variation-settings: "SOFT" 60, "WONK" 1; font-size: clamp(1.4rem, 1.1rem + 1.5vw, 1.9rem); line-height: 1; color: var(--golden-hour); }
.ev-date .m { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.ev-date .y { font-size: 0.78rem; color: rgba(251, 241, 223, 0.7); }
.ev-head .kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--old-teak); }
.ev-head h3 {
  margin-top: 0.2rem;
  font-weight: 640; font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.3rem); line-height: 1.1; color: var(--teak-night);
}
.ev-head .th-name { font-weight: 450; font-size: 0.62em; color: var(--old-teak); }
.ev-main { margin-top: 0.35rem; font-size: 1rem; }

.ev-body { display: grid; gap: clamp(1.4rem, 3vw, 2rem); padding: clamp(1rem, 3vw, 1.6rem); }
@media (min-width: 900px) {
  .ev-body { grid-template-columns: 1fr 320px; align-items: start; }
  .ev-side { order: 2; }
}
.ev-side { display: grid; gap: 1rem; }

.ev-facts { margin: 0; display: grid; gap: 1.15rem; max-width: 44rem; }
.ev-facts dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--old-teak); }
.ev-facts dd { margin: 0.25rem 0 0; }
.ev-facts sup a { text-decoration: none; font-weight: 700; }
.ev-sites { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.ev-sites li::marker { color: var(--lantern); }
.ev-facts .tip { margin-top: 0.8rem; }

.ev-crew dd { display: grid; gap: 0.5rem; justify-items: start; }
.ev-crew-name {
  display: inline-block; padding: 0.4em 1em; border-radius: 999px;
  background: var(--lantern); color: var(--teak-night); font-weight: 650; text-decoration: none;
}
.ev-crew-name:hover { background: var(--golden-hour); }
.ev-crew p { font-family: var(--font-display); font-style: italic; font-variation-settings: "SOFT" 80, "WONK" 1; font-size: 1.08rem; line-height: 1.45; }

/* Marcus's photo and notes, once they are in */
.ev-photo { margin: 0; }
.ev-photo img { width: 100%; border-radius: 14px; }
.ev-photo figcaption { margin-top: 0.4rem; font-size: 0.9rem; color: #6b5a48; }
.ev-notes { background: var(--honey-light); border-radius: 14px; padding: 1rem 1.1rem; }
.ev-notes h4 { font-family: var(--font-display); font-size: 1.15rem; color: var(--old-teak); margin: 0 0 0.4rem; }

.ev-sources { margin: 0; padding: 1rem clamp(1rem, 3vw, 1.6rem) clamp(1rem, 3vw, 1.4rem); border-top: 1px solid rgba(135, 76, 27, 0.12); }
.ev-sources h4 { margin: 0; font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--skytrain-teal); }

/* small phones: date box above the title */
@media (max-width: 420px) {
  .ev-head { grid-template-columns: 1fr; }
  .ev-date { display: flex; align-items: baseline; gap: 0.45rem; justify-self: start; min-width: 0; padding: 0.45rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-water::after, .ev-water b, .ev-water b::after { animation: none; }
  .ev-water i { animation: none; transform: translateX(var(--rest)); }
}

/* ---------- Getting there: route video, steps, map with pins (events.html) ---------- */

.ev-route { padding: clamp(1rem, 3vw, 1.6rem); border-top: 1px solid rgba(135, 76, 27, 0.12); display: grid; gap: 0.9rem; justify-items: start; }
.ev-route > * { max-width: 100%; }
.ev-route h4 {
  margin: 0; font-family: var(--font-display); font-weight: 620; font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); line-height: 1.15; color: var(--old-teak);
}
.ev-route-place { display: block; font-family: var(--font-body); font-size: 0.55em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--skytrain-teal); }
.ev-route h5 { margin: 0.5rem 0 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--old-teak); }
.ev-route-video, .ev-route-still, .ev-map { width: 100%; }
.ev-route-video, .ev-route-still { display: block; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--honey-light); }
.ev-route-still { display: none; }
.ev-route-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; max-width: 44rem; }
.ev-route-steps li::marker { color: var(--lantern); }
.ev-route sup a { text-decoration: none; font-weight: 700; }
.ev-map-hint { font-size: 0.95rem; color: #6b5a48; }
.ev-route-credit { font-size: 0.82rem; color: #6b5a48; }

/* place buttons under the map, one per pin */
.ev-map-places { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ev-map-places a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4em 1em; border-radius: 999px;
  background: var(--honey-light); color: var(--teak-night); font-weight: 600; font-size: 0.95rem; line-height: 1.3; text-decoration: none;
}
.ev-map-places a:hover { background: var(--golden-hour); }

/* the map: pins placed by left %, top % of the picture */
.ev-map { position: relative; }
.ev-map img { width: 100%; border-radius: 14px; }
.pin {
  position: absolute; left: var(--x); top: var(--y); z-index: 1;
  width: 44px; height: 44px; transform: translate(-50%, -50%);   /* 44px tap target, centred on the spot */
  display: grid; place-items: center; border-radius: 50%;
}
.pin::before, .pin::after {
  content: ""; grid-area: 1 / 1; width: clamp(14px, 2.2vw, 26px); aspect-ratio: 1; border-radius: 50%;
}
.pin::before { border: 3px solid var(--lantern); background: rgba(219, 121, 30, 0.18); box-shadow: 0 0 0 2px var(--rice-paper); transition: background-color 0.2s ease; }
.pin::after { border: 2px solid var(--golden-hour); animation: pin-pulse 2.8s ease-out infinite; }
@keyframes pin-pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.1); opacity: 0; } }
.pin:hover, .pin:focus-visible { z-index: 3; outline: none; }
.pin:hover::before, .pin:focus-visible::before { background: var(--lantern); }
.pin:focus-visible::before { box-shadow: 0 0 0 2px var(--rice-paper), 0 0 0 5px var(--teak-night); }

/* the name tag: shows on hover or keyboard focus */
.pin-tip {
  position: absolute; left: 50%; bottom: calc(50% + 16px); transform: translateX(-50%);
  width: max-content; max-width: 13rem; padding: 0.35em 0.7em; border-radius: 8px;
  background: var(--teak-night); color: var(--rice-paper); box-shadow: 0 6px 16px -6px rgba(43, 31, 20, 0.7);
  font: 600 0.85rem/1.3 var(--font-body); text-align: center;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, visibility 0.15s;
}
.pin:hover .pin-tip, .pin:focus-visible .pin-tip { opacity: 1; visibility: visible; }
.pin--below .pin-tip { bottom: auto; top: calc(50% + 16px); }
.pin--start .pin-tip { left: 4px; transform: none; text-align: left; }   /* near the left side of the picture */
.pin--end .pin-tip { left: auto; right: 4px; transform: none; text-align: right; }   /* keeps a long name inside the card */

@media (prefers-reduced-motion: reduce) {
  .ev-route-video { display: none; }
  .ev-route-still { display: block; }
  .pin::after { animation: none; display: none; }
  .pin::before, .pin-tip { transition: none; }
}

/* ---------- Place pages (places/*.html) ---------- */

.char-hero.place-hero .wrap { grid-template-columns: 1fr; }   /* no picture column */
.place-hero h1 { font-size: clamp(2.2rem, 1.2rem + 4vw, 4rem); }
.place-hero h1 .th-name { display: block; margin-top: 0.35em; font-size: 0.5em; line-height: 1.4; }
.place-note { margin-top: 0.4rem; padding: 0.9rem 1.1rem; border: 2px dashed rgba(135, 76, 27, 0.35); border-radius: 14px; color: #6b5a48; font-style: italic; }
.place-directions { display: inline-flex; margin-top: 0.4rem; }

/* ---------- Blog link in the top bars (index and crew pages) ---------- */

.blog-pill {
  margin-left: auto;   /* sits just left of the language buttons or the back link */
  font: 600 0.95rem/1 var(--font-body); text-decoration: none;
  color: var(--rice-paper);
  padding: calc(0.55em + 4px) 1em;
  border-radius: 999px;
  background: rgba(43, 31, 20, 0.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.blog-pill:hover { background: var(--lantern); color: var(--teak-night); }
.page-top .blog-pill { background: rgba(251, 241, 223, 0.12); color: var(--honey-light); padding: 0.5em 0.95em; }

/* Phones: no room beside the language buttons, so on the home page the Blog pill
   drops to a second row, right side of the picture, small enough to clear the headline. */
@media (max-width: 559px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topbar .blog-pill { order: 3; font-size: 0.85rem; padding: 0.5em 0.9em; }
  .page-top .blog-pill { padding: 0.45em 0.8em; }
  .page-top .back { white-space: nowrap; }
}
