/* =========================================================================
   Parable Labs — Hi-fi design system
   Direction: editorial precision · vibrant emerald · serif reserved for display
   ========================================================================= */

:root {
  /* --- Dark surfaces (retained, cooled away from warm brown-black) --- */
  --soil:   #0C1311;   /* primary dark bg (hero, anchor, footer) */
  --bark:   #122019;   /* lifted dark surface / cards on dark */
  --char:   #20302A;   /* hairlines on dark */

  /* --- Light surfaces (shifted parchment -> clean editorial whites) --- */
  --paper:  #FBFCFB;   /* primary light bg */
  --mist:   #EFF3F1;   /* secondary light surface ("medium" sections) */
  --card:   #FFFFFF;   /* pure-white editorial cards */
  --sand:   #E7ECE9;   /* hairlines on light */

  /* --- Ink --- */
  --ink:        #0E1714;
  --ink-soft:   #51615A;
  --ink-faint:  #8B978F;

  /* --- On dark --- */
  --bone:       #ECF1ED;
  --bone-soft:  #9DB0A6;
  --bone-faint: #61756B;

  /* --- Accent: emerald, more chromatic / confident --- */
  --seedling:        #10A86A;   /* the accent */
  --seedling-bright: #2BD18A;   /* pop on dark / hovers */
  --seedling-ink:    #0A7E51;   /* accessible green text on light */
  --seedling-tint:   rgba(16,168,106,0.10);
  --seedling-line:   rgba(16,168,106,0.30);

  /* --- Type --- */
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* --- Rhythm --- */
  --measure: 64ch;
  --maxw: 1180px;
  --gutter: clamp(24px, 5vw, 72px);
  --section-y: clamp(80px, 11vh, 148px);
  --radius: 4px;

  /* tweakable hooks (Tweaks panel overrides these) */
  --tw-accent: var(--seedling);
  --tw-accent-bright: var(--seedling-bright);
  --tw-accent-ink: var(--seedling-ink);
  --tw-light: var(--paper);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

::selection { background: var(--tw-accent); color: #fff; }

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wrap.narrow { max-width: 880px; }

.section { padding-block: var(--section-y); position: relative; }
.section.dark  { background: var(--soil); color: var(--bone); }
.section.mist  { background: var(--mist); }
.section.tight { padding-block: clamp(56px, 7vh, 96px); }

/* ---------- Type ---------- */
.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.display.xl { font-size: clamp(2.8rem, 6.2vw, 5.1rem); }
.display.lg { font-size: clamp(2.4rem, 4.6vw, 3.9rem); }

h2.heading, .heading {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.9vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.heading.sm { font-size: clamp(1.35rem, 2vw, 1.7rem); }

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tw-accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
}
.section.dark .label { color: var(--tw-accent-bright); }
.label::before {
  content: "";
  width: 26px; height: 1.5px;
  background: currentColor;
  opacity: 0.7;
}

.lead {
  font-size: clamp(1.12rem, 1.5vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0;
}
.section.dark .lead { color: var(--bone-soft); }

.body { color: var(--ink-soft); max-width: var(--measure); }
.body p { margin: 0 0 1.1em; }
.body p:last-child { margin-bottom: 0; }
.section.dark .body { color: var(--bone-soft); }

.kicker-line { font-weight: 500; color: var(--ink); }
.section.dark .kicker-line { color: var(--bone); }

/* Pull-quote — DM Sans (serif reserved for hero display) */
.pullquote {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--ink);
  border-left: 3px solid var(--tw-accent);
  padding: 4px 0 4px 28px;
  margin: 0;
  max-width: 24ch;
  text-wrap: balance;
}
.section.dark .pullquote { color: var(--bone); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--tw-accent);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn.primary {
  background: var(--b);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.btn.primary:hover {
  background: var(--tw-accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px var(--tw-accent);
}
.btn.ghost {
  background: transparent;
  border-color: var(--sand);
  color: var(--ink);
}
.section.dark .btn.ghost { border-color: var(--char); color: var(--bone); }
.btn.ghost:hover { border-color: var(--tw-accent); color: var(--tw-accent-ink); transform: translateY(-2px); }
.section.dark .btn.ghost:hover { color: var(--tw-accent-bright); }
.btn.sm { padding: 10px 20px; font-size: 0.92rem; }
.btn.lg { padding: 18px 34px; font-size: 1.08rem; }

/* Text link with arrow */
.tlink {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--tw-accent-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid var(--tw-accent-line);
  padding-bottom: 2px;
  transition: gap .18s ease, border-color .18s ease;
}
.section.dark .tlink { color: var(--tw-accent-bright); }
.tlink:hover { gap: 14px; border-color: var(--tw-accent); }
.tlink .arr { transition: transform .18s ease; }
.tlink:hover .arr { transform: translateX(2px); }

/* ---------- Spiral mark ---------- */
.spiral { display: inline-block; color: var(--tw-accent); line-height: 0; }
.spiral svg { display: block; width: 100%; height: 100%; }
.section.dark .spiral { color: var(--tw-accent-bright); }

@media (prefers-reduced-motion: no-preference) {
  /* Pivot on the spiral's eye (hub dot at SVG 60,60). Under viewBox "-16 -16 132 132"
     that point sits at (60 - -16)/132 = 57.58% of the box — keeping the original
     spins-in-place feel. (Box-center 50% maps to SVG 50,50, which makes the hub orbit.) */
  .spiral.spin svg { animation: spiral-spin 48s linear infinite; transform-origin: 57.58% 57.58%; }
}
@keyframes spiral-spin { to { transform: rotate(360deg); } }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--sand);
  padding-block: 13px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand .spiral { width: 30px; height: 30px; }
.nav-brand .wordmark {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--bone);
  transition: color .3s ease;
}
.nav.scrolled .nav-brand .wordmark { color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--sans);
  font-size: 0.96rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--bone-soft);
  transition: color .2s ease;
  position: relative;
}
.nav.scrolled .nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--bone); }
.nav.scrolled .nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--bone); }
.nav.scrolled .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content:""; position:absolute; left:0; right:0; bottom:-6px;
  height:1.5px; background: var(--tw-accent);
}
.nav-cta { margin-left: 6px; }

/* keep nav legible when over a light hero/header */
.nav.on-light:not(.scrolled) .nav-brand .wordmark,
.nav.on-light:not(.scrolled) .nav-links a { color: var(--ink-soft); }
.nav.on-light:not(.scrolled) .nav-brand .wordmark { color: var(--ink); }
.nav.on-light:not(.scrolled) .nav-links a.active { color: var(--ink); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.foot {
  background: var(--soil);
  color: var(--bone-soft);
  padding: 56px var(--gutter) 44px;
}
.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand .spiral { width: 26px; height: 26px; color: var(--tw-accent-bright); }
.foot-brand .wordmark { font-family: var(--mono); font-weight: 400; color: var(--bone); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.foot-brand .meta { color: var(--bone-faint); font-size: 0.9rem; }
.foot-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.foot-links a { color: var(--bone-soft); text-decoration: none; font-size: 0.92rem; transition: color .2s ease; }
.foot-links a:hover { color: var(--bone); }
.foot-links a.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--tw-accent-bright);
  border: 1px solid var(--char);
  padding: 5px 11px;
  border-radius: 4px;
}
.foot-links a.mono:hover { border-color: var(--tw-accent); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  background: var(--soil);
  color: var(--bone);
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 168px var(--gutter) 120px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
/* faint emerald radial + concentric rings echoing the spiral */
.hero-bg::before {
  content:""; position:absolute;
  width: 880px; height: 880px;
  left: 50%; top: 38%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, var(--seedling-tint) 0%, transparent 62%);
}
.hero-rings {
  position: absolute; left: 50%; top: 38%;
  transform: translate(-50%,-50%);
  width: 760px; height: 760px;
  opacity: 0.5;
}
.hero-content { position: relative; max-width: 960px; }
.hero .markwrap {
  width: 64px; height: 64px;
  margin: 0 auto 30px;
  color: var(--tw-accent-bright);
}
.hero .brandlabel {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bone-soft);
  margin: 0 0 30px;
}
.hero .display { margin: 0 auto; max-width: 16ch; }
.hero .hero-sub {
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  line-height: 1.5;
  color: var(--bone-soft);
  max-width: 52ch;
  margin: 30px auto 40px;
}
.hero-cta { display: flex; justify-content: center; }
.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bone-faint);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(var(--bone-faint), transparent); }

/* =========================================================================
   PROBLEM
   ========================================================================= */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.problem-grid .body { font-size: 1.12rem; }
.closing-insight {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--sand);
  color: var(--ink-soft);
  max-width: 60ch;
  font-size: 1.06rem;
}
.closing-insight strong { color: var(--ink); font-weight: 500; }

/* =========================================================================
   POSITIONING ANCHOR
   ========================================================================= */
.anchor { text-align: center; }
.anchor .display { margin: 0 auto; max-width: none; white-space: nowrap; }
.anchor .lead { margin: 28px auto 0; text-align: center; max-width: 46ch; }

/* =========================================================================
   POSITIONING ANCHOR — emerald band variant
   ========================================================================= */
.section.emerald {
  background: var(--tw-accent);
  background-image: linear-gradient(157deg,
    color-mix(in srgb, var(--tw-accent) 92%, #ffffff 8%) 0%,
    color-mix(in srgb, var(--tw-accent) 80%, #053c27 20%) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.section.emerald .display { color: #fff; }
.section.emerald .lead { color: rgba(255,255,255,0.88); }
.section.emerald .label { color: rgba(255,255,255,0.92); }
.section.emerald .label::before { background: rgba(255,255,255,0.7); }
/* faint spiral echo, bottom-right */
.section.emerald .emerald-mark {
  position: absolute;
  right: -60px; bottom: -90px;
  width: 320px; height: 320px;
  color: rgba(255,255,255,0.10);
  pointer-events: none;
}

/* =========================================================================
   WHY PARABLE — founders are the bigger beat
   ========================================================================= */
.founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  margin: clamp(28px, 4vw, 44px) 0 clamp(40px, 5vw, 60px);
}
.founder {
  padding-top: 22px;
  border-top: 2px solid var(--tw-accent);
}
.founder-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 12px;
  color: var(--bone);
}
.section:not(.dark) .founder-name { color: var(--ink); }
.founder-cred {
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--bone-soft);
  margin: 0;
}
.section:not(.dark) .founder-cred { color: var(--ink-soft); }
.founder-cred strong { color: var(--tw-accent-bright); font-weight: 500; }
.section:not(.dark) .founder-cred strong { color: var(--tw-accent-ink); }

.why-headline {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: var(--bone);
  max-width: 20ch;
  text-wrap: balance;
}
.section:not(.dark) .why-headline { color: var(--ink); }

/* =========================================================================
   WHY PARABLE
   ========================================================================= */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  margin-top: 8px;
}
.section.dark .why-col .kicker-line { color: var(--bone); }
.section.dark .why-col .body { color: var(--bone-soft); }
.why-col .kicker-line {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  font-weight: 500;
}
.why-col .body { font-size: 1.04rem; }
.why-tag {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--tw-accent-ink);
  display: inline-flex;
  gap: 9px;
  align-items: baseline;
}
.why-tag::before { content: "→"; }
.qualify {
  margin-top: clamp(44px, 5vw, 64px);
  padding-top: 34px;
  border-top: 1px solid var(--sand);
  display: flex;
  gap: 40px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.qualify p {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.45;
  color: var(--ink);
  max-width: 60ch;
}
.qualify p em { font-style: normal; color: var(--tw-accent-ink); }
.section.dark .qualify { border-top-color: var(--char); }
.section.dark .qualify p { color: var(--bone); }
.section.dark .qualify p em { color: var(--tw-accent-bright); }

/* Single emerald accent word (e.g. positioning anchor on light) */
.accent-word { color: var(--tw-accent-ink); }
.section.dark .accent-word { color: var(--tw-accent-bright); }

/* ---------- Meet-the-team block (Why Parable) ---------- */
.meet-team {
  margin-top: clamp(40px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px 40px;
}
.meet-portraits { display: flex; flex-wrap: wrap; gap: 18px 40px; }
.meet-person {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.meet-portrait {
  position: relative;
  width: 62px; height: 62px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--mist);
  box-shadow: 0 0 0 1px var(--char), 0 0 0 4px transparent;
  transition: box-shadow .25s ease;
}
.meet-portrait img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .45s ease;
}
.meet-ai { opacity: 0; }
.meet-person:hover .meet-ai { opacity: 1; }
.meet-person:hover .meet-portrait {
  box-shadow: 0 0 0 1px var(--tw-accent), 0 0 0 4px color-mix(in srgb, var(--tw-accent) 22%, transparent);
}
/* John — initial placeholder (matches About) */
.meet-portrait .meet-initial {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  color: var(--tw-accent-bright);
}
.meet-id { display: flex; flex-direction: column; gap: 3px; }
.meet-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--ink);
  transition: color .2s ease;
}
.section.dark .meet-name { color: var(--bone); }
.meet-role {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tw-accent-ink);
}
.section.dark .meet-role { color: var(--tw-accent-bright); }
.meet-person:hover .meet-name { color: var(--tw-accent-bright); }

/* =========================================================================
   HOW WE WORK TEASER (four-up)
   ========================================================================= */
.teaser-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 52px; }
.loop4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--char);
  border: 1px solid var(--char);
  border-radius: var(--radius);
  overflow: hidden;
}
.loop4 .step {
  background: var(--soil);
  padding: 30px 26px 34px;
  position: relative;
  transition: background .25s ease;
}
.loop4 .step:hover { background: var(--bark); }
.loop4 .step .idx {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--tw-accent-bright);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.loop4 .step .idx .arc {
  width: 22px; height: 22px; color: var(--tw-accent-bright); opacity: 0.9;
}
.loop4 .step h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.34rem;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--bone);
}
.loop4 .step p { margin: 0; font-size: 0.98rem; color: var(--bone-soft); line-height: 1.5; }
.loop4 .step .flow {
  position: absolute; top: 36px; right: -1px;
  color: var(--bone-faint); font-size: 0.9rem;
}

/* =========================================================================
   SUBSCRIBE
   ========================================================================= */
.subscribe { text-align: center; }
.subscribe .heading { margin: 0 auto; max-width: 20ch; }
.subscribe .lead { margin: 22px auto 34px; text-align: center; }
.subscribe-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.subdomain { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-faint); letter-spacing: 0.04em; }

/* =========================================================================
   Reveal on scroll
   ========================================================================= */
body.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
}
@media (prefers-reduced-motion: reduce) {
  body.reveal-ready .reveal { opacity: 1; transform: none; }
}
.reveal {
  transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1);
}
/* must out-specify body.reveal-ready .reveal */
body.reveal-ready .reveal.in,
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* =========================================================================
   Responsive (light touch — comp is desktop-first)
   ========================================================================= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .problem-grid, .why-grid { grid-template-columns: 1fr; }
  .founders { grid-template-columns: 1fr; gap: 28px; }
  .loop4 { grid-template-columns: 1fr 1fr; }
  .qualify { flex-direction: column; align-items: flex-start; gap: 24px; }
}
@media (max-width: 560px) {
  .loop4 { grid-template-columns: 1fr; }
  .anchor .display { white-space: normal; }
}
