/* ============================================================
   Paraboliq — landing page styles
   Warm neutrals · soft ink · one signal-blue accent
   Bodoni Moda (display) · Newsreader (body) · JetBrains Mono (technical)
   ============================================================ */

:root {
  /* Warm neutral grounds */
  --cream:      #F4EEE2;
  --paper:      #FBF7EE;
  --sand:       #E9E0CF;
  --sand-deep:  #DED2BC;

  /* Soft warm ink */
  --ink:        #221E17;
  --ink-soft:   #5C554A;
  --ink-faint:  #8C8475;

  /* Signal blue accent (used sparingly) */
  --signal:        #1E47A0;
  --signal-deep:   #14306E;
  --signal-tint:   rgba(30, 71, 160, 0.10);

  /* Hairlines */
  --line:       rgba(34, 30, 23, 0.13);
  --line-soft:  rgba(34, 30, 23, 0.07);

  /* Type */
  --font-display: "Bodoni Moda", Georgia, serif;
  --font-body:    "Newsreader", Georgia, serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Rhythm */
  --container: 1240px;
  --gutter: clamp(22px, 5vw, 80px);
  --section-y: clamp(90px, 13vh, 190px);

  /* the live accent, overridable by tweaks */
  --accent: var(--signal);
  --accent-deep: var(--signal-deep);
  --accent-tint: var(--signal-tint);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.62;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

#root { position: relative; z-index: 1; }

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration: none; }

/* ---------- shared layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.012em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* ============================================================
   Background canvas (the living parabola)
   ============================================================ */
#parabola-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(244, 238, 226, 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 42px);
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-links .nav-link.cta { color: var(--ink); }

.btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--cream); transform: translateY(-1px); }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--paper); }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

/* ---------- wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.wordmark .mark { display: block; overflow: visible; }
.wordmark .mark .arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.wordmark .mark .focus { fill: var(--accent); }
.wordmark .word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 78px;
}
.hero-inner { width: 100%; padding-block: clamp(40px, 7vh, 90px); }
.hero-eyebrow { margin-bottom: clamp(26px, 4vh, 40px); }

.hero h1 {
  font-size: clamp(48px, 8.4vw, 124px);
  line-height: 0.98;
  font-weight: 500;
  max-width: 14ch;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
}
.hero h1 .accent-word { color: var(--accent); }

.hero-sub {
  margin-top: clamp(26px, 3.6vh, 40px);
  max-width: 50ch;
  font-size: clamp(18px, 1.45vw, 22px);
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero-actions {
  margin-top: clamp(34px, 4.4vh, 52px);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* live equation readout — a translucent caption that rides the marker dot */
.equation {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(20px, -50%);
  will-change: left, top, opacity;
}
.equation .eq-label { text-transform: uppercase; letter-spacing: 0.16em; opacity: 0.8; }
.equation .eq-value { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.equation .eq-value .c { color: var(--accent); }

/* ============================================================
   Sections — shared
   ============================================================ */
section { position: relative; }
.band {
  position: relative;
  z-index: 1;
  padding-block: var(--section-y);
}
.band.paper {
  background: var(--paper);
  border-block: 1px solid var(--line-soft);
}
.section-head { max-width: 62ch; }
.section-head h2 {
  font-size: clamp(32px, 4.6vw, 62px);
  margin-top: 22px;
  max-width: 18ch;
}
.section-head .lede {
  margin-top: 26px;
  font-size: clamp(18px, 1.4vw, 21px);
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ---------- services ---------- */
.services {
  margin-top: clamp(54px, 7vh, 88px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.service {
  background: var(--cream);
  padding: clamp(30px, 3.4vw, 50px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  transition: background 0.4s ease;
}
.band.paper .service { background: var(--paper); }
.service:hover { background: var(--sand); }
.band.paper .service:hover { background: var(--cream); }
.service .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.service h3 {
  font-size: clamp(24px, 2.3vw, 33px);
  font-weight: 500;
}
.service p {
  color: var(--ink-soft);
  font-size: 17.5px;
  line-height: 1.55;
  margin: 0;
}
.service .more {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease, gap 0.3s ease;
}
.service:hover .more { color: var(--accent); gap: 12px; }

/* ---------- how we work ---------- */
.phases {
  margin-top: clamp(54px, 7vh, 90px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 64px);
}
.phase { position: relative; padding-top: 30px; border-top: 1px solid var(--ink); }
.phase .pnum {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}
.phase h3 {
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 500;
  margin-bottom: 16px;
}
.phase h3 em { font-style: italic; }
.phase p { color: var(--ink-soft); font-size: 17px; line-height: 1.58; margin: 0; }

/* ---------- thesis ---------- */
.thesis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vh, 70px);
  align-items: start;
}
.thesis-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 20ch;
}
.thesis-quote em { font-style: italic; }
.thesis-quote .accent-word { color: var(--accent); }
.thesis-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(26px, 3vw, 48px);
  max-width: 900px;
}
.thesis-body p { color: var(--ink-soft); font-size: 18px; margin: 0; }
.thesis-body p strong { color: var(--ink); font-weight: 600; }

/* ---------- contact CTA ---------- */
.cta-band {
  padding-block: clamp(110px, 18vh, 220px);
  text-align: center;
  position: relative;
}
.cta-band h2 {
  font-size: clamp(40px, 7vw, 104px);
  line-height: 1.0;
  font-weight: 500;
  max-width: 16ch;
  margin-inline: auto;
}
.cta-band h2 em { font-style: italic; }
.cta-band .accent-word { color: var(--accent); }
.cta-band .cta-sub {
  margin: 30px auto 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.4vw, 21px);
}
.cta-band .cta-actions {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--sand);
  padding-block: clamp(56px, 8vh, 96px);
}
.footer a { color: var(--sand); }
.footer .footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer .wordmark .word { color: var(--paper); }
.footer .wordmark .mark .arc { stroke: var(--paper); }
.footer .wordmark .mark .focus { fill: var(--accent); }
.footer .foot-tag {
  margin-top: 18px;
  max-width: 36ch;
  color: rgba(255,255,255,0.55);
  font-size: 16px;
}
.footer .foot-cols {
  display: flex;
  gap: clamp(40px, 7vw, 96px);
}
.footer .foot-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 0 18px;
}
.footer .foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer .foot-col a {
  font-size: 16px;
  color: rgba(255,255,255,0.78);
  transition: color 0.25s ease;
}
.footer .foot-col a:hover { color: var(--paper); }
.footer .footer-bottom {
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
}
.footer .footer-bottom .links { display: flex; gap: 26px; }
.footer .footer-bottom .links a:hover { color: var(--paper); }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  body { font-size: 18px; }
  .nav-links .desktop-only { display: none; }
  .services { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr; gap: 36px; }
  .thesis-body { grid-template-columns: 1fr; }
  .equation { font-size: 11px; gap: 10px; }
  .equation .eq-meta { display: none; }
}

@media (max-width: 560px) {
  .nav-inner { height: 66px; }
  .hero { padding-top: 66px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .footer .footer-top { flex-direction: column; }
}
