/* =========================================================
   ATTENTION AGENTS · Holder Crates
   base.css: tokens, reset, type, layout, header, buttons
   ========================================================= */

:root {
  /* Surfaces: built around the project's own theme colour #130e22 */
  --bg: #130e22;
  --bg-deep: #0e0a1a;
  --panel: #1a132d;
  --panel-2: #211839;
  --line: #33274e;
  --line-2: #4a3a6d;

  /* Text */
  --text: #f6f0ff;
  --muted: #c3b7dc;
  --dim: #9a8db8;

  /* Cafe lights */
  --sign: #ff5fae;      /* neon sign pink: primary accent */
  --sign-soft: rgba(255, 95, 174, 0.16);
  --amber: #ffc25c;     /* counter lamp / focus */
  --cyan: #59e6f2;      /* monitor glow */
  --lime: #b9f36c;

  /* Tier lights */
  --copper: #e48a5a;
  --bronze: #cf9f5e;
  --silver: #d3dae6;
  --gold: #ffd36a;
  --platinum: #e4f6ff;

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --gutter: clamp(18px, 4vw, 40px);
  --maxw: 1200px;
  --header-h: 68px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* soft light spill, like booth lights bouncing off the cafe walls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 8% -10%, rgba(255, 95, 174, .12), transparent 60%),
    radial-gradient(50vw 50vh at 100% 110%, rgba(255, 194, 92, .07), transparent 60%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: .92em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--amber);
  color: #1a1206;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Layout ---------- */
.container {
  width: min(var(--maxw), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.section {
  padding-block: clamp(72px, 9vw, 124px);
  position: relative;
}
.section + .section { border-top: 1px solid rgba(74, 58, 109, .35); }

.section-head { max-width: 640px; }
.section-head > p { color: var(--muted); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px 22px; margin-top: 28px;
}
.fine { font-size: .9rem; color: var(--dim); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
}
.eyebrow__led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sign);
  box-shadow: 0 0 10px var(--sign);
}
.booth-no {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(26, 19, 45, .7);
}

.text-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sign);
  text-decoration-thickness: 2px;
}
.text-link:hover { color: var(--sign); }

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h);
  padding: 0 22px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--sign);
  color: #1b0716;
  box-shadow: 0 0 0 1px rgba(255,95,174,.4), 0 8px 28px -8px rgba(255, 95, 174, .7);
}
.btn--primary:hover {
  background: #ff7cbe;
  box-shadow: 0 0 0 1px rgba(255,95,174,.6), 0 10px 34px -6px rgba(255, 95, 174, .85);
}
.btn--ghost {
  background: rgba(26, 19, 45, .6);
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--sign); color: #fff; }
.btn--sm { --btn-h: 42px; padding: 0 16px; font-size: .94rem; border-radius: 10px; }
.btn--lg { --btn-h: 56px; padding: 0 26px; font-size: 1.06rem; }

/* ---------- Status pills (text + icon, never colour alone) ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  white-space: nowrap;
}
.status-pill__icon { font-size: .7rem; line-height: 1; }
.status-pill--locked { color: var(--amber); border-color: rgba(255, 194, 92, .45); }
.status-pill--demo { color: var(--cyan); border-color: rgba(89, 230, 242, .4); }
.status-pill--resolved { color: var(--lime); border-color: rgba(185, 243, 108, .45); }

/* ---------- Booth lights strip (each agent brain sets a booth light colour) ---------- */
.booth-lights {
  display: flex; justify-content: center; gap: clamp(14px, 3vw, 40px);
  padding: 14px var(--gutter);
  pointer-events: none;
}
.booth-lights span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c, var(--sign));
  box-shadow: 0 0 12px 1px var(--c, var(--sign));
  opacity: .85;
}
.booth-lights span:nth-child(12n+1) { --c: var(--sign); }
.booth-lights span:nth-child(12n+2) { --c: var(--cyan); }
.booth-lights span:nth-child(12n+3) { --c: var(--amber); }
.booth-lights span:nth-child(12n+4) { --c: var(--lime); }
.booth-lights span:nth-child(12n+5) { --c: #a98bff; }
.booth-lights span:nth-child(12n+6) { --c: #ff7a59; }
.booth-lights span:nth-child(12n+7) { background: transparent; box-shadow: none; border: 1.5px solid var(--line-2); } /* empty seat */
.booth-lights span:nth-child(12n+8) { --c: #5ff2b0; }
.booth-lights span:nth-child(12n+9) { --c: var(--sign); }
.booth-lights span:nth-child(12n+10) { --c: #ffe08a; }
.booth-lights span:nth-child(12n+11) { --c: var(--cyan); }
.booth-lights span:nth-child(12n+12) { --c: #ff9bd0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(19, 14, 34, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background-color .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(19, 14, 34, .94); }
.header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.brand__logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--panel-2);
  box-shadow: 0 0 0 1px var(--line-2);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .02em;
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sign);
  margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 22px; }
.nav__list { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav__list a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav__list a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav__list a[aria-current="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--sign); border-radius: 8px 8px 0 0; }
.nav__ext { color: var(--amber) !important; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: 10px;
  border: 1.5px solid var(--line-2);
  background: var(--panel);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle__bars { display: grid; gap: 5px; }
.nav-toggle__bars span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav__list a { padding: 8px 9px; font-size: .9rem; }
  .nav { gap: 12px; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 18px var(--gutter) 26px;
    background: rgba(14, 10, 26, .98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__list a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid rgba(74,58,109,.3); border-radius: 0; }
  .nav .btn { width: 100%; --btn-h: 52px; }
}

@media (max-width: 420px) {
  .brand__name { font-size: .9rem; }
  .brand__logo { width: 32px; height: 32px; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
