/* =========================================================================
   Bumrungrad International Hospital — Phuket
   Corporate Identity palette, modern "liquid glass" UI language.

   CI notes honoured in this stylesheet:
   - Composition stays 60–70% white / off-white; CI colours are used only as
     accents (headings, icons, CTA, thin dividers, footer swatches).
   - No embossing, drop-shadow illustration, or colour gradients are used on
     brand marks, headings, or flat surfaces.
   - The single translucency/blur affordance ("liquid glass") is treated as a
     modern *UI chrome* material (pills, cards, nav) rather than a graphic
     treatment of the logo or CI colours themselves — kept intentionally
     restrained (soft blur + 1px hairline + faint elevation only).
   ========================================================================= */

/* =========================== Myriad Pro (local) =========================== */

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/myriadpro-light.woff2") format("woff2"),
       url("../font/Myriad Pro/myriadpro-light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/MyriadPro-Regular.woff2") format("woff2"),
       url("../font/Myriad Pro/MyriadPro-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/MyriadPro-It.woff2") format("woff2"),
       url("../font/Myriad Pro/MyriadPro-It.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/MyriadPro-Semibold.woff2") format("woff2"),
       url("../font/Myriad Pro/MyriadPro-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/MyriadPro-SemiboldIt.woff2") format("woff2"),
       url("../font/Myriad Pro/MyriadPro-SemiboldIt.otf") format("opentype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/myriadpro-bold.woff2") format("woff2"),
       url("../font/Myriad Pro/myriadpro-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../font/Myriad Pro/MyriadPro-BoldIt.woff2") format("woff2"),
       url("../font/Myriad Pro/MyriadPro-BoldIt.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Myriad Pro has no Thai glyphs. Thai text falls through to this variable
   face (Thai subset only), so Thai never depends on the visitor's system
   fonts. The unicode-range limits it to Thai characters (which includes the
   baht sign used in the English page's investment stat). */
@font-face {
  font-family: "Noto Sans Thai";
  src: url("../font/Noto Sans Thai/NotoSansThai-thai-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

:root {
  /* ---- Corporate Identity colours ---- */
  --cb-golden-brown: #8A6E4B;
  --cb-golden-brown-deep: #7A5F40; /* hover + small text on warm paper (AA) */
  --cb-golden: #B68400;
  --cb-mustard: #DAA900;
  --cb-olive: #7A7F34;
  --cb-dark-grey: #5A656F;
  --cb-light-grey: #8C9D9C;

  /* ---- Neutral / white system (60–70% of composition) ---- */
  --paper: #FFFFFF;
  --paper-warm: #FAF8F5;
  --paper-tint: #F4F3EF;
  --ink: #22262A;
  --ink-soft: var(--cb-dark-grey);

  /* ---- Glass material tokens ---- */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-border-dark: rgba(34, 38, 42, 0.08);
  --glass-blur: 20px;
  --glass-elevation: 0 1px 1px rgba(34, 38, 42, 0.04), 0 8px 24px rgba(34, 38, 42, 0.06);

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-xs: 6px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Myriad Pro", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; display: block; }

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

/* Brand-coloured keyboard focus and text selection (browser defaults belong
   to no design system). Light grounds use deep bronze; photo and bronze
   grounds use white; the dark lightbox uses mustard. */
:focus-visible {
  outline: 2px solid var(--cb-golden-brown-deep);
  outline-offset: 3px;
}
.hero :focus-visible,
.inquiry :focus-visible { outline-color: #fff; }
.lightbox :focus-visible { outline-color: var(--cb-mustard); }
::selection { background: rgba(138, 110, 75, 0.28); }

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--cb-golden-brown-deep);
  outline-offset: 2px;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* =========================== Headings =========================== */

h1, h2, h3, h4 {
  text-wrap: balance;
  font-family: "Myriad Pro", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.accent { color: var(--cb-golden-brown); font-style: italic; }

.section-kicker {
  font-family: "Myriad Pro", "Noto Sans Thai", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cb-golden-brown-deep);
  margin: 0 0 14px;
}
.section-kicker-light { color: #fff; }

.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  max-width: 18ch;
  margin-bottom: 20px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 40px;
}

/* =========================== Glass utilities =========================== */

.glass-pill,
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: var(--glass-elevation);
}

.glass-card {
  border-radius: var(--radius-md);
  padding: 28px;
}

/* =========================== Header =========================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 18px clamp(16px, 4vw, 40px) 0;
  pointer-events: none;
}

.header-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 1160px;
  border-radius: var(--radius-pill);
  padding: 10px 10px 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.is-scrolled .header-inner {
  background: var(--glass-bg-strong);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
  flex: none;
}

.header-actions { display: flex; align-items: center; gap: 4px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.lang-switch:hover { color: var(--cb-golden-brown); background: rgba(34, 38, 42, 0.05); }
.lang-switch:focus-visible { outline: 2px solid var(--cb-mustard); outline-offset: 2px; }

/* =========================== Buttons =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--cb-golden-brown);
  color: #fff;
}
.btn-primary:hover { background: var(--cb-golden-brown-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--glass-border-dark);
}
.btn-ghost:hover { border-color: var(--cb-golden-brown); color: var(--cb-golden-brown); }

.btn-glass {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--ink);
}
.btn-glass:hover { background: var(--cb-golden-brown); color: #fff; }
.btn-inquiry svg { transition: transform .25s var(--ease); }
.btn-inquiry:hover svg { transform: translateX(3px); }

/* =========================== Hero =========================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video,
.hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* The still image is always present and sits beneath the video, so the
   hero never falls back to an empty dark slab if the video is slow,
   blocked, or fails: the poster/still shows instead. The video is stacked
   above it (later in the DOM).
   Mobile: hide the video (main.js never even loads it — see below) and
   show only the still image, since the wide establishing shot loses its
   signage/entrance detail once object-fit: cover crops it down to a
   narrow, near-full-height phone viewport. Kept as a dedicated breakpoint
   (769px) rather than reusing the 880px layout breakpoint, since this is
   about media weight/legibility, not grid layout. */
@media (max-width: 768px) {
  .hero-video { display: none; }
  .hero-image {
    /* Plain center — biasing this toward either signage risks cutting a
       sign off mid-word on some phone widths (tested; looked broken).
       Centered keeps a clean, consistent architectural crop (entrance +
       curved facade) on every device size; the sign name is already in
       the headline text below. */
    object-position: center;
    /* Same slow zoom/drift used when the site had no video at all — keeps
       the mobile still from feeling static without competing with the
       copy on top. */
    transform-origin: center;
    animation: hero-kenburns 24s ease-in-out infinite alternate;
  }
}

@keyframes hero-kenburns {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(-1.5%, -1.5%, 0); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  /* Gradient scrim: darkens the video (stronger near the bottom, where
     the text sits) instead of a flat dark tint, so the footage stays
     visible but never competes with the copy on top. No blur — keep
     the footage sharp. */
  /* A soft left-edge layer sits under the headline column (the sky behind
     the eyebrow measured about 3.4:1 against white); the right side, with
     the building and badge, stays bright. */
  background:
    linear-gradient(
      to right,
      rgba(20, 20, 18, 0.26) 0%,
      rgba(20, 20, 18, 0.16) 40%,
      rgba(20, 20, 18, 0) 75%
    ),
    linear-gradient(
      to bottom,
      rgba(20, 20, 18, 0.3) 0%,
      rgba(20, 20, 18, 0.44) 45%,
      rgba(20, 20, 18, 0.64) 100%
    );
  -webkit-backdrop-filter: blur(0) saturate(140%);
  backdrop-filter: blur(0) saturate(140%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 0 clamp(20px, 5vw, 48px) clamp(120px, 24vh, 240px);
  max-width: 900px;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
  margin: 0 0 18px;
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 600;
  margin-bottom: 22px;
  /* The global "h1, h2, h3, h4" rule sets a dark --ink colour directly on
     the element, which otherwise overrides the white inherited from
     .hero-content and makes the headline blend into the video. */
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  max-width: 64ch;
  margin: 0 0 36px;
}
/* One-line key facts between the tagline and the buttons. */
.hero-facts { margin: 0 0 28px; }

/* Tagline under the hospital name — the banner carries no body copy. */
.hero-tagline {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  max-width: 32ch;
  margin: 0 0 36px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-cta .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero-cta .btn-ghost:hover { border-color: var(--cb-mustard); color: var(--cb-mustard); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue::after { content: ""; position: absolute; inset: -6px -9px; }
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--cb-mustard);
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* Newsweek "World's Best Hospitals" award badge, floated over the hero video */
.hero-badge {
  position: absolute;
  top: clamp(96px, 15vh, 136px);
  right: clamp(20px, 5vw, 48px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: 12px 18px 12px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hero-badge:hover,
.hero-badge:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}
.hero-badge-img {
  width: 64px;
  height: auto;
  flex: none;
  border-radius: var(--radius-xs);
}
.hero-badge-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-badge-campus {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-badge-stat {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--cb-golden-brown);
  white-space: nowrap;
}
.hero-badge-stat small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* =========================== Sections (generic) =========================== */

.section {
  padding: clamp(64px, 10vw, 128px) 0;
  background: var(--paper);
}
.section + .section { border-top: 1px solid var(--glass-border-dark); }

.about { background: var(--paper-warm); }

/* TEMPORARY — billboard video section (remove with its markup in index.html
   and th/index.html). Native controls, no autoplay; the clip is 960x260. */
.billboard { background: var(--paper-tint); }
.billboard-frame {
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--glass-elevation);
}
.billboard-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 260;
}
.billboard-hint { max-width: 960px; margin: 14px auto 0; font-size: 0.9rem; color: var(--ink-soft); }
.billboard-transcript { max-width: 960px; margin: 20px auto 0; }
.billboard-transcript summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--cb-golden-brown-deep);
}
.billboard-transcript h3 { font-size: 1rem; margin: 16px 0 8px; }
.billboard-transcript ol { margin: 0; padding-left: 1.4em; color: var(--ink); }
.billboard-transcript p { margin: 0 0 8px; color: var(--ink-soft); }

.statement {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  max-width: 20ch;
  margin-bottom: 28px;
}
.statement-sub {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
/* Sub-labels ("Our Vision" / "Our Mission") inside the vision & mission block. */
.statement-tag { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.statement-tag-next { margin-top: 40px; }

/* Consecutive lead paragraphs read as one passage, not separate blocks. */
.section-lead:has(+ .section-lead) { margin-bottom: 16px; }

/* =========================== Stat grid =========================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0 64px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--glass-border-dark);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.stat-value {
  font-family: "Myriad Pro", "Noto Sans Thai", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--cb-golden-brown);
}
.stat-label {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* =========================== Awards & recognition =========================== */

.awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0 32px;
}

.award-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--glass-border-dark);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.award-source {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cb-golden-brown);
}
.award-card h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}
.award-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* "What we will offer" — four service cards reuse .award-card styling. */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 40px 0 0;
}

.awards-rank {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cb-golden-brown-deep);
  margin: 0 0 20px;
}
.awards-disclaimer {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.awards-full {
  border-top: 1px solid var(--glass-border-dark);
  padding-top: 24px;
}
.awards-full summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--cb-golden-brown);
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.awards-full summary::-webkit-details-marker { display: none; }
.awards-full summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s var(--ease);
  flex: none;
}
.awards-full[open] summary::after { transform: rotate(-135deg); }

.awards-full-group {
  margin-top: 24px;
}
.awards-full-group h4 {
  font-family: "Myriad Pro", "Noto Sans Thai", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0 0 10px;
}
.awards-full-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.awards-full-group li {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.awards-full-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cb-mustard);
}

/* =========================== Press release =========================== */

.press {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  margin-top: 8px;
}

.press-article p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 20px;
}
.press-article p:last-child { margin-bottom: 0; }

.press-aside {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* =========================== Split layout =========================== */

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split-reverse { grid-template-columns: 1fr 1.1fr; }
.split-reverse .split-text { order: 2; }
.split-reverse .split-media { order: 1; }

.split-text h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.split-text p { color: var(--ink-soft); }
.split-text .btn { margin-top: 18px; }

.media-card {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  background: var(--paper-tint);
}
.media-card-label {
  font-family: "Myriad Pro", "Noto Sans Thai", sans-serif;
  font-size: 1.2rem;
  color: var(--cb-golden-brown);
}
.media-card-note { font-size: 0.88rem; color: var(--ink-soft); }

.media-card.has-image {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  justify-content: flex-start;
  gap: 0;
}
.media-card-img { object-position: center 40%; }
.media-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-card-tag {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin: 14px 0 0 14px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 18, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.media-card-overlay {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(20, 20, 18, 0.88) 0%, rgba(20, 20, 18, 0.68) 55%, rgba(20, 20, 18, 0) 100%);
}
.media-card-overlay .media-card-label { color: #fff; }
.media-card-overlay .media-card-note { color: rgba(255, 255, 255, 0.85); }

.map-card { padding: 0; overflow: hidden; aspect-ratio: 4 / 3; }
.map-card iframe { width: 100%; height: 100%; border: 0; }

/* =========================== Timeline =========================== */

.timeline-section { background: var(--paper-warm); }

.timeline {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--cb-light-grey);
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cb-golden-brown);
}
.timeline-item.is-future { border-top-color: var(--cb-mustard); }
.timeline-item.is-future::before { background: var(--cb-mustard); }

.timeline-year {
  display: block;
  font-family: "Myriad Pro", "Noto Sans Thai", sans-serif;
  font-size: 1.3rem;
  color: var(--cb-golden-brown-deep);
  margin-bottom: 8px;
}
.timeline-body h3 { font-size: 1rem; margin-bottom: 8px; }
.timeline-body p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* =========================== Progress gallery =========================== */

.progress-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0 0;
}

.progress-card {
  margin: 0; /* <figure> ships 40px side margins that shrank phone thumbnails to ~85px */
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* The photo fills the card, so the glass blur behind it is invisible and
     only costs GPU; a flat tint shows while lazy images load instead. */
  background: var(--paper-tint);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.progress-card picture { display: block; }

.progress-card-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.progress-card-trigger:focus-visible {
  outline: 2px solid var(--cb-mustard);
  outline-offset: -2px;
}

.progress-card img {
  width: 100%;
  height: auto; /* width/height attributes set the ratio hint only; the 4/3 crop below decides the box */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.progress-card-trigger:hover img,
.progress-card-trigger:focus-visible img {
  transform: scale(1.05);
}

.progress-card-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: #fff;
  background: rgba(20, 20, 18, 0.4);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.progress-card-trigger:hover .progress-card-zoom,
.progress-card-trigger:focus-visible .progress-card-zoom {
  opacity: 1;
  transform: scale(1);
}

.progress-card figcaption {
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* =========================== Progress gallery lightbox =========================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 40px);
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 10, 0.78);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  backdrop-filter: blur(6px) saturate(140%);
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
}

.lightbox-figure {
  touch-action: pan-y;
  margin: 0;
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(20, 20, 18, 0.3);
  border: 1px solid var(--glass-border);
}

.lightbox-img {
  width: 100%;
  max-height: 78svh;
  object-fit: contain;
  background: #000;
}

.lightbox-caption {
  padding: 12px 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(20, 20, 18, 0.55);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--ink);
  cursor: pointer;
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--glass-bg-strong); }
.lightbox-close:active,
.lightbox-nav:active { transform: scale(0.94); }

.lightbox-close {
  top: 10px;
  right: 10px;
}

.lightbox-prev { top: 50%; left: 10px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 10px; transform: translateY(-50%); }
.lightbox-prev:active { transform: translateY(-50%) scale(0.94); }
.lightbox-next:active { transform: translateY(-50%) scale(0.94); }

.lightbox-nav[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

body.lightbox-open { overflow: hidden; }

@media (max-width: 640px) {
  .hero-badge { gap: 10px; padding: 10px 14px 10px 10px; top: clamp(84px, 13vh, 112px); }
  .hero-badge-img { width: 52px; }
  .hero-badge-stat { font-size: 0.9rem; }
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next { width: 38px; height: 38px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-close { top: 4px; right: 4px; }
  .lightbox-img { max-height: 64svh; }
  .lightbox-caption { font-size: 0.8rem; padding: 10px 14px; }
}

/* =========================== Inquiry =========================== */

.inquiry {
  background: var(--cb-golden-brown);
  color: #fff;
}
.inquiry .section-title { color: #fff; }
.inquiry .section-lead { color: #fff; }
.inquiry-subtitle { font-size: 1.1rem; color: #fff; margin: 8px 0 16px; }

.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.inquiry-card {
  background: rgba(34, 38, 42, 0.22);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.inquiry-card:hover {
  background: rgba(34, 38, 42, 0.34);
  transform: translateY(-3px);
}
.inquiry-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 600;
}
.inquiry-value { font-size: 1rem; font-weight: 400; }

.inquiry-note {
  margin: 32px 0 0;
  max-width: 62ch;
  font-size: 1rem;
  color: #fff;
}
.inquiry-note a,
.emergency-bar a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inquiry-note [lang] { display: block; margin-top: 6px; line-height: 1.8; }

/* =========================== Emergency notice =========================== */

.emergency-bar {
  background: var(--paper-tint);
  border-top: 1px solid var(--glass-border-dark);
  padding: 14px 0;
  font-size: 0.9rem;
  color: var(--ink);
  text-align: center;
}
.emergency-bar p { margin: 0; }
.emergency-bar [lang] { display: block; margin-top: 2px; line-height: 1.8; }

/* =========================== Footer =========================== */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--glass-border-dark);
  padding: 48px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-areas:
    "brand links"
    "copy   swatches";
  row-gap: 24px;
  align-items: center;
}
.footer-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-links {
  grid-area: links;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
}
.footer-links a:hover { color: var(--cb-golden-brown); }
.footer-copy {
  grid-area: copy;
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  max-width: 60ch;
}
.footer-swatches {
  grid-area: swatches;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.footer-swatches span {
  width: 18px;
  height: 8px;
  border-radius: 4px;
  display: block;
}

/* =========================== Reveal-on-scroll =========================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================== Responsive =========================== */

@media (max-width: 880px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .awards-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .progress-grid { grid-template-columns: repeat(3, 1fr); }
  .inquiry-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-text, .split-reverse .split-media { order: initial; }
  .press { grid-template-columns: 1fr; margin-top: 4px; }
  .press-aside { position: static; }
  .footer-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "links"
      "copy"
      "swatches";
  }
  .footer-links, .footer-swatches { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .header-inner { padding: 8px 8px 8px 16px; }
  .stat-grid, .timeline, .inquiry-grid, .awards-grid, .offer-grid { grid-template-columns: 1fr; }
  .progress-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-badge { right: 16px; padding: 8px; }
  .hero-badge-copy { display: none; }
}

/* =========================== Thai (html[lang="th"]) ===========================
   Thai has no capitals or italics, stacks tone marks above and below the
   line, and runs words together, so the Latin-tuned type settings above
   (tight leading, tracked caps, italic accent, narrow measures) don't carry
   over. Everything here is scoped to Thai pages. */

html[lang="th"] { font-size: 106.25%; }
html[lang="th"] body { font-size: 1rem; line-height: 1.8; }

html[lang="th"] h1,
html[lang="th"] h2,
html[lang="th"] h3,
html[lang="th"] h4 {
  letter-spacing: 0;
  line-height: 1.35;
  text-wrap: balance;
}
/* Thai glyphs are taller and wider than Latin at the same size, so the hero
   headline steps down to keep each phrase on its own line. */
html[lang="th"] .hero-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.25;
}

/* No italic in Thai: carry the accent phrase with weight and colour. */
html[lang="th"] .accent { font-style: normal; font-weight: 600; }

html[lang="th"] .eyebrow,
html[lang="th"] .section-kicker,
html[lang="th"] .award-source,
html[lang="th"] .inquiry-label,
html[lang="th"] .media-card-tag,
html[lang="th"] .hero-badge-campus,
html[lang="th"] .hero-badge-stat small {
  letter-spacing: 0;
  text-transform: none;
}

/* Measures are set in ch, which is wider than an average Thai glyph. */
html[lang="th"] .section-title { max-width: 26ch; }
html[lang="th"] .hero-tagline { max-width: 48ch; line-height: 1.5; }
html[lang="th"] .hero-facts { font-size: 1rem; }
html[lang="th"] .statement { max-width: 28ch; }
html[lang="th"] .section-lead,
html[lang="th"] .statement-sub { max-width: 66ch; }

html[lang="th"] .press-article p { line-height: 1.9; }
html[lang="th"] .btn { line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .scroll-cue span { animation: none; }
  .hero-image { animation: none; }
}
