:root {
  --ink: #ece7dc;
  --muted: #9a9488;
  --bg: #0e1012;
  --bg-soft: #16191d;
  --paper: #1c2026;
  --line: rgba(236, 231, 220, 0.12);
  --accent: #c9a227;
  --accent-deep: #a68419;
  --accent-bar: #e8d48b;
  --on-accent: #12100a;
  --font: 'Anuphan', sans-serif;
  --heading: 'Prompt', 'Anuphan', sans-serif;
  --mono: 'IBM Plex Mono', 'Anuphan', monospace;
  --max: 1040px;
  --demo-h: 48px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  font-synthesis: none;
  background:
    radial-gradient(ellipse 45% 35% at 80% 0%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 30% at 10% 100%, rgba(201, 162, 39, 0.05), transparent 50%),
    linear-gradient(180deg, #12151a 0%, var(--bg) 40%, #0a0c0e 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; font-size: 16px; }
ul { list-style: none; }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.demo-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; padding: 0.55rem 1.25rem;
  background: #050607; color: #fff; font-size: 0.82rem;
}
.demo-bar strong {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--accent-bar); font-weight: 500;
}
.demo-bar__actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.demo-bar a {
  padding: 0.35rem 0.7rem; border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius); font-size: 0.78rem; font-weight: 500;
}
.demo-bar a.is-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.site-header {
  position: sticky; top: var(--demo-h); z-index: 50;
  background: rgba(14, 16, 18, 0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); position: relative;
}
.brand {
  font-family: var(--heading); font-weight: 700; font-size: 1.25rem;
  display: inline-flex; align-items: baseline; gap: 0.45rem;
}
.brand small {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); font-weight: 500;
}
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  padding: 0.45rem 0.8rem; cursor: pointer; border-radius: var(--radius); color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 1.15rem; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav-cta {
  background: var(--accent); color: var(--on-accent) !important;
  padding: 0.55rem 1.05rem; border-radius: var(--radius); font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.4rem; font-weight: 700; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,0.4); background: transparent; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero {
  position: relative; min-height: min(90dvh, 820px);
  display: flex; align-items: flex-end; color: #fff; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: ken 22s var(--ease) both; filter: brightness(0.78) saturate(0.9);
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(8, 9, 11, 0.94) 0%, rgba(8, 9, 11, 0.62) 48%, rgba(8, 9, 11, 0.3) 100%);
}
.hero__fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.scan {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.55), transparent);
  animation: scanMove 5.5s linear infinite;
}
.ticket-edge {
  position: absolute; right: 8%; top: 18%; bottom: 22%; width: 1px;
  background: repeating-linear-gradient(180deg, rgba(201,162,39,0.5) 0 8px, transparent 8px 16px);
  opacity: 0.5;
}
.hero__inner {
  position: relative; z-index: 2; padding: 5rem 0 3.5rem; max-width: 38rem;
  margin-left: max(calc((100% - var(--max)) / 2), 1.25rem);
  width: min(100% - 2.5rem, 38rem);
  animation: rise 0.9s var(--ease) both;
}
.hero__brand {
  font-family: var(--heading); font-size: 1.25rem; font-weight: 700;
  margin-bottom: 1rem; display: flex; gap: 0.5rem; align-items: baseline;
}
.hero__brand span {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-bar);
}
.hero h1 {
  font-family: var(--heading); font-size: clamp(2.15rem, 5vw, 3.35rem);
  line-height: 1.18; letter-spacing: -0.02em; margin-bottom: 0.9rem;
}
.hero h1 em {
  display: block; font-style: normal; color: var(--accent-bar);
  font-size: 0.72em; margin-top: 0.25rem;
}
.hero__lead { color: rgba(255,255,255,0.84); margin-bottom: 1.5rem; }

@keyframes ken { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes scanMove {
  0% { top: 12%; opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.5; }
  100% { top: 82%; opacity: 0; }
}

.section { padding: 4.5rem 0; }
.section--soft { background: var(--bg-soft); }
.section--ink { background: #050607; }
.section__head { margin-bottom: 2.25rem; max-width: 38rem; }
.section__head h2 {
  font-family: var(--heading); font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 0.5rem;
}
.section__head p { color: var(--muted); }
.eyebrow {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem;
}
.eyebrow.light { color: var(--accent-bar); }
.mono { font-family: var(--mono); letter-spacing: 0.04em; }

/* UNIT DOCKET — appointment slip */
.docket {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.5rem; align-items: stretch;
}
.slip {
  background: var(--paper);
  border: 1px solid rgba(201, 162, 39, 0.35);
  display: flex; flex-direction: column;
  background-image:
    radial-gradient(circle at 0 50%, transparent 10px, var(--paper) 11px),
    radial-gradient(circle at 100% 50%, transparent 10px, var(--paper) 11px);
  background-size: 100% 100%;
}
.slip__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.35rem; border-bottom: 1px dashed rgba(201, 162, 39, 0.35);
}
.slip__brand {
  font-family: var(--heading); font-weight: 700; letter-spacing: 0.08em;
}
.slip__no {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--accent-bar); text-transform: uppercase;
}
.slip__body { padding: 1.5rem 1.35rem; flex: 1; }
.slip__label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.45rem;
}
.slip h3 {
  font-family: var(--heading); font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.25; margin-bottom: 1.25rem;
}
.slip__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem;
}
.slip__meta dt {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem;
}
.slip__meta dd { font-weight: 600; }
.slip__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.35rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.slip__foot a { color: var(--accent-bar); font-weight: 600; }
.docket__side {
  position: relative; border: 1px solid var(--line); overflow: hidden; min-height: 280px;
}
.docket__side img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.docket__side p {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.7rem 1rem; background: rgba(5, 6, 7, 0.88);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
}

/* UNIT STACK — vertical viewing list */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.filter {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 0.45rem 0.9rem; cursor: pointer; border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.filter.is-active, .filter:hover {
  border-color: var(--accent); color: var(--accent-bar); background: rgba(201, 162, 39, 0.08);
}
.stack {
  display: grid; gap: 0; border: 1px solid var(--line); background: var(--paper);
}
.unit {
  display: grid; grid-template-columns: 5.5rem 1.4fr auto auto;
  gap: 1rem; align-items: center;
  padding: 1.05rem 1.2rem; border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}
.unit:last-child { border-bottom: none; }
.unit:hover { background: rgba(201, 162, 39, 0.06); }
.unit[hidden] { display: none; }
.unit__code {
  font-family: var(--mono); font-size: 0.78rem; color: var(--accent-bar); font-weight: 500;
}
.unit__body strong {
  font-family: var(--heading); font-size: 1.05rem; display: block; line-height: 1.25;
}
.unit__body small { color: var(--muted); font-size: 0.85rem; }
.unit__tag {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; border: 1px solid rgba(201, 162, 39, 0.35);
  padding: 0.25rem 0.45rem; color: var(--accent-bar);
}
.unit__price { font-family: var(--heading); font-weight: 700; font-size: 1.05rem; }
.stack-media {
  margin-top: 1.75rem; border: 1px solid var(--line); overflow: hidden;
}
.stack-media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.slots {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line);
}
.slot {
  padding: 1.4rem 1.15rem; border-right: 1px solid var(--line);
  display: grid; gap: 0.35rem; background: var(--paper);
  transition: background 0.2s var(--ease);
}
.slot:last-child { border-right: none; }
.slot:hover { background: rgba(201, 162, 39, 0.08); }
.slot__day {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.slot strong {
  font-family: var(--heading); font-size: 1.85rem; letter-spacing: -0.02em;
}
.slot small { color: var(--muted); font-size: 0.85rem; }

.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2.5rem; align-items: start; }
.contact h2 {
  font-family: var(--heading); font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 0.6rem;
}
.contact > .reveal > p { color: rgba(236, 231, 220, 0.72); }
.form {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(201, 162, 39, 0.28);
  padding: 1.5rem; display: grid; gap: 1rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-bar);
}
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.16);
  color: var(--ink); padding: 0.75rem 0.85rem; border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 96px; }
.field option { color: #12100a; }

.site-footer {
  border-top: 1px solid var(--line); padding: 1.5rem 0; background: #050607;
}
/* Voice slips — ticket / docket */
.voice-slips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.voice-slip {
  margin: 0;
  padding: 1.15rem 1.05rem 1rem;
  border: 1px dashed var(--line);
  background: var(--slip-bg, var(--bg-soft, var(--paper, var(--panel, var(--dust, transparent)))));
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
.voice-slip:nth-child(2n) { transform: rotate(0.45deg); }
.voice-slip:nth-child(2n+1) { transform: rotate(-0.4deg); }
.voice-slip__no {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.voice-slip p {
  font-family: var(--heading, var(--display, inherit));
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.voice-slip figcaption {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0;
  margin-top: auto;
}
@media (max-width: 900px) {
  .voice-slips {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
  }
  .voice-slip {
    flex: 0 0 min(78vw, 16.5rem);
    scroll-snap-align: start;
    transform: none;
  }
}

.footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted);
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }


@media (max-width: 900px) {
  .docket, .contact { grid-template-columns: 1fr; }
  .slots { grid-template-columns: 1fr 1fr; }
  .slot:nth-child(2) { border-right: none; }
  .slot:nth-child(1), .slot:nth-child(2) { border-bottom: 1px solid var(--line); }
  .unit {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 1rem;
  }
  .unit__body { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border: 1px solid var(--line); padding: 0.5rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: 0.35rem; }
  .field-row, .slip__meta, .slots { grid-template-columns: 1fr; }
  .slot { border-right: none; border-bottom: 1px solid var(--line); }
  .slot:last-child { border-bottom: none; }
  .hero__inner { margin-left: 1.25rem; }
  .stack-media img { aspect-ratio: 16 / 10; }
}
