/* thefilled // BKK — shared neutral system. Posters are the only colour on the site. */
:root {
  --ground: #f2f2f0;
  --surface: #ffffff;
  --tone: #e6e6e3;
  --tone-2: #d7d7d3;
  --ink: #141414;
  --muted: #5b5b58;
  --inverse: #ffffff;
  --danger: #a3261b;
  --ok: #1d6b3a;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.02; font-weight: 800; text-wrap: balance; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.bar :focus-visible, .foot :focus-visible { outline-color: var(--inverse); }
::selection { background: var(--ink); color: var(--inverse); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- top bar ---------- */
.bar { background: #000; color: var(--inverse); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.bar .logo img { height: 34px; width: auto; }
.bar nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); font-weight: 600; font-size: 15px; }
.bar nav a { text-decoration: none; padding: 10px 0; }
.bar nav a:hover { text-decoration: underline; }
.bar nav a { white-space: nowrap; }
@media (max-width: 560px) {
  .bar .wrap { min-height: 56px; gap: 12px; }
  .bar .logo img { height: 26px; }
  .bar nav { gap: 16px; font-size: 14px; }
  .bar nav .wide-only { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px;
  background: var(--ink); color: var(--inverse);
  border: 0; border-radius: 0; cursor: pointer;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover { background: #000; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn.quiet { background: var(--tone); color: var(--ink); }
.btn.quiet:hover { background: var(--tone-2); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn.light { background: var(--inverse); color: var(--ink); }
.btn.light:hover { background: var(--tone); }

/* ---------- state chip (a word, not a badge) ---------- */
.state { font-weight: 700; }
.state.is-full, .state.is-closed { color: var(--danger); }
.state.is-past { color: var(--muted); }

/* ---------- seats ---------- */
.seats-track { height: 10px; background: var(--tone); overflow: hidden; }
.seats-fill { height: 100%; width: 0; background: var(--ink); transition: width .6s var(--ease); }

/* ---------- guest name blocks: ten colours, picked from the name ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 14px; font-weight: 700; color: var(--ink); background: var(--surface); }
.chip small { font-size: 12px; font-weight: 700; background: var(--ink); color: var(--inverse); padding: 2px 7px; }
.chip.c0 { background: #f7d6c4; } .chip.c1 { background: #f5e3a6; } .chip.c2 { background: #d5e8b8; }
.chip.c3 { background: #bfe6d2; } .chip.c4 { background: #bfe1ec; } .chip.c5 { background: #cbd7f5; }
.chip.c6 { background: #ddd0f2; } .chip.c7 { background: #f3cde2; } .chip.c8 { background: #f5c9c9; }
.chip.c9 { background: #e3d9c6; }
.chip.you { background: var(--ink); color: var(--inverse); }
.chip.you small { background: var(--inverse); color: var(--ink); }
.chip { white-space: nowrap; }
/* On a phone the list shows one line; a caret opens the rest when there are more names. */
.chips-wrap { display: flex; gap: 8px; align-items: flex-start; }
.chips-wrap .chips { flex: 1; min-width: 0; }
.chips-toggle { display: none; flex: none; width: 44px; height: var(--line, 44px); min-height: 40px; place-items: center; background: var(--ink); color: var(--inverse); border: 0; border-radius: 0; cursor: pointer; }
.chips-toggle svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.chips-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 640px) {
  .chips-wrap.clamped .chips { max-height: var(--line, 44px); overflow: hidden; }
  .chips-wrap.has-more .chips-toggle { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .chips-toggle svg { transition: none; } }

/* ---------- footer ---------- */
.foot { background: #000; color: var(--inverse); margin-top: clamp(96px, 14vw, 180px); }
.foot .wrap { padding-top: clamp(48px, 7vw, 88px); padding-bottom: 40px; display: grid; gap: 40px; grid-template-columns: 1.4fr 1fr; align-items: end; }
.foot .sign { font-size: clamp(28px, 4.4vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-weight: 600; justify-items: start; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .imprint { grid-column: 1 / -1; color: #b9b7b1; font-size: 14px; }
@media (max-width: 720px) { .foot .wrap { grid-template-columns: 1fr; } }

/* ---------- entrances: content is visible without script ---------- */
.js .rise { opacity: 0; transform: translateY(20px); }
.js .rise.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .rise.in { opacity: 1; transform: none; transition: none; }
  .btn, .seats-fill { transition: none; }
}

/* ---------- loading: skeletons for content, spinners for actions ---------- */
/* A skeleton is flat tone in the shape of what is coming; it pulses slowly, never sweeps. */
.sk { display: block; background: var(--tone); animation: sk-pulse 1.4s ease-in-out infinite; }
.sk-line { height: 14px; margin: 6px 0; }
.sk-title { height: 30px; margin: 4px 0 12px; }
.sk-chip { display: inline-block; height: 40px; }
.sk-box { width: 100%; height: 100%; }
.sk-group { display: grid; gap: 4px; align-content: start; }
@keyframes sk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* A ring in the button's own text colour, so it works on black and quiet buttons alike. */
.spinner {
  display: inline-block; flex: none; width: 16px; height: 16px;
  border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-busy[disabled] { opacity: 1; cursor: progress; }
/* Phone guest lists show one line, so their skeleton does too. */
@media (max-width: 640px) { [aria-busy] .chips { max-height: 40px; overflow: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .sk, .spinner { animation: none; }
}
