/* =========================================================================
   Ian Randolph · AI products people actually adopt
   Visual system per brand-style-guide.md (hard constraints):
   warm paper · near-black ink · one disciplined indigo accent ·
   contemporary serif over a clean grotesque · lots of air · restrained motion.
   Anti-brief: nothing here may read as a generic SaaS / fractional-CPO site.
   ========================================================================= */

/* ---- Tokens ----------------------------------------------------------- */
:root {
  --bg:          #F6F2EA;  /* warm bone, not stark white */
  --surface:     #FBF9F4;  /* raised panels, used sparingly */
  --ink:         #17150F;  /* warm near-black */
  --ink-muted:   #6B675E;  /* secondary text, credentials */
  --ink-faint:   #908B80;  /* finest captions */
  --accent:      #2E2A5C;  /* deep indigo (locked) */
  --accent-hover:#403A7A;
  --hairline:    #E2DCD0;
  --hairline-strong: #D4CCBC;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* fluid type scale */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.0rem, 0.96rem + 0.2vw, 1.15rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3:  clamp(2.0rem, 1.6rem + 2vw, 3.1rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.6rem);

  --measure: 64ch;
  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 9rem);

  --fraunces-soft: 0;
  --fraunces-wonk: 0;
}

/* ---- Reset / base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #F6F2EA; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

::selection { background: rgba(46,42,92,0.14); }

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 420;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 110, "SOFT" var(--fraunces-soft), "WONK" var(--fraunces-wonk);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;   /* never overflow the viewport during font swap (FOUT) */
}

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1.4rem;
}

p { margin: 0 0 1.1rem; max-width: var(--measure); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }
strong { font-weight: 600; }
em { font-style: italic; }

/* ---- Layout ----------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }
.measure { max-width: var(--measure); }

/* ---- Buttons (no SaaS pills; small radius, certain) ------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--sans); font-size: var(--step-0); font-weight: 600;
  line-height: 1; letter-spacing: 0.005em;
  padding: 0.95em 1.5em; border-radius: 3px;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn-primary { background: var(--accent); color: #F4F1FB; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--hairline-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.textlink {
  font-weight: 600; color: var(--accent);
  border-bottom: 1px solid rgba(46,42,92,0.28); padding-bottom: 1px;
}
.textlink:hover { border-color: var(--accent-hover); }

/* ---- Nav -------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,242,234,0.86);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--hairline); }
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  font-family: var(--serif); font-weight: 460; font-size: 1.18rem;
  letter-spacing: -0.01em; color: var(--ink);
  font-variation-settings: "opsz" 40;
}
.wordmark:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav-links a:not(.btn) {
  font-size: var(--step--1); font-weight: 500; color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav .btn { padding: 0.6em 1.1em; font-size: var(--step--1); }
.nav-cta-only { display: none; }
@media (max-width: 620px) {
  .nav-links .nav-page { display: none; }
}

/* ---- Hero ------------------------------------------------------------- */
.hero { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero h1 {
  font-size: var(--step-4); font-weight: 440; max-width: 16ch;
  margin-bottom: 1.5rem; line-height: 1.02;
}
.hero .subhead {
  font-size: var(--step-1); color: var(--ink-muted); line-height: 1.5;
  max-width: 46ch; margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.5rem; }

/* trust strip */
.trust {
  margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}
.trust ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.55rem 0;
  font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.01em;
}
.trust li { display: inline-flex; align-items: center; }
.trust li:not(:last-child)::after {
  content: "·"; margin: 0 0.7rem; color: var(--hairline-strong);
}
.trust em { font-style: italic; }

/* ---- The insight (aphorism, the emotional center) -------------------- */
.insight { text-align: left; }
.insight .statement {
  font-family: var(--serif); font-weight: 380;
  font-size: var(--step-3); line-height: 1.18; max-width: 22ch;
  letter-spacing: -0.015em; margin-bottom: 2.6rem;
}
.insight .statement .hl { color: var(--accent); }
.insight .support { max-width: 54ch; }
.insight .support p { color: var(--ink-muted); font-size: var(--step-1); line-height: 1.55; }
.insight .support p:last-child { color: var(--ink); margin-bottom: 0; }

/* ---- Competition table (editorial, hairlines only) ------------------- */
.compare { margin-top: 2.6rem; max-width: 940px; }
.compare .row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.4rem 0; border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.compare .row:last-child { border-bottom: 1px solid var(--hairline); }
.compare .opt { font-weight: 600; color: var(--ink); font-size: var(--step-0); }
.compare .res { color: var(--ink-muted); margin: 0; }
.compare .res em { color: var(--ink); font-style: italic; }
@media (max-width: 600px) {
  .compare .row { grid-template-columns: 1fr; gap: 0.35rem; padding: 1.2rem 0; }
}

/* ---- Differentiated value (with the single portrait) ----------------- */
.value-grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.value h2 { font-size: var(--step-3); max-width: 16ch; margin-bottom: 1.6rem; font-weight: 420; }
.value p { font-size: var(--step-1); color: var(--ink-muted); line-height: 1.55; max-width: 48ch; }
.portrait {
  position: relative; align-self: center;
}
.portrait img {
  width: 100%; border-radius: 3px;
  filter: grayscale(0.32) contrast(1.02) brightness(1.02);
  background: var(--surface);
}
.portrait::after { /* whisper of indigo so the file reads editorial, not LinkedIn */
  content: ""; position: absolute; inset: 0; border-radius: 3px;
  background: var(--accent); mix-blend-mode: color; opacity: 0.10; pointer-events: none;
}
@media (max-width: 760px) {
  .value-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; order: -1; }
}

/* ---- Proof (three quiet pillars; confidence whispers) ---------------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 2.4rem; }
.pillar { padding: 0 clamp(1.2rem, 2.5vw, 2.2rem); }
.pillar:first-child { padding-left: 0; }
.pillar:last-child { padding-right: 0; }
.pillar + .pillar { border-left: 1px solid var(--hairline); }
.pillar h3 {
  font-family: var(--sans); font-size: var(--step-0); font-weight: 700;
  letter-spacing: 0.005em; margin-bottom: 1.2rem; color: var(--ink); line-height: 1.3;
}
.pillar ul { list-style: none; margin: 0; padding: 0; }
.pillar li {
  font-size: var(--step--1); color: var(--ink-muted); line-height: 1.45;
  padding: 0.5rem 0; border-top: 1px solid var(--hairline);
}
.pillar li:first-child { border-top: 0; padding-top: 0; }
.pillar em { font-style: italic; color: var(--ink); }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; gap: 2rem; }
  .pillar { padding: 0; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--hairline); padding-top: 2rem; }
}

/* ---- Testimonials (voices, with air; not a brag-wall) ---------------- */
.voices { columns: 2; column-gap: clamp(2rem, 5vw, 4rem); }
.voice { break-inside: avoid; margin: 0 0 clamp(2rem, 4vw, 3rem); }
.voice blockquote {
  margin: 0 0 0.85rem; font-family: var(--serif); font-weight: 360;
  font-size: var(--step-1); line-height: 1.4; color: var(--ink); letter-spacing: -0.005em;
}
.voice .cite { font-size: var(--step--1); color: var(--ink-muted); font-style: normal; }
.voice .cite b { color: var(--ink); font-weight: 600; }
@media (max-width: 680px) { .voices { columns: 1; } }

/* ---- How I help (three doors; numbered, not icon cards) -------------- */
.doors { margin-top: 2.4rem; max-width: 940px; }
.door {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 4vw, 2.6rem);
  padding: 2rem 0; border-top: 1px solid var(--hairline); align-items: start;
}
.door:last-child { border-bottom: 1px solid var(--hairline); }
.door .num {
  font-family: var(--serif); font-size: var(--step-2); font-weight: 360;
  color: var(--accent); line-height: 1; font-variation-settings: "opsz" 144;
}
.door h3 { font-family: var(--serif); font-weight: 440; font-size: var(--step-2); margin-bottom: 0.5rem; }
.door .said { color: var(--ink-muted); font-style: italic; margin-bottom: 0.6rem; display: block; }
.door p { margin: 0; color: var(--ink); max-width: 52ch; }
@media (max-width: 560px) {
  .door { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.6rem 0; }
  .door .num { font-size: var(--step-1); }
}

/* ---- The ask ---------------------------------------------------------- */
.ask { text-align: center; }
.ask h2 { font-size: var(--step-3); margin-bottom: 1.3rem; font-weight: 420; }
.ask .measure { margin-inline: auto; }
.ask p { margin-inline: auto; color: var(--ink-muted); font-size: var(--step-1); }
.ask .ask-actions { margin-top: 2.2rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ask .email { font-size: var(--step-0); color: var(--ink-muted); }
.ask .email a { border-bottom: 1px solid var(--hairline-strong); }

/* ---- Footer ----------------------------------------------------------- */
.footer { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--hairline); }
.footer-line {
  font-family: var(--serif); font-style: italic; font-weight: 360;
  font-size: var(--step-1); color: var(--ink); max-width: 40ch; margin-bottom: 2rem;
}
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-meta nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-meta a { font-size: var(--step--1); color: var(--ink-muted); font-weight: 500; }
.footer-meta a:hover { color: var(--ink); }
.footer-meta .copy { font-size: var(--step--1); color: var(--ink-faint); }

/* ---- About page ------------------------------------------------------- */
.about-hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.about-hero .grid {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.about-hero h1 { font-size: var(--step-4); font-weight: 440; max-width: 14ch; }
.about-hero .kicker { font-size: var(--step-1); color: var(--ink-muted); margin-top: 1.4rem; max-width: 42ch; }
@media (max-width: 760px) {
  .about-hero .grid { grid-template-columns: 1fr; }
  .about-hero .portrait { max-width: 300px; }
}
.prose { max-width: 60ch; }
.prose p { font-size: var(--step-1); line-height: 1.62; color: var(--ink); }
.prose p.dim { color: var(--ink-muted); }
.prose h2 {
  font-size: var(--step-2); font-weight: 420; margin: 3rem 0 1.2rem;
}
.prose .pull {
  font-family: var(--serif); font-weight: 360; font-size: var(--step-2);
  line-height: 1.25; color: var(--accent); max-width: 24ch;
  margin: 3rem 0; letter-spacing: -0.01em;
}
.prose a { border-bottom: 1px solid rgba(46,42,92,0.28); }

/* ---- Reveal-on-scroll (restrained, progressive enhancement) ----------
   Visible by default so no-JS visitors and crawlers always see content.
   Only hidden-then-revealed once JS confirms it is running (.js on <html>). */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Skip link / a11y ------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 0.6rem 1rem; border-radius: 3px; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
