:root {
  --ink: #ece7dc;
  --muted: #9a9488;
  --bg: #10120f;
  --bg-soft: #181b16;
  --paper: #1e221b;
  --line: rgba(236, 231, 220, 0.12);
  --accent: #c9a227;
  --accent-deep: #a68419;
  --accent-bar: #e8d48b;
  --moss: #6f9b6a;
  --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(111, 155, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #151812 0%, var(--bg) 40%, #0a0c09 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; }
.mono { font-family: var(--mono); letter-spacing: 0.04em; }

.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: #050605; 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(16, 18, 15, 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.72) saturate(0.85);
}
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(8, 10, 7, 0.94) 0%, rgba(8, 10, 7, 0.62) 48%, rgba(8, 10, 7, 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: #050605; }
.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); }

/* GATE DOCKET — entry 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.35rem; flex: 1; }
.slip__label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--moss); margin-bottom: 0.45rem;
}
.slip__body h3 {
  font-family: var(--heading); font-size: 1.45rem; line-height: 1.25;
  margin-bottom: 1.15rem;
}
.slip__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.25rem;
}
.slip__meta dt {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem;
}
.slip__meta dd { font-weight: 500; }
.slip__foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.35rem; border-top: 1px dashed rgba(201, 162, 39, 0.35);
  font-size: 0.88rem; color: var(--muted);
}
.slip__foot a { font-weight: 700; color: var(--accent-bar); }
.docket__side {
  display: grid; gap: 0.75rem; align-content: start;
}
.docket__side img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border: 1px solid var(--line); filter: brightness(0.85) saturate(0.9);
}
.docket__side p {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* CROP STACK */
.crop-stack {
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.crop {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 1rem; align-items: center;
  padding: 1.15rem 0.25rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.crop:hover {
  background: rgba(201, 162, 39, 0.06);
  padding-left: 0.5rem;
}
.crop__code { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.08em; }
.crop__body strong {
  display: block; font-family: var(--heading); font-size: 1.1rem; margin-bottom: 0.15rem;
}
.crop__body small { color: var(--muted); font-size: 0.88rem; }
.crop__slot {
  font-family: var(--mono); font-size: 0.85rem; color: var(--accent-bar);
  letter-spacing: 0.04em;
}

.slots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.slot {
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.slot:hover { border-color: rgba(201, 162, 39, 0.5); transform: translateY(-2px); }
.slot--hot {
  border-color: rgba(201, 162, 39, 0.55);
  background: linear-gradient(160deg, rgba(201, 162, 39, 0.12), var(--paper));
}
.slot .mono {
  display: block; color: var(--accent); font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.slot strong {
  display: block; font-family: var(--heading); font-size: 1.2rem; margin-bottom: 0.35rem;
}
.slot p { color: var(--muted); font-size: 0.92rem; }

.book-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start;
}
.contact-ids { margin: 1rem 0 1.25rem; color: var(--muted); }
.book-photo img {
  width: 100%; aspect-ratio: 3/2; object-fit: cover;
  border: 1px solid var(--line); filter: brightness(0.8);
}
.book-form {
  background: var(--paper); border: 1px solid rgba(201, 162, 39, 0.28);
  padding: 1.5rem; display: grid; gap: 1rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); background: #12150f;
  padding: 0.75rem 0.85rem; border-radius: var(--radius); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 5rem; }

.site-footer {
  background: #050605; color: rgba(236, 231, 220, 0.8); padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--line);
}
.site-footer .brand { color: #fff; }
.site-footer .brand small { color: var(--accent); }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem;
}
.footer__lede { margin-top: 0.65rem; color: var(--muted); max-width: 22rem; }
.footer__grid h4 {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.footer__grid a { display: block; margin-bottom: 0.4rem; font-size: 0.92rem; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(236, 231, 220, 0.4);
}

.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, .slots, .book-split, .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 0.75rem 1.25rem 1rem; gap: 0.35rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.65rem 0.25rem; }
  .nav-cta { text-align: center; }
  .hero__inner { margin-left: 1.25rem; }
  .crop { grid-template-columns: 3.5rem 1fr; }
  .crop__slot { grid-column: 2; justify-self: start; }
  .slip__meta { grid-template-columns: 1fr; }
}
