:root {
  color-scheme: dark;
  --bg-top: #40120f;
  --bg-bottom: #090608;
  --bg-glow: #b23f1d;
  --accent: #ffd04c;
  --rail-accent: #ffba43;
  --ink: #f7f2e8;
  --muted: rgba(247, 242, 232, 0.68);
  --line: rgba(255, 255, 255, 0.17);
  --panel: rgba(10, 8, 9, 0.77);
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-right: max(20px, env(safe-area-inset-right));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  --safe-left: max(20px, env(safe-area-inset-left));
  font-family: Inter, Arial, "Noto Sans Thai", "Noto Sans Thai UI", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  background: #080708;
  scroll-behavior: auto;
  scrollbar-color: rgba(255, 255, 255, 0.28) #090809;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: #080708;
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

::selection {
  color: #140b08;
  background: var(--accent);
}

.experience {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -4;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--bg-glow) 72%, transparent) 0%, transparent 42%),
    linear-gradient(180deg, var(--bg-top) 0%, color-mix(in srgb, var(--bg-top) 42%, var(--bg-bottom)) 42%, var(--bg-bottom) 100%);
}

.ambient-background::before,
.ambient-background::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ambient-background::before {
  inset: -15%;
  opacity: 0.26;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 145, 62, 0.16), transparent 28%),
    radial-gradient(circle at 78% 42%, rgba(47, 176, 156, 0.1), transparent 31%);
  filter: blur(78px);
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

.ambient-background::after {
  inset: -42% -12%;
  opacity: 0.33;
  background:
    linear-gradient(180deg,
      transparent 0%,
      color-mix(in srgb, var(--bg-glow) 28%, transparent) 14%,
      transparent 31%,
      color-mix(in srgb, var(--accent) 20%, transparent) 49%,
      transparent 63%,
      color-mix(in srgb, var(--bg-glow) 24%, transparent) 79%,
      transparent 100%),
    linear-gradient(180deg,
      transparent 0%,
      color-mix(in srgb, var(--bg-top) 14%, transparent) 36%,
      transparent 58%,
      color-mix(in srgb, var(--accent) 14%, transparent) 86%,
      transparent 100%);
  mix-blend-mode: screen;
  filter: blur(56px);
  animation: ambient-ribbon 22s linear infinite;
  will-change: transform;
}

.ambient-background__noise,
.ambient-background__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient-background__noise {
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(255,255,255,.16) 0 0.6px, transparent 0.9px),
    radial-gradient(circle at 70% 65%, rgba(255,255,255,.1) 0 0.7px, transparent 1px);
  background-size: 23px 21px, 31px 29px;
  mix-blend-mode: soft-light;
}

.ambient-background__grain {
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

@keyframes ambient-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

@keyframes ambient-ribbon {
  from { transform: translate3d(0, -10%, 0) scale(1.05); }
  50% { transform: translate3d(0, 0%, 0) scale(1.08); }
  to { transform: translate3d(0, 10%, 0) scale(1.05); }
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  background: #080708;
  transition: opacity 600ms ease, visibility 600ms ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__mark {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  animation: loader-spin 2.4s linear infinite;
}

.loader__mark span {
  width: 10px;
  height: 10px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--accent);
}

.loader p {
  margin: 0;
  color: rgba(255,255,255,.65);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .28em;
}

.loader__line {
  width: 210px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.1);
}

.loader__line span {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--accent);
  animation: loader-line 1.3s ease-in-out infinite;
}

@keyframes loader-spin { to { transform: rotate(1turn); } }
@keyframes loader-line {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 86px;
  padding: var(--safe-top) 28px 0;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 85px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.04));
}

.brand,
.motion-toggle {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 5px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 38%, transparent);
}

.brand__mark span {
  width: 4px;
  height: 4px;
  background: #fff3dd;
  border-radius: 50%;
}

.brand__text {
  display: grid;
  gap: 1px;
}

.brand__text strong {
  font-size: 14px;
  letter-spacing: .15em;
  line-height: 1;
}

.brand__text small {
  color: rgba(255,255,255,.5);
  font-size: 7px;
  letter-spacing: .23em;
}

.header-kicker {
  margin-top: 4px;
  color: rgba(255,255,255,.86);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .27em;
}

.motion-toggle {
  margin-left: auto;
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(8,7,8,.28);
  color: rgba(255,255,255,.78);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.motion-toggle:hover,
.motion-toggle:focus-visible,
.motion-toggle.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 68%, rgba(255,255,255,.25));
  background: rgba(8,7,8,.58);
  outline: none;
}

.motion-toggle__icon {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
}

.motion-toggle__text {
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 10px;
  letter-spacing: .02em;
}

.scene-shell {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.scene-shell canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 850ms ease;
}

.scene-shell.scene-loaded canvas {
  opacity: 1;
}

.webgl-fallback {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(54vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: #1f6e91 url('../public/assets/earth-clean.png') center / auto 100% no-repeat;
  box-shadow: inset -40px -28px 70px rgba(0,0,0,.58), 0 0 80px rgba(64,180,190,.18);
}

.scene-shell.scene-failed .webgl-fallback {
  opacity: 1;
}

.story {
  position: relative;
  z-index: 4;
}

.story-section {
  position: relative;
  min-height: 165svh;
}

.hero-section {
  min-height: 138svh;
}

.bridge-section {
  min-height: 330svh;
}

.renewal-section {
  min-height: 230svh;
}

.finale-section {
  min-height: 150svh;
}

.section-inner {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.hero-inner {
  padding: 86px clamp(32px, 7.3vw, 116px) 50px;
}

.hero-title-wrap {
  position: absolute;
  top: 6.3vh;
  left: clamp(58px, 7.5vw, 120px);
  z-index: 5;
  pointer-events: none;
}

.hero-overline {
  margin: 0 0 15px 8px;
  color: rgba(255,255,255,.72);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .35em;
}

.hero-title {
  margin: 0;
  display: grid;
  font-family: Arial, "Noto Sans Thai", sans-serif;
  font-size: clamp(72px, 10.2vw, 150px);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .82;
  text-transform: uppercase;
}

.hero-title span:first-child {
  color: #f6f0e5;
}

.hero-title span:last-child {
  color: var(--accent);
}

.hero-copy {
  position: absolute;
  z-index: 6;
  left: clamp(58px, 7.6vw, 120px);
  top: 38.5vh;
  width: min(510px, 36vw);
}

.hero-copy h2 {
  margin: 0 0 22px;
  font-family: "Noto Sans Thai", sans-serif;
  font-size: clamp(28px, 2.4vw, 39px);
  line-height: 1.22;
  letter-spacing: -.035em;
}

.hero-copy p {
  margin: 0;
  color: rgba(255,255,255,.63);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: clamp(15px, 1.18vw, 19px);
  line-height: 1.9;
}

.scroll-cue {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 9.5vh;
  display: grid;
  justify-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.47);
}

.scroll-cue span {
  font-size: 7px;
  letter-spacing: .3em;
}

.scroll-cue i {
  width: 23px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 18px;
}

.scroll-cue i::after {
  content: "";
  display: block;
  width: 3px;
  height: 7px;
  margin: 7px auto 0;
  border-radius: 3px;
  background: var(--accent);
  animation: scroll-wheel 1.7s ease-in-out infinite;
}

.scroll-cue b {
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(255,255,255,.28);
  border-bottom: 1px solid rgba(255,255,255,.28);
  transform: rotate(45deg);
}

@keyframes scroll-wheel {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  80% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

.orbit-label {
  position: absolute;
  z-index: 5;
  color: rgba(255,255,255,.25);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .3em;
  pointer-events: none;
}

.orbit-label--air { top: 21%; right: 18.5%; transform: rotate(9deg); }
.orbit-label--dust { top: 51%; right: 10.7%; transform: rotate(85deg); }
.orbit-label--life { bottom: 23%; right: 30.7%; transform: rotate(-17deg); }

.timeline-rail {
  position: fixed;
  z-index: 14;
  top: 22.5vh;
  right: 25px;
  bottom: 17.5vh;
  width: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.timeline-rail__axis {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 7px;
  width: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.14);
}

.timeline-rail__axis span {
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg, var(--rail-accent), #52d3a4);
  box-shadow: 0 0 12px var(--rail-accent);
}

.rail-item {
  position: relative;
  width: 100%;
  height: 24px;
  padding: 0 21px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.49);
  cursor: pointer;
  pointer-events: auto;
}

.rail-item__dot {
  position: absolute;
  right: 3px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: var(--bg-bottom);
  transition: all 260ms ease;
}

.rail-item__label {
  font-size: 7.5px;
  letter-spacing: .08em;
  transition: color 260ms ease, transform 260ms ease;
}

.rail-item:hover .rail-item__label,
.rail-item:focus-visible .rail-item__label,
.rail-item.is-active .rail-item__label {
  color: var(--rail-accent);
  transform: translateX(-4px);
}

.rail-item.is-active .rail-item__dot {
  border-color: var(--rail-accent);
  background: var(--rail-accent);
  box-shadow: 0 0 16px var(--rail-accent);
  transform: scale(1.18);
}

.rail-item:focus-visible {
  outline: 1px solid var(--rail-accent);
  outline-offset: 4px;
}

.event-card {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: min(480px, 39vw);
  min-height: 485px;
  padding: 44px 44px 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, rgba(255,255,255,.09));
  border-left: 4px solid var(--accent);
  border-radius: 0 34px 0 34px;
  background:
    linear-gradient(120deg, rgba(11,9,10,.82), rgba(11,9,10,.58)),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 54%);
  box-shadow: 0 25px 70px rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  will-change: opacity, transform;
}

.event-card::after {
  content: "";
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 82px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.2), transparent);
}

.event-card--left {
  left: clamp(55px, 7.5vw, 118px);
}

.event-card--right {
  right: clamp(95px, 9.3vw, 150px);
}

.event-card__topline {
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-index {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 50%;
  color: rgba(255,255,255,.55);
  font-size: 9px;
}

.event-year {
  color: var(--accent);
  font-family: Arial, sans-serif;
  font-size: clamp(49px, 5vw, 71px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .8;
  text-shadow: 0 0 35px color-mix(in srgb, var(--accent) 18%, transparent);
}

.event-eyebrow,
.renewal-overline,
.finale-overline,
.bridge-caption {
  margin: 0 0 15px;
  color: rgba(255,255,255,.47);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .24em;
}

.event-title {
  margin: 0;
  white-space: pre-line;
  font-family: Arial, "Noto Sans Thai", sans-serif;
  font-size: clamp(31px, 3.05vw, 44px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.event-thai-title {
  margin: 13px 0 0;
  color: var(--accent);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.event-body {
  margin: 22px 0 0;
  color: rgba(255,255,255,.68);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 14px;
  line-height: 1.92;
}

.event-note {
  margin: 37px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  color: rgba(255,255,255,.52);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 11px;
  line-height: 1.65;
}

.event-note span {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.event-thai-act .event-title,
.event-action .event-title,
.event-thailand .event-title {
  font-family: "Noto Sans Thai", sans-serif;
  line-height: 1.12;
}

.bridge-inner {
  display: grid;
  place-items: center;
}

.bridge-lines {
  position: relative;
  width: min(980px, 86vw);
  height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
}

.bridge-line {
  position: absolute;
  margin: 0;
  opacity: 0;
  color: #f5f4eb;
  font-family: "Noto Sans Thai", sans-serif;
  font-size: clamp(29px, 4vw, 60px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.3;
  text-shadow: 0 12px 50px rgba(0,0,0,.4);
  visibility: hidden;
  will-change: opacity, transform;
}

.bridge-caption {
  position: absolute;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  white-space: nowrap;
}

.renewal-copy {
  position: absolute;
  z-index: 8;
  top: 11.5vh;
  left: 50%;
  width: min(760px, 82vw);
  transform: translateX(-50%);
  text-align: center;
}

.renewal-copy h2 {
  margin: 0;
  font-family: "Noto Sans Thai", sans-serif;
  font-size: clamp(39px, 5.2vw, 74px);
  letter-spacing: -.045em;
  line-height: 1.17;
}

.renewal-copy > p:last-child {
  margin: 19px 0 0;
  color: rgba(255,255,255,.68);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: clamp(18px, 1.7vw, 25px);
}

.growth-meter {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 8vh;
  width: min(360px, 70vw);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.48);
  font-size: 7px;
  letter-spacing: .18em;
}

.growth-meter i {
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
}

.growth-meter b {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(.04);
  transform-origin: left;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.finale-inner {
  display: grid;
  place-items: center;
  padding: 12vh 7vw 5vh;
}

.finale-copy {
  position: relative;
  z-index: 9;
  margin-top: 22vh;
  text-align: center;
  isolation: isolate;
  will-change: opacity, transform;
}

.finale-overline {
  color: var(--accent);
}

.finale-copy h2 {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: clamp(70px, 10.5vw, 155px);
  font-weight: 900;
  letter-spacing: .02em;
  line-height: .87;
  text-shadow: 0 20px 80px rgba(0,0,0,.6);
}

.finale-copy h3 {
  margin: 13px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 43px);
  font-weight: 500;
}

.finale-copy > p:not(.finale-overline) {
  margin: 26px 0 18px;
  color: rgba(255,255,255,.7);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 16px;
}

.finale-cta {
  min-height: 48px;
  padding: 0 8px 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255,255,255,.27);
  border-radius: 999px;
  color: #fff;
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 12px;
  text-decoration: none;
  background: rgba(5,15,18,.34);
  backdrop-filter: blur(8px);
  transition: border-color 220ms ease, transform 220ms ease;
}

.finale-cta:hover,
.finale-cta:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

.finale-cta i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #092018;
  font-size: 17px;
  font-style: normal;
}

.finale-footer {
  position: absolute;
  left: 4vw;
  right: 4vw;
  bottom: var(--safe-bottom);
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.32);
  font-size: 7px;
  letter-spacing: .19em;
}

@media (min-width: 761px) {
  .finale-copy {
    width: min(1120px, 82vw);
    padding: 34px 64px 30px;
  }

  .finale-copy::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border: 1px solid rgba(121, 234, 209, .11);
    border-radius: 38px 0 38px 0;
    background:
      radial-gradient(ellipse at 50% 44%, rgba(2, 10, 13, .42) 0%, rgba(2, 12, 15, .28) 46%, rgba(2, 14, 17, .14) 72%, rgba(2, 14, 17, .05) 100%),
      linear-gradient(135deg, rgba(4, 16, 19, .18), rgba(3, 12, 15, .08));
    box-shadow: 0 20px 72px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255,255,255,.03);
    -webkit-backdrop-filter: blur(8px) saturate(.82);
    backdrop-filter: blur(8px) saturate(.82);
  }
}

.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

@media (max-width: 1100px) {
  .header-kicker {
    display: none;
  }

  .hero-title {
    font-size: clamp(68px, 9.5vw, 108px);
  }

  .event-card {
    width: min(455px, 44vw);
  }

  .event-card--right {
    right: 95px;
  }
}

@media (max-width: 900px) {
  .timeline-rail {
    display: none;
  }

  .event-card--right {
    right: 5vw;
  }

  .event-card--left {
    left: 5vw;
  }

  .event-card {
    width: 46vw;
  }
}

@media (max-width: 760px) {
  :root {
    --safe-left: max(18px, env(safe-area-inset-left));
    --safe-right: max(18px, env(safe-area-inset-right));
  }

  .ambient-background::before {
    filter: blur(48px);
  }

  .site-header {
    height: 68px;
    padding: var(--safe-top) var(--safe-right) 0 var(--safe-left);
  }

  .site-header::after {
    top: 67px;
    left: var(--safe-left);
    right: var(--safe-right);
  }

  .brand__text {
    display: none;
  }

  .brand__mark {
    width: 16px;
    height: 16px;
    border-width: 4px;
  }

  .motion-toggle {
    width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }

  .motion-toggle__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .story-section,
  .event-section {
    min-height: 165svh;
  }

  .hero-section {
    min-height: 132svh;
  }

  .bridge-section {
    min-height: 315svh;
  }

  .renewal-section {
    min-height: 225svh;
  }

  .finale-section {
    min-height: 150svh;
  }

  .hero-inner {
    padding: 68px var(--safe-right) 32px var(--safe-left);
  }

  .hero-title-wrap {
    top: 7px;
    left: var(--safe-left);
    right: var(--safe-right);
  }

  .hero-overline {
    display: none;
  }

  .hero-title {
    font-size: clamp(53px, 15vw, 72px);
    line-height: .78;
  }

  .hero-copy {
    top: 14.5vh;
    left: var(--safe-left);
    right: var(--safe-right);
    width: auto;
  }

  .hero-copy h2 {
    margin-bottom: 14px;
    font-size: clamp(23px, 7vw, 31px);
  }

  .hero-copy p {
    font-size: 14px;
    line-height: 1.82;
  }

  .scroll-cue {
    bottom: 5.5vh;
  }

  .orbit-label {
    display: none;
  }

  .event-card,
  .event-card--left,
  .event-card--right {
    top: 9.5vh;
    left: var(--safe-left);
    right: var(--safe-right);
    width: auto;
    min-height: 0;
    padding: 24px 22px 22px;
    border-left-width: 3px;
    border-radius: 0 24px 0 24px;
    background: linear-gradient(125deg, rgba(10,8,9,.92), rgba(10,8,9,.72));
    transform: none;
  }

  .event-card::after {
    left: 22px;
    right: 22px;
    bottom: 65px;
  }

  .event-card__topline {
    margin-bottom: 15px;
  }

  .event-index {
    width: 34px;
    height: 34px;
    font-size: 8px;
  }

  .event-year {
    font-size: 48px;
  }

  .event-eyebrow {
    margin-bottom: 8px;
    font-size: 7px;
    letter-spacing: .19em;
  }

  .event-title {
    font-size: clamp(28px, 8.4vw, 38px);
  }

  .event-thai-title {
    margin-top: 8px;
    font-size: 13px;
  }

  .event-body {
    margin-top: 13px;
    font-size: 12.5px;
    line-height: 1.72;
  }

  .event-note {
    margin-top: 26px;
    font-size: 10px;
  }

  .bridge-lines {
    width: calc(100% - 36px);
  }

  .bridge-line {
    font-size: clamp(27px, 8.8vw, 40px);
  }

  .bridge-caption {
    bottom: 8vh;
    font-size: 7px;
  }

  .renewal-copy {
    top: 9.5vh;
    width: calc(100% - 36px);
  }

  .renewal-overline {
    font-size: 7px;
  }

  .renewal-copy h2 {
    font-size: clamp(33px, 10.2vw, 47px);
  }

  .renewal-copy > p:last-child {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.6;
  }

  .growth-meter {
    bottom: 5.5vh;
  }

  .finale-inner {
    padding: 10vh 18px 4vh;
  }

  .finale-copy {
    margin-top: 30vh;
  }

  .finale-overline {
    font-size: 7px;
  }

  .finale-copy h2 {
    font-size: clamp(57px, 18vw, 82px);
  }

  .finale-copy h3 {
    margin-top: 8px;
    font-size: 27px;
  }

  .finale-copy > p:not(.finale-overline) {
    margin: 18px 0 14px;
    font-size: 14px;
  }

  .finale-footer {
    left: 18px;
    right: 18px;
    font-size: 6px;
  }

  .finale-footer span:first-child {
    max-width: 55%;
  }

  .webgl-fallback {
    top: 65%;
    width: 66vw;
  }
}

@media (max-width: 420px) and (max-height: 760px) {
  .hero-title {
    font-size: 50px;
  }

  .hero-copy {
    top: 16vh;
  }

  .hero-copy p {
    font-size: 12.5px;
  }

  .event-card {
    top: 8.2vh;
    padding: 20px 19px 18px;
  }

  .event-year {
    font-size: 41px;
  }

  .event-title {
    font-size: 27px;
  }

  .event-body {
    font-size: 11.5px;
  }
}

.tear-section {
  min-height: 165svh;
}

.tear-inner {
  display: grid;
  place-items: center;
}

.tear-copy {
  position: absolute;
  z-index: 9;
  top: 11vh;
  left: 50%;
  width: min(720px, 82vw);
  opacity: 0;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.tear-copy p {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .29em;
}

.tear-copy h2 {
  margin: 0;
  font-family: "Noto Sans Thai", sans-serif;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1.04;
}

.tear-copy span {
  display: block;
  max-width: 540px;
  margin: 12px auto 0;
  color: rgba(255,255,255,.58);
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .tear-section {
    min-height: 165svh;
  }

  .tear-copy {
    top: 10vh;
    width: calc(100% - 36px);
  }

  .tear-copy h2 {
    font-size: clamp(39px, 12vw, 54px);
  }

  .tear-copy span {
    font-size: 12.5px;
  }
}

/* --- Native WebGL Earth + attribution refinements --- */
.scene-shell canvas {
  position: absolute;
  inset: 0;
}

.earth-canvas {
  z-index: 0;
}

.story-canvas {
  z-index: 1;
}

.webgl-fallback {
  z-index: 0;
}

.credits-toggle {
  padding: 0;
  border: 0;
  color: rgba(255,255,255,.38);
  font: inherit;
  font-size: 7px;
  letter-spacing: .19em;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease;
}

.credits-toggle:hover,
.credits-toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.credits-panel {
  position: fixed;
  z-index: 30;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 36px));
  padding: 25px 27px 23px;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, rgba(255,255,255,.12));
  border-radius: 18px 0 18px 0;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 16px, 0) scale(.985);
  background: rgba(4, 12, 14, .94);
  box-shadow: 0 28px 90px rgba(0,0,0,.52);
  backdrop-filter: blur(18px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms step-end;
}

.credits-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0ms;
}

.credits-panel__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: rgba(255,255,255,.75);
  font-size: 22px;
  line-height: 1;
  background: transparent;
  cursor: pointer;
}

.credits-panel__eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .24em;
}

.credits-panel > p:not(.credits-panel__eyebrow) {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-family: Arial, "Noto Sans Thai", sans-serif;
  font-size: 12px;
  line-height: 1.7;
}

.credits-panel__links {
  margin-top: 16px;
  display: flex;
  gap: 18px;
}

.credits-panel__links a {
  color: rgba(255,255,255,.78);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .17em;
  text-decoration: none;
}

.credits-panel__links a:hover,
.credits-panel__links a:focus-visible {
  color: var(--accent);
  outline: none;
}

@media (max-width: 760px) {
  .hero-title-wrap {
    top: 84px;
  }

  .hero-title {
    font-size: clamp(50px, 14.2vw, 66px);
    line-height: .8;
  }

  .hero-copy {
    top: clamp(188px, 23.5svh, 220px);
  }

  .event-card,
  .event-card--left,
  .event-card--right {
    position: fixed;
    top: 84px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .tear-copy,
  .renewal-copy,
  .finale-copy {
    position: fixed;
    top: 84px;
  }

  .finale-inner {
    display: block;
    padding: 0 18px 4vh;
  }

  .finale-copy {
    position: fixed;
    top: 84px;
    left: 18px;
    right: 18px;
    margin: 0;
    padding: 0;
  }

  .finale-copy::before {
    content: none;
  }

  .finale-copy h2 {
    font-size: clamp(54px, 16.5vw, 72px);
  }

  .finale-copy h3 {
    font-size: 25px;
  }

  .finale-copy > p:not(.finale-overline) {
    margin: 13px 0 12px;
  }

  .finale-footer {
    align-items: center;
    gap: 8px;
  }

  .finale-footer > span {
    flex: 1 1 0;
  }

  .finale-footer > span:last-child {
    text-align: right;
  }

  .credits-toggle {
    flex: 0 0 auto;
    font-size: 5.8px;
  }

  .credits-panel {
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom));
    padding: 22px 23px 20px;
  }
}

@media (max-width: 420px) and (max-height: 760px) {
  .hero-title-wrap {
    top: 76px;
  }

  .hero-copy {
    top: 174px;
  }

  .event-card,
  .event-card--left,
  .event-card--right {
    top: 76px;
    padding-top: 18px;
  }

  .tear-copy,
  .renewal-copy,
  .finale-copy {
    top: 76px;
  }
}

/* v1.4: one viewport stage, one active narrative layer. */
.story-section > .section-inner {
  position: fixed;
  inset: 0;
  height: 100svh;
  visibility: visible;
  pointer-events: none;
}
.story-section:not(.is-current) > .section-inner { display: none; }
.story-section.is-current .event-card,
.story-section.is-current .finale-copy,
.story-section.is-current .finale-footer { pointer-events: auto; }
.event-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(115deg,rgba(10,9,10,.24),rgba(10,9,10,.06)); box-shadow: none; min-height: 0; padding: 32px; }
.event-card::after { display: none; }
.event-card__topline { margin-bottom: 22px; }
.event-title { font-size: clamp(29px,3.15vw,49px); }
.event-body { font-size: clamp(14px,1.16vw,18px); }
.event-note { margin-top: 23px; }
.event-card--left { left: 6vw; }
.event-card--right { right: 8vw; }
.tree-webgl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.ambient-background__grain { opacity: .025; }
@media (max-width:760px) {
  .event-card,.event-card--left,.event-card--right {
    position: absolute; top: 78px; left: 20px; right: 20px; width: auto;
    max-height: calc(57svh - 76px); overflow-y: auto;
    padding: 14px 16px; border-radius: 0 20px 0 20px;
    background: linear-gradient(120deg,rgba(8,9,12,.38),rgba(8,9,12,.12));
  }
  .event-card__topline { margin-bottom: 8px; }
  .event-year { font-size: 36px; }
  .event-index { width: 26px; height: 26px; }
  .event-eyebrow { font-size: 7px; margin-bottom: 7px; }
  .event-title { font-size: clamp(25px,7vw,34px); line-height: 1.13; }
  .event-thai-title { font-size: 13px; }
  .event-body { font-size: 13px; line-height: 1.7; margin-top: 10px; }
  .event-note { margin-top: 12px; font-size: 11px; }
  .finale-copy { top: 90px; }
  .hero-copy p { max-width: 420px; }
}
@media (min-width:761px) and (max-height:700px) {
  .event-card { padding: 20px; max-height: calc(100svh - 120px); overflow-y: auto; }
  .event-title { font-size: 30px; }
  .event-year { font-size: 46px; }
  .event-card__topline { margin-bottom: 12px; }
  .event-body { font-size: 14px; line-height: 1.65; }
}
@media (prefers-reduced-motion:reduce) { .scroll-cue b,.loader__mark span { animation: none; } }
@font-face {
  font-family: 'Noto Sans Thai'; src: url('../public/assets/NotoSansThai.ttf') format('truetype');
  font-weight: 100 900; font-display: swap;
}
/* Avoid two oversized, continuously blurred compositor surfaces. */
.ambient-background::before { filter: none; animation: none; }
.ambient-background::after { filter: none; animation: none; opacity: .12; }
:root { font-family: Arial, 'Noto Sans Thai', sans-serif; }
.scene-shell { bottom: auto; height: 100svh; }
@media (min-width:761px) {
  .renewal-copy { top: 32svh; left: 26%; width: 40%; text-align: left; }
  .renewal-copy h2 { font-size: clamp(36px,4vw,64px); }
  .finale-copy { position: absolute; top: 34svh; left: 6vw; width: 42vw; margin: 0; text-align: left; }
  .finale-copy h2 { font-size: clamp(60px,6.6vw,105px); }
  .finale-copy::before { content: none; }
  .growth-meter { left: 75%; bottom: 9svh; width: 25vw; }
}
.event-card { max-height: calc(100svh - 160px); overflow-y: auto; scrollbar-width: thin; }
@media (max-width:760px) {
  .event-card { max-height: calc(57svh - 76px); }
}
@media (hover:hover) and (pointer:fine) {
  .event-card:hover { background: linear-gradient(115deg,rgba(10,9,10,.30),rgba(10,9,10,.10)); }
}
