/* ============================================================
   EXPworks Design System: "The Casefile"
   Winner of the 2026-08-09 design tournament (Pitch A), with the
   hero-diagram mechanism grafted in from runner-up pitches B/D.
   Shared across all 10 site pages. One system, one file.
   ============================================================ */

:root {
  /* Paper (default surface) — neutral stone, not cream */
  --paper: #F2F1EC;
  --paper-card: #FFFFFF;
  --paper-card-alt: #E9E7DE;

  /* Ink (default text) — true black, not navy */
  --ink: #0E0E0E;          /* headlines */
  --ink-body: #38362F;     /* body copy */
  --ink-faint: #66635A;    /* meta, captions, disabled — 5.1:1 on --paper, passes WCAG AA */
  --hairline: rgba(14,14,14,0.15);
  --hairline-soft: rgba(14,14,14,0.08);

  /* Brand accents, on paper */
  --teal: #3E4E63;         /* analytical: links, tags, kickers — slate, not pastel teal */
  --teal-soft: rgba(62,78,99,0.08);
  --terracotta: #E8420C;   /* action: CTAs, emphasis — one loud saturated signal color, used solid */
  --terracotta-soft: rgba(232,66,12,0.10);

  /* The ink-panel (dark mode: hero + proof + closing CTA moments) */
  --panel-bg: #0E0E0E;
  --panel-bg2: #1A1A1A;
  --panel-text: #F5F4EF;
  --panel-text-muted: rgba(245,244,239,0.64);
  --panel-cyan: var(--terracotta);   /* alias — was a second, near-duplicate orange; one accent, sitewide */
  --panel-orange: var(--terracotta);
  --panel-hairline: rgba(245,244,239,0.16);

  /* Type */
  --font-display: 'Archivo', 'Arial Black', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --pad: 5vw;
  --content-max: 1140px;
  --measure: 680px; /* long-form reading width */
  --section-pad: 120px;
  --section-pad-mobile: 64px;
  --radius: 2px;
  --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ─── TYPOGRAPHY ─── */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
h1 { font-size: clamp(32px, 3.6vw, 58px); line-height: 1.04; font-weight: 900; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; }
h3 { font-size: clamp(18px, 2.2vw, 23px); font-weight: 700; text-transform: none; letter-spacing: -0.005em; }
p { color: var(--ink-body); }
strong { color: var(--ink); font-weight: 600; }

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.kicker::before {
  content: '';
  display: block;
  width: 22px; height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}
.kicker.on-panel { color: var(--panel-cyan); }
.kicker.on-panel::before { background: var(--panel-cyan); }

.mark { color: var(--terracotta); }
.panel .mark, .hero .mark { color: var(--panel-orange); }

/* ─── LAYOUT PRIMITIVES ─── */
.wrap { max-width: var(--content-max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
section.band { padding: var(--section-pad) 0; }
.section-header { max-width: 640px; margin-bottom: 48px; }
.section-header p { font-size: 17px; color: var(--ink-body); margin-top: 12px; max-width: 560px; }

.panel {
  background: var(--panel-bg);
  color: var(--panel-text);
}
.panel h2, .panel h3 { color: var(--panel-text); }
.panel p { color: var(--panel-text-muted); }
.panel .kicker { color: var(--panel-cyan); }

/* ─── NAV ─── */
nav {
  position: sticky; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h); box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--pad);
  background: rgba(242,241,236,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
nav.scrolled { border-bottom-color: var(--hairline); }
/* over the dark hero: transparent, light text (JS toggles this via IntersectionObserver on .hero--dark) */
nav.nav-on-hero { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
nav.nav-on-hero .nav-logo,
nav.nav-on-hero .nav-link { color: var(--panel-text); }
nav.nav-on-hero .nav-link:hover { color: var(--panel-cyan); }
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-body);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--terracotta); }

/* ─── BUTTONS (sharp, solid, no pills, no glow) ─── */
.btn-primary, .btn-secondary, .btn-quiet {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
}
.btn-primary {
  background: var(--terracotta);
  color: var(--ink);
  padding: 16px 28px;
  border-radius: var(--radius);
  transition: transform 0.15s, background 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); background: #FF5A1F; }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  color: var(--ink);
  padding: 15px 2px;
  border-bottom: 2px solid var(--ink);
}
.btn-secondary:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.btn-quiet {
  font-size: 12px;
  color: var(--ink-faint);
  padding: 4px 0;
  text-transform: uppercase;
}
.btn-quiet:hover { color: var(--ink-body); }
.panel .btn-secondary, .hero .btn-secondary { color: var(--panel-text); border-bottom-color: var(--panel-text); }
.panel .btn-secondary:hover, .hero .btn-secondary:hover { color: var(--panel-cyan); border-bottom-color: var(--panel-cyan); }
.btn-nav { font-size: 14px; padding: 11px 22px; }

/* ─── CARDS ─── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  display: flex; flex-direction: column;
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(.16,1,.3,1), box-shadow 0.2s, border-color 0.2s;
}
.card.alt { border-top-color: var(--terracotta); }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(28,36,48,0.08); }
.card .kicker { margin-bottom: 14px; }
.card h3 { margin-bottom: 10px; }
.card .card-body { font-size: 15px; line-height: 1.6; color: var(--ink-body); flex: 1; margin-bottom: 20px; }
.card .card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal); padding-top: 16px; border-top: 1px solid var(--hairline-soft);
}

/* ─── HERO ─── */
.hero { padding: 76px 0 96px; } /* base — still used by pages not yet through the redesign pass (sales.html) */

/* dark, photo-driven variant — the one section the nav reads as transparent over */
.hero--dark {
  background: var(--panel-bg);
  color: var(--panel-text);
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-top: calc(-1 * var(--nav-h)); /* pull up under the sticky nav so nav can float transparent over it */
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.95fr; column-gap: 32px;
  align-items: end; min-height: 460px; position: relative;
}
.hero-copy { padding: calc(var(--nav-h) + 40px) 0 56px; position: relative; z-index: 3; }
.hero-copy h1 { color: var(--panel-text); letter-spacing: -0.03em; }
.hero-cta-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 28px; }
.hero-dek { font-size: 17px; color: var(--panel-text-muted); max-width: 440px; margin-top: 16px; line-height: 1.5; }

.hero-photo-col { position: relative; align-self: end; display: flex; justify-content: flex-end; }
.hero-photo {
  width: 100%; max-width: 440px; height: auto;
  object-fit: contain; object-position: bottom;
  position: relative; z-index: 2;
  filter: grayscale(25%) contrast(1.08);
}
.hero-ghost-num {
  position: absolute; right: -0.05em; top: -0.02em;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(200px, 24vw, 360px);
  color: var(--panel-bg2); line-height: 0.8; z-index: 1; user-select: none; pointer-events: none;
}
.hero-stamp {
  position: absolute; left: -18px; bottom: 76px; z-index: 3;
  background: var(--terracotta); color: var(--ink);
  padding: 18px 22px; max-width: 230px;
  transform: rotate(-3deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.hero-stamp-label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; opacity: 0.72; }
.hero-stamp-num { display: block; font-family: var(--font-display); font-weight: 900; font-size: 28px; line-height: 1; margin-bottom: 8px; }
.hero-stamp-cap { display: block; font-family: var(--font-body); font-size: 12px; line-height: 1.42; font-weight: 600; }

/* ─── FOOTER ─── */
footer {
  padding: 28px var(--pad);
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
footer span, footer a {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); text-decoration: none;
}
footer a:hover { color: var(--teal); }

/* ─── REVEAL (kept from previous build, opacity/translate only, never character content) ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s cubic-bezier(.16,1,.3,1), transform 0.5s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: calc(var(--nav-h) + 48px) 0 32px; }
  .hero-photo-col { flex-direction: column; align-items: center; justify-content: center; padding-bottom: 40px; }
  .hero-photo { max-width: 320px; }
  .hero-ghost-num { display: none; }
  .hero-stamp { position: static; transform: none; margin: 24px auto 0; max-width: 280px; }
  .card-grid, .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  :root { --pad: 24px; --section-pad: 72px; }
  .nav-links .nav-link { display: none; }
  .nav-links .btn-nav { display: none; }
  .nav-logo { font-size: 17px; }
  .card-grid, .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: 1fr; }
}
