/* Standard Communications — v1
   Spec: process/03-design-spec.md. Ink on paper, one accent, mono for the machine side. */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk-var.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #FBFBF8;
  --ink: #0D1017;
  --ink-2: #4B5163;
  --hairline: #E5E4DC;
  --input-border: #8E93A3;
  --accent: #2337E0;
  --accent-down: #1B2BB8;
  --paper-dim: #B9BDC9;
  --error: #B42318;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --container: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-pad: clamp(4.5rem, 10vw, 7.5rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3 { margin: 0; }
p { margin: 0; }
p + p { margin-top: 1em; }

h1 {
  font-size: clamp(2.75rem, 6.5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* ---------- mono labels ---------- */

.eyebrow, .eyebrow-h {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow-h {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.eyebrow-h::before {
  content: '';
  width: 0.625rem;
  height: 0.625rem;
  background: var(--accent);
  flex: none;
}
.eyebrow { margin-bottom: 1rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  padding: 1rem 1.75rem;
  cursor: pointer;
  transition: background 150ms ease, transform 160ms var(--ease-out);
}
.btn:hover { background: var(--accent-down); }
.btn:active { transform: scale(0.97); }
.btn-full { width: 100%; text-align: center; }

/* ---------- header ---------- */

.site-header { padding-block: clamp(1.75rem, 4vw, 2.75rem) 0; }
.wordmark {
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}
.tagline {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-top: 0.25rem;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(4rem, 9vw, 7rem) var(--section-pad); }

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.hero-sub {
  max-width: 34em;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.7vw, 1.1875rem);
  color: var(--ink-2);
}

.cta-block { margin-top: 2.25rem; }
.cta-note {
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 30em;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 7fr 5fr; }
}

/* answer card — the signature */

.answer-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 26rem;
}

.ac-head {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.ac-line + .ac-line { margin-top: 0.75rem; }
.ac-query { font-weight: 500; }
.ac-item { display: flex; align-items: center; gap: 0.625rem; }
.ac-n { color: var(--ink-2); flex: none; }

.redact {
  display: inline-block;
  height: 0.875em;
  background: var(--hairline);
  border-radius: 2px;
}
.redact-a { width: 7.5em; }
.redact-b { width: 5.5em; }

.ac-you .you-slot {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  border-radius: 3px;
  padding: 0.1em 0.5em;
}
.you-note {
  color: var(--ink-2);
  font-size: 0.75rem;
  white-space: nowrap;
}

.ac-foot {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.15em;
  background: var(--accent);
  vertical-align: text-bottom;
}
html.js .cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* hero load sequence */
html.js .answer-card .ac-head,
html.js .answer-card .ac-line,
html.js .answer-card .ac-foot {
  opacity: 0;
  transform: translateY(8px);
  animation: ac-in 450ms var(--ease-out) forwards;
}
html.js .answer-card .ac-head { animation-delay: 100ms; }
html.js .answer-card .ac-line:nth-of-type(2) { animation-delay: 220ms; }
html.js .answer-card .ac-line:nth-of-type(3) { animation-delay: 460ms; }
html.js .answer-card .ac-line:nth-of-type(4) { animation-delay: 580ms; }
html.js .answer-card .ac-line:nth-of-type(5) { animation-delay: 700ms; }
html.js .answer-card .ac-line:nth-of-type(6) { animation-delay: 820ms; }
html.js .answer-card .ac-foot { animation-delay: 1000ms; }
@keyframes ac-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- sections ---------- */

.shift, .offer, .phases, .why, .faq { padding-block: var(--section-pad); }
.shift, .phases, .faq { border-top: 1px solid var(--hairline); }

.lede {
  font-size: clamp(1.1875rem, 2.2vw, 1.4375rem);
  line-height: 1.55;
  max-width: 68ch;
  letter-spacing: -0.01em;
}

/* stat cards */

.stat-grid {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

.stat-card {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: #fff;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.stat-card::before {
  content: '';
  width: 2rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.5rem, 4.5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-text { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }

.stat-callout {
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.stat-src {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

/* Third card: no numeral, so don't push the source line to the bottom —
   the gap read as a missing stat. Let content flow naturally. */
.stat-card-plain .stat-src { margin-top: 0; }
.stat-src a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.stat-src a:hover { color: var(--accent-down); }

/* ---------- offer ---------- */

.offer-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.offer-form-wrap {
  align-self: stretch;
  scroll-margin-top: 2rem;
}
@media (min-width: 900px) {
  .offer-grid { grid-template-columns: 7fr 5fr; }
}

.offer-copy h2 { margin-bottom: 1.25rem; }
.offer-copy p { max-width: 36em; }

.five-questions {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
  display: grid;
  gap: 1.25rem;
}
.five-questions li {
  counter-increment: q;
  position: relative;
  padding-left: 3rem;
  max-width: 36em;
}
.five-questions li::before {
  content: '0' counter(q);
  position: absolute;
  left: 0;
  top: 0.2em;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}
.five-questions strong { font-weight: 700; }

/* form */

.offer-form {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  scroll-margin-top: 2rem;
}
@media (min-width: 900px) {
  .offer-form { position: sticky; top: 2rem; }
}

.hp-field { position: absolute; left: -9999px; }

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
}
.field input {
  width: 100%;
  font-family: var(--sans);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  transition: border-color 150ms ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(35, 55, 224, 0.18);
}
.field input::placeholder { color: #6E7383; }

.form-note {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  text-align: center;
}

.form-error {
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  color: var(--error);
  text-align: center;
}

.form-success {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}
.form-success .fs-head {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ---------- phases ---------- */

.phase-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 900px) {
  .phase-grid { grid-template-columns: repeat(3, 1fr); }
}

.phase-n {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.phase h3 { margin-bottom: 0.75rem; font-size: 1.5rem; }
.phase p { color: var(--ink-2); font-size: 0.9843rem; }

/* ---------- why us ---------- */

.why {
  background: #fff;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.why-inner { max-width: 50rem; }
.why h2 { margin-bottom: 1.25rem; }
.why p { max-width: 68ch; }

/* ---------- stack strip ---------- */

.stack-strip { padding-block: clamp(2rem, 4vw, 2.75rem); }
.stack-strip p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 68ch;
}

/* ---------- faq ---------- */

.faq-inner .faq-item { max-width: 44rem; }
.faq-item + .faq-item {
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--hairline);
}
.faq-item h3 { margin-bottom: 0.625rem; }
.faq-item p { color: var(--ink-2); max-width: 65ch; }

/* ---------- closing band (the only inverted section) ---------- */

.closing {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(5rem, 12vw, 8.5rem);
}
.closing-inner { max-width: 46rem; }
.closing h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); text-wrap: balance; }
.closing p {
  margin-top: 1.25rem;
  color: var(--paper-dim);
  font-size: clamp(1.0625rem, 1.7vw, 1.1875rem);
  max-width: 38em;
}
.closing .btn { margin-top: 2.25rem; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper-dim);
  border-top: 1px solid #232838;
  padding-block: 2.5rem;
  font-size: 0.9375rem;
}
.footer-descriptor { max-width: 44em; }
.footer-meta {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.site-footer a { color: var(--paper); }

/* ---------- scroll reveals (progressive enhancement) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
}
html.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js .cursor { animation: none; }
  html.js .answer-card .ac-head,
  html.js .answer-card .ac-line,
  html.js .answer-card .ac-foot {
    animation-duration: 200ms;
    animation-delay: 0ms;
    transform: none;
  }
  html.js .reveal {
    transform: none;
    transition: opacity 200ms ease;
  }
  .btn { transition: background 150ms ease; }
  .btn:active { transform: none; }
}
