/* Catalyst Partners — site styles */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette */
  --paper: #F4F6F5;      /* cool mineral white */
  --surface: #E4ECEA;    /* pale teal wash for alternating bands */
  --ink: #0E2A2F;        /* deep teal ink: text and dark band */
  --graphite: #4A5A5E;   /* secondary text */
  --rule: #C5D0CE;       /* hairlines and axes */
  --reaction: #C8235F;   /* indicator magenta: the one accent */
  --reaction-dark: #A11B4C;

  /* Type scale (1.25) */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
  --step-3: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.5rem, 1.7rem + 3.6vw, 4.4rem);

  --space: clamp(4rem, 3rem + 5vw, 7.5rem);
  --wrap: 72rem;
  --measure: 38rem;
}

*, *::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: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--reaction);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; z-index: 10; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(244, 246, 245, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -0.02em;
}
.wordmark-mark { width: 1.9rem; height: 1.9rem; }
.wordmark-mark path { fill: none; stroke: var(--reaction); stroke-width: 3; stroke-linecap: round; }

.nav-list { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a { text-decoration: none; font-size: 0.98rem; color: var(--graphite); }
.nav-list a:hover { color: var(--ink); }
.nav-list .nav-cta {
  color: var(--ink); font-weight: 600;
  border-bottom: 2px solid var(--reaction); padding-bottom: 2px;
}

/* Buttons */
.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 0.85rem 1.4rem; border-radius: 3px; line-height: 1.2;
  transition: background-color 0.15s ease;
}
.button-primary { background: var(--reaction); color: #fff; }
.button-primary:hover { background: var(--reaction-dark); }
.button-quiet { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button-quiet:hover { background: var(--surface); }

/* Hero */
.hero { padding: clamp(3rem, 2rem + 5vw, 6.5rem) 0 var(--space); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center;
}
.hero h1 {
  font-size: var(--step-4); font-weight: 760; letter-spacing: -0.035em; line-height: 1.0;
  max-width: 13ch;
}
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--graphite); max-width: 32rem; margin-top: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }

.hero-figure { margin: 0; }
.energy { width: 100%; height: auto; display: block; overflow: visible; }
.energy .axes path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.energy .axis-label { font-size: 13px; fill: var(--graphite); }
.energy .curve { fill: none; stroke-linecap: round; }
.energy .curve-without { stroke: var(--graphite); stroke-width: 2; stroke-dasharray: 6 7; opacity: 0.75; }
.energy .curve-with { stroke: var(--reaction); stroke-width: 4.5; }
.energy .gap path { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.energy .gap-label { font-size: 15px; font-weight: 600; fill: var(--ink); }
/* Paper-colored halo so the dashed curve passes behind labels */
.energy .gap-label, .energy .curve-label { paint-order: stroke; stroke: var(--paper); stroke-width: 7px; stroke-linejoin: round; }
.energy .curve-label { font-size: 14px; }
.energy .label-without { fill: var(--graphite); }
.energy .label-with { fill: var(--reaction); font-weight: 700; font-size: 16px; }
.hero-figure figcaption {
  margin-top: 1rem; padding-left: 3.1rem;
  font-size: var(--step--1); color: var(--graphite); max-width: 30rem; line-height: 1.5;
}

/* The one orchestrated moment: the catalyzed curve draws in, then the gap appears */
@media (prefers-reduced-motion: no-preference) {
  .energy .curve-with { stroke-dasharray: 620; stroke-dashoffset: 620; animation: draw 1.6s 0.35s cubic-bezier(.6,.05,.3,1) forwards; }
  .energy .gap, .energy .gap-label, .energy .label-with { opacity: 0; animation: appear 0.6s 1.7s ease forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Section scaffolding */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem; align-items: end; margin-bottom: 3rem; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--graphite); max-width: var(--measure); margin: 0; }

/* Problem (dark band) */
.problem { background: var(--ink); color: var(--paper); padding: var(--space) 0; }
.problem-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 1rem + 4vw, 5rem); }
.problem h2 { font-size: var(--step-3); max-width: 14ch; }
.problem-body > p { color: #B9C9C6; font-size: var(--step-1); }
.symptoms { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.symptoms li {
  position: relative; padding: 1.1rem 0 1.1rem 2rem;
  border-top: 1px solid rgba(244, 246, 245, 0.16);
  max-width: var(--measure);
}
.symptoms li:last-child { border-bottom: 1px solid rgba(244, 246, 245, 0.16); }
.symptoms li::before {
  content: ""; position: absolute; left: 0; top: 1.65rem;
  width: 0.8rem; height: 2px; background: var(--reaction);
}

/* Services */
.services { padding: var(--space) 0; }
.service-list { border-top: 2px solid var(--ink); }
.service {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem;
  padding: 2rem 0; border-bottom: 1px solid var(--rule);
}
.service h3 { font-size: var(--step-2); max-width: 16ch; }
.service p { max-width: var(--measure); }
.service .outputs { color: var(--graphite); font-size: 0.97rem; padding-left: 1rem; border-left: 2px solid var(--reaction); }

/* Approach (a real sequence, so it is numbered) */
.approach { background: var(--surface); padding: var(--space) 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding: 0 1.75rem 0 0; position: relative; }
.steps li::before {
  content: counter(step);
  display: block; font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  color: var(--ink); padding-bottom: 1rem; margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
}
.steps li:last-child::before { border-bottom-color: var(--reaction); color: var(--reaction); }
.steps h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.steps p { color: var(--graphite); font-size: 0.98rem; }

/* Engagement models */
.models { padding: var(--space) 0 calc(var(--space) * 0.75); }
.model-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.model { padding: 0.25rem 2rem 0.25rem 0; }
.model + .model { padding-left: 2rem; border-left: 1px solid var(--rule); }
.model h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.model p { color: var(--graphite); }

/* About */
.about { padding: calc(var(--space) * 0.75) 0 var(--space); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem; border-top: 2px solid var(--ink); padding-top: 2.5rem; }
.about h2 { font-size: var(--step-3); max-width: 10ch; }
.about-body p { max-width: var(--measure); font-size: var(--step-1); line-height: 1.55; }
.about-body p + p { color: var(--graphite); font-size: var(--step-0); line-height: 1.6; }

/* Contact */
.contact { background: var(--ink); color: var(--paper); padding: var(--space) 0; }
.contact h2 { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 1.02; max-width: 16ch; }
.contact-lede { color: #B9C9C6; font-size: var(--step-1); max-width: 34rem; margin-top: 1.5rem; }
.contact-email {
  display: inline-block; margin-top: 1.5rem;
  font-size: clamp(1.05rem, 0.45rem + 3.4vw, 2.4rem); font-weight: 650; letter-spacing: -0.02em;
  text-decoration: none; border-bottom: 3px solid var(--reaction); padding-bottom: 0.2rem;
}
.contact-email:hover { color: #fff; border-bottom-color: #fff; }
.contact-note { color: #B9C9C6; margin-top: 2rem; font-size: var(--step--1); }

/* Footer */
.site-footer { background: var(--ink); color: #8FA3A0; border-top: 1px solid rgba(244, 246, 245, 0.12); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem; font-size: var(--step--1); }
.footer-inner p { margin: 0; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--paper); }

/* 404 */
.notfound { min-height: 70vh; display: flex; align-items: center; padding: var(--space) 0; }
.notfound h1 { font-size: var(--step-4); letter-spacing: -0.035em; max-width: 14ch; }
.notfound p { color: var(--graphite); font-size: var(--step-1); margin: 1.5rem 0 2rem; max-width: 32rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .problem-grid, .section-head, .service, .about-grid { grid-template-columns: 1fr; }
  .section-head { gap: 0.75rem; }
  .service { gap: 0.75rem; }
  .hero h1 { max-width: 16ch; }
  .hero-figure { max-width: 34rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
}
@media (max-width: 720px) {
  .nav-list li:not(:last-child) { display: none; }
  .model-list { grid-template-columns: 1fr; }
  .model, .model + .model { padding: 1.5rem 0; border-left: 0; border-top: 1px solid var(--rule); }
  .hero-figure figcaption { padding-left: 0; }
  .models { padding-bottom: 1rem; }
  /* Keep diagram labels readable when the SVG scales down */
  .energy .axis-label { font-size: 19px; }
  .energy .curve-label { font-size: 19px; }
  .energy .gap-label { font-size: 20px; }
  .energy .label-with { font-size: 22px; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .wordmark span { font-size: 1.05rem; }
}
