@import url('./fonts.css');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* paper (light) surfaces */
  --paper: #F2EEE1;
  --paper-raised: #FBF9F1;
  --paper-sunk: #E8E2D0;

  /* ink (dark) surfaces */
  --ink: #16140D;
  --ink-raised: #201D14;

  /* text on paper */
  --text: #1A1710;
  --text-dim: #4A4536;
  --text-faint: #8C8570;

  /* text on ink */
  --text-on-ink: #F2EEE1;
  --text-on-ink-dim: #9C9683;

  /* lines */
  --line: rgba(26, 23, 16, 0.13);
  --line-on-ink: rgba(242, 238, 225, 0.14);

  /* accent: system / primary action (green) */
  --green-900: #163527;
  --green-700: #235A40;
  --green-500: #3C8A62;
  --green-200: #C7DBC7;
  --green-100: #E1EBDD;

  /* accent: AI / secondary pop (indigo) */
  --indigo-700: #3A3270;
  --indigo-500: #5A4FB0;
  --indigo-100: #E4E0F5;

  /* accent: attention (warm clay, used sparingly for "featured") */
  --clay-600: #B0512F;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 26px;

  --font-display: 'Unbounded', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max: 1180px;
  --pad: 32px;
}

@media (max-width: 720px) {
  :root { --pad: 20px; }
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--green-700); outline-offset: 3px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eyebrow .num { color: var(--green-700); font-weight: 500; }
.on-ink .eyebrow { color: var(--text-on-ink-dim); }
.on-ink .eyebrow .num { color: var(--green-200); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-top: 14px;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 16px;
  max-width: 520px;
}
.on-ink .section-head p { color: var(--text-on-ink-dim); }

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.on-ink { background: var(--ink); color: var(--text-on-ink); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--green-900);
  color: var(--text-on-ink);
}
.btn-primary:hover { background: var(--green-700); }
.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text); }
.on-ink .btn-ghost { border-color: var(--line-on-ink); color: var(--text-on-ink); }
.on-ink .btn-ghost:hover { border-color: var(--text-on-ink); }
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 238, 225, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.logo .dot { color: var(--green-700); }
.nav-links {
  display: flex;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 100px;
  color: var(--text-dim);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--paper-sunk); }
.nav-links a.active { color: var(--green-900); background: var(--green-100); font-weight: 600; }
.mob-menu a.active { color: var(--green-900); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav .btn { padding: 10px 20px; font-size: 13.5px; }
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ''; display: block; width: 16px; height: 1.5px; background: var(--text);
  position: relative; transition: all 0.2s ease;
}
.nav-burger span::before { position: absolute; top: -5px; }
.nav-burger span::after { position: absolute; top: 5px; }
.nav-burger.open span { background: transparent; }
.nav-burger.open span::before { top: 0; transform: rotate(45deg); }
.nav-burger.open span::after { top: 0; transform: rotate(-45deg); }

.mob-menu {
  display: none;
  flex-direction: column;
  padding: 8px var(--pad) 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.mob-menu a {
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
}
.mob-menu.open { display: flex; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav .btn-ghost { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 72px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-top: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-700);
}
.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 480px;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-proof {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.hero-proof b { color: var(--text); font-weight: 600; }

/* --- hero visual: fragments -> system --- */
.hero-visual {
  position: relative;
  height: 420px;
}
.frag {
  position: absolute;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: 0 14px 30px -18px rgba(26,23,16,0.35);
  padding: 14px 16px;
  width: 168px;
}
.frag-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.frag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.frag-note {
  top: 12px; left: 0;
  transform: rotate(-7deg);
  background-image: repeating-linear-gradient(var(--paper-raised) 0 21px, var(--line) 21px 22px);
}
.frag-note .frag-line { height: 8px; border-radius: 2px; background: var(--text-faint); opacity: 0.55; margin: 5px 0; }
.frag-note .frag-line:nth-child(2) { width: 78%; }
.frag-note .frag-line:nth-child(3) { width: 55%; }
.frag-chat {
  top: 108px; left: 92px;
  transform: rotate(4deg);
  z-index: 2;
}
.frag-chat .bubble {
  background: var(--indigo-100);
  border-radius: 12px 12px 12px 3px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--indigo-700);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.frag-ledger {
  top: 224px; left: 18px;
  transform: rotate(-4deg);
}
.frag-ledger .row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; padding: 4px 0; border-bottom: 1px dashed var(--line); color: var(--text-dim); }
.frag-ledger .row:last-child { border-bottom: none; }

.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-lines path {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  opacity: 0.6;
}

.frag-system {
  right: 0; top: 70px;
  width: 208px;
  background: var(--ink);
  border-color: var(--ink);
  z-index: 3;
}
.frag-system .frag-label { color: var(--text-on-ink-dim); }
.frag-system .frag-label .frag-dot { background: var(--green-500); box-shadow: 0 0 0 3px rgba(60,138,98,0.25); }
.frag-system .sys-row {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-on-ink);
  padding: 7px 0;
  border-bottom: 1px solid var(--line-on-ink);
}
.frag-system .sys-row:last-child { border-bottom: none; }
.frag-system .sys-row .ok { color: var(--green-500); }

@media (max-width: 980px) {
  .hero-visual { height: 340px; margin-top: 20px; }
  .frag { width: 140px; padding: 11px 13px; }
  .frag-system { width: 176px; }
}
@media (max-width: 560px) {
  .hero-visual { display: none; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.svc-category { margin-bottom: 64px; }
.svc-category:last-child { margin-bottom: 0; }
.svc-cat-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.svc-cat-num { font-family: var(--font-mono); font-size: 13px; color: var(--green-700); }
.svc-cat-title { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.svc-cat-desc { margin-left: auto; font-size: 13px; color: var(--text-faint); display: none; }
@media (min-width: 720px) { .svc-cat-desc { display: block; } }

/* featured (sites & bots): 2-col asymmetric */
.svc-featured { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.svc-rest { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .svc-featured, .svc-rest { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .svc-featured, .svc-rest { grid-template-columns: 1fr; } }

.svc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px;
  background: var(--paper-raised);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.svc-card:hover { border-color: var(--text-faint); transform: translateY(-2px); }
.svc-card.big { padding: 26px; }
.svc-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  margin-top: 14px;
  letter-spacing: -0.005em;
}
.svc-card.small h3 { font-size: 14.5px; margin-top: 10px; }
.svc-card p { margin-top: 8px; font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.svc-card.small p { font-size: 12.5px; margin-top: 6px; }
.svc-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-100);
  color: var(--green-900);
}
.svc-card.small .svc-icon { width: 28px; height: 28px; border-radius: 7px; }
.svc-icon svg { width: 16px; height: 16px; }
.svc-card.small .svc-icon svg { width: 14px; height: 14px; }

/* AI category: indigo tint */
.svc-category.is-ai .svc-icon { background: var(--indigo-100); color: var(--indigo-700); }
.svc-category.is-ai .svc-cat-num { color: var(--indigo-500); }

/* infra category: dense list/table style */
.svc-list { display: flex; flex-direction: column; }
.svc-row {
  display: grid;
  grid-template-columns: 34px 220px 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.svc-row:last-child { border-bottom: none; }
.svc-row .svc-icon { width: 30px; height: 30px; border-radius: 8px; }
.svc-row h3 { font-family: var(--font-display); font-weight: 500; font-size: 14.5px; margin: 0; }
.svc-row p { margin: 0; font-size: 13.5px; color: var(--text-dim); }
@media (max-width: 720px) {
  .svc-row { grid-template-columns: 30px 1fr; grid-template-rows: auto auto; }
  .svc-row p { grid-column: 2; }
}

/* ============================================================
   WHY (thesis, inverted)
   ============================================================ */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; gap: 40px; } }
.why-thesis {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.38;
  letter-spacing: -0.005em;
}
.why-thesis .struck { color: var(--text-on-ink-dim); text-decoration: line-through; text-decoration-color: var(--green-500); text-decoration-thickness: 1.5px; }
.why-list { display: grid; grid-template-columns: 1fr; gap: 0; }
.why-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-on-ink);
}
.why-item:first-child { padding-top: 0; }
.why-item:last-child { border-bottom: none; }
.why-num { font-family: var(--font-mono); font-size: 13px; color: var(--green-500); }
.why-item h3 { font-family: var(--font-display); font-weight: 500; font-size: 15.5px; }
.why-item p { margin-top: 6px; font-size: 14px; color: var(--text-on-ink-dim); line-height: 1.5; }

/* ============================================================
   STACK (compact, appendix-style)
   ============================================================ */
.stack-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .stack-groups { grid-template-columns: 1fr; gap: 32px; } }
.stack-group-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.stack-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 13px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--text-dim);
  cursor: default;
  position: relative;
}
.stack-pill:hover { border-color: var(--text-faint); color: var(--text); }
.stack-pill .tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: var(--text-on-ink);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 10px;
  width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}
.stack-pill:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 32px 28px;
  background: var(--paper-raised);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text-on-ink);
  transform: scale(1.02);
}
.price-tag {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--green-500);
  color: var(--text-on-ink);
  margin-bottom: 16px;
}
.price-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.price-desc { margin-top: 8px; font-size: 13.5px; color: var(--text-dim); min-height: 36px; }
.price-card.featured .price-desc { color: var(--text-on-ink-dim); }
.price-amount {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  margin-top: 20px;
  letter-spacing: -0.01em;
}
.price-support { margin-top: 6px; font-size: 12.5px; color: var(--text-faint); }
.price-card.featured .price-support { color: var(--text-on-ink-dim); }
.price-feats { margin-top: 24px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.price-feat { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; }
.price-feat svg { flex-shrink: 0; margin-top: 2px; width: 14px; height: 14px; color: var(--green-700); }
.price-card.featured .price-feat svg { color: var(--green-500); }
.price-feat.off { color: var(--text-faint); }
.price-card.featured .price-feat.off { color: var(--text-on-ink-dim); opacity: 0.5; }
.price-feat.off svg { color: var(--text-faint); }
.price-card .btn { margin-top: 26px; justify-content: center; width: 100%; }

.pricing-note { margin-top: 22px; font-size: 13px; color: var(--text-faint); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 720px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  text-align: left;
}
.faq-q .num { font-family: var(--font-mono); font-size: 13px; color: var(--green-700); }
.faq-q .q { font-family: var(--font-display); font-weight: 500; font-size: 16px; }
.faq-q .chev { transition: transform 0.2s ease; color: var(--text-faint); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.faq-a-inner { padding: 0 0 22px 50px; font-size: 14.5px; color: var(--text-dim); line-height: 1.6; max-width: 560px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-cross {
  padding: 26px var(--pad);
  border-bottom: 1px solid var(--line-on-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 14px;
  gap: 16px;
}
.footer-cross b { font-family: var(--font-display); font-weight: 500; }
.footer-cross a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-on-ink); font-weight: 600; }
.footer-cross a:hover .btn-arrow { transform: translateX(3px); }
.footer-main {
  padding: 40px var(--pad) 32px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.footer-tag { font-size: 13px; color: var(--text-on-ink-dim); margin-top: 6px; }
.footer-links { display: flex; gap: 22px; font-size: 13.5px; }
.footer-links a { color: var(--text-on-ink-dim); }
.footer-links a:hover { color: var(--text-on-ink); }

@media (max-width: 620px) {
  .footer-cross { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

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