/* dataib — site styles */

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

:root {
  --ink: #1e2a33;        /* slate ink: text, hero ground */
  --ink-soft: #46555f;   /* secondary text */
  --fog: #eef1ee;        /* page ground */
  --paper: #ffffff;
  --sage: #4f6d6a;       /* structure, settled data */
  --rule: #c9d1cc;
  --signal: #f2b807;     /* the insight colour — used sparingly */

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale (≈1.25 ratio) */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.4rem, 1.6rem + 3.4vw, 4.1rem);

  --measure: 66ch;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--fog);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); max-width: 22ch; }
h3 { font-size: var(--step-1); letter-spacing: -0.005em; }
p { margin: 0 0 1em; max-width: var(--measure); }

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

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--signal); color: var(--ink);
  padding: 0.6rem 1rem; font-weight: 600; z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */
.site-header {
  background: var(--ink);
  color: var(--fog);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.wordmark {
  display: inline-flex; align-items: flex-end; gap: 0.5rem;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em;
  text-decoration: none;
}
.wordmark svg { width: 1.3rem; height: 1.3rem; margin-bottom: 0.2rem; }
.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: var(--step--1); font-weight: 500; opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 760px) { .site-nav li:not(:last-child) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font: inherit; font-weight: 600; font-size: var(--step-0);
  padding: 0.85rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--signal); color: var(--ink); }
.btn-primary:hover { background: #ffcb2b; }
.btn-quiet { border-color: currentColor; }
.btn-quiet:hover { background: rgba(255,255,255,0.08); }

/* ---------- hero ---------- */
.hero {
  background: var(--ink);
  color: var(--fog);
  padding: clamp(2.5rem, 6vw, 5rem) 0 0;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 13ch;
  margin-bottom: 1.5rem;
}
.hero .lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: #c8d2d6;
  max-width: 34ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }

.hero-figure { margin: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-figure canvas { width: 100%; height: clamp(260px, 34vw, 430px); }
.hero-figure figcaption {
  font-size: var(--step--1);
  color: #9fb0b5;
  padding: 0.9rem 0 1.4rem;
  border-top: 1px solid #3a4a55;
  display: flex; justify-content: space-between; gap: 1rem;
}
.hero-figure button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.hero-figure button:hover { color: var(--fog); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-actions { margin-bottom: 0; }
}

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); margin-top: 1rem; max-width: 48ch; }

/* symptoms */
.symptoms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0 3rem;
  list-style: none; margin: 0; padding: 0;
}
.symptoms li {
  padding: 1.25rem 0 1.25rem 1.6rem;
  border-top: 1px solid var(--rule);
  position: relative;
  max-width: 40ch;
}
.symptoms li::before {
  content: ""; position: absolute; left: 0; top: 1.95rem;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--sage); opacity: 0.55;
}
.symptoms strong { display: block; font-weight: 650; margin-bottom: 0.2rem; }
.symptoms span { color: var(--ink-soft); }
.turn {
  margin-top: 2.5rem; font-size: var(--step-2); line-height: 1.3;
  font-weight: 600; letter-spacing: -0.015em; max-width: 30ch;
}

/* services */
.services { background: var(--paper); }
.service-list { margin: 0; }
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1rem 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}
.service:last-child { border-bottom: 1px solid var(--rule); }
.service dt h3 { max-width: 18ch; }
.service dd { margin: 0; }
.service dd p:last-child { margin-bottom: 0; }
.tools { color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 760px) { .service { grid-template-columns: 1fr; } }

/* process — genuinely sequential, so it is numbered */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 3.5rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-feature-settings: "tnum";
  border: 2px solid var(--ink);
}
.steps li::after {
  content: ""; position: absolute; top: 1.2rem; left: 3rem; right: -1.6rem;
  height: 2px; background: var(--rule);
}
.steps li:last-child::after { display: none; }
.steps li:last-child::before { background: var(--signal); border-color: var(--signal); }
.steps h3 { margin-bottom: 0.6rem; }
.steps p { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
}
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* typical projects */
.projects { background: var(--ink); color: var(--fog); }
.projects .section-head p { color: #b9c5ca; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 2.5rem 3rem;
}
.project { border-top: 3px solid var(--sage); padding-top: 1.25rem; }
.project h3 { margin-bottom: 0.9rem; max-width: 24ch; }
.project dl { margin: 0; display: grid; gap: 0.75rem; }
.project dt { font-weight: 650; color: var(--fog); font-size: var(--step--1); }
.project dd { margin: 0; color: #c8d2d6; font-size: 0.98rem; }
.project.highlight { border-top-color: var(--signal); }
.projects .note { margin-top: 2.5rem; font-size: var(--step--1); color: #9fb0b5; }

/* about */
.about .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem 4rem;
}
.about .body p:first-child { font-size: var(--step-1); line-height: 1.5; }
.principles { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.principles li { padding: 0.9rem 0; border-top: 1px solid var(--rule); max-width: var(--measure); }
.principles strong { font-weight: 650; }
@media (max-width: 860px) { .about .wrap { grid-template-columns: 1fr; } }

/* faq */
.faq-list { max-width: 50rem; }
.faq-list details { border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  list-style: none; cursor: pointer;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 600; font-size: var(--step-1); line-height: 1.35;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%;
  width: 0.7rem; height: 0.7rem;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-list .answer { padding: 0 0 1.4rem; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } }

/* contact */
.contact { background: var(--signal); }
.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem 4rem; align-items: start;
}
.contact h2 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 12ch; }
.contact .lede { font-size: var(--step-1); line-height: 1.5; margin-top: 1.25rem; max-width: 36ch; }
.contact .btn-primary { background: var(--ink); color: var(--fog); margin-top: 0.5rem; }
.contact .btn-primary:hover { background: #2c3c48; }
.contact :focus-visible { outline-color: var(--ink); }
.email-line { margin-top: 1rem; font-size: var(--step--1); }
.contact h3 { margin-bottom: 0.75rem; }
.contact ul { margin: 0; padding-left: 1.2rem; }
.contact li { margin-bottom: 0.4rem; }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }

/* footer */
.site-footer { background: var(--ink); color: #9fb0b5; font-size: var(--step--1); padding: 2.5rem 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--fog); }

/* simple pages (privacy, 404) */
.page { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.page h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin-bottom: 1.5rem; max-width: 16ch; }
.page h2 { font-size: var(--step-2); margin: 2.5rem 0 0.75rem; }
.page .updated { color: var(--ink-soft); font-size: var(--step--1); }

/* back to top, one per section */
.to-top { grid-column: 1 / -1; margin: 2.5rem 0 0; font-size: var(--step--1); font-weight: 600; }
.to-top a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; }
.to-top a::before {
  content: ""; width: 0.45rem; height: 0.45rem;
  border-left: 2px solid currentColor; border-top: 2px solid currentColor;
  margin-left: 0.15rem;
  transform: translateY(0.15rem) rotate(45deg);
}
.projects .to-top a { color: #c8d2d6; }
.projects .to-top a:hover { color: var(--fog); }
