/* ==========================================================================
   Dr. Thanawat Thiasiriphet — "Signal"
   ========================================================================== */

:root {
  --navy-950: #040b14;
  --navy-900: #07131f;
  --navy-800: #0c1d2e;
  --teal-600: #128a80;
  --teal-500: #29a397;
  --teal-400: #2dd4bf;
  --teal-300: #5eead4;
  --cyan-300: #67e8f9;
  --sky-400: #38bdf8;
  --indigo-400: #818cf8;

  /* "Paper" sections. The dark theme re-colours these. */
  --paper: #f3f7f8;
  --paper-card: #ffffff;
  --ink: #0b1a27;
  --ink-soft: #51606e;
  --rule: rgba(11, 26, 39, 0.12);
  --accent: var(--teal-600);

  --font-display: "Space Grotesk", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans Thai", ui-monospace, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  --paper: #081421;
  --paper-card: #0d1e31;
  --ink: #e9f3f5;
  --ink-soft: #9fb1be;
  --rule: rgba(255, 255, 255, 0.1);
  --accent: var(--teal-300);
}

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

/* No CSS scroll-behavior: smooth here — it makes ScrollTrigger animate the
   scroll position when it re-measures. Anchor links are eased in main.js. */
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--navy-950);
  color: #e9f3f5;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, canvas, svg { display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--teal-300); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.container { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--teal-300); color: var(--navy-950); font-weight: 600;
  transition: top 0.2s;
}
.skip:focus { top: 16px; }

.gl { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- tones ---------- */
.tone-light {
  background: var(--paper); color: var(--ink);
  --fg: var(--ink); --fg-soft: var(--ink-soft); --card: var(--paper-card); --line: var(--rule); --acc: var(--accent);
}
.tone-dark {
  background: var(--navy-950); color: #e9f3f5;
  --fg: #e9f3f5; --fg-soft: #9fb1be; --card: rgba(255, 255, 255, 0.04); --line: rgba(255, 255, 255, 0.1); --acc: var(--teal-300);
}

.section { position: relative; padding-block: clamp(72px, 10vw, 140px); }
.section--tight { padding-block: clamp(48px, 7vw, 96px); }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--acc);
}
.eyebrow::before {
  content: ""; width: 34px; height: 10px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M0 5h8l2.500-4 4 8 4-8 3 4h12.500' fill='none' stroke='%23000' stroke-width='1.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M0 5h8l2.500-4 4 8 4-8 3 4h12.500' fill='none' stroke='%23000' stroke-width='1.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(2.1rem, 5vw, 4rem); text-wrap: balance;
}
.h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.lead { color: var(--fg-soft); font-size: clamp(1rem, 1.35vw, 1.2rem); max-width: 46ch; text-wrap: pretty; }

.head {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); column-gap: clamp(24px, 5vw, 80px); row-gap: 18px;
  align-items: end; margin-bottom: clamp(36px, 6vw, 72px);
}
.head .eyebrow { grid-column: 1 / -1; justify-self: start; }

.grad {
  background: linear-gradient(90deg, var(--cyan-300), var(--sky-400) 50%, var(--indigo-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 26px; height: 52px; border-radius: 999px; font-weight: 600; font-size: 0.98rem; white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}
.btn--primary {
  color: #03211f; background: linear-gradient(100deg, var(--teal-300), var(--cyan-300));
  box-shadow: 0 10px 30px -10px rgba(45, 212, 191, 0.65);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(45, 212, 191, 0.8); }
.btn--ghost { color: #e9f3f5; border: 1px solid rgba(255, 255, 255, 0.28); }
.btn--ghost:hover { border-color: var(--teal-300); color: var(--teal-300); }
.btn--ghost .ic { transition: transform 0.3s var(--ease); }
.btn--ghost:hover .ic { transform: translateX(4px); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 0.88rem; }
.btn--lg { height: 62px; padding: 0 34px; font-size: 1.08rem; }

.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--acc); border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.link:hover { border-color: currentColor; }
.link .ic { transition: transform 0.3s var(--ease); }
.link:hover .ic { transform: translate(2px, -2px); }

.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14); color: #b9c8d1; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.chip:hover { color: var(--teal-300); border-color: var(--teal-300); }
.chip--icon { width: 36px; padding: 0; justify-content: center; }
.chip--gfx.is-full { color: var(--navy-950); background: var(--teal-300); border-color: var(--teal-300); }

.round {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2); color: #e9f3f5; background: rgba(4, 11, 20, 0.7); font-size: 1.1rem;
  transition: border-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.round:hover { border-color: var(--teal-300); color: var(--teal-300); transform: scale(1.06); }

/* ---------- loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--navy-950);
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}
.js.is-loaded .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { display: grid; justify-items: center; gap: 18px; }
.loader__wave { width: 200px; height: 50px; fill: none; stroke: var(--teal-300); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; animation: draw 1.6s ease-in-out infinite; }
.loader__text { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: #8fa3b1; }
.loader__dots::after { content: "..."; }
@keyframes draw { 0% { stroke-dashoffset: 520; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -520; } }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; width: min(1240px, 100% - 24px); margin-inline: auto; }
.nav__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 10px 0 24px;
  border-radius: 999px; background: #06101c; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.7); color: #e9f3f5;
}
.nav__logo { font-family: var(--font-display); font-weight: 700; font-size: 1.16rem; letter-spacing: -0.02em; white-space: nowrap; }
.nav__logo span { color: var(--teal-300); }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav__links a { position: relative; padding: 6px 0; font-size: 0.9rem; font-weight: 500; color: #a9bac5; transition: color 0.25s; white-space: nowrap; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--teal-300); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav__links a:hover, .nav__links a.is-current { color: #fff; }
.nav__links a.is-current::after { transform: scaleX(1); }
.nav__tools { display: flex; align-items: center; gap: 8px; }
.nav__burger { display: none; font-size: 1.05rem; }
.nav__burger .ic--close, .nav__burger[aria-expanded="true"] .ic--open { display: none; }
.nav__burger[aria-expanded="true"] .ic--close { display: block; }

#theme-toggle .ic--sun { display: none; }
[data-theme="dark"] #theme-toggle .ic--sun { display: block; }
[data-theme="dark"] #theme-toggle .ic--moon { display: none; }

.nav__menu {
  display: grid; gap: 2px; margin-top: 8px; padding: 12px; border-radius: 24px;
  background: #06101c; border: 1px solid rgba(255, 255, 255, 0.1);
}
.nav__menu a:not(.btn) { padding: 12px 14px; border-radius: 14px; font-weight: 500; color: #c9d6dd; }
.nav__menu a:not(.btn):hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav__menu .btn { margin-top: 8px; }

@media (max-width: 1080px) {
  .chip--gfx span { display: none; }
  .chip--gfx { width: 36px; padding: 0; justify-content: center; }
}
@media (max-width: 900px) {
  .nav__links, .nav__cta, .chip--gfx { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__bar { padding-left: 20px; height: 56px; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: 100vh; min-height: 100svh; padding: 124px 0 96px; background: var(--navy-950); color: #e9f3f5;
}
.hero .gl { z-index: -2; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 11, 20, 0.78) 0%, rgba(4, 11, 20, 0.4) 42%, rgba(4, 11, 20, 0) 68%),
    linear-gradient(0deg, rgba(4, 11, 20, 0.5), rgba(4, 11, 20, 0) 30%);
}
.hero.no-gl { background: var(--navy-950) url("../assets/hero-bg-CGRAYDbz.jpg") center / cover no-repeat; }
.hero.no-gl .gl { display: none; }

.hero__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: center; gap: clamp(32px, 6vw, 96px); width: min(1200px, 100% - var(--gutter) * 2); }

.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
.badge__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-300); }
.badge__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cyan-300); animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(3.2); opacity: 0; } }

.hero__title {
  margin-top: 22px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 0.96;
  font-size: clamp(2.9rem, 7.1vw, 6.2rem);
}
.hero__line { display: block; overflow: hidden; padding: 0.06em 0.04em 0.14em; margin: -0.06em -0.04em -0.14em; }
.hero__line > span { display: inline-block; }
.hero__desc { margin-top: 26px; max-width: 54ch; font-size: clamp(1rem, 1.3vw, 1.16rem); color: #c2d1d9; text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 28px; margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.14); max-width: 640px; }
.hero__stats li { display: grid; gap: 4px; }
.hero__stats strong { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.hero__stats span { font-size: 0.78rem; color: #93a6b3; line-height: 1.35; }

.hero__visual { position: relative; justify-self: center; width: min(100%, 420px); aspect-ratio: 1; }
.portrait {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #d8d2c6;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.5), 0 0 0 12px rgba(94, 234, 212, 0.07), 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 61% 50%; transform: scale(1.28); transform-origin: 50% 38%; }
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 42%, rgba(4, 11, 20, 0) 52%, rgba(4, 11, 20, 0.5) 100%); box-shadow: inset 0 0 50px rgba(4, 11, 20, 0.45); }
.portrait__orbit { position: absolute; inset: -26px; border-radius: 50%; border: 1px dashed rgba(94, 234, 212, 0.32); animation: spin 48s linear infinite; pointer-events: none; }
.portrait__orbit::before { content: ""; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.500px; border-radius: 50%; background: var(--teal-300); box-shadow: 0 0 14px var(--teal-300); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__scroll {
  position: absolute; right: max(var(--gutter), (100vw - 1200px) / 2); bottom: 26px; display: grid; justify-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: #8fa3b1;
}
.hero__scroll i { position: relative; width: 1px; height: 34px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 50%; background: var(--teal-300); animation: drop 2s var(--ease) infinite; }
@keyframes drop { 0% { transform: translateY(-100%); } 100% { transform: translateY(200%); } }

@media (max-width: 900px) {
  .hero { padding: 104px 0 88px; align-items: flex-start; }
  .hero__inner { grid-template-columns: 1fr; gap: 34px; }
  .hero__visual { order: -1; width: min(58vw, 250px); justify-self: start; margin-left: 22px; margin-top: 18px; }
  .portrait__orbit { inset: -18px; }
  .hero__scrim { background: linear-gradient(180deg, rgba(4, 11, 20, 0) 22%, rgba(4, 11, 20, 0.72) 52%, rgba(4, 11, 20, 0.6) 100%); }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 38px; gap: 20px 24px; }
  .hero__scroll { display: none; }
}

/* ==========================================================================
   WAVEFORM BAND — the transition between sections
   ========================================================================== */
.band { position: relative; height: clamp(64px, 9vw, 128px); overflow: hidden; background: var(--from); margin-block: -1px; }
.band svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.band path { fill: var(--to); }
.band.is-live svg { animation: band var(--d, 30s) linear infinite; }
@keyframes band { to { transform: translateX(-50%); } }

/* ==========================================================================
   EXPERTISE
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 28px 26px 0; border-radius: 24px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(45, 212, 191, 0.18), transparent 55%);
}
.card:hover { border-color: var(--teal-500); box-shadow: 0 34px 60px -36px rgba(18, 138, 128, 0.55); }
.card:hover::before { opacity: 1; }
.card__n { position: absolute; right: 24px; top: 26px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-soft); }
.card__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; font-size: 1.4rem; color: var(--acc); background: color-mix(in srgb, var(--teal-400) 14%, transparent); }
.card__title { margin-top: 26px; font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.card__text { margin-top: 12px; color: var(--fg-soft); font-size: 0.95rem; }
.card__sig { margin-top: auto; padding-top: 22px; width: calc(100% + 52px); margin-inline: -26px; height: 78px; overflow: visible; }
.card__sig path { fill: none; stroke: var(--acc); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; stroke-dasharray: 5 5; transition: opacity 0.3s; }
.card:hover .card__sig path { opacity: 1; animation: march 0.9s linear infinite; }
@keyframes march { to { stroke-dashoffset: -10; } }

@media (max-width: 1040px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card { min-height: 290px; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } .card { min-height: 0; } }

/* ==========================================================================
   IMPACT
   ========================================================================== */
.impact { background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.impact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 80% 12%, rgba(45, 212, 191, 0.13), transparent 70%), radial-gradient(50% 36% at 8% 70%, rgba(129, 140, 248, 0.11), transparent 70%);
}
.impact .container { position: relative; }

.panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(28px, 4vw, 64px); align-items: center;
  padding: clamp(24px, 4vw, 54px); border-radius: 30px; overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 60%); border: 1px solid rgba(255, 255, 255, 0.1);
}
.panel + .panel { margin-top: 28px; }
.panel--voice { padding-top: clamp(84px, 9vw, 120px); }
.panel__title { display: flex; align-items: center; gap: 18px; }
.panel__icon { display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 20px; font-size: 1.5rem; color: var(--teal-300); background: rgba(45, 212, 191, 0.12); border: 1px solid rgba(45, 212, 191, 0.25); }
.panel__tag { margin-top: 4px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--teal-300); }
.panel__text { margin-top: 24px; color: #b6c5ce; text-wrap: pretty; }
.panel__label { margin-top: 26px; font-size: 0.86rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 26px; }
.tags li { padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05); font-size: 0.8rem; font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: 20px; background: rgba(4, 11, 20, 0.55); border: 1px solid rgba(255, 255, 255, 0.08); }
.stat__ic { font-size: 1.1rem; color: var(--teal-300); }
.stat__n {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-size: clamp(1.7rem, 2.7vw, 2.6rem); font-variant-numeric: tabular-nums; white-space: nowrap;
  background: linear-gradient(100deg, var(--teal-300), var(--cyan-300) 60%, var(--indigo-400)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat > span { font-size: 0.8rem; line-height: 1.4; color: #93a6b3; }

/* Voice spectrum along the top of the Botnoi Voice panel. */
.eq { position: absolute; left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: flex-start; justify-content: space-between; padding: 0 clamp(24px, 4vw, 54px); pointer-events: none; opacity: 0.75; }
.eq i { width: 3px; height: 100%; border-radius: 0 0 3px 3px; background: linear-gradient(180deg, var(--teal-300), rgba(129, 140, 248, 0.15)); transform-origin: top; transform: scaleY(var(--s, 0.3)); }
.eq.is-live i { animation: eq var(--t, 1.2s) ease-in-out var(--delay, 0s) infinite alternate; }
@keyframes eq { to { transform: scaleY(var(--e, 1)); } }

.dots { width: 100%; height: auto; margin: 26px 0 22px; }

@media (max-width: 900px) {
  .panel { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .stat { padding: 18px 14px; }
}

/* ==========================================================================
   JOURNEY
   ========================================================================== */
.journey { position: relative; }
.journey__head { padding-top: clamp(72px, 10vw, 140px); }
.journey__head .head { margin-bottom: clamp(20px, 3vw, 40px); }
.journey__track { position: relative; height: 560vh; }
.journey__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.journey__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(4, 11, 20, 0.86) 0%, rgba(4, 11, 20, 0.5) 34%, rgba(4, 11, 20, 0) 58%), linear-gradient(0deg, rgba(4, 11, 20, 0.7), rgba(4, 11, 20, 0) 22%); }

.jcards { position: absolute; left: max(var(--gutter), (100vw - 1200px) / 2); top: 50%; width: min(470px, 40vw); height: 0; }
.jcard { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 28px)); transition: opacity 0.45s ease, transform 0.6s var(--ease), visibility 0s linear 0.45s; }
.jcard.is-active { opacity: 1; visibility: visible; transform: translateY(-50%); transition-delay: 0.1s, 0.1s, 0s; }
.jcard__n { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 9vw, 7.500rem); line-height: 0.8; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--c) 55%, transparent); margin-bottom: 18px; }
.jcard__meta { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; }
.jcard__kind { padding: 4px 12px; border-radius: 999px; color: var(--navy-950); background: var(--c); font-weight: 500; text-transform: uppercase; }
.jcard__year { color: var(--c); }
.jcard__title { margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.3vw, 2.9rem); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.jcard__sub { margin-top: 12px; font-size: clamp(1rem, 1.4vw, 1.2rem); color: #cfdce3; }
.jcard__list { margin-top: 18px; display: grid; gap: 8px; }
.jcard__list li { position: relative; padding-left: 20px; font-size: 0.92rem; color: #9fb1be; }
.jcard__list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--c); }
.jcard__subs { margin-top: 20px; display: grid; gap: 8px; justify-items: start; }
.jcard__subs li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.86rem; }
.jcard__subs .ic { color: var(--c); }
.jcard__subs span { color: #9fb1be; }

.journey__hint { position: absolute; right: var(--gutter); top: 96px; display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8fa3b1; transition: opacity 0.4s; }
.journey__hint i { width: 40px; height: 1px; background: linear-gradient(90deg, var(--teal-300), transparent); }
.journey__hint.is-off { opacity: 0; }

.rail { position: absolute; left: max(var(--gutter), (100vw - 1200px) / 2); right: max(var(--gutter), (100vw - 1200px) / 2); bottom: 34px; }
.rail__line { position: relative; height: 1px; margin: 0 8.333%; background: rgba(255, 255, 255, 0.16); }
.rail__fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--teal-300), var(--cyan-300)); transform-origin: left; transform: scaleX(0); }
.rail__stops { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: -5px; }
.rail__btn { display: grid; justify-items: center; gap: 10px; width: 100%; padding-bottom: 4px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: #7f93a1; transition: color 0.3s; }
.rail__btn i { width: 9px; height: 9px; border-radius: 50%; background: var(--navy-950); border: 1px solid rgba(255, 255, 255, 0.4); transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s; }
.rail__btn:hover { color: #e9f3f5; }
.rail__btn.is-done i { background: var(--teal-300); border-color: var(--teal-300); }
.rail__btn.is-active { color: #fff; }
.rail__btn.is-active i { background: var(--teal-300); border-color: var(--teal-300); transform: scale(1.5); box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.18); }
.rail__count { display: none; font-family: var(--font-mono); font-size: 0.76rem; color: #8fa3b1; letter-spacing: 0.1em; }
.rail__count b { color: var(--teal-300); font-weight: 500; }

@media (max-width: 900px) {
  .journey__track { height: 500vh; }
  .journey__scrim { background: linear-gradient(0deg, rgba(4, 11, 20, 0.95) 0%, rgba(4, 11, 20, 0.82) 34%, rgba(4, 11, 20, 0) 62%); }
  .jcards { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 92px; }
  .jcard { top: auto; bottom: 0; transform: translateY(28px); }
  .jcard.is-active { transform: none; }
  .jcard__n { font-size: 3.400rem; margin-bottom: 12px; }
  .journey__hint { top: 84px; }
  .rail { bottom: 26px; display: flex; align-items: center; gap: 16px; }
  .rail__line { display: none; }
  .rail__stops { flex: 1; margin: 0; display: flex; gap: 6px; }
  .rail__stops li { flex: 1; }
  .rail__btn { padding: 12px 0; }
  .rail__btn span { display: none; }
  .rail__btn i { width: 100%; height: 3px; border-radius: 3px; border: 0; background: rgba(255, 255, 255, 0.18); }
  .rail__btn.is-active i { transform: none; box-shadow: none; }
  .rail__count { display: block; }
}

/* No WebGL: the journey becomes a plain timeline. */
.journey.is-static .journey__track { height: auto; }
.journey.is-static .journey__sticky { position: static; height: auto; overflow: visible; padding: 0 var(--gutter) clamp(60px, 8vw, 110px); }
.journey.is-static .gl, .journey.is-static .journey__scrim, .journey.is-static .rail, .journey.is-static .journey__hint { display: none; }
.journey.is-static .jcards { position: static; width: min(760px, 100%); height: auto; margin-inline: auto; display: grid; gap: 18px; }
.journey.is-static .jcard { position: relative; opacity: 1; visibility: visible; transform: none; padding: 26px; border-radius: 22px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); }
.journey.is-static .jcard__n { font-size: 3rem; }

/* ==========================================================================
   AWARDS
   ========================================================================== */
.awards__title { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; }
.awards__title .ic { color: var(--acc); font-size: 1.1em; }
.awards__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(24px, 3vw, 40px); }
.award { position: relative; padding: 24px 22px 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); transition: border-color 0.3s, transform 0.4s var(--ease); }
.award:hover { border-color: var(--teal-500); transform: translateY(-4px); }
.award__n { display: block; margin-bottom: 30px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--acc); }
.award p { font-weight: 500; line-height: 1.45; text-wrap: balance; }
@media (max-width: 1040px) { .awards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .awards__grid { grid-template-columns: 1fr; } .award__n { margin-bottom: 14px; } }

/* ==========================================================================
   PUBLICATIONS
   ========================================================================== */
.pubs .head { margin-bottom: 0; }
.pubs__stage { position: relative; height: clamp(430px, 66vh, 680px); margin-top: clamp(8px, 2vw, 24px); outline-offset: -4px; }
.pubs__stage .gl { cursor: grab; touch-action: pan-y; }
.pubs__stage .gl.is-dragging { cursor: grabbing; }
.pubs__prev, .pubs__next { position: absolute; top: 50%; margin-top: -26px; }
.pubs__prev { left: max(var(--gutter), (100vw - 1200px) / 2); }
.pubs__next { right: max(var(--gutter), (100vw - 1200px) / 2); }
.pubs__hint { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8fa3b1; pointer-events: none; }
.pubs__hint i { width: 34px; height: 1px; background: currentColor; position: relative; }
.pubs__hint i::before, .pubs__hint i::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border: solid currentColor; border-width: 1px 0 0 1px; }
.pubs__hint i::before { left: 0; transform: rotate(-45deg); }
.pubs__hint i::after { right: 0; transform: rotate(135deg); }
.pubs.no-gl .pubs__stage { display: none; }
.pubs.no-gl .head { margin-bottom: clamp(36px, 6vw, 72px); }

.publist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); margin-top: clamp(20px, 3vw, 40px); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.publist li { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.pub { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; width: 100%; padding: 20px 8px 20px 14px; text-align: left; transition: background 0.3s, color 0.3s; }
.pub::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: var(--teal-300); transform: scaleY(0); transition: transform 0.35s var(--ease); }
.pub__n { font-family: var(--font-mono); font-size: 0.78rem; color: #7f93a1; padding-top: 3px; transition: color 0.3s; }
.pub__body { display: grid; gap: 4px; }
.pub__title { font-weight: 500; line-height: 1.4; color: #c9d6dd; transition: color 0.3s; }
.pub__venue { font-family: var(--font-mono); font-size: 0.76rem; color: #7f93a1; }
.pub:hover { background: rgba(255, 255, 255, 0.03); }
.pub:hover .pub__title, .pub.is-active .pub__title { color: #fff; }
.pub.is-active::before { transform: scaleY(1); }
.pub.is-active .pub__n, .pub.is-active .pub__venue { color: var(--teal-300); }

@media (max-width: 900px) {
  .pubs__stage { height: clamp(400px, 62vh, 520px); }
  .pubs__prev, .pubs__next { top: auto; bottom: 40px; margin: 0; width: 46px; height: 46px; }
  .publist { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { overflow: hidden; text-align: center; padding-block: clamp(90px, 13vw, 180px); }
.contact__inner { position: relative; display: grid; justify-items: center; gap: 22px; }
.contact__title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; font-size: clamp(3rem, 10vw, 8rem); }
.contact .lead { max-width: 52ch; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.copy { display: inline-flex; align-items: center; gap: 16px; height: 62px; padding: 0 12px 0 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); transition: border-color 0.3s; max-width: 100%; }
.copy:hover { border-color: var(--teal-500); }
.copy__addr { font-family: var(--font-mono); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy__act { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; color: var(--acc); background: color-mix(in srgb, var(--teal-400) 14%, transparent); }
.contact__rings { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.contact__rings i { position: absolute; left: -45vmin; top: -45vmin; width: 90vmin; height: 90vmin; border-radius: 50%; border: 1px solid var(--teal-500); opacity: 0; animation: radiate 8s linear infinite; }
.contact__rings i:nth-child(2) { animation-delay: -2s; }
.contact__rings i:nth-child(3) { animation-delay: -4s; }
.contact__rings i:nth-child(4) { animation-delay: -6s; }
@keyframes radiate { 0% { transform: scale(0.15); opacity: 0; } 15% { opacity: 0.4; } 100% { transform: scale(1.5); opacity: 0; } }

@media (max-width: 560px) {
  .copy { height: auto; padding: 14px 14px 14px 20px; flex-wrap: wrap; justify-content: center; border-radius: 24px; gap: 10px; }
  .copy__addr { font-size: 0.8rem; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--navy-950); color: #8fa3b1; border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 28px 0 34px; font-size: 0.86rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.footer__top { display: inline-flex; align-items: center; gap: 8px; color: #c9d6dd; transition: color 0.25s; }
.footer__top:hover { color: var(--teal-300); }
.seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); }
.seg__label { padding: 0 10px 0 12px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.seg button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: #a9bac5; transition: background 0.25s, color 0.25s; }
.seg button:hover { color: #fff; }
.seg button.is-on { background: var(--teal-300); color: var(--navy-950); }

/* ==========================================================================
   CURSOR PING — a small beacon that trails the cursor and locks onto buttons
   ========================================================================== */
.ping { position: fixed; left: 0; top: 0; z-index: 80; width: 36px; height: 36px; margin: -18px 0 0 -18px; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.ping.is-on { opacity: 1; }
.ping i { position: absolute; border-radius: 50%; }
.ping i:first-child { inset: 15px; background: var(--teal-400); box-shadow: 0 0 10px var(--teal-400); transition: transform 0.3s var(--ease); }
.ping i:last-child { inset: 0; border: 1.500px solid var(--teal-400); opacity: 0.45; transform: scale(0.55); transition: transform 0.35s var(--ease), opacity 0.3s; }
.ping.is-locked i:first-child { transform: scale(1.5); }
.ping.is-locked i:last-child { animation: lock 1.1s ease-out infinite; }
@keyframes lock { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
@media (hover: none), (pointer: coarse) { .ping { display: none; } }

/* ==========================================================================
   THAI — taller line-height, slightly smaller display sizes
   ========================================================================== */
html[lang="th"] body { line-height: 1.85; }
html[lang="th"] .h2 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); line-height: 1.3; letter-spacing: -0.01em; }
html[lang="th"] .h3, html[lang="th"] .card__title, html[lang="th"] .awards__title { line-height: 1.4; letter-spacing: 0; }
html[lang="th"] .jcard__title { font-size: clamp(1.5rem, 2.9vw, 2.5rem); line-height: 1.35; letter-spacing: -0.01em; }
html[lang="th"] .contact__title { font-size: clamp(2.6rem, 8vw, 6.2rem); line-height: 1.3; letter-spacing: -0.02em; }
html[lang="th"] .eyebrow, html[lang="th"] .badge, html[lang="th"] .jcard__meta, html[lang="th"] .journey__hint, html[lang="th"] .pubs__hint, html[lang="th"] .hero__scroll, html[lang="th"] .loader__text, html[lang="th"] .seg__label { letter-spacing: 0.04em; }
html[lang="th"] .btn { letter-spacing: 0; }

/* ==========================================================================
   SMALL SCREENS
   ========================================================================== */
@media (max-width: 760px) {
  .head { grid-template-columns: 1fr; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ping, .contact__rings { display: none; }
}
