/* --- TOKENS --- */
:root {
  --bg: #FAFAF7;
  --bg-2: #F1EFEA;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --muted: #6B6B66;
  --line: rgba(10, 10, 10, 0.08);
  --line-strong: rgba(10, 10, 10, 0.16);
  --accent: #3B82F6;
  --accent-deep: #1D4ED8;
  --accent-ink: #0E2A66;
  --dark: #0A0A0A;
  --dark-2: #131316;
  --on-dark: #EDEDE8;
  --on-dark-muted: #8A8A85;
  --serif: "Instrument Serif", "Newsreader", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
  --radius: 4px;
  --radius-lg: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* --- LAYOUT --- */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) {
  .wrap { padding: 0 24px; }
}

section {
  position: relative;
  padding: 120px 0;
  scroll-margin-top: 0;
}
section.dark {
  background: var(--dark);
  color: var(--on-dark);
}
section.tint {
  background: var(--bg-2);
}
@media (max-width: 768px) {
  section { padding: 80px 0; }
}

/* --- TYPE --- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dark .eyebrow { color: var(--on-dark-muted); }
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7.5vw, 96px); }
h2 { font-size: clamp(36px, 5.2vw, 64px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; }

.lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}
.dark .lead { color: var(--on-dark); opacity: 0.85; }
.body { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.dark .body { color: var(--on-dark); opacity: 0.78; }
.muted { color: var(--muted); }
.dark .muted { color: var(--on-dark-muted); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .meta { padding-top: 8px; }
.section-head h2 { max-width: 18ch; }
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .section-head .meta { padding-top: 0; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); border-color: var(--accent); }
.btn .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  transition: background 0.2s ease;
}
.btn:hover .dot { background: var(--bg); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dark .btn { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.dark .btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.dark .btn.ghost { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,0.2); }

/* --- HEADER --- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 250, 247, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.topbar.on-dark {
  background: rgba(10, 10, 10, 0.6);
  color: var(--on-dark);
  border-bottom-color: rgba(255,255,255,0.06);
}
.topbar .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
}
.topbar .logo .mark {
  width: 22px; height: 22px;
  position: relative;
}
.topbar nav {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  color: var(--muted);
}
.topbar.on-dark nav { color: var(--on-dark-muted); }
.topbar nav a { transition: color 0.15s; }
.topbar nav a:hover { color: var(--ink); }
.topbar.on-dark nav a:hover { color: var(--on-dark); }
@media (max-width: 768px) {
  .topbar { padding: 14px 24px; }
  .topbar nav { display: none; }
}

/* --- SIDE RAIL --- */
.rail {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rail button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.rail button .label {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
  white-space: nowrap;
}
.rail button:hover .label { opacity: 1; transform: translateX(0); }
.rail button .tick {
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transition: width 0.2s, opacity 0.2s, background 0.2s;
}
.rail button.active .tick { width: 32px; opacity: 1; background: var(--accent); }
.rail button.active { color: var(--ink); }
.rail.on-dark button { color: var(--on-dark-muted); }
.rail.on-dark button.active { color: var(--on-dark); }
@media (max-width: 1100px) { .rail { display: none; } }

/* --- HERO --- */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  background: var(--dark);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 220px);
}
.hero h1 {
  font-size: clamp(54px, 7.6vw, 108px);
  letter-spacing: -0.025em;
  line-height: 0.98;
}
.hero h1 .accent { color: var(--accent); font-style: italic; }
.hero .sub {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.hero .cta-row {
  margin-top: 48px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.hero .meta-strip {
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.hero .meta-strip .wrap { display: flex; justify-content: space-between; width: 100%; gap: 24px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
}

/* --- NEURAL VIS --- */
.neural {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin-left: auto;
}
.neural svg { width: 100%; height: 100%; }
.neural .label {
  position: absolute;
  bottom: 0; left: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

/* --- IMAGE PLACEHOLDER --- */
.placeholder {
  position: relative;
  background: var(--bg-2);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder.dark {
  background: #0F0F12;
  color: var(--on-dark-muted);
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(0,0,0,0.04) 14px 15px
  );
}
.placeholder.dark::before {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(255,255,255,0.05) 14px 15px
  );
}
.placeholder .ph-label {
  position: relative;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.placeholder.dark .ph-label {
  background: var(--dark);
  border-color: rgba(255,255,255,0.08);
  color: var(--on-dark-muted);
}

/* --- CARDS --- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--line-strong); }
.dark .card {
  background: transparent;
  border-color: rgba(255,255,255,0.1);
}
.dark .card:hover { border-color: rgba(255,255,255,0.22); }

.card .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dark .card .num { color: var(--on-dark-muted); }

.card h3 { margin-bottom: 12px; }

/* --- PROMISE BLUE CARD --- */
.promise {
  background: var(--accent);
  color: white;
  padding: 36px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.promise::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
}
.promise .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 16px;
}
.promise h3 {
  font-family: var(--serif);
  font-size: 32px;
  margin-bottom: 16px;
}

/* --- STATS --- */
.stat {
  border-top: 1px solid var(--line);
  padding: 24px 0 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: baseline;
}
.dark .stat { border-top-color: rgba(255,255,255,0.1); }
.stat .icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.stat .lab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dark .stat .lab { color: var(--on-dark-muted); }
.stat .val {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  text-align: right;
}

/* --- FEATURE ROW (HR Resume style) --- */
.feature-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.dark .feature-row { border-top-color: rgba(255,255,255,0.1); }
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.dark .feature-row:last-child { border-bottom-color: rgba(255,255,255,0.1); }
.feature-row .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 6px;
}
.feature-row .body-col h3 {
  font-family: var(--serif);
  margin-bottom: 8px;
}

/* --- DETAIL SECTION FOOTER LINE --- */
.detail-footer {
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 18px;
}
.dark .detail-footer { border-top-color: rgba(255,255,255,0.1); color: var(--on-dark); }
.detail-footer .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* --- TIMELINE (How We Work / Workflow) --- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 0; right: 0;
  height: 1px;
  background: var(--line-strong);
}
.dark .timeline::before { background: rgba(255,255,255,0.18); }
.tl-step {
  padding: 0 24px 0 0;
  position: relative;
}
.tl-step .node {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  position: relative;
  z-index: 2;
  margin-top: 33px;
  margin-bottom: 28px;
}
.dark .tl-step .node { background: var(--dark); }
.tl-step .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 8px;
}
.tl-step h3 {
  font-family: var(--serif);
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .tl-step { padding: 24px 0; border-top: 1px solid var(--line); }
  .dark .tl-step { border-top-color: rgba(255,255,255,0.1); }
  .tl-step .node { margin-top: 0; }
}

/* --- ARROW TILE --- */
.arrow-tile {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  position: relative;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.arrow-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.dark .arrow-tile { background: transparent; border-color: rgba(255,255,255,0.1); }
.arrow-tile .arrow {
  position: absolute;
  top: 28px; right: 28px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.arrow-tile:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
.arrow-tile h3 { margin-top: 32px; margin-bottom: 8px; }

/* --- FOOTER --- */
footer.site {
  background: var(--dark);
  color: var(--on-dark);
  padding: 80px 0 40px;
}
footer.site .ft-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
footer.site h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  font-weight: 400;
  margin-bottom: 20px;
}
footer.site a { display: block; padding: 4px 0; color: var(--on-dark); }
footer.site a:hover { color: var(--accent); }
footer.site .ft-bot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
@media (max-width: 800px) {
  footer.site .ft-grid { grid-template-columns: 1fr 1fr; }
}

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

/* --- UTILITIES --- */
.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}
.dark .divider { background: rgba(255,255,255,0.1); }

.kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.dark .kbd { border-color: rgba(255,255,255,0.18); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 24px; }
}

/* Form bits */
input.field, textarea.field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 14px 0;
  font: inherit;
  color: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.dark input.field, .dark textarea.field { border-bottom-color: rgba(255,255,255,0.2); color: var(--on-dark); }
input.field:focus, textarea.field:focus { border-bottom-color: var(--accent); }
input.field::placeholder, textarea.field::placeholder { color: var(--muted); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dark .tag { border-color: rgba(255,255,255,0.18); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
