/* ==========================================================================
   KARAZ COFFEE FACTORY — Studio Build
   Dark-first editorial design. Espresso black / cream / berry red accent.
   Type: Space Grotesk (display) + Inter (body)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --black: #120e0b;
  --black-2: #1a140f;
  --black-3: #221a14;
  --cream: #f2ede1;
  --cream-2: #e9e2d2;
  --red: #a52a2a;
  --red-hot: #c43e2f;
  --green: #2c5114;
  --green-lit: #8fc46a;
  --gold: #c79a55;

  --ink: #16100c;                          /* text on cream */
  --ink-soft: rgba(22, 16, 12, 0.65);
  --paper: rgba(242, 237, 225, 1);          /* text on dark */
  --paper-soft: rgba(242, 237, 225, 0.58);
  --line-dark: rgba(242, 237, 225, 0.14);   /* hairlines on dark */
  --line-cream: rgba(22, 16, 12, 0.16);     /* hairlines on cream */

  /* type */
  --font-display: 'Space Grotesk', 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.35s var(--ease-out);
  --t-slow: 0.9s var(--ease-out);

  /* layout */
  --gutter: clamp(20px, 4vw, 64px);
  --max: 1480px;
  --nav-h: 76px;
  --radius: 20px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--paper);
  background: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

::selection { background: var(--red); color: var(--cream); }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 3000;
  background: var(--cream);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

/* ---------- Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.display-xl {
  font-size: clamp(2.9rem, 9.5vw, 8.2rem);
  line-height: 0.96;
}

.display-lg {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 1;
}

.display-md {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-soft);
}

.kicker .k-num {
  color: var(--red-hot);
  letter-spacing: 0.1em;
}

.kicker::after {
  content: "";
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

.section--cream .kicker { color: var(--ink-soft); }
.section--cream .kicker .k-num { color: var(--red); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--paper-soft);
  max-width: 56ch;
}

.section--cream .lede { color: var(--ink-soft); }

.accent { color: var(--red-hot); }
.accent-green { color: var(--green-lit); }
.section--cream .accent { color: var(--red); }
.section--cream .accent-green { color: var(--green); }

/* word-split reveal */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.wi { display: inline-block; transform: translateY(115%); transition: transform 1s var(--ease-out); transition-delay: var(--wd, 0s); }
.in-view .wi, .wi.in-view { transform: translateY(0); }

/* generic reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].in-view { opacity: 1; transform: none; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(88px, 12vw, 168px);
  background: var(--black);
}

.section--cream {
  background: var(--cream);
  color: var(--ink);
}

.section--cream .lede, .section--cream p { color: var(--ink-soft); }
.section--cream h2, .section--cream h3 { color: var(--ink); }

.sec-head { margin-bottom: clamp(40px, 6vw, 88px); }
.sec-head .kicker { margin-bottom: 22px; }
.sec-head .lede { margin-top: 26px; }

.hairline-top { border-top: 1px solid var(--line-dark); }
.section--cream.hairline-top { border-top-color: var(--line-cream); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background-color var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast);
}

.btn .arr { transition: transform var(--t-fast); display: inline-flex; }
.btn:hover .arr { transform: translateX(5px); }
.btn:active { transform: scale(0.97); }

.btn-red { background: var(--red); color: var(--cream); }
.btn-red:hover { background: var(--red-hot); }

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

.btn-line { border-color: var(--line-dark); color: var(--paper); background: transparent; }
.btn-line:hover { border-color: var(--cream); }

.section--cream .btn-line { border-color: var(--line-cream); color: var(--ink); }
.section--cream .btn-line:hover { border-color: var(--ink); }

.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--black-3); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color var(--t-fast), border-color var(--t-fast);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(18, 14, 11, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-dark);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--cream);
}
.brand sup { font-size: 0.55em; color: var(--red-hot); }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--paper-soft);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav-links a:hover { color: var(--cream); }
.nav-links a.active { color: var(--cream); background: rgba(242, 237, 225, 0.08); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta { min-height: 44px; padding: 10px 22px; font-size: 0.88rem; }

/* burger */
.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 13px;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
}
.menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cream);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast), width var(--t-fast);
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* full-screen menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 48px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-out), visibility 0.7s;
}

.menu-overlay.open {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
}

.menu-overlay nav { display: grid; gap: 4px; }

.menu-overlay a.m-link {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--paper);
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-dark);
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.menu-overlay a.m-link:hover,
.menu-overlay a.m-link.active { color: var(--red-hot); padding-left: 14px; }

.menu-overlay a.m-link .m-num {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--paper-soft);
}

.menu-overlay .m-meta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 36px;
  font-size: 0.85rem;
  color: var(--paper-soft);
}
.menu-overlay .m-meta a:hover { color: var(--cream); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) 0 0;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(18,14,11,0.62) 0%, rgba(18,14,11,0.18) 42%, rgba(18,14,11,0.88) 88%, var(--black) 100%);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: clamp(28px, 5vh, 64px);
}

.hero-tag {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-soft);
  max-width: 230px;
  line-height: 1.9;
}

.hero h1 { color: var(--cream); }

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 237, 225, 0.7);
}

.hero-foot {
  margin-top: clamp(30px, 5vh, 60px);
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.hero-foot .lede { max-width: 46ch; font-size: 1.02rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 140px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-soft);
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 56px;
  background: var(--paper-soft);
  animation: cueDrop 2.2s var(--ease-out) infinite;
}

@keyframes cueDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  min-height: clamp(420px, 64svh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 40px);
  isolation: isolate;
  overflow: hidden;
}

.page-hero .hero-bg { inset: -8% 0; }

.page-hero .crumb {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-soft);
  margin-bottom: 20px;
}
.page-hero .crumb b { color: var(--red-hot); font-weight: 500; }

.page-hero .hero-foot { margin-top: clamp(24px, 4vh, 48px); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--black);
  padding: 18px 0;
  user-select: none;
}

.marquee--cream {
  background: var(--cream);
  border-color: var(--line-cream);
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper-soft);
  padding-right: 18px;
}

.marquee--cream .marquee-track span { color: var(--ink-soft); }

.marquee-track span i {
  font-style: normal;
  color: var(--red-hot);
  padding-right: 18px;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Editorial split (label left / content right) ---------- */
.ed-grid {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
}

.ed-grid .ed-label { position: relative; }

.ed-body p + p { margin-top: 1.3em; }

.ed-body .big-quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-top: 1.6em;
  padding-left: 26px;
  border-left: 2px solid var(--red-hot);
}

.section--cream .ed-body .big-quote { color: var(--ink); border-color: var(--red); }

/* media block */
.media {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease-out);
}

.media.in-view img, .media:hover img { transform: scale(1); }

.media--tall { aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 16 / 9; }

/* image placeholder */
.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 300px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(242,237,225,0.025) 14px 15px),
    var(--black-3);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: var(--paper-soft);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
}

.section--cream .ph {
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(22,16,12,0.03) 14px 15px),
    var(--cream-2);
  border-color: var(--line-cream);
  color: var(--ink-soft);
}

.ph::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--red-hot);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.stat {
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: clamp(26px, 4vw, 56px) clamp(20px, 3vw, 44px);
}

.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--cream);
}

.stat .num em { font-style: normal; color: var(--red-hot); }

.stat .lbl {
  margin-top: 14px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-soft);
}

/* ---------- Numbered editorial list (process) ---------- */
.steps { border-top: 1px solid var(--line-cream); }
.section:not(.section--cream) .steps { border-top-color: var(--line-dark); }

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px clamp(20px, 4vw, 64px);
  align-items: start;
  padding: clamp(28px, 4vw, 52px) 0;
  border-bottom: 1px solid var(--line-cream);
  transition: padding-left var(--t-fast);
}

.section:not(.section--cream) .step { border-bottom-color: var(--line-dark); }

.step:hover { padding-left: 14px; }

.step .s-num {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 500;
  color: var(--red);
  padding-top: 6px;
  min-width: 52px;
}

.section:not(.section--cream) .step .s-num { color: var(--red-hot); }

.step h3 {
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.step p { margin-top: 12px; max-width: 58ch; }

.step .s-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.step .s-tags span {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--line-cream);
  border-radius: 999px;
  color: var(--ink-soft);
}

.section:not(.section--cream) .step .s-tags span {
  border-color: var(--line-dark);
  color: var(--paper-soft);
}

/* ---------- Grade panels ---------- */
.grades { display: grid; gap: 0; border-top: 1px solid var(--line-dark); }

.grade {
  position: relative;
  display: grid;
  gap: 14px clamp(20px, 4vw, 64px);
  padding: clamp(34px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--line-dark);
  overflow: hidden;
  transition: background-color var(--t-fast);
}

.grade:hover { background: var(--black-2); }

.grade .g-id {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 9vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 237, 225, 0.45);
  transition: color var(--t-fast), -webkit-text-stroke-color var(--t-fast);
}

.grade:hover .g-id { color: var(--cream); -webkit-text-stroke-color: transparent; }

.grade--sc18:hover .g-id { color: var(--red-hot); }
.grade--sc15:hover .g-id { color: var(--green-lit); }
.grade--sc12:hover .g-id { color: var(--gold); }

.grade .g-info h3 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; }

.grade .g-tier {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-soft);
}

.grade--sc18 .g-tier { color: var(--red-hot); }
.grade--sc15 .g-tier { color: var(--green-lit); }
.grade--sc12 .g-tier { color: var(--gold); }

.grade p { margin-top: 12px; color: var(--paper-soft); max-width: 52ch; }

.grade .g-size {
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--paper-soft);
  letter-spacing: 0.1em;
  align-self: start;
}

.grade .g-size b {
  display: block;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.grade .g-link {
  align-self: end;
  justify-self: start;
}

/* ---------- Pillar columns (EUDR) ---------- */
.pillars {
  display: grid;
  border-top: 1px solid var(--line-cream);
  border-left: 1px solid var(--line-cream);
}

.section:not(.section--cream) .pillars {
  border-color: var(--line-dark);
}

.pillar {
  padding: clamp(28px, 3.5vw, 52px) clamp(22px, 3vw, 40px);
  border-right: 1px solid var(--line-cream);
  border-bottom: 1px solid var(--line-cream);
  transition: background-color var(--t-fast);
}

.section:not(.section--cream) .pillar {
  border-color: var(--line-dark);
}

.pillar:hover { background: rgba(22, 16, 12, 0.035); }
.section:not(.section--cream) .pillar:hover { background: var(--black-2); }

.pillar .p-num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--red);
}

.section:not(.section--cream) .pillar .p-num { color: var(--red-hot); }

.pillar h3 {
  margin-top: 48px;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  letter-spacing: -0.01em;
}

.pillar p { margin-top: 14px; font-size: 0.95rem; }

/* statement banner */
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 26ch;
}

/* ---------- Ticket list (objectives) ---------- */
.tick-list { display: grid; }

.tick-list li {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.section--cream .tick-list li {
  border-bottom-color: var(--line-cream);
  color: var(--ink);
}

.tick-list li .t-i {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--red-hot);
  min-width: 36px;
}

.section--cream .tick-list li .t-i { color: var(--red); }

/* ---------- CTA band ---------- */
.cta {
  background: var(--red);
  color: var(--cream);
  padding-block: clamp(88px, 12vw, 160px);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 235, 200, 0.16), transparent 45%),
              radial-gradient(circle at 75% 85%, rgba(18, 14, 11, 0.35), transparent 55%);
  pointer-events: none;
}

.cta .wrap { position: relative; }

.cta h2 { color: var(--cream); }

.cta .lede { color: rgba(242, 237, 225, 0.8); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: clamp(30px, 4vw, 52px);
}

.cta-meta {
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: 26px;
  border-top: 1px solid rgba(242, 237, 225, 0.3);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 44px;
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.cta-meta a, .cta-meta span { color: rgba(242, 237, 225, 0.85); transition: color var(--t-fast); }
.cta-meta a:hover { color: #fff; }

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  border-top: 1px solid var(--line-dark);
  padding-top: clamp(56px, 8vw, 110px);
  overflow: hidden;
}

.footer-grid {
  display: grid;
  gap: 44px;
  padding-bottom: clamp(48px, 7vw, 96px);
}

.footer h5 {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-soft);
  margin-bottom: 22px;
}

.footer-about p { color: var(--paper-soft); font-size: 0.95rem; max-width: 34ch; }

.f-links { display: grid; gap: 12px; }

.f-links a {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--paper);
  width: fit-content;
  position: relative;
  transition: color var(--t-fast);
}

.f-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--red-hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast);
}

.f-links a:hover { color: var(--cream); }
.f-links a:hover::after { transform: scaleX(1); }

.f-contact { display: grid; gap: 12px; font-size: 0.95rem; color: var(--paper-soft); }
.f-contact a { color: var(--paper); transition: color var(--t-fast); }
.f-contact a:hover { color: var(--red-hot); }

.f-social { display: flex; gap: 10px; }

.f-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--paper-soft);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.f-social a:hover {
  border-color: var(--cream);
  color: var(--cream);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 30px;
  font-size: 0.82rem;
  color: var(--paper-soft);
}

.footer-bottom a { color: var(--paper); }
.footer-bottom a:hover { color: var(--red-hot); }

/* giant wordmark */
.f-mark {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.4rem, 19vw, 17rem);
  line-height: 0.78;
  letter-spacing: -0.04em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 237, 225, 0.22);
  transform: translateY(0.12em);
  user-select: none;
  pointer-events: none;
}

/* ---------- Spec tables (products) ---------- */
.spec-rows { border-top: 1px solid var(--line-dark); margin-top: 26px; }

.spec-rows .sr {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.92rem;
}

.section--cream .spec-rows,
.section--cream .spec-rows .sr { border-color: var(--line-cream); }

.spec-rows .sr b {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--cream);
}

.section--cream .spec-rows .sr b { color: var(--ink); }
.spec-rows .sr span { color: var(--paper-soft); text-align: right; }
.section--cream .spec-rows .sr span { color: var(--ink-soft); }

/* bean scale */
.bean-scale {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  margin-top: 30px;
}

.bean-scale .b {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--paper-soft);
}

.section--cream .bean-scale .b { color: var(--ink-soft); }

.bean-scale .dot {
  border-radius: 50% 50% 48% 48% / 58% 58% 42% 42%;
  background: linear-gradient(150deg, #5d4634, #2a1d13);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.4);
}

.bean-scale .b12 .dot { width: 24px; height: 29px; }
.bean-scale .b15 .dot { width: 33px; height: 39px; }
.bean-scale .b18 .dot { width: 43px; height: 50px; }

.bean-scale .b.on { color: var(--cream); }
.section--cream .bean-scale .b.on { color: var(--ink); }
.bean-scale .b.on .dot { outline: 2px solid var(--red-hot); outline-offset: 4px; }

/* comparison table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.c-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.c-table th, .c-table td {
  text-align: left;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-dark);
}

.c-table thead th {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-soft);
  background: var(--black-2);
}

.c-table thead th.hl { color: var(--red-hot); }

.c-table tbody th {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--cream);
  white-space: nowrap;
}

.c-table tbody td { color: var(--paper-soft); }
.c-table tbody tr:last-child th, .c-table tbody tr:last-child td { border-bottom: none; }
.c-table tbody tr:hover { background: var(--black-2); }

/* ---------- Forms (contact) ---------- */
.form-grid { display: grid; gap: clamp(40px, 6vw, 90px); }

.field { position: relative; padding: 26px 0 14px; border-bottom: 1px solid var(--line-dark); }

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-soft);
  margin-bottom: 10px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 4px 0;
}

.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--black-2); color: var(--cream); }

.field input::placeholder, .field textarea::placeholder { color: rgba(242, 237, 225, 0.28); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }

.field::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--red-hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.field:focus-within::after { transform: scaleX(1); }

.field.has-error { border-bottom-color: var(--red-hot); }

.err {
  display: none;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--red-hot);
}

.field.has-error .err { display: block; }

.form-status {
  display: none;
  margin-top: 26px;
  padding: 18px 24px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.form-status.success {
  display: block;
  border: 1px solid rgba(143, 196, 106, 0.4);
  color: var(--green-lit);
}

.form-status.error {
  display: block;
  border: 1px solid rgba(196, 62, 47, 0.5);
  color: var(--red-hot);
}

/* contact info list */
.c-info { display: grid; gap: 0; border-top: 1px solid var(--line-dark); }

.c-info .ci {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-dark);
}

.c-info .ci h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-soft);
  margin-bottom: 10px;
}

.c-info .ci p, .c-info .ci a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.5;
}

.c-info .ci a { transition: color var(--t-fast); width: fit-content; }
.c-info .ci a:hover { color: var(--red-hot); }

.map-shell {
  margin-top: clamp(48px, 7vw, 90px);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-shell iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 44vw, 460px);
  border: 0;
  filter: grayscale(1) invert(0.92) contrast(0.9);
}

.map-shell .map-cap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 16px 24px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--paper-soft);
}

/* ---------- Region pills (about) ---------- */
.regions { display: flex; flex-wrap: wrap; gap: 10px; }

.regions span {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--paper-soft);
}

.regions span.on {
  border-color: var(--green-lit);
  color: var(--green-lit);
}

.section--cream .regions span { border-color: var(--line-cream); color: var(--ink-soft); }
.section--cream .regions span.on { border-color: var(--green); color: var(--green); }

/* ---------- Timeline (about) ---------- */
.tl { border-top: 1px solid var(--line-cream); }
.section:not(.section--cream) .tl { border-top-color: var(--line-dark); }

.tl-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px clamp(24px, 4vw, 72px);
  padding: clamp(26px, 3.6vw, 44px) 0;
  border-bottom: 1px solid var(--line-cream);
}

.section:not(.section--cream) .tl-row { border-bottom-color: var(--line-dark); }

.tl-row .tl-year {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--red);
  min-width: 120px;
}

.section:not(.section--cream) .tl-row .tl-year { color: var(--red-hot); }

.tl-row h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
.tl-row p { margin-top: 10px; max-width: 60ch; }

/* ---------- Utility ---------- */
.mt-1 { margin-top: clamp(20px, 3vw, 36px); }
.mt-2 { margin-top: clamp(36px, 5vw, 64px); }
.mt-3 { margin-top: clamp(56px, 8vw, 110px); }

.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .wi { transform: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .media img { transform: none; }
  .hero-bg { transform: none !important; }
  .marquee-track { animation: none; }
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .grade {
    grid-template-columns: minmax(180px, 0.9fr) 1.4fr;
  }
  .grade .g-size { grid-column: 1; }
  .grade .g-link { grid-column: 2; }
}

@media (min-width: 900px) {
  .ed-grid { grid-template-columns: minmax(200px, 0.8fr) 2fr; }
  .ed-grid--media { grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .ed-grid--media-rev .ed-media { order: 2; }

  .form-grid { grid-template-columns: 1.3fr 1fr; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr 1fr; }

  .grade {
    grid-template-columns: minmax(220px, 0.9fr) 1.6fr minmax(140px, 0.5fr) auto;
    align-items: center;
  }
  .grade .g-size { grid-column: auto; }
  .grade .g-link { grid-column: auto; }

  .step { grid-template-columns: 80px 1.2fr 1fr; }
  .step .s-body2 { padding-top: 10px; }

  .scroll-cue { display: flex; }
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
  .pillars { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1023px) {
  .nav-cta { display: none; }
}


.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 200px; 
    width: auto;
    display: block;
}