/* DealRouters — design tokens */
:root {
  --paper: #F3F1EB;
  --surface: #FBFAF7;
  --ink: #0F1720;
  --ink-2: #2A333D;
  --muted: #5B6470;
  --rule: #D9D5CB;
  --route: #E0472B;      /* graphics, large accents */
  --route-text: #B83A20; /* accessible text on paper */
  --night: #0F1720;
  --night-2: #18222D;
  --on-night: #F3F1EB;
  --on-night-muted: #A9B1BB;

  --display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.eyebrow, .tag {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--route-text);
}
.eyebrow { margin-bottom: 20px; }
.eyebrow--light { color: #FF8A6E; }
.section-title { font-size: clamp(34px, 4.6vw, 60px); max-width: 16ch; }
.section-lede { margin-top: 20px; max-width: 52ch; color: var(--muted); font-size: 19px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 16px/1 var(--display); text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--route); }
.btn--ghost { border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--lg { min-height: 58px; padding: 0 30px; font-size: 18px; }
.contact .btn--primary { background: var(--route); color: #fff; }
.contact .btn--primary:hover { background: var(--paper); color: var(--ink); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; fill: var(--ink); }
.brand__route { color: var(--route); }
.brand__word { font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand__word span { color: var(--route-text); }
.brand--small .brand__mark { width: 24px; height: 24px; }
.brand--small .brand__word { font-size: 18px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__menu { display: flex; align-items: center; gap: 30px; }
.nav__menu a:not(.btn) { text-decoration: none; font-size: 15.5px; font-weight: 500; color: var(--ink-2); position: relative; }
.nav__menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--route); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__menu a:not(.btn):hover::after, .nav__menu a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; color: var(--ink);
  }
  .nav__bars, .nav__bars::before, .nav__bars::after {
    display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .nav__bars { position: relative; }
  .nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
  .nav__bars::before { top: -7px; }
  .nav__bars::after { top: 7px; }
  .nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav__menu {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .nav.is-open .nav__menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
  .nav__menu a:not(.btn)::after { display: none; }
  .nav__menu .btn { margin-top: 20px; justify-content: center; min-height: 52px; font-size: 17px; }
}

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(44px, 6.6vw, 92px); letter-spacing: -0.04em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--route-text); }
.lede { margin-top: 28px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 46ch; }
.hero__ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.route { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(12px, 2vw, 24px); }
.route svg { width: 100%; height: auto; overflow: visible; }
.route__rail { fill: none; stroke: var(--rule); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; }
.route__line { fill: none; stroke: var(--route); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s .3s var(--ease) forwards; }
.route__dot { fill: var(--route); opacity: 0; animation: fadeIn .4s 2.2s forwards; }
.route__terminal rect { fill: var(--ink); }
.route__terminal text { fill: var(--paper); font: 600 15px var(--display); text-anchor: middle; }
.route__terminal--end rect { fill: var(--route); }
.route__terminal--end text { fill: #fff; }
.route__stop { opacity: 0; animation: fadeIn .5s var(--d) var(--ease) forwards; }
.route__stop circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.route__stop text { fill: var(--ink-2); font: 500 15px var(--display); text-anchor: middle; }
.route__stop .route__num { fill: var(--route-text); font: 500 12px var(--mono); letter-spacing: .08em; }
.route__stop .route__num--l, .route__stop .route__lbl--l { text-anchor: start; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .route { max-width: 600px; }
}
@media (max-width: 600px) {
  .route__stop text { font-size: 21px; }
  .route__stop .route__num { font-size: 16px; }
  .route__terminal text { font-size: 18px; }
}

/* Contrast */
.contrast { padding: 0 0 var(--section); }
.contrast__grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--ink); }
.contrast__item { padding: 28px 28px 0 0; }
.contrast__item + .contrast__item { padding-left: 28px; border-left: 1px solid var(--rule); }
.contrast__item p:last-child { margin-top: 14px; font-size: 18px; color: var(--muted); }
.contrast__item .tag { color: var(--muted); }
.contrast__item--us .tag { color: var(--route-text); }
.contrast__item--us p:last-child { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) {
  .contrast__grid { grid-template-columns: 1fr; }
  .contrast__item, .contrast__item + .contrast__item { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* Model */
.model { padding: var(--section) 0; background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.model__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); }
.model__intro { position: sticky; top: 120px; align-self: start; }
.model__intro p:not(.eyebrow) { margin-top: 20px; color: var(--muted); max-width: 36ch; font-size: 18px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 30px 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step__num { font: 500 14px var(--mono); color: var(--route-text); padding-top: 6px; }
.step h3 { font-size: clamp(22px, 2.2vw, 28px); }
.step p { margin-top: 10px; color: var(--muted); max-width: 48ch; }
@media (max-width: 860px) {
  .model__grid { grid-template-columns: 1fr; }
  .model__intro { position: static; }
  .step { grid-template-columns: 44px 1fr; }
}

/* Lanes */
.lanes { padding: var(--section) 0; }
.lane-list { margin-top: 56px; border-top: 1.5px solid var(--ink); }
.lane { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(20px, 5vw, 80px); padding: 40px 0; border-bottom: 1px solid var(--rule); position: relative; }
.lane::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
  background: var(--route); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.lane:hover::before { transform: scaleX(1); }
.lane__code { font: 500 13px var(--mono); color: var(--route-text); letter-spacing: .08em; }
.lane h3 { margin-top: 10px; font-size: clamp(28px, 3.2vw, 42px); }
.lane__pair { margin-top: 10px; font-weight: 500; color: var(--ink-2); }
.lane__body p:first-child { font-size: 18px; color: var(--ink-2); max-width: 56ch; }
.lane__note { margin-top: 16px; font-size: 14px; color: var(--muted); padding-left: 14px; border-left: 2px solid var(--rule); max-width: 56ch; }
.lane--open h3 { color: var(--muted); }
.lane--open a { color: var(--route-text); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 760px) { .lane { grid-template-columns: 1fr; padding: 32px 0; } }

/* Work */
.work { padding: var(--section) 0; background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.feature {
  margin-top: 56px; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 4vw, 48px); background: var(--night); color: var(--on-night); border-radius: 22px;
}
.feature__figure { display: flex; align-items: center; gap: 20px; }
.feature__big { font-size: clamp(96px, 14vw, 180px); font-weight: 800; line-height: .8; letter-spacing: -0.06em; color: var(--route); }
.feature__unit { font: 500 14px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--on-night-muted); }
.feature__text .tag { color: #FF8A6E; }
.feature__text p:last-child { margin-top: 12px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; max-width: 24ch; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } }

.ledger { margin-top: 48px; }
.ledger__row { display: grid; grid-template-columns: 1fr 2.4fr .8fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.ledger__row--head { padding: 0 0 12px; border-bottom: 1.5px solid var(--ink); font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ledger__ind { font-weight: 600; }
.ledger__type { font: 500 13px var(--mono); color: var(--route-text); text-align: right; }
.ledger__row--head span:last-child { text-align: right; }
.work__note { margin-top: 24px; font-size: 14px; color: var(--muted); max-width: 70ch; }
@media (max-width: 760px) {
  .ledger__row--head { display: none; }
  .ledger__row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .ledger__row > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--ink-2); }
}

/* FAQ */
.faq { padding: var(--section) 0; }
.faq__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); }
.faq__list { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-size: clamp(19px, 1.8vw, 22px); font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--route); border-bottom: 2px solid var(--route);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) { .faq__grid { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--night); color: var(--on-night); padding: var(--section) 0; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(224, 71, 43, .35) 30%, rgba(224, 71, 43, .35) 70%, transparent);
  pointer-events: none;
}
.contact__inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact__title { font-size: clamp(40px, 6.4vw, 88px); letter-spacing: -0.04em; max-width: 14ch; background: var(--night); padding: 0 16px; }
.contact__lede { margin-top: 24px; color: var(--on-night-muted); font-size: 19px; max-width: 46ch; background: var(--night); padding: 0 12px; }
.contact__actions { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 22px; background: var(--night); padding: 0 16px; }
.contact__mail { font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; color: var(--on-night); text-decoration: none; border-bottom: 1.5px solid rgba(243, 241, 235, .3); padding-bottom: 4px; transition: border-color .2s; overflow-wrap: anywhere; }
.contact__mail:hover { border-color: var(--route); }

/* Footer */
.footer { background: var(--night-2); color: var(--on-night-muted); padding: 40px 0; }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer .brand { color: var(--on-night); }
.footer .brand__mark { fill: var(--on-night); }
.footer .brand__word span { color: #FF8A6E; }
.footer__legal { font-size: 13px; line-height: 1.55; max-width: 70ch; }
.footer__mail { font-size: 14px; color: var(--on-night); text-underline-offset: 3px; }
@media (max-width: 860px) { .footer__inner { grid-template-columns: 1fr; gap: 18px; } }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .route__dot { display: none; }
}
