/* =========================================================================
   Pyxidr — "Field Notes" site styles
   Brand tokens live in :root. Change them here, not in individual pages.
   ========================================================================= */

:root {
  /* Colors */
  --ink: #111111;          /* primary text, rules, dark sections */
  --ink-2: #333333;        /* body copy */
  --ink-3: #555555;        /* secondary labels (passes 4.5:1 on white and paper) */
  --muted: #6b6b6b;        /* the "not X" half of a belief line */
  --paper: #ffffff;        /* page background */
  --paper-2: #f4f2ee;      /* warm alternate band */
  --rule-soft: #e4e0d8;
  --accent: #c2410c;       /* burnt orange: needle, links, primary button */
  --accent-dark: #9a3412;
  --accent-on-dark: #f08a5d; /* accent used on --ink backgrounds */

  /* Type */
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(64px, 8vw, 112px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

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

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.band { background: var(--paper-2); }
.band-dark { background: var(--ink); color: var(--paper); }
.band-dark a { color: var(--paper); }
.band-dark a:hover { color: var(--accent-on-dark); }
.rule-top { border-top: 1px solid var(--ink); }

/* ---------- Type helpers ---------- */

.eyebrow {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow.accent { color: var(--accent); }
.band-dark .eyebrow { color: var(--accent-on-dark); }

.display, h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
h1, h2, h3, p { margin-top: 0; }

.h1 { font-size: clamp(56px, 9vw, 136px); line-height: 0.95; letter-spacing: -0.02em; margin: 0; }
.h2 { font-size: clamp(36px, 4.5vw, 60px); line-height: 1.05; margin: 0; }
.h-page { font-size: clamp(44px, 6vw, 84px); line-height: 1; margin: 0; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); }
.band-dark .lead { color: #dddddd; }
em.accent, .accent-text { color: var(--accent); }

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

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 1px solid var(--ink);
  background: transparent; color: var(--ink);
  font: inherit; font-weight: 500; font-size: 16px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-dark { background: var(--ink); color: var(--paper); min-height: 44px; padding: 0 20px; }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Logo (the needle) ---------- */

.wordmark {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--ink); }
/* The dotless "ı" carries the needle as its dot. */
.needle-i { position: relative; display: inline-block; }
.needle-i svg {
  position: absolute; left: 50%; top: 0.02em;
  width: 0.11em; height: 0.24em;
  transform: translateX(-50%);
}
.needle-n { fill: var(--accent); }
.needle-s { fill: var(--ink); }
.band-dark .needle-n { fill: var(--accent-on-dark); }
.band-dark .needle-s { fill: var(--paper); }

/* ---------- Header ---------- */

.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 24px; padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(56px, 8vw, 120px); padding-bottom: clamp(48px, 6vw, 88px); }
.hero .h1 { max-width: 1100px; margin: 24px 0 40px; }
.hero-foot { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-end; justify-content: space-between; }
.hero-foot .lead { max-width: 600px; margin: 0; }

/* ---------- Beliefs (three pillars) ---------- */

.beliefs h2 { margin-bottom: 40px; }
.belief {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 48px;
  padding: 36px 0; border-top: 1px solid var(--ink);
}
.belief:last-child { border-bottom: 1px solid var(--ink); }
.belief-num { flex: 0 0 64px; font-family: var(--serif); font-size: 40px; color: var(--accent); line-height: 1; }
.belief-head { flex: 1 1 320px; }
.belief-head h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.belief-line { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1.15; }
.belief-line .not { color: var(--muted); }
.belief-body { flex: 1 1 300px; margin: 0; color: var(--ink-2); }

/* ---------- Statement ---------- */

.statement { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 32px; padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); }
.statement p.big { margin: 0; max-width: 980px; font-family: var(--serif); font-size: clamp(36px, 5vw, 68px); line-height: 1.08; }
.statement .lead { max-width: 680px; margin: 0; }

/* ---------- Field notes (cards) ---------- */

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px; min-height: 220px;
  background: var(--paper-2); color: var(--ink); text-decoration: none;
}
.card:hover { color: var(--ink); outline: 1px solid var(--ink); }
.card-title { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.card-cta { margin-top: auto; font-size: 15px; color: var(--accent); }

/* ---------- People ---------- */

.person { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.person-photo { flex: 0 1 300px; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(100%); }
.person-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.person-text h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1; margin: 0; }
.person-text p { margin: 0; max-width: 640px; }
.etymology { font-family: var(--serif); font-style: italic; font-size: 24px; color: #bbbbbb; }
.etymology span { color: var(--paper); }
.etymology svg { width: 10px; height: 20px; margin-right: 10px; vertical-align: -2px; }

/* ---------- Contact ---------- */

.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-intro { flex: 1 1 380px; display: flex; flex-direction: column; gap: 20px; }
.contact-intro p { margin: 0; color: var(--ink-2); }
.contact-form { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.contact-form input, .contact-form textarea {
  min-height: 48px; padding: 8px 2px;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: transparent; font: inherit; font-size: 18px; font-weight: 400; color: var(--ink);
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom: 2px solid var(--accent); }
.contact-form .btn { align-self: flex-start; }
.form-status { margin: 0; font-size: 15px; color: var(--ink-2); min-height: 1.6em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Long-form pages (legal, resources) ---------- */

.page-head { padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(32px, 4vw, 56px); }
.page-head .lead { max-width: 720px; margin: 24px 0 0; }
.prose { max-width: 760px; padding-bottom: var(--section-y); }
.prose h2 { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 48px 0 12px; }
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 10px; }
.prose .meta { font-size: 15px; color: var(--ink-3); border-bottom: 1px solid var(--rule-soft); padding-bottom: 24px; margin-bottom: 40px; }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent-dark); }

/* Embedded reports (iframes) */
.embed { padding-bottom: var(--section-y); }
.embed iframe { width: 100%; height: 80vh; min-height: 600px; border: 1px solid var(--rule-soft); background: #fff; }

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

.site-footer .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 32px; padding-bottom: 32px;
  border-top: 1px solid var(--ink); font-size: 14px; color: var(--ink-3);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--ink-3); }
.site-footer a:hover { color: var(--accent); }
.footer-mark { display: flex; align-items: center; gap: 12px; }
.footer-mark svg { width: 9px; height: 18px; }

/* Non-link cards (e.g. "Where it applies") */
.card-static:hover { outline: none; }
.card h3.card-title { margin: 0; font-weight: 400; }
.card p { margin: 0; color: var(--ink-2); }
.card p.card-impact {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--ink);
  display: flex; align-items: flex-start; gap: 0.5em;
  color: var(--ink);
}
.card-impact svg { flex: 0 0 auto; width: 0.5em; height: 1em; margin-top: 0.3em; }

/* ---------- Case pages (e.g. supply-chains.html) ---------- */
.case-head .h-page { max-width: 1100px; margin: 24px 0 0; }
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 48px; margin-top: 48px; }
.point { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--ink); }
.point h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; }
.point p { margin: 0; color: var(--ink-2); }
.point p.eyebrow { color: var(--ink-3); }
.impact { display: flex; flex-direction: column; gap: 12px; margin-top: 56px; padding: 32px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.impact-line { display: flex; align-items: flex-start; gap: 0.4em; margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1.15; }
.impact-line svg { flex: 0 0 auto; width: 0.35em; height: 0.7em; margin-top: 0.22em; }
.case-cta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 56px; }
.case-cta > div { flex: 0 1 520px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.case-cta .lead { margin: 0; }

/* A linked card with an impact line: keep the "Read the case" link right under it */
.card-impact + .card-cta { margin-top: 0; }
.point-list { margin: 0; padding-left: 20px; color: var(--ink-2); }
.point-list li { margin-bottom: 10px; }
.point-list strong { font-weight: 600; color: var(--ink); }
