/* ============================================================
   Agent Revenue Studio — Design System
   Palette: warm paper / cool ink / blueprint blue
   Type: Schibsted Grotesk (display) · Instrument Sans (body)
         IBM Plex Mono (technical)
   ============================================================ */

:root {
  --paper: #F5F4EF;
  --paper-2: #EDECE4;
  --ink: #191C22;
  --ink-2: #14161B;
  --slate: #5A6170;
  --line: #DFDDD2;
  --blue: #2E56D4;
  --blue-deep: #22409C;
  --blue-tint: #E9EDFB;
  --term-green: #7BD88F;
  --term-dim: #8B93A3;

  --font-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --max: 1120px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue-tint); color: var(--blue-deep); }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 244, 239, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-decoration: none; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.logo::before {
  content: "";
  width: 7px; height: 15px; border-radius: 2.5px;
  background: var(--blue);
  display: inline-block;
}
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; }
.nav-links a {
  font-size: 14.5px; text-decoration: none; color: var(--slate);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  font-size: 14px !important; color: #fff !important;
  background: var(--ink); padding: 8px 16px; border-radius: 8px;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--blue-deep); }
@media (max-width: 720px) {
  .nav-links { gap: 14px; }
  .nav-links li.hide-m { display: none; }
  .nav-links a { font-size: 13.5px; }
  .nav-cta { font-size: 13px !important; padding: 7px 12px; }
  .logo { font-size: 11.5px; gap: 8px; }
}
@media (max-width: 560px) {
  /* Collapse the wordmark to just the blue mark so nav fits one row */
  .logo { font-size: 0; gap: 0; letter-spacing: 0; }
  .logo::before { width: 9px; height: 19px; border-radius: 3px; }
  .nav-links { gap: 12px; }
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-deep);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 20px; height: 1px; background: var(--blue);
  display: inline-block;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; }

.display {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.display em { font-style: normal; color: var(--blue); }

h2.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
  max-width: 20ch;
  margin-top: 18px;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--slate);
  max-width: 56ch;
  margin-top: 22px;
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.btn {
  font-family: var(--font-body); font-size: 15.5px; font-weight: 500;
  text-decoration: none; border-radius: 10px;
  padding: 13px 22px; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--slate); }
.btn .arrow { font-family: var(--font-mono); }

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 7vw, 84px) 0; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { padding: clamp(52px, 7vw, 88px) 0 clamp(44px, 6vw, 64px); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Terminal card (signature) ---------- */
.terminal {
  background: var(--ink-2);
  border-radius: var(--radius);
  border: 1px solid #262A33;
  box-shadow: 0 24px 60px -24px rgba(25, 28, 34, 0.35);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
}
.terminal-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #262A33;
  color: var(--term-dim); font-size: 11.5px; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span { width: 9px; height: 9px; border-radius: 50%; background: #2E333E; display: block; }
.terminal-body { padding: 20px 22px 24px; color: #C9CEDA; min-height: 265px; }
.terminal-body .dim { color: var(--term-dim); }
.terminal-body .blue { color: #7C9BFF; }
.terminal-body .green { color: var(--term-green); }
.terminal-body .line { display: block; white-space: pre-wrap; word-break: break-word; }
.caret {
  display: inline-block; width: 7px; height: 15px;
  background: #7C9BFF; vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.terminal-caption {
  font-family: var(--font-mono); font-size: 12px; color: var(--slate);
  margin-top: 14px; text-align: right;
}

/* ---------- Subpage hero size ---------- */
.display.sub {
  font-size: clamp(2.2rem, 4.8vw, 3.5rem);
}

/* ---------- Manifesto diagram (inside terminal card) ---------- */
.diagram-svg { width: 100%; height: auto; display: block; }
.diagram-svg .t-dim  { fill: var(--term-dim); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
.diagram-svg .t-lit  { fill: #C9CEDA; font-family: var(--font-mono); font-size: 12px; }
.diagram-svg .t-blue { fill: #7C9BFF; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; }
.diagram-svg .l-dim  { stroke: #3A404D; stroke-width: 1.5; }
.diagram-svg .l-blue { stroke: #7C9BFF; stroke-width: 1.5; }
.diagram-svg .n-dim  { fill: #3A404D; }
.diagram-svg .n-blue { fill: #7C9BFF; }
.diagram-svg .divider { stroke: #2A2F3A; stroke-dasharray: 4 5; stroke-width: 1; }
.diagram-svg .halo {
  fill: #7C9BFF; opacity: 0.35;
  transform-box: fill-box; transform-origin: center;
  animation: haloPulse 2.6s ease-out infinite;
}
.diagram-svg .halo.d2 { animation-delay: 0.9s; }
.diagram-svg .halo.d3 { animation-delay: 1.8s; }
@keyframes haloPulse {
  0%   { transform: scale(0.6); opacity: 0.45; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ---------- Services method rail (inside terminal card) ---------- */
.rail { display: flex; flex-direction: column; }
.rail-item { display: flex; gap: 16px; position: relative; padding-bottom: 26px; }
.rail-item:last-child { padding-bottom: 4px; }
.rail-line {
  position: absolute; left: 5px; top: 16px; bottom: 2px;
  width: 1px; background: #2E333E;
}
.rail-item:last-child .rail-line { display: none; }
.rail-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #7C9BFF; flex-shrink: 0; margin-top: 4px;
  box-shadow: 0 0 0 3px rgba(124, 155, 255, 0.15);
}
.rail-item.dim .rail-dot { background: #3A404D; box-shadow: none; }
.rail-phase {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: #7C9BFF; text-transform: uppercase;
}
.rail-item.dim .rail-phase { color: var(--term-dim); }
.rail-name { color: #E8EAF0; font-family: var(--font-body); font-size: 15px; font-weight: 500; margin-top: 3px; }
.rail-sub { color: var(--term-dim); font-size: 12px; margin-top: 3px; line-height: 1.55; }
.rail-sub .g { color: var(--term-green); }

/* ---------- Asset grid (problem section) ---------- */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.asset-list { list-style: none; margin-top: 8px; }
.asset-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 15px 4px; border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.asset-list li:first-child { border-top: 1px solid var(--line); }
.asset-list .tag {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--slate); letter-spacing: 0.05em;
}
.body-copy p + p { margin-top: 18px; }
.body-copy .em { color: var(--ink); font-weight: 500; }
.body-copy { color: var(--slate); }

/* ---------- Method ---------- */
.method-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 56px;
}
@media (max-width: 860px) { .method-grid { grid-template-columns: 1fr; } }
.phase {
  background: #FBFAF7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.phase:hover { border-color: var(--blue); transform: translateY(-2px); }
.phase-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--blue-deep);
  letter-spacing: 0.1em;
}
.phase h3 { font-size: 1.45rem; }
.phase p { font-size: 15.5px; color: var(--slate); }
.phase .phase-service {
  margin-top: auto; padding-top: 16px;
  font-family: var(--font-mono); font-size: 12px; color: var(--slate);
  border-top: 1px solid var(--line);
}
.method-note {
  margin-top: 40px; padding: 22px 26px;
  border-left: 2px solid var(--blue);
  background: var(--blue-tint);
  border-radius: 0 10px 10px 0;
  font-size: 16px; max-width: 640px;
}

/* ---------- Manifesto ---------- */
.manifesto-claims { margin-top: 64px; display: flex; flex-direction: column; }
.claim {
  display: grid; grid-template-columns: 90px 1fr;
  gap: clamp(20px, 4vw, 56px);
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 640px) { .claim { grid-template-columns: 1fr; gap: 12px; padding: 36px 0; } }
.claim-num {
  font-family: var(--font-mono); font-size: 13px; color: var(--blue-deep);
  padding-top: 8px; letter-spacing: 0.1em;
}
.claim h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 14px; }
.claim p { color: var(--slate); max-width: 60ch; }
.claim p + p { margin-top: 14px; }
.claim .em { color: var(--ink); font-weight: 500; }

/* ---------- Services ---------- */
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #FBFAF7;
  padding: clamp(28px, 4vw, 44px);
  margin-top: 28px;
}
.service-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; flex-wrap: wrap;
}
.service h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.service .price {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink);
  white-space: nowrap;
}
.service .price .founding {
  display: block; font-size: 11.5px; color: var(--blue-deep);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px;
}
.service .purpose { margin-top: 14px; color: var(--slate); max-width: 62ch; }
.outcomes { list-style: none; margin-top: 26px; display: grid; gap: 10px; }
.outcomes li {
  display: flex; gap: 12px; align-items: baseline; font-size: 16px;
}
.outcomes li::before {
  content: "→"; font-family: var(--font-mono); color: var(--blue);
  font-size: 14px;
}
details.deliverables { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
details.deliverables summary {
  cursor: pointer; font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate);
  list-style: none; display: flex; align-items: center; gap: 8px;
  user-select: none;
}
details.deliverables summary::-webkit-details-marker { display: none; }
details.deliverables summary::after { content: "+"; color: var(--blue); font-size: 15px; }
details[open].deliverables summary::after { content: "−"; }
.deliverable-grid {
  margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px 24px; list-style: none;
}
@media (max-width: 720px) { .deliverable-grid { grid-template-columns: 1fr; } }
.deliverable-grid li {
  font-size: 14.5px; color: var(--slate); padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.service .service-cta { margin-top: 30px; }

/* ---------- Contact ---------- */
.form { margin-top: 44px; max-width: 620px; display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate);
}
.field input, .field textarea {
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: #FBFAF7; border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; width: 100%;
  transition: border-color 0.15s ease;
}
.field input:hover, .field textarea:hover { border-color: var(--slate); }
.field input:focus, .field textarea:focus { border-color: var(--blue); outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 14px; color: var(--slate); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 48px;
  color: var(--slate); font-size: 14px;
}
.footer-grid {
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  align-items: flex-start;
}
.footer nav { display: flex; gap: 22px; }
.footer a { color: var(--slate); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.agent-note {
  margin-top: 36px; padding-top: 24px; border-top: 1px dashed var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--slate);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.agent-note .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
  display: inline-block;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink-2); color: #F2F1EC;
  border-radius: var(--radius);
  padding: clamp(44px, 6vw, 72px);
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 18ch; letter-spacing: -0.03em; }
.cta-band p { color: #A6ACBA; margin-top: 12px; max-width: 46ch; }
.cta-band .btn-primary { background: #F2F1EC; color: var(--ink); }
.cta-band .btn-primary:hover { background: #fff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
