:root {
  --pink: #ec4670;
  --pink-hi: #ff5a83;
  --pink-glow: rgba(236, 70, 112, .45);
  --bg: #000;
  --surface: #131313;
  --surface-2: #222;
  --line: #2a2a2a;
  --ink: #fff;
  --ink-2: #b5b5b5;
  --ink-3: #7a7a7a;
  --radius: 14px;
  --dock-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Thai', 'Leelawadee UI',
    'PingFang TC', 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', 'Noto Sans CJK', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { background: var(--pink-hi); }
.btn-ghost { background: var(--surface-2); color: #fff; }
.btn-outline { border: 1.5px solid var(--pink); color: #fff; }
.btn-block { width: 100%; }

/* ── Language button + sheet ─────────────────────────── */
.lang-btn {
  position: fixed; z-index: 40;
  top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 20, 20, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lang-btn svg { width: 26px; height: 26px; }

.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 80vh; overflow-y: auto;
  background: var(--surface); border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet-panel::before {
  content: ''; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: #444; margin: 0 auto 14px;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-title {
  font-size: 12px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase;
  color: var(--pink); text-align: center; margin-bottom: 10px;
}
.lang-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-list button {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px;
  background: var(--surface-2); text-align: left; font-size: 15px; font-weight: 500;
}
.lang-list button[aria-current] { background: var(--pink); font-weight: 700; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  display: grid; place-items: center; overflow: hidden; isolation: isolate;
  background: #000 url('/assets/hero-poster-2.webp') center / cover no-repeat;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .45) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .25) 0%, transparent 30%, transparent 65%, #000 100%);
}
.hero-content { text-align: center; padding: 0 24px; margin-top: 4vh; }
.hero-logo { width: min(74vw, 420px); height: auto; margin: 0 auto; filter: drop-shadow(0 2px 18px rgba(0, 0, 0, .45)); }
.tagline {
  margin-top: 18px; font-size: clamp(11px, 3.4vw, 15px); font-weight: 600;
  letter-spacing: .3em; text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

/* ── Sections ────────────────────────────────────────── */
.section { padding: 88px 0 24px; scroll-margin-top: 0; }
.kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .38em; text-transform: uppercase;
  color: var(--pink); text-align: center; padding: 0 16px; margin-bottom: 28px;
}

/* ── Event carousel ──────────────────────────────────── */
.carousel {
  display: flex; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
  padding: 4px 16px 8px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 86%; max-width: 360px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card:only-child { flex-basis: 100%; margin: 0 auto; }
.card-media { display: block; position: relative; aspect-ratio: 1; background: #1b1b1b; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.date-badge {
  position: absolute; top: 12px; left: 12px;
  min-width: 52px; padding: 6px 8px 7px; border-radius: 10px;
  background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.1;
}
.date-badge b { display: block; font-size: 22px; letter-spacing: 0; color: var(--pink); }
.card-body { padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title {
  font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: .01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 2px;
}
.meta { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.meta svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--pink); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 8px; }
/* Two equal halves are narrow, so labels never wrap: js/main.js fitButtons()
   drops the icon, then tightens the text, only on buttons that overflow. */
.card-actions .btn { min-width: 0; padding: 0 8px; gap: 6px; letter-spacing: .06em; font-size: 11.5px; }
.card-actions .btn span { min-width: 0; overflow: hidden; white-space: nowrap; }
.card-actions .btn svg { width: 16px; height: 16px; }
.card-actions .btn.no-icon svg { display: none; }
.card-actions .btn.tight { font-size: 10.5px; letter-spacing: .02em; padding: 0 6px; }

.skeleton .card-media, .skeleton .card-body i {
  background: linear-gradient(90deg, #1a1a1a 0%, #262626 50%, #1a1a1a 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}
.skeleton .card-body i { display: block; height: 14px; border-radius: 6px; }
.skeleton .card-body i:nth-child(1) { width: 85%; height: 18px; }
.skeleton .card-body i:nth-child(2) { width: 60%; }
.skeleton .card-body i:nth-child(3) { width: 70%; margin-bottom: 54px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; min-height: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: #444; transition: width .2s, background-color .2s; }
.dots span.on { width: 18px; background: var(--pink); }

.events-state { text-align: center; padding: 8px 32px 0; color: var(--ink-2); font-size: 14px; }
.events-state .btn { margin-top: 16px; }

/* ── About ───────────────────────────────────────────── */
.about { padding-left: 16px; padding-right: 16px; }
.about-copy { color: var(--ink-2); font-size: 15px; text-align: center; max-width: 34em; margin: 0 auto 28px; }
.about-copy p + p { margin-top: 16px; }
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
}
.gallery a { aspect-ratio: 1; background: #1a1a1a; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ── Contact ─────────────────────────────────────────── */
.contact {
  min-height: 88vh; min-height: 88svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 40px;
  background: radial-gradient(ellipse at 50% 110%, rgba(236, 70, 112, .08), transparent 60%);
}
.contact .kicker { margin-bottom: 48px; }
.socials { display: flex; gap: 24px; justify-content: center; }
.socials a {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pink); box-shadow: 0 0 28px var(--pink-glow);
  transition: transform .15s ease;
}
.socials a:active { transform: scale(.94); }
.socials svg { width: 34px; height: 34px; color: #fff; }
.email { margin-top: 48px; font-size: clamp(17px, 5.2vw, 22px); letter-spacing: .02em; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  text-align: center; padding: 28px 16px calc(var(--dock-h) + 40px + var(--safe-b));
  border-top: 1px solid #141414; font-size: 12px; color: var(--ink-3);
}
.legal { display: flex; justify-content: center; gap: 10px; margin-bottom: 8px; }
.legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #444; }

/* ── Bottom dock ─────────────────────────────────────── */
.dock {
  position: fixed; z-index: 50;
  left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%);
  width: calc(100% - 20px); max-width: 420px; height: var(--dock-h);
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: rgba(20, 20, 20, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid #2c2c2c; border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.dock-logo { flex: 0 1 auto; min-width: 44px; height: 52px; display: grid; place-items: center; padding: 0 4px; }
.dock-logo .logo-wide { width: min(26vw, 118px); height: auto; }
.dock-logo .logo-icon { display: none; width: 40px; height: 40px; }
.dock-btn {
  flex: none; width: 52px; height: 52px; border-radius: 10px;
  display: grid; place-items: center; background: var(--surface-2);
  transition: transform .15s ease;
}
.dock-btn svg { width: 24px; height: 24px; }
.dock-btn-outline { background: transparent; border: 1.5px solid var(--pink); }
.dock-cta {
  flex: 1 1 auto; height: 52px; border-radius: 10px; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--pink); font-size: 14px; font-weight: 700; letter-spacing: .14em;
  transition: transform .15s ease;
}
.dock-cta svg { width: 24px; height: 24px; flex: none; }
.dock-btn:active, .dock-cta:active { transform: scale(.95); }
@media (max-width: 350px) {
  .dock { gap: 6px; padding: 0 8px; }
  /* Too narrow for the wordmark: switch to the round icon. */
  .dock-logo .logo-wide { display: none; }
  .dock-logo .logo-icon { display: block; }
  .dock-btn { width: 46px; }
  .dock-cta { font-size: 12px; letter-spacing: .08em; }
}

/* ── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; z-index: 70;
  bottom: calc(var(--dock-h) + 28px + var(--safe-b));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: #fff; color: #000; font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Legal pages ─────────────────────────────────────── */
.doc { max-width: 40rem; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top, 0px)) 20px 64px; }
.doc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.doc-head img { width: 112px; height: auto; }
.doc-head a.back {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
}
.doc h1 { font-size: clamp(24px, 7vw, 32px); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.doc .updated { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.doc h2 { font-size: 16px; font-weight: 700; margin: 32px 0 10px; color: #fff; }
.doc p, .doc li { color: var(--ink-2); font-size: 15px; }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 20px; margin-top: 8px; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--pink); }
.doc b { color: #fff; font-weight: 600; }
.doc .callout { margin-top: 28px; padding: 16px 18px; border: 1px solid var(--pink); border-radius: 12px; background: rgba(236, 70, 112, .06); }
.doc .callout h2 { margin-top: 0; color: var(--pink); }
.doc footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-3); font-size: 12px; }

/* ── Loading feedback (js/nav.js) ────────────────────── */
.nav-progress {
  position: fixed; top: 0; left: 0; z-index: 100; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--pink), #ff9ec0); box-shadow: 0 0 10px var(--pink-glow);
  opacity: 0; pointer-events: none;
}
.is-navigating .nav-progress { opacity: 1; animation: nav-progress 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes nav-progress { 0% { width: 0; } 15% { width: 45%; } 100% { width: 92%; } }

.spin, .btn.is-loading::after, .dock-cta.is-loading::after {
  content: ''; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .6s linear infinite;
}
.btn.is-loading svg, .dock-cta.is-loading svg { display: none; }
.card.is-loading { opacity: .6; transition: opacity .2s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Images: shimmer placeholder until they arrive, then fade in. */
.card-media {
  background: linear-gradient(90deg, #1a1a1a 0%, #262626 50%, #1a1a1a 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}
.card-media img, img.fade { opacity: 0; transition: opacity .35s ease; }
.card-media img.loaded, img.fade.loaded { opacity: 1; }

/* Luma text while its translation is on the way (js/i18n.js). */
.tr-pending [data-tr] { animation: tr-pulse 1.4s ease-in-out infinite; }
@keyframes tr-pulse { 50% { opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  .card-media, .tr-pending [data-tr] { animation: none; }
  .is-navigating .nav-progress { animation: none; width: 60%; }
}
