/* Morgan & Barnaby — site styles. Tokens first; no frameworks. */
:root {
  color-scheme: light;
  --paper: #edf2f8;
  --paper-2: #e1eaf4;
  --ink: #0a1a33;
  --ink-2: #3b4c63;
  --rule: #c3d0e0;
  --signal: #2a5bff;
  --signal-ink: #1a3fcc;
  --moss: #1f5a52;
  --tbc-bg: #fff4d6;
  --tbc-line: #a9801b;
  --tbc-ink: #5e4400;
  --danger: #a3261b;
  --head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f3f7fb 0, var(--paper) 520px);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--signal-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--head); color: var(--ink); font-weight: 600; margin: 0; }
h1 { font-size: clamp(2.7rem, 6.2vw, 5.1rem); line-height: 1; letter-spacing: -0.042em; font-weight: 400; }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; }
h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 62ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { color: var(--ink); font-weight: 600; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section + .section { border-top: 1px solid var(--rule); }
.section--tint { background: linear-gradient(180deg, #e6eef8, #dde7f3); }
.section--ink { background: radial-gradient(60% 120% at 85% 0%, rgba(60, 110, 255, 0.35), rgba(60, 110, 255, 0) 65%), var(--ink); color: #c7d1db; border-top: 0; }
.section--ink h2, .section--ink h3, .section--ink strong { color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(237, 242, 248, 0.78); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.015em; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-family: var(--head); font-size: 0.98rem; color: var(--ink); text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }
.nav .btn { border-bottom: 0; color: #fff; padding: 11px 18px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); color: var(--ink); font: 600 0.95rem var(--head); padding: 9px 14px; border-radius: var(--radius); cursor: pointer; }

/* Buttons and links */
.btn { display: inline-block; font-family: var(--head); font-weight: 600; font-size: 1.02rem; text-decoration: none; padding: 15px 24px; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; line-height: 1.2; transition: background-color 0.15s, border-color 0.15s; }
.btn--primary { background: linear-gradient(135deg, #4d8aff, #1f46d8); color: #fff; box-shadow: 0 8px 22px -10px rgba(31, 70, 216, 0.7); }
.btn--primary:hover { background: linear-gradient(135deg, #3d78f0, #1a3fcc); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper-2); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.link-strong { font-family: var(--head); font-weight: 600; color: var(--ink); text-decoration-thickness: 2px; }
.section--ink .link-strong { color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 32px; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 88px); background: radial-gradient(60% 70% at 78% 35%, rgba(110, 165, 255, 0.38), rgba(110, 165, 255, 0) 70%), radial-gradient(40% 50% at 8% 100%, rgba(190, 215, 255, 0.5), rgba(190, 215, 255, 0) 70%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 12ch; }
.hero .lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; margin-top: 24px; max-width: 34em; color: var(--ink-2); }
.figure { margin: 0; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 20px; padding: clamp(14px, 2.4vw, 28px); box-shadow: 0 40px 90px -40px rgba(30, 70, 170, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.figure figcaption { font-size: 0.9rem; margin-top: 10px; color: var(--ink-2); max-width: none; }
.gate-svg { width: 100%; height: auto; }
.gate-svg text { font-family: var(--head); font-size: 15px; fill: var(--ink); }
.dot-sig { filter: drop-shadow(0 0 6px rgba(42, 91, 255, 0.55)); }
.gate-line { stroke: var(--ink); stroke-width: 2; }
.row-track { fill: #d8e4f4; }
.row-fill { fill: var(--signal); transform-box: fill-box; transform-origin: left center; }
.dot-grey { fill: #8396b2; }
.dot-sig { fill: var(--signal); }

/* Page head (inner pages) */
.page-head { padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--rule); background: radial-gradient(50% 120% at 85% 0%, rgba(110, 165, 255, 0.28), rgba(110, 165, 255, 0) 70%); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); max-width: 18ch; }
.page-head p { font-size: 1.25rem; margin-top: 20px; max-width: 36em; }

/* Two-column section layout: statement left, content right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.split > :first-child { position: sticky; top: 100px; }
.split h2 + p { margin-top: 18px; }

/* Ruled lists */
.ruled > li { padding-block: 22px; border-top: 1px solid var(--rule); }
.ruled > li:last-child { border-bottom: 1px solid var(--rule); }
.ruled h3 { margin-bottom: 6px; }
.ruled p { margin: 0; }
.section--ink .ruled > li { border-color: rgba(255, 255, 255, 0.18); }

/* Steps — a real sequence, so numbered */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 48px; counter-reset: step; }
.steps li { position: relative; padding: 28px 24px 0 0; border-top: 2px solid var(--ink); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: -17px; left: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; font: 600 0.95rem var(--head); color: var(--ink); }
.section--tint .steps li::before { background: var(--paper-2); }
.steps h3 { margin-bottom: 8px; margin-top: 8px; }
.steps p { font-size: 1rem; }
.steps--stacked { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
.steps--stacked li { padding: 28px 0 28px 56px; border-top: 1px solid var(--rule); }
.steps--stacked li::before { top: 26px; left: 0; }
.steps--stacked li:last-child { border-bottom: 1px solid var(--rule); }

/* Placeholders: dashed amber = not yet confirmed */
.tbc { display: inline-block; font: 600 0.78rem/1 var(--head); color: var(--tbc-ink); background: var(--tbc-bg); border: 1px dashed var(--tbc-line); border-radius: 2px; padding: 4px 7px; margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.slots li { border: 2px dashed var(--tbc-line); background: var(--tbc-bg); color: var(--tbc-ink); border-radius: var(--radius); padding: 22px 20px; min-height: 112px; font-family: var(--head); }
.slots li strong { display: block; color: var(--tbc-ink); font-size: 1.05rem; margin-bottom: 4px; }
.slots li span { font-size: 0.95rem; }
.note { border-left: 3px solid var(--tbc-line); background: var(--tbc-bg); color: var(--tbc-ink); padding: 14px 18px; font-size: 1rem; max-width: 62ch; margin-top: 28px; }
.note p { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 28px; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
caption { text-align: left; font: 600 1.1rem var(--head); color: var(--ink); padding-bottom: 12px; }
th, td { text-align: left; padding: 14px 16px 14px 0; border-top: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--head); color: var(--ink); font-weight: 600; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 1px solid var(--rule); }

/* CTA band */
.cta-band h2 { max-width: 20ch; }
.cta-band p { margin-top: 16px; font-size: 1.2rem; }

/* Footer */
.site-footer { background: var(--ink); color: #aebbc8; padding-block: 56px 40px; font-size: 0.98rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.site-footer a { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: 12px; letter-spacing: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer p { max-width: 36ch; }
.legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 24px; font-size: 0.9rem; }

/* Form */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
label, .legend { font: 600 0.98rem var(--head); color: var(--ink); }
.opt { font-weight: 400; color: var(--ink-2); }
.hint { font-size: 0.9rem; color: var(--ink-2); margin: 0; max-width: none; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; font: 1.05rem var(--body); color: var(--ink); background: #fff; border: 1.5px solid #8497b3; border-radius: var(--radius); padding: 13px 14px; min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.field[data-invalid="true"] input, .field[data-invalid="true"] select, .field[data-invalid="true"] textarea { border-color: var(--danger); border-width: 2px; }
.error { color: var(--danger); font: 600 0.92rem var(--head); margin: 0; min-height: 0; max-width: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--signal); }
.check label { font: 400 1rem/1.5 var(--body); color: var(--ink-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-summary { border: 2px solid var(--danger); background: #fdecea; color: #6f1a12; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 24px; }
.form-summary:empty { display: none; }
.form-summary h2 { font-size: 1.1rem; color: #6f1a12; margin-bottom: 8px; letter-spacing: 0; }
.form-summary a { color: #6f1a12; }
.success { border: 2px solid var(--moss); background: #e6f0ec; padding: 28px; border-radius: var(--radius); }
.success h2 { font-size: 1.6rem; margin-bottom: 10px; }
.success p { margin-bottom: 0; }
.aside-card { border-top: 2px solid var(--ink); padding-top: 20px; }
.aside-card + .aside-card { margin-top: 32px; }

/* Mobile sticky CTA */
.sticky-cta { display: none; }

/* Hero animation: plays once on load, ends composed. */
@keyframes grey-pass { 0% { opacity: 0.9; transform: translateX(0); } 70% { opacity: 0.9; transform: translateX(var(--gx)); } 100% { opacity: 0.22; transform: translateX(var(--gx)); } }
@keyframes sig-pass { 0% { transform: translate(0, 0); } 100% { transform: translate(var(--dx), var(--dy)); } }
@keyframes row-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dot-grey { animation: grey-pass 2.6s ease-in both; animation-delay: var(--d, 0s); }
.dot-sig { animation: sig-pass 3s cubic-bezier(0.45, 0, 0.2, 1) both; animation-delay: var(--d, 0s); transform: translate(var(--dx), var(--dy)); animation-fill-mode: both; }
.row-fill { animation: row-fill 0.7s ease-out both; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot-grey { animation: none; opacity: 0.22; transform: translateX(var(--gx)); }
  .dot-sig { animation: none; transform: translate(var(--dx), var(--dy)); }
  .row-fill { animation: none; }
  .btn { transition: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .split > :first-child { position: static; }
  .hero h1 { max-width: 14ch; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 16px; text-align: center; border: 2px solid transparent; }
  .form-grid { grid-template-columns: 1fr; }
  .steps, .slots { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(237, 242, 248, 0.92); border-top: 1px solid var(--rule); }
  .sticky-cta .btn { display: block; text-align: center; width: 100%; }
  .has-sticky { padding-bottom: 76px; }
}
@media print { .site-header, .sticky-cta, .nav-toggle { display: none; } }

/* Utilities (no inline styles, so CSP can stay strict) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-s { margin-top: 16px; }
.mt-l { margin-top: 48px; }
.h-sm { font-size: 1.3rem; }
.note--flush { margin-top: 0; }
[tabindex="-1"], input, select, textarea, [id] { scroll-margin-top: 96px; }

@media (prefers-reduced-transparency: reduce) { .figure, .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #f4f8fc; } }

.hero h1 { font-size: clamp(2.3rem, 4.8vw, 4.1rem); max-width: 16ch; }
.slots--one { grid-template-columns: 1fr; margin-top: 8px; max-width: 520px; }
@media (max-width: 960px) { .hero h1 { max-width: 18ch; } }

.preview-bar { background: var(--tbc-bg); color: var(--tbc-ink); font: 600 0.9rem/1.3 var(--head); text-align: center; padding: 8px var(--gutter); border-bottom: 1px dashed var(--tbc-line); }

/* Illustrations and icons */
.has-icon { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; align-items: start; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(42, 91, 255, 0.1); color: var(--signal); }
.ico svg { width: 22px; height: 22px; }
.figure--art { padding: clamp(12px, 2vw, 22px); max-width: 520px; }
.art-svg { width: 100%; height: auto; }
.page-head--art .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.page-head--art .figure { justify-self: end; width: 100%; max-width: 440px; }
.figure--map figcaption { margin-top: 4px; }
.split .figure--art { margin-bottom: 24px; }
.hub { fill: var(--signal); }
.pulse { fill: var(--signal); transform-box: fill-box; transform-origin: center; animation: ripple 3.2s ease-out infinite; animation-delay: var(--d, 0s); opacity: 0; }
.p0 { --d: 0s; } .p1 { --d: 0.5s; } .p2 { --d: 1.1s; } .p3 { --d: 1.6s; } .p4 { --d: 2.1s; } .p5 { --d: 0.3s; } .p6 { --d: 0.9s; } .p7 { --d: 1.4s; } .p8 { --d: 1.9s; } .p9 { --d: 2.5s; }
.road-dash { stroke-dasharray: 22 18; animation: road 1s linear infinite; }
.truck { animation: truck-bob 0.7s ease-in-out infinite; }
.spin { transform-box: fill-box; transform-origin: center; animation: spin 1.1s linear infinite; }
.shield { animation: shield-bob 3.4s ease-in-out infinite; }
.doc-float { animation: shield-bob 4.2s ease-in-out infinite; animation-delay: 0.6s; }
.ring { transform-box: fill-box; transform-origin: center; animation: ring 3.4s ease-out infinite; opacity: 0; }
.ring--b { animation-delay: 1.7s; }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(5); opacity: 0; } }
@keyframes road { to { stroke-dashoffset: -40; } }
@keyframes truck-bob { 0%, 100% { transform: translate(120px, 148px); } 50% { transform: translate(120px, 146px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shield-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes ring { 0% { transform: scale(0.9); opacity: 0.45; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse, .road-dash, .truck, .spin, .shield, .doc-float, .ring { animation: none; } .pulse, .ring { opacity: 0; } }
@media (max-width: 960px) { .page-head--art .wrap { grid-template-columns: 1fr; } .page-head--art .figure { justify-self: start; } }

.stats { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stats li { background: rgba(255,255,255,.7); border: 1px solid var(--rule); border-radius: 16px; padding: 22px 24px; display: grid; gap: 6px; }
.stats strong { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--signal-ink); line-height: 1.1; }
.stats span { color: var(--ink-2); }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } }

.typeform { width: 100%; min-height: 640px; border: 1px solid var(--rule); border-radius: 16px; background: #fff; }
