/* New XP · site v2 · implements the "New XP Design System" (claude.ai/design)
   Cream paper + warm ink + one vermilion accent + dot-matrix motifs + hard "sticker" shadows.
   Themes: light (cream, brand default) and dark (warm graphite) via [data-theme="dark"].
   Tokens mirror the design system's tokens/*.css; class names kept from site v2. */

/* ---------- tokens ---------- */
:root {
  /* paper */
  --bg: #f4f1ea;
  --bg-deep: #efeae0;
  --bg-sunken: #e9e3d6;
  --bg-raise: #faf8f3;
  /* ink */
  --text-strong: #0d0e10;
  --text: #33302b;
  --text-dim: #6b665d;
  --text-faint: #b3ab9d;
  /* accent */
  --signal: #e94f2a;
  --signal-hover: #d13f1d;
  --signal-deep: #b33415;
  --on-signal: #ffffff;
  /* warm secondary (imagery/status only, never a competing accent) */
  --terra: #b06b3f;
  /* borders */
  --line-hair: rgba(13, 14, 16, 0.12);
  --line: rgba(13, 14, 16, 0.18);
  --line-strong: #0d0e10;
  /* dot-matrix texture */
  --dot-ink: rgba(13, 14, 16, 0.10);
  --dot-accent: rgba(233, 79, 42, 0.55);
  --dot-accent-soft: rgba(233, 79, 42, 0.22);
  /* sticker + soft shadows */
  --shadow-hard-sm: 3px 3px 0 rgba(13, 14, 16, 0.9);
  --shadow-hard: 5px 5px 0 rgba(13, 14, 16, 0.9);
  --shadow-hard-lg: 8px 8px 0 rgba(13, 14, 16, 0.9);
  --shadow-soft: 0 4px 12px rgba(13, 14, 16, 0.08), 0 1px 3px rgba(13, 14, 16, 0.06);
  /* geometry + motion */
  --radius-sm: 5px;
  --radius: 8px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --press: 2px;
}
:root[data-theme="dark"] {
  --bg: #121316;
  --bg-deep: #17181c;
  --bg-sunken: #1e2024;
  --bg-raise: #1b1c20;
  --text-strong: #f4f1ea;
  --text: #cfcabf;
  --text-dim: #9a948a;
  --text-faint: #5f5a52;
  --line-hair: rgba(244, 241, 234, 0.14);
  --line: rgba(244, 241, 234, 0.20);
  --line-strong: #f4f1ea;
  --dot-ink: rgba(244, 241, 234, 0.08);
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot-ink) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.06rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}
::selection { background: var(--signal); color: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
a:focus-visible, button:focus-visible { outline: 3px solid rgba(233, 79, 42, 0.4); outline-offset: 3px; }

/* section kicker: mono eyebrow led by a vermilion dash */
.kicker { color: var(--text-dim); margin-bottom: 1.1rem; }
.kicker::before { content: "\2014"; color: var(--signal); font-weight: 700; margin-right: 0.8em; }

/* ---------- motion: scroll reveals ---------- */
.rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0; transform: translateY(14px);
    transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  .rv.in { opacity: 1; transform: none; }
}

/* ---------- motion: hero line mask reveal ---------- */
.mask-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.mask-line > span { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .mask-line > span {
    transform: translateY(115%);
    animation: lineUp 0.8s var(--ease) forwards;
    animation-delay: calc(var(--l, 0) * 110ms + 80ms);
  }
  @keyframes lineUp { to { transform: translateY(0); } }
}

/* ---------- buttons (sticker look: ink border + hard shadow, press "clicks down") ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-weight: 700; font-size: 0.95rem; line-height: 1;
  padding: 0.9em 1.5em; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; white-space: nowrap; cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--signal); color: var(--on-signal);
  border-color: var(--line-strong); box-shadow: var(--shadow-hard-sm);
}
.btn-primary:hover { background: var(--signal-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translate(var(--press), var(--press)); box-shadow: none; }
.btn-ghost { border-color: var(--line); color: var(--text-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btn-ghost:active { transform: translate(1px, 1px); }

/* ---------- nav ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-hair);
  transition: background-color 0.35s ease;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 850; font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1;
  color: var(--text-strong);
}
.wm-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25em; height: 1.25em; flex: 0 0 auto;
  background: var(--signal); color: #0d0e10;
  border-radius: 0.18em; font-weight: 850; font-size: 0.82em;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--text); transition: color 0.15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text-strong); }
.nav-cta { display: flex; align-items: center; gap: 0.9rem; }
.menu-btn { display: none; background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text-strong); padding: 0.5em 0.8em; font: inherit; font-size: 0.85rem; cursor: pointer; }

/* theme toggle */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-raise); color: var(--text-strong); cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .ic-moon { display: none; }
.theme-btn .ic-sun { display: block; }
[data-theme="dark"] .theme-btn .ic-sun { display: none; }
[data-theme="dark"] .theme-btn .ic-moon { display: block; }

/* ---------- type ---------- */
h1 {
  font-weight: 850; color: var(--text-strong);
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  line-height: 0.98; letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 .accent { color: var(--signal); }
h2 {
  font-weight: 850; color: var(--text-strong);
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  line-height: 1.08; letter-spacing: -0.02em;
  max-width: 26ch; text-wrap: balance;
}
h3, h4 { color: var(--text-strong); }
.section-intro { margin-top: 1.1rem; color: var(--text); max-width: 62ch; }
section { padding: clamp(4rem, 9vh, 6rem) 0; }

/* ---------- hero (home) ---------- */
.hero { padding: clamp(3.5rem, 8vh, 5.5rem) 0 clamp(3rem, 7vh, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-sub { margin-top: 1.6rem; color: var(--text); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 46ch; }
.hero-ctas { margin-top: 2.2rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero-vis { position: relative; }
.hero-vis::before {
  content: ""; position: absolute; right: -8%; top: -14%; width: 60%; aspect-ratio: 1;
  background-image: radial-gradient(var(--dot-accent-soft) 2.2px, transparent 2.2px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 56%);
  mask-image: radial-gradient(circle, #000 55%, transparent 56%);
}
.hero-vis img { position: relative; width: 100%; display: block; border-radius: var(--radius); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow-hard); }

/* ---------- services (home) ---------- */
#services { border-top: 1px solid var(--line-hair); background: var(--bg-deep); }
.svc-featured {
  margin-top: 3rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise); box-shadow: var(--shadow-hard);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.svc-featured-left { padding: clamp(1.6rem, 3vw, 2.6rem); border-right: 1px solid var(--line-hair); }
.svc-featured-right { padding: clamp(1.6rem, 3vw, 2.6rem); }
.svc-kicker { color: var(--signal); font-weight: 700; }
h3.svc-name { font-weight: 800; font-size: clamp(1.35rem, 2.2vw, 1.5rem); letter-spacing: -0.015em; margin-top: 0.8rem; line-height: 1.12; }
.svc-desc { margin-top: 0.9rem; color: var(--text); max-width: 44ch; }
.svc-terms { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line-hair); color: var(--text-dim); font-size: 0.95rem; max-width: 42ch; }
.scope-list { list-style: none; display: grid; gap: 1.1rem; }
.scope-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: baseline; }
.scope-list .tick { color: var(--signal); font-weight: 700; }
.scope-list strong { display: block; font-weight: 700; color: var(--text-strong); }
.scope-list span.d { color: var(--text-dim); font-size: 0.95rem; }

.svc-grid { margin-top: 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.svc-card {
  border: 1px solid var(--line-hair); border-radius: var(--radius); background: var(--bg-raise);
  box-shadow: var(--shadow-soft); padding: clamp(1.5rem, 2.5vw, 2rem);
  display: flex; flex-direction: column;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.svc-card:hover { transform: translateY(-2px); }
.svc-card ul { list-style: none; margin-top: 1.3rem; display: grid; gap: 0.55rem; color: var(--text-dim); font-size: 0.95rem; }
.svc-card ul li { padding-left: 1.2rem; position: relative; }
.svc-card ul li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.5rem; height: 0.5rem; background: var(--dot-accent-soft); border-radius: 1px; }
.svc-more { margin-top: auto; padding-top: 1.4rem; font-weight: 700; font-size: 0.95rem; color: var(--text-strong); }
.svc-more .arrow { margin-left: 0.4em; }
.svc-card:hover .svc-more .arrow, .svc-featured a.svc-more:hover .arrow { color: var(--signal); transform: translateX(4px); }
.arrow { color: var(--text-faint); transition: color 0.15s ease, transform 0.2s var(--ease); display: inline-block; }

/* ---------- process ---------- */
.band { background: var(--bg-deep); border-top: 1px solid var(--line-hair); border-bottom: 1px solid var(--line-hair); transition: background-color 0.35s ease; }
.stages { margin-top: 3rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: stage; }
.stage { counter-increment: stage; border-top: 2px solid var(--line-strong); padding: 1.1rem 0.4rem 0 0; }
.stage::before {
  content: "0" counter(stage);
  font-family: "JetBrains Mono", monospace; font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.18em; color: var(--signal);
  display: block; margin-bottom: 0.85rem;
}
@media (prefers-reduced-motion: no-preference) {
  .stage { opacity: 0; transform: translateY(14px); transition: opacity 0.42s var(--ease), transform 0.42s var(--ease); }
  .stage:nth-child(2) { transition-delay: 120ms; }
  .stage:nth-child(3) { transition-delay: 240ms; }
  .stage:nth-child(4) { transition-delay: 360ms; }
  .stages.in .stage { opacity: 1; transform: none; }
}
.stage h3 { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.stage p { margin-top: 0.8rem; color: var(--text); font-size: 0.95rem; }
.stage .gets { margin-top: 1rem; color: var(--text-dim); font-size: 0.9rem; font-style: italic; }

/* ---------- compliance ---------- */
.comp-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.comp-note { margin-top: 1.6rem; color: var(--text); max-width: 48ch; }
.comp-backing {
  margin-top: 2rem; padding: 1.2rem 1.4rem; border: 1px solid var(--line-hair); border-radius: var(--radius);
  background: var(--bg-raise); box-shadow: var(--shadow-soft); color: var(--text); font-size: 0.95rem; max-width: 48ch;
}
.comp-backing strong { color: var(--text-strong); }
.controls { list-style: none; display: grid; border-top: 2px solid var(--line-strong); }
.controls li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: baseline; padding: 1.05rem 0.2rem; }
.controls li + li { border-top: 1px solid var(--line-hair); }
.controls .tick { color: var(--signal); font-weight: 700; }

/* ---------- principles ---------- */
.prin-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 5rem); }
.prin h3 { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.prin h3::before { content: ""; display: block; width: 0.75rem; height: 0.75rem; background: var(--signal); border-radius: 1px; margin-bottom: 0.9rem; }
.prin p { margin-top: 0.9rem; color: var(--text); max-width: 46ch; }

/* ---------- proof ---------- */
.proof-row { margin-top: 2.8rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.proof-card {
  border: 1px solid var(--line-hair); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-raise); box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.proof-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hard-sm); }
.proof-card .shot { display: block; overflow: hidden; border-bottom: 1px solid var(--line-hair); }
.proof-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 0.5s var(--ease); }
.proof-card:hover img { transform: scale(1.03); }
.proof-meta { display: block; padding: 1.1rem 1.3rem 1.3rem; }
.proof-meta .mono {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.12em;
  color: var(--signal-deep); background: var(--dot-accent-soft);
  border-radius: 3px; padding: 0.4em 0.7em;
}
[data-theme="dark"] .proof-meta .mono { color: #f0968a; }
.proof-meta h3 { font-weight: 800; font-size: 1.1rem; margin-top: 0.7rem; }
.proof-meta p { color: var(--text-dim); font-size: 0.92rem; margin-top: 0.35rem; }
.client-line { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: baseline; color: var(--text-dim); font-size: 0.95rem; }
.client-line .c {
  font-family: "JetBrains Mono", monospace; font-size: 0.78rem;
  border: 1px solid var(--line); border-radius: 3px; padding: 0.45em 0.8em;
}
.client-line .c strong { color: var(--text-strong); font-weight: 600; }
.client-line .c span { color: var(--terra); }
.text-link { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; color: var(--text-strong); border-bottom: 1.5px solid var(--signal); padding-bottom: 2px; }
.text-link:hover { color: var(--signal); }
.text-link:hover .arrow { color: var(--signal); transform: translateX(4px); }

/* ---------- about ---------- */
.about-grid { margin-top: 3rem; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-copy h3 { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; margin-top: 2.2rem; }
.about-copy h3:first-child { margin-top: 0; }
.about-copy p { margin-top: 0.8rem; color: var(--text); max-width: 58ch; }
.about-visual { border: 1.5px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-raise); box-shadow: var(--shadow-hard); }
.about-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.values { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line-hair); padding-top: 2rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
.value::before { content: ""; display: block; width: 0.75rem; height: 0.75rem; background: var(--signal); border-radius: 1px; margin-bottom: 0.9rem; }
.value h4 { font-weight: 800; font-size: 1.02rem; }
.value p { margin-top: 0.5rem; color: var(--text-dim); font-size: 0.9rem; }

/* ---------- CTA band (ink sticker card) ---------- */
.cta-band {
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  background: #0d0e10; box-shadow: var(--shadow-hard);
  padding: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem; align-items: center;
}
[data-theme="dark"] .cta-band { background: #1e2024; }
.cta-band h2 { max-width: none; color: #f4f1ea; }
.cta-band .sub { margin-top: 1rem; color: #b3ab9d; max-width: 52ch; }
.cta-actions { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; justify-self: end; }
.cta-band .btn-primary { border-color: #f4f1ea; box-shadow: 3px 3px 0 rgba(244, 241, 234, 0.9); }
.cta-band .btn-primary:active { box-shadow: none; }
.cta-actions .email { color: #b3ab9d; font-size: 0.95rem; }
.cta-actions .email a { color: #f4f1ea; border-bottom: 1px solid var(--signal); }
.cta-actions .email a:hover { color: var(--signal); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line-hair); padding: 3rem 0 3.5rem; color: var(--text-dim); font-size: 0.92rem; }
.foot-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.foot-nav a:hover { color: var(--text-strong); }
.foot-right { text-align: right; font-family: "JetBrains Mono", monospace; font-size: 0.78rem; line-height: 1.9; }
.foot-right a { color: var(--text); }
.foot-right a:hover { color: var(--signal); }

/* ---------- subpage hero ---------- */
.page-hero { padding: clamp(3rem, 7vh, 5rem) 0 clamp(2.5rem, 5vh, 4rem); border-bottom: 1px solid var(--line-hair); overflow: hidden; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.page-hero .crumb { color: var(--text-dim); }
.page-hero .crumb a:hover { color: var(--text-strong); }
.page-hero h1 { margin-top: 1.1rem; font-size: clamp(2.2rem, 4.2vw, 3.3rem); }
.page-hero .lede { margin-top: 1.4rem; color: var(--text); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 56ch; }
.page-hero .hero-ctas { margin-top: 2rem; }
.page-hero-visual { position: relative; }
.page-hero-visual::before {
  content: ""; position: absolute; right: -5%; top: -10%; width: 52%; aspect-ratio: 1;
  background-image: radial-gradient(var(--dot-accent-soft) 2.2px, transparent 2.2px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle, transparent 58%, #000 59%, #000 76%, transparent 77%);
  mask-image: radial-gradient(circle, transparent 58%, #000 59%, #000 76%, transparent 77%);
}
.page-hero-visual img { position: relative; width: 100%; display: block; border-radius: var(--radius); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow-hard); }

/* ---------- service detail blocks ---------- */
.detail-grid { margin-top: 2.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 3.5vw, 2.6rem); }
.detail { border-top: 2px solid var(--line-strong); padding-top: 1.2rem; }
.detail h3 { font-weight: 800; font-size: 1.18rem; }
.detail p { margin-top: 0.7rem; color: var(--text); font-size: 0.97rem; }
.fit-grid { margin-top: 2.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.fit { border: 1px solid var(--line-hair); border-radius: var(--radius); padding: clamp(1.5rem, 2.5vw, 2.2rem); }
.fit.good { background: var(--bg-raise); box-shadow: var(--shadow-soft); }
.fit h3 { font-weight: 800; font-size: 1.15rem; }
.fit ul { list-style: none; margin-top: 1.1rem; display: grid; gap: 0.6rem; color: var(--text); font-size: 0.95rem; }
.fit ul li { padding-left: 1.3rem; position: relative; }
.fit.good ul li::before { content: "\2713"; position: absolute; left: 0; color: var(--signal); font-weight: 700; }
.fit.bad ul li::before { content: "\00d7"; position: absolute; left: 0; color: var(--text-faint); font-weight: 700; }

/* resource card (e.g. idea validator skill) — sticker elevation */
.resource {
  margin-top: 2.6rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raise); box-shadow: var(--shadow-hard); padding: clamp(1.5rem, 3vw, 2.4rem);
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 1.6rem; align-items: center;
}
.resource h3 { font-weight: 800; font-size: 1.3rem; }
.resource p { margin-top: 0.7rem; color: var(--text); max-width: 56ch; }
.resource .cta { justify-self: end; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-end; }
.badge {
  display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 3px; padding: 0.4em 0.7em;
}
.badge.live { color: var(--terra); border-color: var(--terra); }

/* ---------- blog / lab cards ---------- */
.card-grid { margin-top: 2.8rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.post-card, .lab-card {
  border: 1px solid var(--line-hair); border-radius: var(--radius); background: var(--bg-raise);
  box-shadow: var(--shadow-soft); padding: clamp(1.4rem, 2.5vw, 1.9rem);
  display: flex; flex-direction: column; gap: 0.8rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.post-card:hover, .lab-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hard-sm); }
.post-card .date { font-family: "JetBrains Mono", monospace; color: var(--text-faint); font-size: 0.78rem; letter-spacing: 0.06em; }
.post-card h3, .lab-card h3 { font-weight: 800; font-size: 1.18rem; line-height: 1.22; letter-spacing: -0.01em; }
.post-card p, .lab-card p { color: var(--text); font-size: 0.95rem; }
.lab-card .top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lab-card .foot { margin-top: auto; padding-top: 0.6rem; font-weight: 700; font-size: 0.92rem; color: var(--text-strong); }
.featured-post {
  margin-top: 2.8rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-raise);
  box-shadow: var(--shadow-hard); padding: clamp(1.8rem, 3.5vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.featured-post:hover { transform: translateY(-2px); box-shadow: var(--shadow-hard-lg); }
.featured-post h3 { font-weight: 850; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.08; }
.featured-post p { margin-top: 1rem; color: var(--text); max-width: 58ch; }
.featured-post .meta { justify-self: end; text-align: right; color: var(--text-dim); font-family: "JetBrains Mono", monospace; font-size: 0.78rem; line-height: 1.8; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-deep); border-bottom: 1px solid var(--line); padding: 1.5rem var(--pad); gap: 1.2rem; }
  .hero-grid, .svc-featured, .comp-grid, .cta-band, .about-grid, .resource, .featured-post, .page-hero-grid { grid-template-columns: 1fr; }
  .svc-featured-left { border-right: none; border-bottom: 1px solid var(--line-hair); }
  .stages { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .proof-row, .card-grid { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: repeat(3, 1fr); }
  .cta-actions, .resource .cta { justify-self: start; align-items: flex-start; }
  .featured-post .meta { justify-self: start; text-align: left; }
}
@media (max-width: 768px) {
  .svc-grid, .prin-grid, .fit-grid, .detail-grid, .stages, .proof-row, .card-grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .foot-right { text-align: left; }
}
@media (max-width: 480px) {
  .values { grid-template-columns: 1fr; }
}


/* dot-matrix icons */
.dot-ic { width: 44px; height: 44px; display: block; color: var(--signal); }
.svc-card, .svc-featured-left, .stage { position: relative; }
.svc-card .dot-ic, .svc-featured-left .dot-ic { position: absolute; top: 1.6rem; right: 1.6rem; margin: 0; }
.svc-featured-left .dot-ic { top: 2.2rem; right: 2.2rem; }
.stage .dot-ic { position: absolute; top: 1.3rem; right: 0.4rem; width: 34px; height: 34px; margin: 0; }
.prin .dot-ic { width: 38px; height: 38px; margin-bottom: 0.9rem; }
.prin h3::before { content: none; }
#compliance .dot-ic { width: 48px; height: 48px; margin-bottom: 1.2rem; }
/* wordmark image */
.wm-mark { background: none; border-radius: 0; }
.wm-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }


/* contact modal */
.xp-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; }
.xp-modal.open { display: flex; }
.xp-modal__scrim { position: absolute; inset: 0; background: rgba(13,14,16,.45); }
.xp-modal__card { position: relative; width: min(440px, calc(100vw - 40px)); background: var(--card, var(--bg-raise)); border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-hard); color: var(--text-strong); }
.xp-modal__card h3 { font-size: 1.3rem; }
.xp-modal__card p { margin: 6px 0 14px; color: var(--text-dim); font-size: .9rem; }
.xp-modal__card label { display: block; font-size: .78rem; font-weight: 600; margin: 12px 0 4px; color: var(--text); }
.xp-modal__card input, .xp-modal__card textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); padding: 10px 12px; font: 400 .92rem/1.4 inherit; color: var(--text-strong); }
.xp-modal__card input:focus, .xp-modal__card textarea:focus { outline: 2px solid var(--signal); border-color: var(--signal); }
.xp-modal__send { margin-top: 18px; width: 100%; border: 0; border-radius: 999px; cursor: pointer; background: var(--signal); color: #fff; font: 600 .95rem/1 inherit; padding: 13px 20px; }
.xp-modal__send:disabled { opacity: .6; }
.xp-modal__close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--text-dim); }
.xp-modal__ok { display: none; text-align: center; padding: 26px 6px; }
.xp-modal__ok strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.xp-modal__err { color: #b33415; font-size: .85rem; margin-top: 10px; }
