/* Dose — First Crack Coffee Roasters.
   A measuring app, not a website. One 560px column at every width,
   white cards on a cool grey floor, one number per card, one action.
   Self-hosted Pretendard only; zero external requests. */

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

@font-face {
  font-family: "Pretendard";
  src: url("./assets/fonts/Pretendard-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("./assets/fonts/Pretendard-SemiBold.subset.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("./assets/fonts/Pretendard-Bold.subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  /* Surfaces */
  --bg: #f2f4f6;
  --canvas: #ffffff;
  --canvas-soft: #f9fafb;
  --hairline: #e5e8eb;

  /* The one action */
  --blue: #3182f6;
  --blue-press: #2272eb;
  --blue-wash: #e8f3ff;
  --blue-ink: #1b64da;
  /* --brand-blue: #0064FF is documented in DESIGN.md and never rendered.
     It is deliberately absent from this file so nobody can reach for it. */

  /* Ink ramp (cool undertone; #000000 exists nowhere) */
  --ink: #191f28;
  --ink-strong: #333d4b;
  --grey-700: #4e5968;
  --grey-600: #6b7684;
  --grey-500: #8b95a1;
  --grey-400: #b0b8c1;
  --on-blue: #ffffff;

  /* Spacing — 8px base */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-32: 32px;
  --s-48: 48px;

  /* Radii — 0px exists nowhere */
  --r-chip: 4px;
  --r-card: 12px;
  --r-hero: 16px;

  /* Elevation — exactly two shadows exist */
  --shadow-hero: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-plinth: 0 -2px 12px rgba(0, 0, 0, 0.06);

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

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

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

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

body {
  margin: 0;
  padding-bottom: 96px; /* the pinned plinth never covers the footer */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

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

:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 2px;
  border-radius: var(--r-chip);
}

/* ---------- The column. One track, every width. ---------- */

.col {
  max-width: 560px;
  margin: 0 auto;
  padding-left: var(--s-20);
  padding-right: var(--s-20);
}

/* ---------- Type scale ---------- */

.amount {
  display: inline-block;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-weight: 700;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.amount-unit {
  margin-left: var(--s-4);
  padding-left: 2px; /* 6px total from the figure */
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--grey-600); /* white cards only — never on the floor */
}

.amount-eyebrow,
.section-eyebrow {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.3px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--grey-700);
}

.amount-eyebrow {
  display: block;
  margin-bottom: var(--s-8);
}

.section-eyebrow {
  display: block;
  margin-bottom: var(--s-16);
  padding-left: var(--s-4);
}

.display-xxl {
  font-size: 30px;
  line-height: 1.33;
  letter-spacing: -0.6px;
  font-weight: 700;
  color: var(--ink);
}

.display-xl {
  font-size: 26px;
  line-height: 1.38;
  letter-spacing: -0.4px;
  font-weight: 700;
  color: var(--ink);
}

.heading-m {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  font-weight: 600;
  color: var(--ink);
}

.body-l {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--grey-700);
}

.body-m {
  font-size: 14px;
  line-height: 1.57;
  font-weight: 400;
  color: var(--grey-700);
}

.caption {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--grey-600);
}

/* ---------- App bar ---------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  background: var(--canvas);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease-out;
}

.appbar.is-scrolled {
  border-bottom-color: var(--hairline);
}

.appbar .col {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.2px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

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

.nav a {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--grey-700);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--ink); /* the active link is ink — navigation is not the action */
}

/* ---------- Column rhythm ---------- */

main {
  display: block;
  padding-top: var(--s-32);
}

.section + .section {
  margin-top: var(--s-48);
}

.card + .card,
.frame-note + .card {
  margin-top: var(--s-32);
}

.section > .link-row {
  margin-top: var(--s-24);
  padding-left: var(--s-4);
}

/* ---------- Cards ---------- */

.card {
  background: var(--canvas);
  border-radius: var(--r-card);
  padding: var(--s-24);
  /* no shadow, no border: the contrast step does the separating */
}

.card--hero {
  border-radius: var(--r-hero);
  padding: var(--s-32) var(--s-24);
  box-shadow: var(--shadow-hero); /* the only Level-2 shadow on the site */
}

.card-title {
  margin-top: var(--s-12);
}

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

/* ---------- Illustration frame ---------- */

.frame {
  margin-top: var(--s-20);
  background: var(--canvas-soft);
  border-radius: var(--r-card);
  overflow: hidden;
}

.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--scene {
  aspect-ratio: 16 / 10;
}

.frame--square {
  aspect-ratio: 1 / 1;
}

/* ---------- Chips (a chip is a fact, and facts are grey) ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8) 6px;
  margin-top: var(--s-16);
  padding: 0;
  list-style: none;
}

.chip {
  background: var(--bg);
  color: var(--grey-700);
  border-radius: var(--r-chip);
  padding: var(--s-4) var(--s-8);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.3px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------- Spec ladder ---------- */

.ladder {
  margin-top: var(--s-20);
  padding: 0;
  list-style: none;
}

.ladder li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-16);
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

.ladder li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* The label names the fact and never breaks: it keeps its one line at every width.
   The value takes the rest of the measure and wraps inside it, still right-aligned
   to the card's edge — so a long value ("Jasmine, bergamot, dried apricot") sets a
   second line under itself instead of squeezing "Tasting notes" into two. */
.spec-label {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.57;
  font-weight: 400;
  color: var(--grey-700);
}

.spec-value {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  font-weight: 600;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.spec-value--text {
  color: var(--ink-strong);
}

/* ---------- Text link — a section's one permitted blue element ---------- */

.text-link {
  display: inline-block;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--blue-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

/* ---------- The one action ---------- */

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: var(--blue);
  color: var(--on-blue);
  border: 0;
  border-radius: var(--r-hero);
  font-family: var(--font);
  font-size: 19px; /* 19/700 is load-bearing for contrast, not styling */
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 100ms ease-out;
}

.cta-button:hover,
.cta-button:active {
  background: var(--blue-press);
}

/* CTA band (index only) — the only card on the site with no amount-cell */
.cta-band {
  background: var(--blue-wash);
  border-radius: var(--r-hero);
  padding: var(--s-32) var(--s-24);
}

.cta-band .body-l {
  margin-top: var(--s-12);
}

.cta-band .cta-button {
  margin-top: var(--s-24);
}

/* Pinned plinth */
.plinth {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--canvas);
  box-shadow: var(--shadow-plinth); /* the only Level-3 shadow on the site */
  padding: var(--s-12) var(--s-20);
  padding-bottom: calc(var(--s-12) + env(safe-area-inset-bottom, 0px));
  transition:
    transform 180ms ease-out,
    opacity 180ms ease-out;
}

.plinth-inner {
  max-width: 520px;
  margin: 0 auto;
}

.plinth.is-docked {
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
}

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

.footer {
  margin-top: var(--s-48);
  background: var(--canvas);
  border-radius: var(--r-hero);
  padding: var(--s-24);
}

.footer p {
  font-size: 14px;
  line-height: 1.57;
  color: var(--grey-700);
}

.footer-nav {
  margin-top: var(--s-16);
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-block;
  font-size: 14px;
  line-height: 2;
  color: var(--grey-700);
  text-decoration: none;
}

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

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .amount {
    font-size: 40px;
    letter-spacing: -1px;
  }

  .display-xxl {
    font-size: 26px;
    letter-spacing: -0.5px;
  }

  .display-xl {
    font-size: 23px;
    letter-spacing: -0.3px;
  }

  .heading-m {
    font-size: 18px;
  }

  .nav {
    gap: var(--s-16);
  }
}

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

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

  .plinth.is-docked {
    transform: none;
    visibility: hidden;
  }
}
