/* Vessel — First Crack Coffee Roasters.
   A silent catalogue: warm paper, one face, one color locked in a box.
   Hierarchy comes from size and space, never from weight. */

/* ---------- Fonts (self-hosted woff2, no CDN) ---------- */

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-300.woff2") format("woff2");
  font-weight: 300;
  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;
}

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

:root {
  /* Paper family */
  --canvas: #f7f4ee;
  --plate: #ffffff;
  --beige: #ede7da;
  --kraft: #c7b299;
  --kraft-deep: #a8916e;
  --panel: #fbf9f4;

  /* The one color — logo box only */
  --maroon: #7f0019;
  --maroon-deep: #5e0013;

  /* Ink */
  --ink: #1a1a1a;
  --body: #333333;
  --ink-soft: #595959;
  --ink-faint: #8a8a8a;
  --on-maroon: #ffffff;
  --on-ink: #ffffff;

  /* Rules — the structural workhorse */
  --hairline: #e4decf;
  --hairline-strong: #cfc6b2;
  --hairline-on-white: #eaeaea;

  /* Spacing — 8px base, 4px sub-step */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-24: 24px;
  --s-40: 40px;
  --s-64: 64px;
  --s-96: 96px;

  --container: 1200px;
  --column: 640px;
  --radius-control: 2px;

  --font: "Inter", system-ui, -apple-system, Arial, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease-out;
}

/* Quiet focus. No ring, no glow, no color. */
:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Type roles ---------- */

.d-xl {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.d-l {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 300;
  letter-spacing: -0.2px;
  color: var(--ink);
}

.d-m {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--ink);
}

.lead {
  font-size: 15px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--body);
}

.h-m {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}

.h-s {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}

.body {
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--body);
}

.body-s {
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink-soft);
}

.spec {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.caption {
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-soft);
}

.microcap {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

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

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

.section--beige {
  background: var(--beige);
}

/* The bracket only reads as a bracket if canvas shows above the top rule.
   Without this gap the CTA's top hairline lands on the preceding band's edge
   and the two rules collapse into one band boundary. */
.section--rules {
  margin-top: var(--s-96);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

/* Editorial passage: one narrow column, plenty of air. */
.column {
  max-width: var(--column);
}

.stack-8 > * + * {
  margin-top: var(--s-8);
}
.stack-12 > * + * {
  margin-top: var(--s-12);
}
.stack-16 > * + * {
  margin-top: var(--s-16);
}
.stack-24 > * + * {
  margin-top: var(--s-24);
}
.stack-40 > * + * {
  margin-top: var(--s-40);
}
.stack-64 > * + * {
  margin-top: var(--s-64);
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--plate);
  border-bottom: 1px solid var(--hairline);
}

/* The one shadow in the system, and it is barely there. */
.nav.is-scrolled {
  box-shadow: rgba(26, 26, 26, 0.06) 0 1px 3px;
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-24);
  min-height: 56px;
  padding: var(--s-16) var(--s-24);
  max-width: var(--container);
  margin: 0 auto;
}

/* The maroon logo box. Flat. No radius, no gradient, no shadow, no border. */
.logo {
  display: inline-block;
  background: var(--maroon);
  color: var(--on-maroon);
  border-radius: 0;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-24);
}

.nav__links a {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--body);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav__links a:hover {
  color: var(--ink);
}

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

/* The mobile disclosure. Hidden entirely above 640px so it is not a tab stop. */
.nav__toggle {
  display: none;
}

.nav__burger {
  display: none;
  width: 20px;
  height: 14px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  height: 1px;
  background: var(--ink);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}

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

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 13px 23px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}

.kraft .btn-outline:active {
  background: var(--kraft-deep);
}

/* ---------- The kraft band (once per page) ---------- */

.kraft {
  background: var(--kraft);
  border-radius: 0;
  padding: var(--s-64) 0;
}

/* --ink-soft measures 3.4:1 on kraft and fails AA. Secondary text steps up. */
.kraft .microcap {
  color: var(--body);
}

.kraft .body,
.kraft .lead {
  color: var(--body);
}

/* No horizontal inset: kraft copy rags off the same container edge as every other
   section. The band's own vertical padding on .kraft is what sets it apart. */
.kraft__inner {
  padding: 0;
}

/* ---------- The catalogue plate ---------- */

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

.plate {
  display: block;
}

.plate__image {
  background: var(--plate);
  border-radius: 0;
}

.plate__image img {
  width: 100%;
  border-radius: 0;
}

/* The caption stack sits 12px beneath the plate. No border, no fill, no shadow. */
.plate__caption {
  margin-top: var(--s-12);
}

.plate__name {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}

.plate__descriptor {
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink-soft);
}

.plate__line {
  margin-top: var(--s-8);
}

/* ---------- Spec rows (tabular figures) ---------- */

.specs {
  display: grid;
  grid-template-columns: 88px 1fr;
  column-gap: var(--s-16);
  margin-top: var(--s-12);
}

.specs dt {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}

.specs dd {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}

.section--beige .specs dt,
.section--beige .specs dd {
  border-top-color: var(--hairline-strong);
}

/* ---------- Info card ---------- */

.info-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 0;
  padding: var(--s-40);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: var(--s-64) var(--s-24);
}

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

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

.footer__links a {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.footer__links a:hover {
  color: var(--ink);
}

.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: var(--s-24);
  margin-top: var(--s-40);
  padding-top: var(--s-24);
  border-top: 1px solid var(--hairline);
}

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

@media (max-width: 900px) {
  .footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: var(--s-64) 0;
  }

  .section--rules {
    margin-top: var(--s-64);
  }

  .d-xl {
    font-size: 28px;
    line-height: 1.25;
  }

  .d-l {
    font-size: 24px;
  }

  .d-m {
    font-size: 20px;
  }

  .kraft {
    padding: var(--s-24) 0;
  }

  .kraft__inner {
    padding: var(--s-24) 0;
  }

  /* Ragged last row is a normal catalogue property. The orphan stays left. */
  .grid-plates {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Narrow cells: the spec row stacks label over figure, hairline above each. */
  .specs {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .specs dt {
    padding: 10px 0 0;
  }

  .specs dd {
    padding: 2px 0 10px;
    border-top: 0;
  }

  .info-card {
    padding: var(--s-24);
  }

  .nav__burger {
    display: flex;
  }

  /* Transparent, sits over the burger: keyboard-focusable, visually absent. */
  .nav__toggle {
    display: block;
    position: absolute;
    top: 21px;
    right: var(--s-24);
    width: 20px;
    height: 14px;
    margin: 0;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
  }

  .nav__inner {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .nav__links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-16);
    padding: var(--s-16) 0 var(--s-8);
  }

  .nav__toggle:checked ~ .nav__links {
    display: flex;
  }

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

  .footer__legal {
    flex-direction: column;
    gap: var(--s-8);
  }
}

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