/* Serhard site styles. Values follow the Serhard brand book (tokens.json). */

@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-800.woff2") format("woff2"); font-weight: 800; 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-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Brand tokens: light theme */
:root {
  --paper: #f2f5f8;
  --sheet: #ffffff;
  --rule: #d5dce5;
  --ink: #13213c;
  --ink-soft: #3c4a63;
  --muted: #5d6a80;
  --brand: #13213c;
  --brand-hover: #1f3360;
  --on-brand: #ffffff;
  --on-brand-soft: #c9d2e3;
  --steel: #c9d2e3;
  --signal: #e5484d;
  --flag: #b3261e;
  --flag-bg: #fbe9e7;
  --match: #1d6b45;
  --focus: #2457c5;
  --row-rule: #edf0f4;
  --shadow-panel: 0 1px 0 #d5dce5, 0 18px 40px -28px rgba(19, 33, 60, 0.45);

  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-14: 56px; --space-18: 72px;
  --radius-sm: 2px; --radius-md: 6px; --radius-lg: 10px;
  --measure: 66ch;
  color-scheme: light;
}

/* Brand tokens: dark theme (screens only; printouts stay light) */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1526;
    --sheet: #15213a;
    --rule: #2a3854;
    --ink: #e8edf5;
    --ink-soft: #b9c4d6;
    --muted: #8f9bb1;
    --brand: #3d5f9e;
    --brand-hover: #4a6db0;
    --on-brand: #ffffff;
    --on-brand-soft: #dfe6f2;
    --steel: #2b3d63;
    --signal: #f0626a;
    --flag: #ff8a7e;
    --flag-bg: #3b1f22;
    --match: #6fd0a0;
    --focus: #8fb0ff;
    --row-rule: #22304b;
    --shadow-panel: 0 1px 0 #2a3854, 0 18px 40px -24px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 { text-wrap: balance; }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--space-6), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-6), env(safe-area-inset-right, 0px));
}

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: 22px; }
.brand { display: inline-flex; line-height: 0; }
.brand img { height: 30px; width: auto; }
.site-head nav { display: flex; gap: 22px; }
.site-head nav a { font-size: 0.95rem; color: var(--ink-soft); }
.site-head nav a[aria-current="page"] { color: var(--ink); text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-block; background: var(--brand); color: var(--on-brand); text-decoration: none;
  padding: 14px 22px; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem; line-height: 1.25;
}
.btn:hover { background: var(--brand-hover); }
.btn-quiet { display: inline-block; color: var(--ink); padding: 14px 4px; margin-left: 14px; font-weight: 600; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 0; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--space-14); align-items: center; padding-block: 56px 88px;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.05; letter-spacing: -0.025em; font-weight: 800;
  margin: 0 0 22px; max-width: 14ch;
}
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; margin: 0 0 30px; }

/* Ledger: the brand's signature image */
.ledger {
  margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 22px 22px 16px; box-shadow: var(--shadow-panel); min-width: 0;
}
.ledger-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: 12px; }
.ledger-title strong { font-size: 0.98rem; }
.ledger-title span { font-size: 0.85rem; color: var(--muted); }
.ledger table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.ledger th { font-family: var(--font-sans); font-weight: 600; font-size: 0.8rem; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.ledger th.num, .ledger td.num { text-align: right; }
.ledger td { padding: 9px 8px; border-bottom: 1px solid var(--row-rule); white-space: nowrap; }
.ledger td.ok { color: var(--match); font-family: var(--font-sans); font-size: 0.8rem; }
.ledger tr.miss td { background: var(--flag-bg); color: var(--flag); }
.ledger tr.miss td.ok { color: var(--flag); font-weight: 600; }
.ledger tfoot td { border-bottom: 0; padding-top: 12px; font-family: var(--font-sans); font-size: 0.9rem; color: var(--ink); }
.ledger tfoot .diff { color: var(--flag); font-weight: 600; font-family: var(--font-mono); }
.ledger tfoot .zero { color: var(--match); font-weight: 600; font-family: var(--font-mono); }
.ledger-note { margin: 12px 2px 0; font-size: 0.86rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .ledger tr.miss td { animation: flag 1.6s ease-out 0.6s both; }
  @keyframes flag { from { background: transparent; color: var(--ink); } to { background: var(--flag-bg); color: var(--flag); } }
  .ledger tr.fixed td { animation: fixed 1.4s ease-out 0.8s both; }
  @keyframes fixed { from { background: var(--flag-bg); color: var(--flag); } to { background: transparent; color: var(--ink); } }
  .ledger tr.fixed td.ok { animation-name: fixed-ok; }
  @keyframes fixed-ok { from { background: var(--flag-bg); color: var(--flag); } to { background: transparent; color: var(--match); } }
}

/* Sections */
section.block { padding-block: var(--space-18); border-top: 1px solid var(--rule); }
.block h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; max-width: 24ch; }
.block p.intro { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 36px; }

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8) var(--space-10); margin: 0; padding: 0; list-style: none; }
.checks li h3 { font-size: 1.05rem; margin: 0 0 6px; }
.checks li p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10); }
.steps li { counter-increment: step; position: relative; padding-top: 44px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.steps .when { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 8px; }

/* Services: the offer list on the introduction page */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.services li {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: var(--space-6) var(--space-10); padding-block: 28px; border-bottom: 1px solid var(--rule); align-items: start;
}
.services h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.services .for { display: block; margin-top: 6px; font-size: 0.92rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.services p { margin: 0; color: var(--ink-soft); }
.services .terms { margin: 0; font-size: 0.95rem; }
.services .terms strong { display: block; font-size: 1.05rem; }
.services .terms span { display: block; color: var(--muted); }
.services .terms a { display: inline-block; margin-top: 10px; font-weight: 600; }
.services li.flagship h3::after {
  content: "Most asked for"; display: block; width: fit-content; margin-top: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; color: var(--on-brand);
  background: var(--brand); padding: 3px 9px; border-radius: var(--radius-md);
}

/* Domains: where the experience comes from */
.domains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-10); margin: 0; }
.domains div { padding-block: 16px; border-top: 1px solid var(--rule); }
.domains dt { font-weight: 700; }
.domains dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.98rem; }

.offer { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-14); align-items: start; }
.price { background: var(--brand); color: var(--on-brand); border-radius: var(--radius-lg); padding: 30px; }
.price .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 4px; }
.price p { margin: 0 0 18px; color: var(--on-brand-soft); }
.price ul { margin: 0 0 24px; padding-left: 18px; }
.price li { margin-bottom: 6px; }
.price .btn { background: var(--sheet); color: var(--ink); }
.price .btn:hover { background: var(--paper); }
.price :focus-visible { outline-color: var(--on-brand); }

.deliver { margin: 0; padding-left: 20px; max-width: var(--measure); }
.deliver li { margin-bottom: 10px; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-14); }
.about p { max-width: var(--measure); margin: 0 0 14px; }
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; }

.lead { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.lead h2 { margin-bottom: 8px; }
.lead p { margin: 0; color: var(--ink-soft); max-width: 52ch; }

.contact p { max-width: var(--measure); }
.contact .mail { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }

footer { padding-block: 36px 48px; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }
footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero, .offer, .about { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-block: 24px 64px; }
  .checks, .steps { grid-template-columns: 1fr 1fr; }
  .services li { grid-template-columns: 1fr 1fr; }
  .services li > p { grid-column: 1 / -1; grid-row: 2; }
  .lead { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .wrap {
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
  }
  .brand img { height: 26px; }
  .site-head nav { gap: 16px; }
  .site-head nav a.hide-sm { display: none; }
  .checks, .steps, .domains { grid-template-columns: 1fr; }
  .services li { grid-template-columns: 1fr; gap: var(--space-3); }
  .services li > p { grid-column: auto; grid-row: auto; }
  .ledger { padding: 16px 12px 12px; }
  .ledger table { font-size: 0.76rem; }
  .ledger td, .ledger th { padding: 8px 5px; }
  .ledger .hide-sm { display: none; }
  section.block { padding-block: var(--space-14); }
  .actions { flex-direction: column; align-items: flex-start; }
  .btn-quiet { display: block; width: fit-content; margin: 8px 0 0; padding: 10px 0; }
  .lead { padding: 24px; }
}

/* Status words for projects: always a word, colour only supports it */
.status { display: inline-block; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: var(--radius-md); border: 1px solid var(--rule); color: var(--ink-soft); white-space: nowrap; }
.status--live { color: var(--match); border-color: currentColor; }
.status--building { color: var(--ink); }
.status--planned { color: var(--muted); }

/* Projects ledger on the hub */
.ledger.projects td { white-space: normal; vertical-align: top; }
.ledger.projects td a { font-family: var(--font-sans); font-weight: 600; text-decoration: none; }
.ledger.projects td a:hover { text-decoration: underline; }
.ledger.projects .addr { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.ledger.projects td.st { text-align: right; }

/* Placeholder pages for projects in progress */
.soon { padding-block: 48px 88px; max-width: 760px; }
.soon .status { margin-bottom: 18px; }
.soon h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; margin: 0 0 18px; }
.soon .lede { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 32px; max-width: 46ch; }
.soon h2 { font-size: 1.15rem; margin: 0 0 10px; }
.soon ul.plan { margin: 0 0 36px; padding-left: 20px; max-width: var(--measure); }
.soon ul.plan li { margin-bottom: 8px; }
.soon .addr { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
