/* M1 CACAO — Verified from Origin to Batch™ */

:root {
  --bg: #faf6f3;
  --surface: #f5ece5;
  --ink: #2b1703;
  --ink-soft: #3c3835;
  --clay: #66615a;
  --stone: #85827e;
  --accent: #bc773f;
  --sand: #dec9b8;
  --line: rgba(43, 23, 3, 0.14);
  --line-light: rgba(250, 246, 243, 0.16);
  --dark: #2b1703;
  --dark-2: #1e0f02;
  --light: #faf6f3;
  --sans: "Space Grotesk", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.33, 0, 0.66, 1);
  --pad: clamp(20px, 6vw, 72px);
}

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

html { scroll-behavior: smooth; }
@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(--sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dim { color: var(--stone); }
.dark .dim { color: rgba(250, 246, 243, 0.5); }

.container { max-width: 1280px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--light); padding: 12px 20px;
}
.skip-link:focus { left: 0; }

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(250, 246, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--pad);
  height: 64px;
  display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; margin-right: auto; }
.brand-mark {
  font-family: var(--mono); font-weight: 500; font-size: 0.95rem;
  background: var(--ink); color: var(--light);
  padding: 2px 7px; letter-spacing: 0.04em;
}
.brand-word { font-weight: 500; letter-spacing: 0.28em; font-size: 0.85rem; }
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  text-decoration: none; font-size: 0.85rem; color: var(--ink-soft);
  padding: 8px 0; position: relative;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { width: 100%; }
.header-status { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-nav {
  display: none; flex-direction: column; border-top: 1px solid var(--line);
  background: var(--bg); padding: 8px var(--pad) 24px;
}
.mobile-nav:not([hidden]) { display: flex; }
.mobile-nav a { text-decoration: none; padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); min-height: 44px; }
.mobile-nav a:last-child { border-bottom: 0; color: var(--accent); font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.06em; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--dark-2); color: var(--light);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("/assets/hero-macro.jpg") center 40% / cover no-repeat;
  opacity: 0.5;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30, 15, 2, 0.92) 0%, rgba(30, 15, 2, 0.35) 55%, rgba(30, 15, 2, 0.55) 100%);
}
.hero-content { position: relative; padding-top: 96px; padding-bottom: 120px; }
.eyebrow { color: var(--accent); margin-bottom: 24px; }
.hero-title {
  font-weight: 300; letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 7.5vw, 5.5rem);
  line-height: 1.04; max-width: 14ch;
}
.hero-sub {
  margin-top: 28px; max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(250, 246, 243, 0.82); font-weight: 300;
}
.hero-actions { margin-top: 44px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 34px;
  text-decoration: none; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary { background: var(--light); color: var(--ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--accent); color: var(--light); }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent); border: 1px solid rgba(188, 119, 63, 0.45);
  padding: 10px 18px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-meta {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 22px;
  color: rgba(250, 246, 243, 0.45);
  border-top: 1px solid var(--line-light);
}

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 14vw, 200px) 0; position: relative; scroll-margin-top: 64px; }
.section.dark { background: var(--dark); color: var(--light); }
.section-head { max-width: 720px; margin-bottom: clamp(56px, 8vw, 96px); }
.section-index { color: var(--stone); margin-bottom: 20px; }
.dark .section-index { color: rgba(250, 246, 243, 0.4); }
h2 {
  font-weight: 300; letter-spacing: -0.015em;
  font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.12;
}
.section-lede { margin-top: 28px; max-width: 58ch; font-size: 1.05rem; color: var(--clay); }
.dark .section-lede { color: rgba(250, 246, 243, 0.75); }

/* Question */
.question { background: var(--bg); }
.question-title {
  font-weight: 300; letter-spacing: -0.02em;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem); line-height: 1.08;
  max-width: 18ch;
}
.question-body { margin-top: 40px; max-width: 52ch; color: var(--clay); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.question-figure { margin-top: clamp(56px, 8vw, 96px); }
.question-figure img { width: 100%; height: auto; display: block; }
.question-figure figcaption { margin-top: 14px; color: var(--stone); }

/* Pillars */
.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.pillar { padding: 36px 28px 44px 0; border-right: 1px solid var(--line); position: relative; }
.pillar + .pillar { padding-left: 28px; }
.pillar:last-child { border-right: 0; }
.pillar-num { position: absolute; top: 36px; right: 28px; color: var(--stone); }
.pillar + .pillar .pillar-num { right: 0; }
.pillar-icon { width: 34px; height: 34px; color: var(--accent); margin-bottom: 28px; }
.pillar h3 {
  font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 14px;
}
.pillar p { font-size: 0.95rem; color: var(--clay); max-width: 30ch; }

/* Traceability */
.trace-chain {
  list-style: none; display: grid; grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light);
}
.trace-chain li {
  padding: 28px 12px 32px 16px;
  border-right: 1px solid var(--line-light);
  display: flex; flex-direction: column; gap: 40px;
  position: relative;
}
.trace-chain li:last-child { border-right: 0; }
.trace-chain li::after {
  content: ""; position: absolute; top: 34px; right: -4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); z-index: 1;
}
.trace-chain li:last-child::after { right: auto; left: -4px; }
.trace-step { color: rgba(250, 246, 243, 0.4); }
.trace-name { font-weight: 400; font-size: clamp(0.85rem, 1.3vw, 1.05rem); letter-spacing: 0.02em; }
.trace-note {
  margin-top: 48px; max-width: 62ch;
  color: rgba(250, 246, 243, 0.6); font-size: 0.95rem;
  border-left: 2px solid var(--accent); padding-left: 20px;
}

/* Passport */
.passport-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 7vw, 110px); align-items: start;
}
.passport-copy > p { margin-top: 24px; max-width: 52ch; color: var(--clay); }
.passport-list {
  list-style: none; margin-top: 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px;
}
.passport-list li {
  padding: 12px 0; font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  position: relative; padding-left: 22px;
}
.passport-list li::before {
  content: ""; position: absolute; left: 0; top: 21px;
  width: 8px; height: 1px; background: var(--accent);
}
.passport-visual { position: sticky; top: 96px; }
.passport-card {
  background: var(--dark); color: var(--light);
  border: 1px solid rgba(43, 23, 3, 0.2);
  box-shadow: 0 30px 60px -30px rgba(43, 23, 3, 0.35);
}
.pc-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--line-light);
}
.pc-badge {
  color: var(--dark); background: var(--accent);
  padding: 4px 10px; white-space: nowrap;
}
.pc-body { padding: 24px; }
.pc-row {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line-light);
}
.pc-key { color: rgba(250, 246, 243, 0.45); width: 88px; flex-shrink: 0; }
.pc-val.skeleton {
  height: 10px; background: rgba(250, 246, 243, 0.18);
  width: 45%; flex-shrink: 0;
}
.pc-val.skeleton.w70 { width: 70%; }
.pc-val.skeleton.w55 { width: 55%; }
.pc-chart {
  margin-top: 28px; height: 120px;
  display: flex; align-items: flex-end; gap: 18px;
  border-bottom: 1px solid var(--line-light); position: relative;
  padding-bottom: 0;
}
.pc-chart span {
  flex: 1; max-width: 46px; height: var(--h);
  background: var(--accent); opacity: 0.85;
}
.pc-chart em {
  position: absolute; bottom: -26px; left: 0;
  font-style: normal; color: rgba(250, 246, 243, 0.4);
}
.pc-qr { margin-top: 64px; display: flex; align-items: center; gap: 20px; }
.pc-qr svg { width: 72px; height: 72px; color: var(--light); }
.pc-qr em { font-style: normal; color: rgba(250, 246, 243, 0.45); }
.passport-visual figcaption { margin-top: 16px; color: var(--stone); }

/* Analytical */
.analyte-grid {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-light);
}
.analyte-grid li {
  padding: 36px 24px 40px; border-right: 1px solid var(--line-light);
  display: flex; flex-direction: column; gap: 20px;
}
.analyte-grid li:last-child { border-right: 0; }
.analyte-sym {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--accent); letter-spacing: 0.02em; text-transform: none;
}
.analyte-name { font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* Suppliers */
.suppliers-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(48px, 7vw, 110px); align-items: start; }
.suppliers-grid h2 { margin-bottom: 28px; }
.suppliers-grid p { max-width: 54ch; color: var(--clay); margin-bottom: 18px; }
.pref-list { list-style: none; margin-top: 12px; }
.pref-list li {
  padding: 11px 0 11px 26px; font-size: 0.97rem;
  border-bottom: 1px solid var(--line); position: relative;
}
.pref-list li::before {
  content: ""; position: absolute; left: 0; top: 20px;
  width: 10px; height: 1.5px; background: var(--accent);
}
.contact-panel {
  background: var(--dark); color: var(--light);
  padding: clamp(28px, 4vw, 48px);
  position: sticky; top: 96px;
}
.contact-panel h3 { color: var(--accent); margin-bottom: 32px; font-weight: 500; }
.contact-block { margin-bottom: 28px; }
.contact-label { display: block; color: rgba(250, 246, 243, 0.5); margin-bottom: 8px; }
.contact-mail {
  font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 300;
  color: var(--light); text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding: 4px 0; min-height: 44px; display: inline-block;
  transition: color 0.25s var(--ease);
  word-break: break-all;
}
.contact-mail:hover, .contact-mail:focus-visible { color: var(--accent); }
/* Closing */
.closing { text-align: left; }
.closing-statement {
  font-size: clamp(2.2rem, 6vw, 4.4rem); font-weight: 300;
  letter-spacing: -0.02em; line-height: 1.12; max-width: 20ch;
}
.closing-statement span { color: rgba(250, 246, 243, 0.45); }
.closing-brand { margin-top: clamp(72px, 10vw, 140px); display: flex; flex-direction: column; gap: 10px; }
.closing-logo { font-size: 1.1rem; font-weight: 500; letter-spacing: 0.3em; }
.closing-brand .mono { color: var(--accent); }
.closing-brand .mono.dim { color: rgba(250, 246, 243, 0.4); }

/* Footer */
.site-footer { background: var(--dark); color: var(--light); padding: 64px 0; border-top: 1px solid var(--line-light); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; }
.footer-brand { font-weight: 500; letter-spacing: 0.3em; margin-bottom: 10px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; }
.footer-contact .mono { margin-top: 10px; }
.footer-contact a { text-decoration: none; border-bottom: 1px solid rgba(188, 119, 63, 0.5); width: fit-content; padding: 2px 0; min-height: 32px; }
.footer-contact a:hover { color: var(--accent); }
.footer-legal { display: flex; flex-direction: column; gap: 10px; }
.footer-legal a { text-decoration: none; color: var(--stone); min-height: 32px; }
.footer-legal a:hover { color: var(--light); }
.copyright { margin-top: auto; padding-top: 24px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 24px 40px 0; }
  .pillar + .pillar { padding-left: 0; }
  .pillar .pillar-num { right: 0 !important; }
  .analyte-grid { grid-template-columns: 1fr 1fr; }
  .analyte-grid li { border-right: 0; border-bottom: 1px solid var(--line-light); }
  .passport-grid, .suppliers-grid { grid-template-columns: 1fr; }
  .passport-visual, .contact-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .main-nav, .header-status { display: none; }
  .nav-toggle { display: flex; }
  .hero-meta { flex-wrap: wrap; gap: 8px 24px; }
  .pillars { grid-template-columns: 1fr; }
  .trace-chain { grid-template-columns: 1fr; border-bottom: 0; }
  .trace-chain li {
    flex-direction: row; align-items: baseline; gap: 20px;
    border-right: 0; border-bottom: 1px solid var(--line-light);
    padding: 18px 4px 18px 24px;
  }
  .trace-chain li::after { top: 26px; left: 0; right: auto; }
  .passport-list { grid-template-columns: 1fr; }
  .analyte-grid { grid-template-columns: 1fr 1fr; }
  .pc-header { flex-direction: column; align-items: flex-start; }
  .hero-actions { gap: 18px; }
}
