/* Thread & Theory — site styles */

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

:root {
  --paper: #F1F3EF;   /* cool linen */
  --ink: #1A2530;     /* deep slate */
  --indigo: #2F4FA0;  /* the thread */
  --sage: #55705F;    /* secondary text */
  --mist: #E1E9E2;   /* pale sage wash */
  --rule: #C6CEC8;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Spectral", Georgia, serif;

  --measure: 38rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 10vw, 8rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.4vw + 0.98rem, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--sans); color: var(--ink); margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }

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

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; font-family: var(--sans); }
.skip:focus { left: 0.5rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(241, 243, 239, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.wordmark { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark .amp { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--indigo); }
.site-header ul { list-style: none; display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); margin: 0; padding: 0; align-items: center; }
.site-header nav a { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--indigo); }
.nav-cta { border-bottom: 2px solid var(--indigo); padding-bottom: 2px; }

/* Hero */
.hero { padding-top: clamp(3.5rem, 9vw, 7.5rem); padding-bottom: var(--section); overflow: hidden; }
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
.thread {
  display: block;
  width: 100%;
  height: clamp(90px, 15vw, 200px);
  margin: clamp(0.5rem, 2vw, 1.5rem) 0;
  overflow: visible;
}
.thread path {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.4s cubic-bezier(.6, .05, .3, 1) .25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .thread path { animation: none; stroke-dashoffset: 0; }
}
.hero-lower { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 900px) {
  .hero-lower { grid-template-columns: 1fr minmax(0, 34rem); }
  .hero-lower > * { grid-column: 2; }
}
.lead { font-size: clamp(1.15rem, 0.8vw + 1rem, 1.4rem); line-height: 1.55; max-width: var(--measure); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }

.button {
  display: inline-block;
  font-family: var(--sans); font-weight: 500; font-size: 1rem;
  background: var(--indigo); color: #fff;
  padding: 0.85rem 1.4rem;
  border: 0; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: #253f82; }
.text-link { font-family: var(--sans); font-weight: 500; font-size: 1rem; color: var(--ink); }

/* Shared section rhythm */
.who, .services, .work, .process, .about, .contact { padding: var(--section) 0; border-top: 1px solid var(--rule); }
.who h2, .services h2, .work h2, .process h2, .about h2, .contact h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.two-col { display: grid; gap: 0 3rem; }
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr minmax(0, 34rem); }
  .two-col > h2 { margin-bottom: 0; }
}
.prose { max-width: var(--measure); }

/* About portrait */
.about .about-side h2 { margin-bottom: 2rem; }
.portrait {
  display: block;
  width: 100%; max-width: 20rem; height: auto;
  border-radius: 4px;
  margin-bottom: 2.5rem;
}
@media (min-width: 900px) { .portrait { max-width: 22rem; margin-bottom: 0; } }

/* Services */
.service-list { margin: 0; }
.service {
  display: grid; gap: 0.4rem 3rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.service:last-child { border-bottom: 1px solid var(--rule); }
.service dt { font-family: var(--sans); font-weight: 500; font-size: clamp(1.2rem, 1.4vw, 1.4rem); letter-spacing: -0.01em; line-height: 1.3; }
.service dd { margin: 0; max-width: var(--measure); }
@media (min-width: 900px) {
  .service { grid-template-columns: 1fr minmax(0, 34rem); }
}

/* Work */
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem 3rem; }
@media (min-width: 760px) { .work-list { grid-template-columns: 1fr 1fr; } }
.work-list li { border-left: 3px solid var(--indigo); padding-left: 1.25rem; }
.work-list h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.3; margin-bottom: 0.5rem; letter-spacing: -0.005em; }
.work-list p { color: var(--ink); max-width: 30rem; }

/* Process: a real sequence, so it's numbered */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 2rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; } }
.steps li { counter-increment: step; position: relative; padding-top: 3rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--indigo); color: var(--indigo);
  font-family: var(--sans); font-weight: 700; font-size: 0.95rem;
  display: grid; place-items: center;
  background: var(--paper);
}
@media (min-width: 760px) {
  .steps li::after {
    content: ""; position: absolute; top: 1rem; left: 2rem; right: -1.5rem;
    border-top: 2px solid var(--indigo);
  }
  .steps li:last-child::after { display: none; }
}
.steps h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; }
.steps p { font-size: 0.98rem; line-height: 1.55; }

/* Contact */
.contact { background: var(--mist); border-top: 0; }
.contact-intro { max-width: 26rem; }
.contact-direct { font-family: var(--sans); font-size: 0.98rem; margin-top: 1.5rem; }
.contact-form { display: grid; gap: 1.2rem; margin-top: 2rem; }
@media (min-width: 900px) { .contact-form { margin-top: 0; } }
.field { display: grid; gap: 0.35rem; }
.field label { font-family: var(--sans); font-weight: 500; font-size: 0.95rem; }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff;
  border: 1px solid #A3B3A8; border-radius: 6px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo); }
.contact-form .button { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { padding: 2rem 0 2.5rem; font-family: var(--sans); font-size: 0.9rem; color: var(--sage); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.site-footer a { color: var(--sage); }

.brand { display: flex; align-items: baseline; gap: 1rem; }
.tagline { font-family: var(--sans); font-size: 0.9rem; color: var(--sage); white-space: nowrap; }
@media (max-width: 899px) { .tagline { display: none; } }

/* Small screens */
@media (max-width: 560px) {
  .site-header nav li:not(:last-child) { display: none; }
}

/* Thanks / 404 pages */
.simple { min-height: 70vh; display: grid; align-content: center; padding: var(--section) 0; }
.simple h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 1.25rem; }
.simple p { max-width: var(--measure); }
