/* BaristaCritic design system v1.1.0
   Holding edition. Local fonts only, no external requests.
   Palette: Terracotta Bar (scheme 3), approved 2026-09-06. Logo: Cup Check (01).
   Imagery: Style A, warm editorial photography. See design lock v1.1.0. */

:root {
  --ink: #3b2317;        /* terracotta ink: text, footer background */
  --espresso: #a84c2e;   /* terracotta clay: primary buttons, nav current, links */
  --roast: #a84c2e;      /* links and eyebrow labels (AA 5.10:1 on cream) */
  --caramel: #d98e4a;    /* sunbaked gold: icons, check mark, dark-surface text */
  --cream: #faf3e8;      /* page background */
  --pale: #f0dcc2;       /* pale tint band */
  --warm: #e5c9a6;       /* warm tint band */
  --faint: #7d5a3f;      /* muted text on cream (AA 5.59:1) */
  --line: rgba(59, 35, 23, 0.18);
  --white: #ffffff;
  --radius: 12px;
  --maxw: 1120px;
  --font-head: "Instrument Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* Local fonts only: no external requests. Loaded with font-display: swap for speed. */
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- reset & base ---------- */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
::selection { background: var(--caramel); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: var(--roast); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
}
.skip-link:focus {
  left: 12px; top: 12px; background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 6px; z-index: 50;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
h1 { font-size: 2.35rem; }
h2 { font-size: 1.55rem; margin-top: 0; }
h3 { font-size: 1.2rem; }
p { line-height: 1.62; }
.lede { font-size: 1.12rem; color: var(--ink); }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--roast); margin: 0 0 10px;
}
section { scroll-margin-top: 90px; }
.content-page-main { max-width: 740px; margin: 0 auto; }

/* ---------- sections ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page-pad-top { padding-bottom: 0; }

/* ---------- header / nav ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 2px solid var(--espresso);
  position: sticky; top: 0; z-index: 40;
}
.nav-row {
  display: flex; align-items: center; gap: 22px;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-family: var(--font-head);
  letter-spacing: -0.02em;
}
.brand svg { width: 40px; height: 40px; }
.brand-word { font-size: 1.28rem; font-weight: 700; }
.brand-word .critic { color: var(--espresso); }
.nav-desktop {
  display: flex; gap: 6px; margin-left: auto;
  font-family: var(--font-body); font-size: 0.98rem;
}
.nav-desktop a {
  padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink);
}
.nav-desktop a:hover { background: var(--pale); }
.nav-desktop a[aria-current="page"] {
  background: var(--espresso); color: var(--cream); text-decoration: none;
}
.menu-toggle {
  margin-left: auto; display: none;
  background: var(--espresso); color: var(--cream); border: 0; border-radius: 8px;
  font-family: var(--font-body); font-size: 1rem; line-height: 1.2; padding: 13px 18px;
  min-height: 44px; cursor: pointer;
}
.nav-mobile {
  display: none; background: var(--pale); border-top: 1px solid var(--line);
}
.nav-mobile a {
  display: block; padding: 13px 22px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a[aria-current="page"] {
  background: var(--espresso); color: var(--cream);
}

/* ---------- hero ---------- */
.hero {
  background: var(--cream);
  padding: 64px 20px 30px;
  position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; align-items: center;
  max-width: var(--maxw); margin: 0 auto;
}
.hero h1 { font-size: 2.6rem; margin: 6px 0 18px; }
.hero .lede { max-width: 60ch; }
.hero-trust {
  margin-top: 18px; color: var(--faint); font-size: 0.92rem;
}
.hero-trust strong { color: var(--espresso); }
.hero-art {
  margin: 0;
}
.hero-art img {
  width: 100%; height: auto; display: block;
  border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(59, 35, 23, 0.16);
}
.hero-art .art-caption {
  font-size: 0.82rem; color: var(--faint); margin: 10px 0 0; line-height: 1.45;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 10px;
  text-decoration: none; font-family: var(--font-body); font-weight: 600; font-size: 1.02rem;
}
.btn-primary { background: var(--espresso); color: var(--cream); }
.btn-primary:hover { background: var(--ink); color: var(--cream); }
.btn-secondary { background: transparent; border: 2px solid var(--espresso); color: var(--espresso); }
.btn-secondary:hover { background: var(--pale); }

/* ---------- situation selector ---------- */
.selector-band { background: var(--pale); padding: 56px 20px; }
.selector-band .wrap { max-width: var(--maxw); }
.selector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 22px; }
.situation-card {
  display: block; background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 18px; text-decoration: none; color: var(--ink);
  min-height: 148px;
}
.situation-card:hover { border-color: var(--caramel); background: var(--warm); }
.situation-num {
  font-family: var(--font-head); color: var(--caramel); font-size: 1rem; font-weight: 700;
}
.situation-title { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; margin: 10px 0 8px; }
.situation-desc { font-size: 0.94rem; color: var(--faint); line-height: 1.5; }
.situation-go {
  font-size: 0.92rem; font-weight: 600; color: var(--espresso); display: inline-flex;
  align-items: center; gap: 6px; margin-top: 12px;
}
.arrow { font-size: 1.05rem; }

/* ---------- journey ---------- */
.journey-band { background: var(--cream); padding: 56px 20px; }
.journey-steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.journey-steps li {
  position: relative; padding: 18px 20px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.journey-steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 14px; right: 18px; font-family: var(--font-head);
  color: var(--caramel); font-weight: 700; font-size: 0.95rem;
}
.journey-steps h3 { margin: 0 0 6px; }
.journey-steps p { margin: 0 0 10px; font-size: 0.96rem; }
.journey-steps a { font-weight: 600; }

/* ---------- resources ---------- */
.resources-band { background: var(--warm); padding: 56px 20px; }
.resources-band .wrap { max-width: var(--maxw); }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 22px; }
.res-card {
  display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.res-ico { width: 30px; height: 30px; color: var(--caramel); }
.res-card h3 { margin: 12px 0 6px; font-size: 1.08rem; }
.res-card p { margin: 0 0 12px; font-size: 0.94rem; color: var(--ink); }
.res-link {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
  color: var(--espresso); margin-top: auto;
}

/* ---------- trust / editorial ---------- */
.trust-band { background: var(--pale); padding: 56px 20px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 22px; }
.trust-card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.trust-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.trust-card p { margin: 0 0 10px; font-size: 0.95rem; }
.trust-card a { font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; }
details.faq-item {
  background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
  margin: 10px 0;
}
details.faq-item summary {
  cursor: pointer; padding: 15px 18px; font-weight: 600; font-family: var(--font-body);
  list-style-position: inside;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; float: right; color: var(--caramel); font-size: 1.15rem; }
details.faq-item[open] summary::after { content: "\2212"; }
details.faq-item .faq-a { padding: 12px 18px; font-size: 0.95rem; }

/* ---------- standards-note ---------- */
.standards-note {
  display: flex; gap: 12px; background: var(--pale); border: 1px solid var(--caramel);
  border-radius: 10px; padding: 14px 16px; margin: 20px 0;
}
.standards-note svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--caramel); }
.standards-note p { margin: 0; font-size: 0.93rem; color: var(--ink); }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; }
table[role="table"] {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
}
th, td { text-align: left; vertical-align: top; }
thead th {
  background: var(--espresso); color: var(--cream); padding: 12px 14px; font-family: var(--font-head);
}
tbody th { font-weight: 600; color: var(--espresso); padding: 12px 14px; }
tbody td { padding: 12px 14px; }
tbody tr:nth-child(even) { background: var(--pale); }
tbody tr:nth-child(odd) { background: var(--cream); }

/* ---------- list cards / steps for content pages ---------- */
.content-steps { list-style: none; counter-reset: cstep; padding: 0; margin: 18px 0 0; }
.content-steps li {
  position: relative; background: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px 14px 52px; margin: 0 0 10px;
}
.content-steps li::before {
  counter-increment: cstep; content: counter(cstep);
  position: absolute; left: 16px; top: 12px; font-family: var(--font-head);
  color: var(--caramel); font-weight: 700; font-size: 1rem;
}
.checklist { list-style: none; padding-left: 8px; margin: 16px 0 0; }
.checklist li { padding-left: 26px; position: relative; margin: 0 0 8px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 10px;
  border-radius: 3px; background: var(--caramel);
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: var(--cream); padding: 48px 20px 8px; }
.page-hero .wrap { max-width: var(--maxw); }
.page-hero p.lede { max-width: 66ch; }
.meta-line { font-size: 0.88rem; color: var(--faint); margin-top: 16px; }

/* ---------- calculator ---------- */
.calc-card {
  background: var(--cream); border: 2px solid var(--espresso); border-radius: var(--radius);
  padding: 26px; margin-top: 22px;
}
.calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.calc-field label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 0.95rem; }
.calc-field input[type="number"], .calc-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--roast); border-radius: 8px;
  background: var(--white); font-family: var(--font-body); font-size: 1rem; color: var(--ink);
}
.calc-field .unit-hint { display: block; font-size: 0.82rem; color: var(--faint); margin-top: 4px; }
.calc-actions { margin-top: 18px; }
.calc-results {
  margin-top: 20px; background: var(--espresso); color: var(--cream);
  border-radius: var(--radius); padding: 20px 24px;
}
.calc-results h3 { margin: 0 0 12px; font-size: 1.05rem; }
.calc-results dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; }
.calc-results dt { font-size: 0.92rem; color: var(--cream); }
.calc-results dd { margin: 0; font-weight: 700; font-family: var(--font-head); }
.calc-note { margin-top: 14px; font-size: 0.86rem; color: var(--caramel); }

/* ---------- band helper ---------- */
.band { background: var(--cream); padding: 48px 20px; }
.band-alt { background: var(--pale); padding: 48px 20px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding: 52px 20px 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; max-width: var(--maxw); margin: 0 auto; }
.footer-brand { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.footer-brand .critic { color: var(--caramel); }
.footer-mission { font-size: 0.94rem; color: var(--cream); margin-top: 8px; }
.footer-col h4 {
  font-family: var(--font-head); font-size: 0.95rem; color: var(--caramel); margin: 0 0 10px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 8px; }
.footer-col a { color: var(--cream); text-decoration: none; }
.footer-col a:hover { color: var(--caramel); text-decoration: underline; }
.footer-note {
  max-width: var(--maxw); margin: 24px auto 0; font-size: 0.86rem; color: var(--caramel);
}
.footer-legal {
  max-width: var(--maxw); margin: 14px auto 0; font-size: 0.84rem; color: var(--faint); border-top: 1px solid var(--cream);
}
.footer-legal { color: #cfc3b4; }
.footer-legal p { margin: 12px 0 4px; color: #cfc3b4; }

/* ---------- 404 ---------- */
.err404 { padding: 90px 20px; text-align: center; }
.err404 h1 { font-size: 3rem; }
.err404 p { font-size: 1.1rem; }

/* ---------- mobile / responsive ---------- */
@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: inline-block; }
  .nav-mobile { display: none; }
  .site-header.nav-open .nav-mobile { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 16px 24px; }
  .hero h1 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .calc-form { grid-template-columns: 1fr; }
  table[role="table"] { display: block; }
  .content-page-main { max-width: 100%; }
}
@media (max-width: 480px) {
  .brand-word { font-size: 1.14rem; }
  .hero h1 { font-size: 1.75rem; }
  .selector-grid { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none; }
}