/* Plinth — First Crack Coffee Roasters
   Warm cream paper, warm near-black ink. No accent fills, no gradients,
   no shadows, 0px radius everywhere. All depth lives inside the photographs. */

/* ---------------------------------------------------------------- fonts */

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

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

/* --------------------------------------------------------------- tokens */

:root {
  /* palette */
  --canvas: #f3efe5;
  --canvas-deep: #ebe4d5;
  --canvas-sepia: #e4d9c6;
  --panel-dark: #26211a;
  --ink: #211c15;
  --ink-soft: #5e5647;
  --ink-faint: #867c69;
  --on-ink: #f1ece0;
  --hairline: #d6cdbb;
  --hairline-strong: #c4b9a3;
  --sepia: #4a3626;
  --taupe: #9c8f79;
  --olive: #5c5a3c;
  --clay: #9a6f53;

  /* type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --grotesque: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* spacing scale: 4 · 8 · 12 · 16 · 24 · 40 · 64 · 96 · 128 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 40px;
  --s-7: 64px;
  --s-8: 96px;
  --s-9: 128px;

  --container: 1180px;
  --gutter: 40px;

  /* display size steps by breakpoint (desktop default) */
  --display-xxl: 64px;
  --display-xl: 48px;
  --display-l: 36px;
}

/* ---------------------------------------------------------------- reset */

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--grotesque);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

/* ------------------------------------------------------------ type roles */

.display-xxl,
.display-xl,
.display-l,
.display-m,
.card-title {
  font-family: var(--serif);
  font-weight: 400; /* the serif is never bolded */
  font-feature-settings: "liga" 1;
}

.display-xxl {
  font-size: var(--display-xxl);
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.display-xl {
  font-size: var(--display-xl);
  line-height: 1.12;
  letter-spacing: -0.4px;
}

.display-l {
  font-size: var(--display-l);
  line-height: 1.16;
  letter-spacing: -0.2px;
}

.display-m {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.card-title {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.lead {
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.1px;
  color: var(--ink-soft);
}

.body {
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.1px;
  color: var(--ink-soft);
}

/* The apothecary ledger, set in the grotesque — never in the serif. Density is
   the signature: tight leading, a hanging-indent label/value grid (see
   .ledger-list below), and tabular figures so a numeral never shifts the
   column's width as it changes down the list. */
.ledger {
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.1px;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

/* figures that must align down a column */
.figure {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-feature-settings: "case" 1;
  color: var(--ink-faint); /* short labels only — never body copy */
}

/* --ink-faint falls to 3.0:1 on sepia paper — the eyebrow steps up to --ink-soft */
.eyebrow--on-sepia {
  color: var(--ink-soft);
  margin-bottom: var(--s-4);
}

.caption {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: var(--ink-faint); /* short labels only */
}

.micro-cap {
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-feature-settings: "case" 1;
}

/* ------------------------------------------------------------- structure */

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

.section {
  padding: var(--s-8) 0; /* 96px band rhythm */
}

.section--air {
  padding: var(--s-9) 0; /* 128px — hero and campaign bands */
}

.section--deep {
  background: var(--canvas-deep);
}

.section-head {
  margin-bottom: var(--s-7);
}

.section-head .eyebrow {
  margin-bottom: var(--s-4);
}

/* editorial: one narrow column offset in a wide grid, empty columns beside */
.editorial {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-6);
}

.editorial__column {
  grid-column: 3 / 10;
}

/* hero: one serif line, one tall plinth photograph, and a great deal of paper */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-6);
  align-items: start;
}

.hero-grid__line {
  grid-column: 1 / 8;
}

.hero-grid__plate {
  grid-column: 9 / 13;
}

.stack-4 > * + * {
  margin-top: var(--s-4);
}

.stack-5 > * + * {
  margin-top: var(--s-5);
}

.stack-6 > * + * {
  margin-top: var(--s-6);
}

/* ------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
  border-bottom: 1px solid transparent; /* the hairline appears on scroll only */
  transition: border-color 120ms ease-out;
}

.nav[data-scrolled="true"] {
  border-bottom-color: var(--hairline);
}

.nav__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-5) var(--s-6);
}

.nav__wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--ink);
}

.nav__links {
  display: flex;
  gap: var(--s-5);
}

.nav__link {
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.4px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 120ms ease-out;
}

.nav__link:hover,
.nav__link:focus-visible {
  border-bottom-color: var(--ink);
}

.nav__link[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* --------------------------------------------------------------- buttons */

.button-primary,
.button-outline,
.button-on-dark {
  display: inline-block;
  font-family: var(--grotesque);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-feature-settings: "case" 1;
  text-decoration: none;
  border-radius: 0;
  transition:
    background-color 120ms ease-out,
    color 120ms ease-out,
    border-color 120ms ease-out;
}

.button-primary {
  padding: 16px 32px;
  background: var(--ink); /* the ink is the only "CTA color" in this system */
  color: var(--on-ink);
  border: 0;
}

/* color-only hover: the ink deepens. No transform, no lift, no shadow. */
.button-primary:hover,
.button-primary:focus-visible {
  background: #15110b;
}

.button-outline {
  padding: 15px 31px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.button-outline:hover,
.button-outline:focus-visible {
  border-color: #15110b; /* the border darkens — nothing else moves */
}

.button-on-dark {
  padding: 15px 31px;
  background: transparent;
  color: var(--on-ink);
  border: 1px solid var(--on-ink);
}

.button-on-dark:hover,
.button-on-dark:focus-visible {
  background: var(--on-ink);
  color: var(--panel-dark);
}

/* ------------------------------------------------------------ plinth card */

.origins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}

.plinth-card {
  padding: var(--s-6);
  border-radius: 0;
  border: 0;
}

/* on the canvas band the card takes the tonal step; inside a canvas-deep
   band it shares the band's tone — the step has already been spent */
.plinth-card--step {
  background: var(--canvas-deep);
}

.plinth-card__figure {
  margin: 0 0 var(--s-5);
}

.plinth-card__name {
  margin-bottom: var(--s-2);
}

.plinth-card__descriptor {
  color: var(--ink-soft);
  margin-bottom: var(--s-4);
}

.plinth-card__spec {
  color: var(--ink-soft);
}

.plinth-card__tag {
  margin-top: var(--s-4);
}

/* quiet tag — square, hairline, never a colored fill */
.tag {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
}

/* ------------------------------------------------------- hanging ledger */

.ledger-list {
  display: grid;
  grid-template-columns: 112px 1fr;
  column-gap: var(--s-5);
  row-gap: var(--s-2);
  margin: 0;
}

/* the card is narrower than a panel — the hanging indent tightens with it */
.plinth-card .ledger-list {
  grid-template-columns: 88px 1fr;
  column-gap: var(--s-4);
}

.ledger-list dt {
  color: var(--ink);
}

.ledger-list dd {
  margin: 0;
  color: var(--ink-soft);
}

/* formulation card — the sepia panel that carries the ledger */
.formulation-card {
  background: var(--canvas-sepia);
  padding: var(--s-6);
  border-radius: 0;
}

.formulation-card__title {
  margin-bottom: var(--s-5);
}

.formulation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
}

/* ------------------------------------------------------- store-list rows */

.store-list {
  border-top: 1px solid var(--hairline);
}

.store-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--s-6);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--hairline);
}

.store-row__detail {
  color: var(--ink-soft);
  align-self: center;
}

/* ------------------------------------------------------------- CTA band */

.cta-band {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: var(--s-8) 0;
  text-align: center;
}

.cta-band__line {
  margin-bottom: var(--s-6);
}

/* ------------------------------------------------------------ photograph */

.plate {
  margin: 0;
}

.plate img {
  width: 100%;
}

.plate figcaption {
  margin-top: var(--s-3);
}

.bleed {
  width: 100%;
}

.bleed img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* ---------------------------------------------------------------- footer */

.footer {
  background: var(--panel-dark);
  color: var(--on-ink);
  padding: var(--s-8) var(--s-6);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s-6);
}

.footer__wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: var(--on-ink);
}

.footer__heading {
  color: var(--on-ink);
  margin-bottom: var(--s-4);
}

.footer__links li + li {
  margin-top: var(--s-2);
}

.footer__link {
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.4px;
  color: var(--on-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease-out;
}

.footer__link:hover,
.footer__link:focus-visible {
  border-bottom-color: var(--on-ink);
}

.footer__detail {
  font-size: 13px;
  line-height: 1.6;
  color: var(--on-ink);
}

.footer__action {
  margin-top: var(--s-6);
}

.footer__legal {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid #3a342b;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: var(--on-ink);
}

/* ----------------------------------------------------------------- focus */

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.footer a:focus-visible,
.button-on-dark:focus-visible {
  outline-color: var(--on-ink);
}

/* ----------------------------------------------------------- breakpoints */

/* 1023px, not 1024: DESIGN.md gives Desktop >=1024px the 64px display */
@media (max-width: 1023px) {
  :root {
    --display-xxl: 48px;
    --display-xl: 40px;
    --display-l: 32px;
  }

  .editorial__column {
    grid-column: 2 / 11;
  }

  .hero-grid__line {
    grid-column: 1 / 8;
  }

  .hero-grid__plate {
    grid-column: 8 / 13;
  }

  .origins-grid {
    grid-template-columns: 1fr;
    gap: var(--s-7);
  }
}

@media (max-width: 767px) {
  :root {
    --display-xxl: 34px;
    --display-xl: 32px;
    --display-l: 28px;
    --gutter: 24px;
  }

  .nav__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-4);
    padding: var(--s-5) var(--gutter);
  }

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

  .section--air {
    padding: var(--s-8) 0;
  }

  /* collapse the 12-column grids outright — keeping 12 tracks would keep their
     eleven gutters too, and the gutters alone are wider than the viewport */
  .editorial,
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-7);
  }

  .editorial__column,
  .hero-grid__line,
  .hero-grid__plate {
    grid-column: auto;
  }

  .formulation-grid {
    grid-template-columns: 1fr;
  }

  .store-row {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--s-7);
  }

  .footer {
    padding: var(--s-7) var(--gutter);
  }

  .bleed img {
    max-height: 320px;
  }
}

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
