/* ============================================================
   Informed Simplicity — redesign base.css
   Evolves the original warm-monochrome system.
   System font stack only (no webfonts to manage).
   ============================================================ */

:root {
  color-scheme: light;

  /* Ink + paper */
  --ink: #232220;
  --ink-soft: #3a3733;
  --body: #5A5550;
  --muted: #8C8279;
  --muted-soft: #C4BAB0;
  --hairline: #DcD3C6;
  --hairline-strong: #C4BAB0;
  --canvas: #fdfbf6;
  --paper: #F5F0EA;
  --paper-strong: #ece3d6;
  --on-dark: #fdfbf6;
  --footer: #141210;

  /* Signal + page accents */
  --signal: #E63B2E;          /* Cadmium Red Light — action / the gap */
  --signal-ink: #c42f1f;
  --bronze: #B87333;          /* Anodized Copper — Value Translation */
  --teal: #2A6B6B;            /* Deep Teal — Proof / confirmed / Work With Me */
  --slate: #3f4a52;

  --accent: var(--signal);    /* per-page override */

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;

  --wrap: 760px;
  --wrap-wide: 1140px;
  --section: clamp(5rem, 9vw, 8rem);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 980px;

  --shadow-card: 0 1px 2px rgba(35,34,32,.04), 0 8px 30px -18px rgba(35,34,32,.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--canvas); }

/* Layout primitives -------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding: 0 24px; }

/* Type --------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3, h4 { margin: 0; font-weight: 680; color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; }

.display-xl { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.0; letter-spacing: -0.045em; }
.display-lg { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.04; letter-spacing: -0.035em; }
.display-md { font-size: clamp(1.85rem, 3.4vw, 3.15rem); line-height: 1.04; letter-spacing: -0.035em; }
.display-sm { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.02em; }

p { margin: 0; color: var(--body); text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-soft); }
.muted { color: var(--muted); }

.mark-accent { color: var(--accent); }
.underline-accent { box-shadow: inset 0 -0.32em 0 color-mix(in oklab, var(--accent) 18%, transparent); }

/* Hinge line — the load-bearing sentences (» in the source notes) */
.hinge {
  display: block;
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 640;
  color: var(--ink);
  margin: 8px 0;
  padding-left: clamp(20px, 3vw, 34px);
  border-left: 3px solid var(--accent);
  text-wrap: balance;
}
.sec.ink .hinge { color: var(--on-dark); }
.hinge .mark-accent { color: var(--accent); }

/* Nav ---------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--wrap-wide); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: transparent url("/assets/is-mark.svg") center / contain no-repeat;
  position: relative; flex-shrink: 0;
}
.brand-mark::after { content: none; }
.brand-mark.is-accent { background-image: url("/assets/is-mark.svg"); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--body); padding: 4px 0; position: relative; transition: color .15s ease; }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--accent); }

.nav-cta {
  font-size: 14px; font-weight: 550; padding: 9px 17px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--on-dark); border: 1px solid var(--ink);
  transition: transform .15s ease, background-color .15s ease;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

@media (max-width: 760px) {
  .nav-links { gap: 14px; }
  .nav-link:not(.always) { display: none; }
}

/* Buttons ------------------------------------------------ */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 28px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 550;
  background: var(--ink); color: var(--on-dark); border: 1px solid var(--ink);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.cta:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 30px -16px var(--accent); }
.cta .arrow { transition: transform .2s ease; }
.cta:hover .arrow { transform: translateX(3px); }
.cta.secondary { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.cta.secondary:hover { background: transparent; color: var(--accent); border-color: var(--accent); box-shadow: none; transform: translateY(-2px); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; align-items: center; }

/* Footer ------------------------------------------------- */
.foot { background: var(--footer); color: var(--paper-strong); padding: 64px 0 40px; border-top: 1px solid rgba(255,255,255,.08); }
.foot a { color: var(--paper-strong); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 40px; }
.foot .brand { color: var(--on-dark); }
.foot .brand-mark { background-image: url("/assets/is-mark-canvas.svg"); }
.foot .brand-mark::after { content: none; }
.foot-brand .desc { font-size: 14px; color: var(--muted-soft); margin-top: 14px; max-width: 34ch; }
.foot-group h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 14px; }
.foot-group a { display: block; font-size: 14px; padding: 5px 0; transition: color .15s ease; }
.foot-group a:hover { color: var(--on-dark); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Reveal-on-scroll --------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; }
  .reveal.d2 { transition-delay: .16s; }
  .reveal.d3 { transition-delay: .24s; }
}
