/* ══════════════════════════════════════════════════════════════
   Karya · The Enterprise Software Factory
   Shared stylesheet for the two v3 review builds.

   Same material as v2: paper, ink, one violet, drafting rules.
   The hero art is now a circuit — one golden path, looping, because
   the factory never stops at "shipped".
   ══════════════════════════════════════════════════════════════ */
:root {
  --paper:       #f6f4f0;
  --paper-2:     #efece7;
  --paper-3:     #e9e5dd;
  --rule:        #d8d2c8;
  --rule-soft:   #e5e0d7;
  --ink:         #16151a;
  --ink-dim:     #504d58;
  --ink-muted:   #6e6a76;
  --accent:      #7c3aed;
  --accent-soft: rgba(124,58,237,.07);
  --accent-line: rgba(124,58,237,.32);

  --gut: 32px;
  --maxw: 1120px;

  --art-h: min(78vh, 580px);
  --art-o: 1;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ─── background field ─────────────────────── */
#paper-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#graph-paper { display: block; width: 100%; height: 100%; }
.shell { position: relative; z-index: 1; }

/* ─── shared primitives ────────────────────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.section-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gut); }

.display {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 144;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--accent); }

h2.sec-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0 0 20px;
  text-wrap: balance;
}
h2.sec-title em {
  font-style: italic;
  color: var(--accent);
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 120;
  font-weight: 400;
}

/* Small mono kicker above a section title. The deck numbers its sections;
 * this is that habit, carried onto paper. */
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.kicker::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

.lede {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 68ch;
  margin: 0 0 18px;
}
.lede strong { color: var(--ink); font-weight: 600; }
.lede:last-child { margin-bottom: 0; }

.rule { height: 1px; background: var(--rule); border: 0; max-width: var(--maxw); margin: 0 auto; }

.btn-primary {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 13px 24px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .12s;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-primary .arw { opacity: .6; }

/* ─── nav ──────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px max(var(--gut), calc((100vw - var(--maxw)) / 2 + var(--gut)));
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .2s, border-color .2s, padding .2s;
}
.nav.scrolled {
  background: rgba(246,244,240,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--rule);
  padding-top: 13px;
  padding-bottom: 13px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}
.nav-brand img { display: block; }
.nav-spacer { flex: 1; }

/* ─── hero ─────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 82vh;
  min-height: min(82svh, 840px);
  padding: clamp(56px, 9vh, 96px) 0 clamp(72px, 12vh, 124px);
}
.hero > .section { width: 100%; }

.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--art-o);
}

/* The circuit. One path, five stations, work travelling it forever. Nothing
 * here is above .3 ink, so the copy sits on it without a scrim. */
.hero-circuit {
  position: absolute;
  top: 50%;
  right: max(1vw, calc((100vw - var(--maxw)) / 2 - 80px));
  transform: translateY(-50%);
  height: var(--art-h);
  width: var(--art-h);
  overflow: visible;
}
.hero-circuit .track {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: .15;
  stroke-width: 1.5;
}
/* The golden path itself: a violet dash that runs the loop. Long dash, long
 * gap, so at any moment one quarter of the circuit is lit. */
.hero-circuit .flow {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: .62;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 300 1900;
  animation: flow 9s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -2200; } }

.hero-circuit .station {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-opacity: .28;
  stroke-width: 1.5;
  animation: pop-in .7s ease-out both;
  animation-delay: calc(var(--i) * 110ms);
}
.hero-circuit .station-dot {
  fill: var(--accent);
  fill-opacity: .55;
  animation: pop-in .7s ease-out both;
  animation-delay: calc(120ms + var(--i) * 110ms);
}
/* Faint rings around each station — the work in flight at that stage. */
.hero-circuit .halo {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: .14;
  stroke-width: 1;
  animation: pop-in .7s ease-out both;
  animation-delay: calc(200ms + var(--i) * 110ms);
}
.hero-circuit .tick {
  stroke: var(--ink);
  stroke-opacity: .13;
  stroke-width: 1;
}
/* Naming the stations is what turns the ring from decoration into the
 * argument: one path, and it comes back around. */
.hero-circuit .label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 2.6px;
  fill: var(--ink);
  fill-opacity: .34;
  animation: pop-in .7s ease-out both;
  animation-delay: calc(280ms + var(--i) * 110ms);
}
@keyframes pop-in { from { opacity: 0; } to { opacity: 1; } }

.hero-copy { position: relative; z-index: 1; max-width: 660px; }
.hero .display { font-size: clamp(38px, 6vw, 74px); max-width: 13ch; }
.hero-sub {
  margin: 30px 0 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.55vw, 18.5px);
  line-height: 1.62;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-claim {
  margin: 26px 0 0;
  max-width: 34ch;
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 54;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-wrap: balance;
}
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── generic section rhythm ───────────────── */
.band { padding: clamp(58px, 9.5vh, 100px) 0; }
.band-tint { background: rgba(255,255,255,0.4); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ─── premise · who already built one ──────── */
.premise-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.builders { margin-top: 4px; }
.builders-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 6px;
}
.builder {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.builder .val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 17px;
  color: var(--accent);
  min-width: 92px;
}
.builder .who { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; }
.builders-note { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-muted); }

/* ─── the gap · what enterprise requires ───── */
/* Nine requirements, three across — a full 3×3 block. auto-fit would leave a
 * ragged last row with the grid's own rule colour showing through. */
.reqs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  margin: 34px 0 0;
}
.req {
  background: var(--paper);
  padding: 17px 18px 19px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.req svg { flex: none; margin-top: 2px; color: var(--accent); opacity: .75; }
.req b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 3px; }
.req span { display: block; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

/* ─── the golden path ──────────────────────── */
.path {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 44px 0 0;
  border-top: 1px solid var(--rule);
}
.path-stage {
  position: relative;
  padding: 26px 22px 30px 0;
  border-right: 1px solid var(--rule-soft);
}
.path-stage:last-child { border-right: 0; }
/* The station mark sits on the top rule, so the five of them read as one
 * line of travel rather than five separate cards. */
.path-stage::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
}
.path-stage .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.path-stage h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.018em; margin: 0 0 8px; }
.path-stage .who {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 10px;
}
.path-stage p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-dim); }

.chips-box {
  margin-top: 40px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 22px 24px 24px;
  background: rgba(255,255,255,0.5);
}
.chips-box .chips-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 15px;
  background: var(--paper);
}

/* ─── your cloud ───────────────────────────── */
.cloud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  margin-top: 40px;
}
.cloud-card { background: var(--paper); padding: 26px 24px 28px; }
.cloud-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 9px; line-height: 1.3; }
.cloud-card p { margin: 0; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

/* ─── ideal · option A only ────────────────── */
/* Six marks, three across — same reason as .reqs. */
.marks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  margin: 30px 0 26px;
}
.mark { background: var(--paper); padding: 15px 17px 17px; }
.mark b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 4px; }
.mark span { display: block; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

.belief-list { margin-top: 40px; }
.belief {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.belief:last-child { border-bottom: 1px solid var(--rule); }
.belief .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding-top: 8px;
}
.belief h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 120;
  font-weight: 400;
  font-size: clamp(23px, 3vw, 32px);
  letter-spacing: -0.018em;
  line-height: 1.16;
  margin: 0 0 12px;
}
.belief h3 em { font-style: italic; color: var(--accent); }
.belief p { margin: 0; color: var(--ink-dim); font-size: 15.5px; line-height: 1.62; max-width: 60ch; }
.belief p strong { color: var(--ink); font-weight: 600; }

.pullquote {
  margin: clamp(40px, 5.5vh, 62px) 0 0;
  padding: 0 0 0 clamp(18px, 3vw, 34px);
  border-left: 2px solid var(--accent-line);
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 120;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 2.9vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--accent);
  max-width: 28ch;
  text-wrap: balance;
}

/* ─── pricing ──────────────────────────────── */
.price-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) 1.15fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 40px;
}
.price-hero {
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: rgba(255,255,255,0.6);
  padding: 34px 30px 36px;
}
.price-hero .plabel {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.price-hero .amount {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(34px, 4.4vw, 50px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
.price-hero .amount .per { font-size: 15px; letter-spacing: 0; color: var(--ink-muted); }
.price-hero .incl { margin: 16px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.price-row:first-child { padding-top: 0; }
.price-row .rname { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; }
.price-row .rname small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-muted); margin-top: 3px; letter-spacing: 0; }
.price-row .rval {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13.5px;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}

/* ─── mission / CTA / footer ───────────────── */
.mission { padding: clamp(66px, 11vh, 122px) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(255,255,255,0.4); }
.mission .display { font-size: clamp(27px, 3.9vw, 50px); line-height: 1.16; max-width: 22ch; }

.cta { padding: clamp(72px, 13vh, 132px) 0; text-align: center; }
.cta .display { font-size: clamp(32px, 4.8vw, 58px); margin-inline: auto; max-width: 20ch; }
.cta p { margin: 22px auto 38px; max-width: 52ch; color: var(--ink-dim); font-size: 16.5px; line-height: 1.6; }
.cta-actions { display: flex; justify-content: center; }

.footer {
  border-top: 1px solid var(--rule);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--gut) 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.footer-spacer { flex: 1; }
.footer-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-muted); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--accent); }

/* ─── reveal ───────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease-out, transform .7s ease-out; }
[data-reveal].revealed { opacity: 1; transform: none; }
[data-stagger] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease-out, transform .5s ease-out; }
[data-stagger].revealed { opacity: 1; transform: none; }

/* ─── responsive ───────────────────────────── */
@media (max-width: 1080px) {
  /* Five stations across stops fitting a sentence each; go two rows. */
  .path { grid-template-columns: repeat(3, 1fr); }
  .path-stage { border-bottom: 1px solid var(--rule-soft); }
  .path-stage:nth-child(3) { border-right: 0; }
  .path-stage:nth-child(n+4) { border-bottom: 0; }
}
@media (max-width: 820px) {
  .reqs, .marks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .reqs, .marks { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --art-o: .4; --art-h: min(70vh, 500px); }
  .hero-circuit { right: auto; left: 50%; transform: translate(-50%, -50%); }
  .premise-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .belief { grid-template-columns: 1fr; gap: 10px; }
  .belief .num { padding-top: 0; }
}
@media (max-width: 700px) {
  :root { --gut: 20px; --art-o: .5; --art-h: min(56vh, 380px); }
  .hero { min-height: min(78svh, 660px); padding-top: 40px; }
  .hero .display { max-width: none; }
  .hero-circuit { top: auto; bottom: 3%; transform: translateX(-50%); }
  .path { grid-template-columns: 1fr; }
  .path-stage { border-right: 0; padding-right: 0; padding-left: 22px; }
  .path-stage::before { top: 22px; left: -5px; }
  .path-stage:nth-child(3) { border-bottom: 1px solid var(--rule-soft); }
  .path-stage:last-child { border-bottom: 0; }
}

/* ─── reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  [data-reveal], [data-stagger] { opacity: 1 !important; transform: none !important; }
  .btn-primary:hover { transform: none; }
}
