/* 9fold: a document-like site. Left rail carries section names, right column carries content, like a well-kept architecture record. */
:root {
  --paper: #F3F5F8;
  --surface: #FFFFFF;
  --ink: #16202E;
  --muted: #566173;
  --rule: #D6DBE3;
  --fold: #F2B705;
  --fold-ink: #6B5000;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 38rem;
  --wide: 74rem;
  --rail: 13rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--fold); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, .ui {
  font-family: var(--display);
  text-wrap: balance;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.04; font-weight: 700; margin: 0; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; font-weight: 650; margin: 0 0 1rem; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 650; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lead { font-size: 1.3rem; line-height: 1.55; }
.muted { color: var(--muted); }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; flex-wrap: wrap; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.04em; }
.brand svg { width: 1.6rem; height: 1.6rem; }
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 2rem); font-family: var(--display); font-size: 1rem; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--fold); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.3rem; border-radius: 3px; text-decoration: none;
  border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer;
}
.button:hover { background: #24324a; border-color: #24324a; text-decoration: none; }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--surface); }
.nav .button { padding: 0.55rem 1rem; border-bottom-width: 2px; color: var(--paper); }
.nav .button:hover { border-bottom-color: #24324a; }

/* Sections laid out as rail + body */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.rail-grid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 1rem clamp(1.5rem, 4vw, 4rem); }
.rail { font-family: var(--display); font-size: 0.98rem; color: var(--muted); padding-top: 0.45rem; }
.rail::before { content: ""; display: block; width: 1.5rem; height: 3px; background: var(--fold); margin-bottom: 0.75rem; }
@media (max-width: 760px) {
  .rail-grid { grid-template-columns: 1fr; }
  .rail { padding-top: 0; }
}

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero .lead { margin-top: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.byline { display: flex; align-items: center; gap: 0.85rem; margin-top: 2.25rem; font-family: var(--display); font-size: 0.98rem; }
.byline .avatar { width: 3.25rem; height: 3.25rem; border-radius: 50%; object-fit: cover; background: var(--rule); flex: none; }
.byline span { color: var(--muted); display: block; }
.hero-mark { justify-self: end; width: min(100%, 18rem); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { justify-self: start; width: 11rem; order: -1; }
}

/* The mark, with one fold on load */
.mark .sheet { fill: var(--ink); }
.mark .nine { fill: var(--paper); }
.mark .fold { fill: var(--fold); transform-origin: 100% 100%; transform-box: fill-box; }
.hero-mark .fold { animation: fold-in 1.1s cubic-bezier(.2,.8,.2,1) 0.35s both; }
@keyframes fold-in {
  from { transform: rotate(-180deg) scale(0.2); opacity: 0; }
  to   { transform: rotate(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .hero-mark .fold { animation: none; } }

/* Facts as a definition list */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .facts-3 { grid-template-columns: 1fr; } }
.facts div { padding: 1.1rem 1.25rem 1.1rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--display); font-size: 0.9rem; color: var(--muted); margin-bottom: 0.2rem; }
.facts dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.35; }

/* Two routes */
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 0.5rem; }
.route { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.route p { font-size: 1.05rem; }
@media (max-width: 700px) { .routes { grid-template-columns: 1fr; } }

/* Capability list: weighted, not a card grid */
.capability { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.5rem 2rem; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.capability:last-child { border-bottom: 1px solid var(--rule); }
.capability h3 { margin: 0; }
.capability p { margin: 0; }
@media (max-width: 700px) { .capability { grid-template-columns: 1fr; } }

.also { margin-top: 2rem; font-size: 1.02rem; color: var(--muted); }

/* Work summaries on the home page */
.summaries { display: grid; gap: 0; }
.summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 2rem; padding: 1.4rem 0; border-top: 1px solid var(--rule); text-decoration: none; }
.summary:last-child { border-bottom: 1px solid var(--rule); }
.summary h3 { margin: 0 0 0.3rem; }
.summary p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.summary .result { font-family: var(--display); font-weight: 600; align-self: center; text-align: right; max-width: 15rem; }
.summary:hover h3 { text-decoration: underline; text-decoration-color: var(--fold); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
@media (max-width: 700px) { .summary { grid-template-columns: 1fr; } .summary .result { text-align: left; margin-top: 0.5rem; } }

/* Case records on the work page */
.record { padding: 2.5rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.record:first-of-type { border-top: 0; padding-top: 0; }
.record header { margin-bottom: 1.25rem; }
.record .meta { font-family: var(--display); color: var(--muted); font-size: 0.98rem; margin: 0.25rem 0 0; }
.record dl { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.75rem 1.5rem; margin: 0; }
.record dt { font-family: var(--display); font-weight: 600; font-size: 0.98rem; padding-top: 0.2rem; }
.record dd { margin: 0; max-width: var(--measure); }
.record dd ul { margin: 0; padding-left: 1.1rem; }
.record dd li { margin-bottom: 0.35rem; }
.record .outcome { background: var(--surface); border-left: 4px solid var(--fold); padding: 0.75rem 1rem; }
@media (max-width: 600px) { .record dl { grid-template-columns: 1fr; gap: 0.25rem; } .record dd { margin-bottom: 0.75rem; } }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.tags li { font-family: var(--display); font-size: 0.85rem; border: 1px solid var(--rule); background: var(--surface); padding: 0.15rem 0.55rem; border-radius: 2px; }

/* Services */
.shape { padding: 2rem 0; border-top: 1px solid var(--rule); }
.shape:first-child { border-top: 0; padding-top: 0; }
.shape .fit { font-family: var(--display); font-size: 0.98rem; color: var(--muted); margin-bottom: 0.75rem; }
.shape ul { margin: 0.5rem 0 0; padding-left: 1.1rem; max-width: var(--measure); }
.shape li { margin-bottom: 0.35rem; }

.depth { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.75rem 2.5rem; margin: 0; }
.depth dt { font-family: var(--display); font-weight: 650; margin-bottom: 0.35rem; }
.depth dd { margin: 0; font-size: 1rem; color: var(--muted); }

.principles { display: grid; gap: 1.5rem; }
.principles div { max-width: var(--measure); }

/* About */
.about-head { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.portrait { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; object-position: 90% 50%; background: var(--rule); border-radius: 3px; }
.portrait-wrap { position: relative; }
.portrait-wrap::after { content: ""; position: absolute; right: 0; bottom: 0; width: 22%; aspect-ratio: 1; background: linear-gradient(135deg, transparent 50%, var(--fold) 50%); }
@media (max-width: 760px) { .about-head { grid-template-columns: 1fr; } .portrait-wrap { max-width: 14rem; } }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 1.6rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.55rem; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--ink); }
.timeline li:first-child::before { background: var(--fold); border-color: var(--ink); }
.timeline .when { font-family: var(--display); font-size: 0.95rem; color: var(--muted); display: block; }
.timeline .what { font-family: var(--display); font-weight: 650; display: block; line-height: 1.35; }
.timeline p { font-size: 1.02rem; margin: 0.3rem 0 0; }

.nines { width: 100%; border-collapse: collapse; font-family: var(--display); font-variant-numeric: tabular-nums; max-width: 34rem; margin: 1.25rem 0 1.5rem; }
.nines th, .nines td { text-align: left; padding: 0.55rem 1rem 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.nines th { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.nines td:last-child, .nines th:last-child { text-align: right; padding-right: 0; }
.nines tr.far td { color: var(--muted); }

/* Closing band */
.closing { background: var(--ink); color: var(--paper); padding: clamp(3rem, 7vw, 5rem) 0; }
.closing h2 { color: var(--paper); }
.closing p { color: #C9D0DB; }
.closing .button { background: var(--fold); border-color: var(--fold); color: var(--ink); }
.closing .button:hover { background: #ffc928; border-color: #ffc928; }
.closing a:not(.button) { color: var(--paper); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
form { display: grid; gap: 1.1rem; }
label { font-family: var(--display); font-weight: 600; font-size: 0.98rem; display: block; margin-bottom: 0.35rem; }
.hint { font-family: var(--display); font-weight: 400; color: var(--muted); font-size: 0.9rem; display: block; margin-top: 0.1rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--surface); border: 1px solid #B7C0CD; border-radius: 3px; padding: 0.7rem 0.8rem;
}
textarea { min-height: 10rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-family: var(--display); font-weight: 600; font-size: 0.98rem; margin-bottom: 0.5rem; padding: 0; }
.choices { display: grid; gap: 0.5rem; }
.choices label { font-weight: 400; display: flex; gap: 0.6rem; align-items: center; margin: 0; background: var(--surface); border: 1px solid var(--rule); padding: 0.65rem 0.8rem; border-radius: 3px; cursor: pointer; }
.choices input { width: auto; margin: 0; accent-color: var(--ink); }
.form-status { font-family: var(--display); padding: 0.85rem 1rem; border-left: 4px solid var(--fold); background: var(--surface); }
.form-status[hidden] { display: none; }
.aside-box { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.aside-box + .aside-box { margin-top: 2.5rem; }
.aside-box ul { padding-left: 1.1rem; margin: 0.5rem 0 0; }
.aside-box li { margin-bottom: 0.3rem; font-size: 1.02rem; }

/* Page intro */
.page-intro { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); }
.page-intro .lead { margin-top: 1.25rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem; font-family: var(--display); font-size: 0.95rem; color: var(--muted); background: var(--paper); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 4vw, 4rem); padding-bottom: 2rem; }
.footer-brand .brand { font-size: 1.3rem; color: var(--ink); }
.footer-brand .brand svg { width: 1.4rem; height: 1.4rem; }
.footer-brand p { margin: 0.75rem 0 0; max-width: 20rem; }
.footer-brand a:not(.brand) { color: var(--ink); }
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; padding-top: 0.3rem; }
.footer-col h2 { font-size: 0.95rem; font-weight: 650; color: var(--ink); margin: 0 0 0.25rem; letter-spacing: 0; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--fold); }
.footer-legal { border-top: 1px solid var(--rule); padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: 0.88rem; }
.footer-legal p { margin: 0; max-width: none; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Consultancy components */
.strip { border-bottom: 1px solid var(--rule); background: var(--surface); }
.credentials { list-style: none; margin: 0; padding: 1.1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem; font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.credentials li { display: flex; align-items: center; gap: 0.55rem; }
.credentials li::before { content: ""; width: 0.6rem; height: 0.6rem; background: linear-gradient(135deg, var(--ink) 50%, var(--fold) 50%); flex: none; }

.offer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3vw, 3rem); margin-top: 1.5rem; }
.offer-row { display: block; padding: 1.25rem 0; border-top: 1px solid var(--rule); text-decoration: none; }
.offer-row h3 { margin-bottom: 0.3rem; }
.offer-row p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.offer-row:hover h3 { text-decoration: underline; text-decoration-color: var(--fold); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
@media (max-width: 700px) { .offer-list { grid-template-columns: 1fr; } }

.offer { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 4vw, 3.5rem); padding: 2.5rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.offer:first-child { border-top: 0; padding-top: 0; }
.offer-meta { margin: 0; background: var(--surface); border-top: 3px solid var(--ink); padding: 1rem 1.25rem; display: grid; gap: 0.85rem; align-self: start; }
.offer-meta dt { font-family: var(--display); font-size: 0.88rem; color: var(--muted); }
.offer-meta dd { margin: 0.1rem 0 0; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.4; }
@media (max-width: 820px) { .offer { grid-template-columns: 1fr; } }

.principles.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 3rem); }
.principles.two-col p { font-size: 1.04rem; }
@media (max-width: 700px) { .principles.two-col { grid-template-columns: 1fr; } }
.routes.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .routes.three { grid-template-columns: 1fr; } }

.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: stage; }
.stages li { counter-increment: stage; border-top: 3px solid var(--ink); padding-top: 1rem; position: relative; }
.stages li::before { content: counter(stage); font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; letter-spacing: -0.04em; display: block; margin-bottom: 0.75rem; }
.stages li:last-child { border-top-color: var(--fold); }
.stages p { font-size: 1.02rem; }
@media (max-width: 960px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stages { grid-template-columns: 1fr; } }

.leader { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.leader .role { font-family: var(--display); color: var(--muted); margin-top: -0.5rem; }
@media (max-width: 700px) { .leader { grid-template-columns: 1fr; } .leader .portrait-wrap { max-width: 13rem; } }

.plain-list { margin: 0 0 1rem; padding-left: 1.1rem; max-width: var(--measure); }
.plain-list li { margin-bottom: 0.35rem; }
