/* ============================================================
   Onyx — First Crack Coffee Roasters
   Shared design tokens + component styles
   A cathedral of true black; one warm color, spent on order.
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */

@font-face {
  font-family: "Anton";
  src: url("./assets/fonts/anton-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* Surface layering — depth by lightness, never shadow */
  --void: #000000;
  --iron: #181818;
  --charcoal: #202020;
  --graphite: #494949;

  /* Gold — the single accent. CTA fill only. */
  --gold: #ffc000;
  --gold-press: #917300;
  --gold-text: #ffce3e;

  /* Neutrals on the void */
  --white: #ffffff;
  --smoke: #f5f5f5;
  --ash: #b0b0b0;
  --steel: #8a8a8a;
  --ghost-line: rgba(255, 255, 255, 0.5);

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* 8px base spacing */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s15: 120px;

  --content-max: 1280px;
  --gutter: 24px;
  --section-pad: 120px;
}

/* ---------- Reset ---------- */

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

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

body {
  margin: 0;
  background: var(--void);
  color: var(--ash);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

/* Sharp corners are the law — no radius token exists. */

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.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;
}

/* ---------- Layout ---------- */

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

.section {
  padding: var(--section-pad) 0;
}

.section--tight {
  padding-top: 0;
}

.band-iron {
  background: var(--iron);
}

/* 7 / 5 split — headline left, image right */
.split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--s8);
  align-items: center;
}

.split--reverse {
  grid-template-columns: 5fr 7fr;
}

.stack {
  display: grid;
  gap: var(--s3);
  align-content: start;
}

/* ---------- Typography scale ---------- */

.hero-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 120px;
  line-height: 0.92;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--white);
}

.display-l {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 80px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--white);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--white);
}

.subsection {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--white);
}

.feature-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.19;
  text-transform: uppercase;
  color: var(--white);
}

.lede {
  font-size: 18px;
  line-height: 1.56;
  color: var(--smoke);
}

.body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ash);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

.micro {
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--steel);
}

/* The one place gold touches running copy: a link on hover */
.link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}

.link:hover {
  color: var(--gold-text);
}

/* ---------- Hex bullet (threads the geometry) ---------- */

.hex-bullet {
  display: inline-block;
  width: 8px;
  height: 9px;
  flex: 0 0 auto;
  background: currentColor;
  /* flat-top hexagon — sharp vertices, 0 radius by nature */
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease,
    border-color 120ms ease;
}

/* Primary gold CTA — the only gold surface. One per view. */
.btn-gold {
  background: var(--gold);
  color: var(--void);
  padding: 20px 28px;
  letter-spacing: 0.04em;
}

.btn-gold:hover {
  background: var(--gold);
}

.btn-gold:active {
  background: var(--gold-press);
}

/* Ghost secondary — transparent, 1px white @50%. Never fills light. */
.btn-ghost {
  background: transparent;
  color: var(--white);
  padding: 16px 20px;
  letter-spacing: 0.04em;
  border: 1px solid var(--ghost-line);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: var(--charcoal);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
}

/* ---------- Nav — floats in darkness ---------- */

.nav {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--s4) var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}

.brand .hex-bullet {
  width: 13px;
  height: 15px;
}

.brand[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  padding-bottom: 4px;
  transition: color 120ms ease;
}

.nav-links a:hover {
  color: var(--gold-text);
}

.nav-links a[aria-current="page"] {
  border-bottom: 2px solid var(--white);
}

.nav-cta {
  margin-left: var(--s3);
}

/* ---------- Divider rule with optional label plate ---------- */

.divider {
  border-top: 1px solid var(--graphite);
  padding-top: var(--s3);
  margin-bottom: var(--s6);
  display: flex;
}

.divider .plate {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- Hex roast badge ---------- */

.roast-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s1);
}

.roast-badge .hex {
  width: 108px;
  height: auto;
  display: block;
}

.roast-badge .hex-shape {
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1;
}

.roast-badge .hex-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--white);
}

.roast-badge .dial {
  width: 60px;
  height: auto;
  display: block;
}

.roast-badge .pip-on {
  fill: var(--white);
  stroke: none;
}

.roast-badge .pip-off {
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1;
}

/* Featured: gold is the spotlight */
.roast-badge--gold .hex-shape {
  stroke: var(--gold);
}

.roast-badge--gold .hex-label {
  fill: var(--gold-text);
}

/* ---------- Spotlight origin card ---------- */

.origins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  align-items: start;
}

.origin-card {
  display: flex;
  flex-direction: column;
}

/* Image crushes to black at the edges and bleeds into the void */
.origin-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.origin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.origin-body {
  padding-top: var(--s3);
  display: grid;
  gap: var(--s2);
}

.origin-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--white);
  justify-self: start;
}

.origin-notes {
  color: var(--ash);
  font-size: 16px;
  line-height: 1.5;
}

.origin-spec {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

/* Featured house origin — San Agustin */
.origin-card.is-featured {
  border: 1px solid var(--gold);
}

.origin-card.is-featured .origin-body {
  padding: var(--s3);
}

.origin-card.is-featured .origin-name {
  border-bottom: 2px solid var(--gold);
  padding-bottom: var(--s1);
}

/* ---------- Brew spec panel — a machine's readout ---------- */

.spec-panel {
  background: var(--charcoal);
  border: 1px solid var(--graphite);
}

.spec-head {
  padding: var(--s5) var(--s6) var(--s4);
}

.spec-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--white);
}

.spec-sub {
  margin-top: var(--s1);
  color: var(--ash);
  font-size: 16px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--graphite);
  border-top: 1px solid var(--graphite);
}

.spec-stat {
  background: var(--charcoal);
  padding: var(--s5) var(--s1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-figure {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  white-space: nowrap;
  line-height: 1;
  text-transform: uppercase;
  color: var(--white);
}

.spec-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- CTA band — the one centered moment ---------- */

.cta-band {
  background: var(--void);
  text-align: center;
}

.cta-inner {
  display: grid;
  justify-items: center;
  gap: var(--s4);
}

.cta-inner .eyebrow {
  justify-content: center;
}

.cta-line {
  max-width: 16ch;
}

/* ---------- Info rows (visit / schedule) ---------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
}

.info-block {
  border-top: 1px solid var(--graphite);
  padding-top: var(--s3);
  display: grid;
  gap: var(--s2);
}

.info-block .info-value {
  color: var(--smoke);
  font-size: 18px;
  line-height: 1.5;
}

/* ---------- Footer — deepest surface ---------- */

.footer {
  background: var(--iron);
  padding: var(--s10) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s6);
}

.footer .brand {
  margin-bottom: var(--s3);
}

.footer-address {
  color: var(--steel);
  font-size: 14px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: var(--s2);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s1);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  text-decoration: none;
  transition: color 120ms ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-note {
  color: var(--steel);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Full-bleed hero media ---------- */

.hero {
  padding-top: var(--s6);
  padding-bottom: var(--section-pad);
}

.hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wide-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.wide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tall-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.tall-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Motion: color + opacity only, no transform ---------- */

@keyframes onyx-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  animation: onyx-fade 0.6s ease forwards;
}

.reveal-late {
  opacity: 0;
  animation: onyx-fade 0.6s ease 0.5s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-late {
    opacity: 1;
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  :root {
    --section-pad: 64px;
  }

  .hero-display {
    font-size: 56px;
    line-height: 0.95;
  }

  .display-l {
    font-size: 44px;
    line-height: 1.05;
  }

  .section-title {
    font-size: 34px;
    line-height: 1.1;
  }

  .subsection,
  .spec-title {
    font-size: 28px;
    line-height: 1.15;
  }

  .feature-heading {
    font-size: 22px;
    line-height: 1.25;
  }

  .origin-name {
    font-size: 28px;
  }

  .lede {
    font-size: 17px;
    line-height: 1.6;
  }

  .body {
    font-size: 15px;
    line-height: 1.55;
  }

  .split,
  .split--reverse {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }

  .origins-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .origins-grid {
    gap: var(--s8);
  }

  .nav-inner {
    flex-wrap: wrap;
    gap: var(--s3);
    padding: var(--s3) var(--gutter);
  }

  .nav-links {
    gap: var(--s3);
  }

  .nav-cta {
    margin-left: 0;
  }

  .spec-head {
    padding: var(--s4);
  }
}

@media (max-width: 460px) {
  .nav-links {
    flex-wrap: wrap;
  }

  .btn-gold {
    padding: 18px 22px;
  }
}
