/* On Roll marketing site. Tokens follow the app (app/lib/theme/tokens.dart). */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url("/fonts/schibsted-400.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url("/fonts/schibsted-600.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url("/fonts/schibsted-800.woff2") format("woff2"); }

:root {
  --indigo: #1F2A5C;
  --indigo-deep: #161E45;
  --indigo-soft: #E6E9F5;
  --paper: #F5F7FA;
  --sheet: #FFFFFF;
  --graphite: #1A1D29;
  --slate: #5B6275;
  --rule: #DCE1EA;
  --haldi: #D9A21B;
  --haldi-ink: #8A6208;   /* haldi dark enough for text on paper */
  --haldi-soft: #FBF1D6;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-sheet: 6px;
  --radius-ctl: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--indigo); }
h1, h2, h3 { margin: 0; color: var(--indigo); line-height: 1.08; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--haldi); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--indigo); color: #fff; padding: 8px 14px; border-radius: var(--radius-ctl); z-index: 10; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--indigo); color: #fff;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border-radius: var(--radius-ctl);
  transition: background-color .15s ease;
}
.btn:hover { background: var(--indigo-deep); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-ghost { background: transparent; color: var(--indigo); box-shadow: inset 0 0 0 1.5px var(--indigo); }
.btn-ghost:hover { background: var(--indigo-soft); }
.btn-light { background: #fff; color: var(--indigo); }
.btn-light:hover { background: var(--haldi-soft); }

/* Wordmark: same split weight as the app's sidebar logo */
.mark { font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em; color: var(--indigo); text-decoration: none; }
.mark span { font-weight: 400; margin-left: 1px; }
.mark-small { font-size: 1.125rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(245, 247, 250, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.top.is-scrolled { border-bottom-color: var(--rule); }
.top-row { display: flex; align-items: center; gap: 32px; height: 68px; }
.top-nav { display: flex; gap: 26px; margin-right: auto; }
.top-nav a, .link-quiet { color: var(--slate); text-decoration: none; font-size: .9375rem; font-weight: 600; }
.top-nav a:hover, .link-quiet:hover { color: var(--indigo); }
.top-actions { display: flex; align-items: center; gap: 20px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 4.5vw, 64px) 0 clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "title copy" "record record";
  gap: 40px clamp(32px, 5vw, 72px);
  align-items: end;
}
.hero h1 {
  grid-area: title;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: .96;
  max-width: 14ch;
}
.hero-copy { grid-area: copy; }

.lede { font-size: 1.125rem; color: var(--graphite); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.fine { margin-top: 18px; font-size: .9375rem; color: var(--slate); }

/* The employee record */
.record { grid-area: record; margin: 16px 0 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.record-sheet {
  background: var(--sheet);
  border-radius: var(--radius-sheet);
  padding: 26px 28px 14px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -24px rgba(31, 42, 92, .35);
}
.record-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid var(--indigo); }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); font-weight: 800; }
.record-name { font-weight: 800; font-size: 1.25rem; color: var(--indigo); line-height: 1.2; letter-spacing: -0.01em; }
.record-sub { color: var(--slate); font-size: .9375rem; }
.record-code { margin-left: auto; align-self: start; color: var(--slate); font-size: .875rem; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 8px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7.25rem; top: 22px; bottom: 22px; width: 2px; background: var(--rule); }
.timeline li {
  display: grid; grid-template-columns: 6.5rem 6.5rem minmax(0, 1fr); gap: 0 14px; align-items: baseline;
  padding: 10px 0; position: relative;
}
.timeline li::after {
  content: ""; position: absolute; left: calc(7.25rem - 4px); top: 17px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--sheet); box-shadow: inset 0 0 0 2.5px var(--indigo);
}
.timeline li:last-child::after { background: var(--indigo); }
.timeline time {
  justify-self: start; font-size: .8125rem; font-weight: 600; color: var(--graphite);
  background: var(--haldi-soft); box-shadow: inset 0 -2px 0 var(--haldi); padding: 1px 6px; border-radius: 3px; white-space: nowrap;
  font-feature-settings: "tnum" 1;
}
.timeline .area { grid-column: 2; padding-left: 18px; font-size: .8125rem; font-weight: 600; color: var(--slate); }
.timeline p { grid-column: 3; font-size: .9375rem; line-height: 1.45; }

.record-key { font-size: 1rem; color: var(--slate); }
.record-key ul { list-style: none; margin: 16px 0 0; padding: 0; }
.record-key li { padding: 12px 0; border-top: 1px solid var(--rule); }
.record-key strong { color: var(--indigo); font-weight: 800; }

/* The timeline fills in once, in order, on first load */
@media (prefers-reduced-motion: no-preference) {
  .js .timeline li { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
  .js .record.is-drawn .timeline li { opacity: 1; transform: none; }
  .js .record.is-drawn .timeline li:nth-child(2) { transition-delay: .12s; }
  .js .record.is-drawn .timeline li:nth-child(3) { transition-delay: .24s; }
  .js .record.is-drawn .timeline li:nth-child(4) { transition-delay: .36s; }
  .js .record.is-drawn .timeline li:nth-child(5) { transition-delay: .48s; }
  .js .record.is-drawn .timeline li:nth-child(6) { transition-delay: .6s; }
  .js .record.is-drawn .timeline li:nth-child(7) { transition-delay: .72s; }
  .js .record.is-drawn .timeline li:nth-child(8) { transition-delay: .84s; }
}

/* ---------- Section shared ---------- */
section h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; max-width: 18ch; }
.section-lede { margin-top: 14px; color: var(--slate); font-size: 1.125rem; max-width: 36em; }

/* ---------- Roles: a roll of the people in a company ---------- */
.roles { background: var(--sheet); padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.roll { margin: 44px 0 0; }
.roll-row { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 8px 40px; padding: 22px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.roll-row:last-child { border-bottom: 1px solid var(--rule); }
.roll dt { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--indigo); line-height: 1.2; }
.roll dd { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 28px; color: var(--graphite); font-size: .9375rem; line-height: 1.45; }

/* ---------- Product tour ---------- */
.product { padding: clamp(64px, 9vw, 120px) 0; }
.tour { margin-top: 44px; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 40px; align-items: start; }
.tour-tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 92px; }
.tour-tabs button {
  appearance: none; border: 0; background: transparent; text-align: left;
  font: inherit; font-weight: 600; font-size: 1rem; color: var(--slate);
  padding: 11px 14px; border-radius: var(--radius-ctl); cursor: pointer;
  min-height: 44px;
}
.tour-tabs button:hover { color: var(--indigo); background: var(--indigo-soft); }
.tour-tabs button[aria-selected="true"] { color: #fff; background: var(--indigo); }
.tour-panel > p { font-size: 1.125rem; max-width: 40em; margin-bottom: 22px; }
.tour-panel img {
  width: 100%;
  border-radius: var(--radius-sheet);
  box-shadow: 0 0 0 1px var(--rule), 0 30px 60px -30px rgba(31, 42, 92, .4);
  background: #fff;
}

/* ---------- Rules ---------- */
.rules { background: var(--indigo); color: #E8EAF4; padding: clamp(64px, 9vw, 120px) 0; }
.rules h2 { color: #fff; }
.rules-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.rules-intro p { margin-top: 20px; color: #C9CEE6; max-width: 30em; }
.rules-table { width: 100%; border-collapse: collapse; }
.rules-table th, .rules-table td { text-align: left; vertical-align: top; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.rules-table tr:first-child th, .rules-table tr:first-child td { border-top: 0; padding-top: 4px; }
.rules-table th { width: 38%; padding-right: 24px; color: #fff; font-weight: 800; font-size: 1.125rem; line-height: 1.35; }
.rules-table td { color: #C9CEE6; }

/* ---------- Trust ---------- */
.trust { padding: clamp(64px, 9vw, 120px) 0; }
.trust-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.phones { position: relative; height: 560px; }
.phone {
  position: absolute; width: 250px;
  border-radius: 30px; border: 8px solid var(--graphite);
  box-shadow: 0 30px 60px -28px rgba(31, 42, 92, .55);
  background: #fff;
}
.phone-a { left: 0; top: 0; }
.phone-b { left: 170px; top: 64px; }
.trust-list { margin: 32px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.trust-list dt { font-weight: 800; color: var(--indigo); font-size: 1.125rem; line-height: 1.3; }
.trust-list dd { margin: 8px 0 0; color: var(--slate); font-size: .9375rem; }

/* ---------- Close ---------- */
.close { padding: 0 0 clamp(64px, 9vw, 112px); }
.close-inner {
  background: var(--haldi-soft);
  border-radius: 14px;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 6vw, 72px);
}
.close h2 { max-width: 20ch; }
.close p { margin: 18px 0 28px; max-width: 36em; color: var(--graphite); }
.close .btn-light { background: var(--indigo); color: #fff; }
.close .btn-light:hover { background: var(--indigo-deep); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: .9375rem; color: var(--slate); }
.foot-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
.foot nav { display: flex; gap: 22px; margin-left: auto; }
.foot nav a { color: var(--slate); text-decoration: none; }
.foot nav a:hover { color: var(--indigo); text-decoration: underline; }
.foot-legal { width: 100%; font-size: .8125rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "title" "copy" "record"; gap: 24px; }
  .record { grid-template-columns: 1fr; gap: 28px; }
  .roll dd { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: 1fr; }
  .phones { height: 480px; max-width: 460px; }
  .phone { width: 220px; }
  .phone-b { left: 150px; }
}
@media (max-width: 860px) {
  .top-nav { display: none; }
  .tour { grid-template-columns: 1fr; gap: 24px; }
  .tour-tabs { position: static; flex-direction: row; overflow-x: auto; gap: 6px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tabs button { white-space: nowrap; flex: none; box-shadow: inset 0 0 0 1px var(--rule); }
  .rules-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .record-sheet { padding: 20px 18px 8px; }
  .timeline::before { left: 4px; }
  .timeline li { grid-template-columns: auto 1fr; gap: 2px 10px; padding: 10px 0 10px 22px; }
  .timeline li::after { left: 0; top: 15px; }
  .timeline .area { grid-column: 2; padding-left: 0; }
  .timeline p { grid-column: 1 / -1; }
  .roll-row { grid-template-columns: 1fr; }
  .roll dd { grid-template-columns: 1fr; gap: 4px; }
  .roll dd span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--haldi); margin: 0 10px 2px 0; }
  .trust-list { grid-template-columns: 1fr; }
  .rules-table th, .rules-table td { display: block; width: auto; padding: 0; border: 0; }
  .rules-table tr { display: block; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
  .rules-table tr:first-child { border-top: 0; padding-top: 0; }
  .rules-table td { margin-top: 4px; }
  .phones { height: 380px; }
  .phone { width: 170px; border-width: 6px; border-radius: 24px; }
  .phone-b { left: 130px; top: 44px; }
  .top-actions .link-quiet { display: none; }
}
@media (max-width: 380px) {
  .record-code { display: none; }
}
