:root {
  --paper: #f3f2ee;
  --paper-2: #e9e7e1;
  --white: #fbfbf9;
  --ink: #121212;
  --ink-2: #3b3b38;
  --muted: #6d6c67;
  --rule: rgba(18, 18, 18, 0.14);
  --rule-strong: rgba(18, 18, 18, 0.85);
  --signal: #d4441c;
  --pass: #1d7a4b;
  --night: #121212;
  --night-2: #1c1c1a;
  --font-sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 64px;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

p { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

figure { margin: 0; }

code { font-family: var(--font-mono); font-size: 0.9em; }

::selection { background: var(--ink); color: var(--paper); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.logo-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}
.logo-mark::before {
  content: "78";
  position: absolute;
  top: 1px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 0.45rem;
  font-weight: 500;
  letter-spacing: 0;
}

.logo-name { font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; }

.nav-desktop {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.nav-desktop a {
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a.active { color: var(--ink); border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  content: "";
  transition: transform 0.2s;
}
.nav-toggle span { top: 15px; }
.nav-toggle span::before { left: 0; right: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(-7px) rotate(-90deg); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--rule);
  padding-block: 0.5rem 1.25rem;
}
.nav-mobile a {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.nav-mobile .btn { margin-top: 1rem; width: 100%; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.15rem;
  border-radius: var(--r);
  border: 1px solid var(--ink);
  font: 500 0.9rem/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.btn-sm { height: 36px; padding: 0 0.9rem; font-size: 0.85rem; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2a2a28; }

.btn-ghost,
.btn-secondary { background: transparent; color: var(--ink); }
.btn-ghost:hover,
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: #fff; }

.btn-outline-light { background: transparent; color: var(--paper); border-color: rgba(243, 242, 238, 0.4); }
.btn-outline-light:hover { border-color: var(--paper); }

.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Media at native aspect ratios */
.ratio {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--paper-2);
}
.ratio > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-2-3 { aspect-ratio: 2 / 3; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-21-9 { aspect-ratio: 21 / 9; }

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 4.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.hero-kicker {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  color: var(--muted);
}
.hero-kicker span::before { content: "— "; color: var(--signal); }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  max-width: 11ch;
}

.hero-lead {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--ink-2);
}

.hero-search {
  margin-top: 2rem;
  max-width: 520px;
}
.hero-search label { display: block; margin-bottom: 0.5rem; color: var(--muted); }

.search-field {
  display: flex;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--white);
  overflow: hidden;
}
.search-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 1rem;
  height: 52px;
  font: 500 0.95rem var(--font-mono);
  color: var(--ink);
}
.search-field input:focus { outline: none; }
.search-field:focus-within { box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.12); }
.search-field .btn { height: 52px; border: 0; border-left: 1px solid var(--ink); border-radius: 0; }

.hero-search .hint { margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.hero-search .hint a { color: var(--ink); font-family: var(--font-mono); font-size: 0.82rem; }

/* COA document mock */
.doc {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(18, 18, 18, 0.25);
  font-size: 0.82rem;
  transform: rotate(0.6deg);
}

.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1.5px solid var(--ink);
}
.doc-head strong { display: block; font-size: 0.95rem; color: var(--ink); letter-spacing: -0.01em; }
.doc-head .mono { color: var(--muted); font-size: 0.65rem; }

.doc-stamp {
  flex-shrink: 0;
  border: 1.5px solid var(--pass);
  color: var(--pass);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font: 600 0.65rem var(--font-mono);
  letter-spacing: 0.08em;
  transform: rotate(-4deg);
}

.doc-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
}
.doc-meta div { padding: 0.7rem 1.25rem; }
.doc-meta div + div { border-left: 1px solid var(--rule); }
.doc-meta dt { font: 0.62rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.doc-meta dd { margin: 0.15rem 0 0; font: 500 0.8rem var(--font-mono); color: var(--ink); }

.doc-chart { padding: 1rem 1.25rem 0.5rem; border-bottom: 1px solid var(--rule); }
.doc-chart svg { width: 100%; height: auto; display: block; }
.doc-chart .mono { color: var(--muted); font-size: 0.6rem; display: flex; justify-content: space-between; padding-top: 0.25rem; }

.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th,
.doc-table td { padding: 0.6rem 1.25rem; text-align: left; }
.doc-table th { font: 0.62rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 400; }
.doc-table td { border-top: 1px solid var(--rule); color: var(--ink); }
.doc-table td:last-child,
.doc-table th:last-child { text-align: right; }
.doc-table .num { font-family: var(--font-mono); }
.ok { color: var(--pass); font-family: var(--font-mono); font-weight: 600; }

.doc-foot {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 0.62rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Figures strip */
.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}
.figure { padding: 1.5rem 1.5rem 1.6rem 0; }
.figure + .figure { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.figure b {
  display: block;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}
.figure span { display: block; margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); }

/* Sections */
.section { padding-block: clamp(4rem, 9vw, 7rem); }

.section-head {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head .mono { color: var(--muted); padding-top: 0.55rem; }
.section-head .mono b { color: var(--signal); font-weight: 500; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); max-width: 18ch; }
.section-head p { margin-top: 1rem; max-width: 56ch; color: var(--muted); }

.wide-photo { margin-top: 0; }

/* Testing menu table */
.menu-table { width: 100%; border-collapse: collapse; }
.menu-table thead th {
  text-align: left;
  font: 400 0.7rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0 1rem 0.75rem 0;
  border-bottom: 1px solid var(--rule-strong);
}
.menu-table td {
  padding: 1.05rem 1rem 1.05rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.menu-table tbody tr { transition: background 0.15s; }
.menu-table tbody tr:hover { background: var(--white); }
.menu-table .idx { width: 3.5rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); padding-left: 0.25rem; }
.menu-table .ic { width: 2.5rem; color: var(--ink); }
.menu-table .ic svg { width: 20px; height: 20px; display: block; }
.menu-table .name { font-weight: 500; color: var(--ink); font-size: 1rem; }
.menu-table .method { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); }
.menu-table .out { color: var(--muted); font-size: 0.925rem; }
.menu-table td:last-child,
.menu-table th:last-child { text-align: right; padding-right: 0.25rem; }

.chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font: 500 0.68rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.chip-core { border-color: var(--ink); color: var(--ink); background: var(--white); }

.note {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--signal);
  background: var(--white);
  font-size: 0.925rem;
}
.note strong { color: var(--ink); }

/* Process */
.process {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .n { font: 500 0.8rem var(--font-mono); color: var(--signal); padding-top: 0.3rem; }
.steps h3 { font-size: 1.35rem; }
.steps p { margin-top: 0.5rem; color: var(--muted); max-width: 46ch; }
.process-media { margin: 0; position: sticky; top: calc(var(--header-h) + 1.5rem); }

/* Facility gallery */
.section-night { background: var(--night); color: #b9b8b2; }
.section-night h2 { color: var(--paper); }
.section-night .section-head p,
.section-night .section-head .mono,
.section-night figcaption { color: #8d8c86; }
.section-night .ratio { background: var(--night-2); }

.gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* CTA */
.cta {
  border-top: 1px solid var(--rule-strong);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta h2 { font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -0.04em; max-width: 14ch; }

/* Inner pages */
.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.page-head .mono { color: var(--muted); margin-bottom: 1rem; display: block; }
.page-head .mono b { color: var(--signal); font-weight: 500; }
.page-head h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); letter-spacing: -0.045em; }
.page-head p { margin-top: 1rem; max-width: 52ch; color: var(--muted); font-size: 1.05rem; }

.page-body { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(4rem, 8vw, 6rem); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.panel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.panel + .panel { margin-top: 1.25rem; }
.panel h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule-strong);
  margin-bottom: 2rem;
}
.contact-grid div { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule); }
.contact-grid div:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--rule); }
.contact-grid dt { color: var(--muted); }
.contact-grid dd { margin: 0.3rem 0 0; color: var(--ink); }
.contact-grid a { text-decoration: none; }
.contact-grid a:hover { text-decoration: underline; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; color: var(--muted); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--ink); background: #fff; }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-hint { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }

.checklist { list-style: none; margin: 1rem 0 1.5rem; padding: 0; }
.checklist li {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.925rem;
}
.checklist li::before { content: "✓"; color: var(--pass); font-family: var(--font-mono); }

.aside-stack { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }

/* Footer */
.site-footer {
  background: var(--night);
  color: #8d8c86;
  padding-block: 3.5rem 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(243, 242, 238, 0.12);
}
.site-footer .logo { color: var(--paper); }
.site-footer address { font-style: normal; margin-top: 1.25rem; line-height: 1.7; }
.site-footer a { color: #c9c8c2; text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.site-footer h4 { color: #8d8c86; margin-bottom: 1rem; font-weight: 400; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero h1 { max-width: 13ch; }
  .doc { transform: none; max-width: 620px; }
  .section-head { grid-template-columns: 1fr; gap: 0.75rem; }
  .section-head .mono { padding-top: 0; }
  .process { grid-template-columns: 1fr; }
  .process-media { position: static; }
  .process-media .ratio { aspect-ratio: 3 / 2; }
  .split { grid-template-columns: 1fr; }
  .aside-stack { position: static; }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-inner > .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-mobile.open { display: block; }

  .figures { grid-template-columns: 1fr 1fr; }
  .figure:nth-child(3) { padding-left: 0; border-left: 0; }
  .figure:nth-child(n + 3) { border-top: 1px solid var(--rule); }

  .ratio-wide { aspect-ratio: 3 / 2; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  /* Table → stacked rows */
  .menu-table thead { display: none; }
  .menu-table,
  .menu-table tbody,
  .menu-table tr,
  .menu-table td { display: block; }
  .menu-table tr {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    row-gap: 0.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .menu-table td { padding: 0; border: 0; }
  .menu-table .idx { display: none; }
  .menu-table .ic { grid-row: 1 / span 3; width: auto; padding-top: 0.15rem; }
  .menu-table .name { grid-column: 2; }
  .menu-table .method { grid-column: 2; }
  .menu-table .out { grid-column: 2; }
  .menu-table td:last-child { grid-column: 3; grid-row: 1; text-align: right; padding: 0; }
}

@media (max-width: 560px) {
  .hero-kicker { gap: 0.5rem 1rem; }
  .figure { padding: 1.25rem 1rem 1.25rem 0; }
  .figure + .figure { padding-left: 1rem; }
  .figure:nth-child(3) { padding-left: 0; }
  .figure b { font-size: 1.6rem; }
  .search-field { flex-direction: column; }
  .search-field .btn { border-left: 0; border-top: 1px solid var(--ink); width: 100%; }
  .doc-meta { grid-template-columns: 1fr 1fr; }
  .doc-meta div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); }
  .doc-table th, .doc-table td { padding-inline: 0.9rem; }
  .doc-head, .doc-chart, .doc-foot { padding-inline: 0.9rem; }
  .doc-table .hide-sm { display: none; }
  .gallery-pair { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid div:nth-child(even) { padding-left: 0; border-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .cta .actions { width: 100%; }
  .cta .actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Form status + spam honeypot */
.toast-ok { color: var(--pass); }
.toast-err { color: var(--signal); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
