:root {
  --bg: oklch(1 0 0);
  --paper: oklch(0.972 0.004 29);
  --ink: oklch(0.16 0.02 29);
  --ink-2: oklch(0.28 0.02 29);
  --muted: oklch(0.43 0.018 29);
  --primary: oklch(0.43 0.17 29);
  --primary-dark: oklch(0.29 0.12 29);
  --primary-ink: oklch(0.99 0 0);
  --accent: oklch(0.48 0.115 190);
  --accent-dark: oklch(0.31 0.08 190);
  --accent-soft: oklch(0.925 0.04 190);
  --amber: oklch(0.68 0.13 72);
  --line: oklch(0.86 0.01 29);
  --shadow-tight: 0 8px 8px oklch(0.16 0.02 29 / 0.08);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --display: "Schibsted Grotesk", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.site-shell {
  min-height: 100vh;
  animation: page-in 680ms var(--ease-out) both;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px clamp(16px, 4vw, 54px);
  background: oklch(1 0 0 / 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-ink);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.36), transparent);
  transform: translateX(-120%) rotate(18deg);
  animation: mark-shine 4.8s var(--ease-in-out) infinite;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a,
.footer-links a,
.mini-link {
  text-decoration: none;
}

.site-nav a:hover,
.footer-links a:hover,
.mini-link:hover {
  color: var(--primary);
}

.nav-toggle { display: none; }

.button,
button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 12px;
  font: 700 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    color 180ms var(--ease-out);
}

.button:active,
button:active { transform: scale(0.97); }
.button.primary,
button.primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}
.button.secondary {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.button.dark {
  border: 1px solid oklch(1 0 0 / 0.25);
  background: oklch(1 0 0 / 0.08);
  color: oklch(0.98 0 0);
}

.button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 7vw, 94px) clamp(16px, 5vw, 72px) 44px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: min(52vw, 720px);
  height: min(52vw, 720px);
  background:
    radial-gradient(circle at 40% 42%, oklch(0.83 0.08 29 / 0.75), transparent 34%),
    radial-gradient(circle at 68% 65%, oklch(0.82 0.08 190 / 0.62), transparent 32%);
  filter: blur(28px);
  opacity: 0.7;
  transform: translate(16%, 22%);
  pointer-events: none;
}

.hero-copy,
.hero-media,
.section-intro,
.split-copy,
.form-panel,
.reveal {
  position: relative;
}

.hero-copy > * {
  animation: rise-in 760ms var(--ease-out) both;
}
.hero-copy > *:nth-child(2) { animation-delay: 80ms; }
.hero-copy > *:nth-child(3) { animation-delay: 150ms; }
.hero-copy > *:nth-child(4) { animation-delay: 220ms; }
.hero-copy > *:nth-child(5) { animation-delay: 300ms; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--primary);
  font-weight: 800;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.02;
  text-wrap: balance;
}

h1 {
  max-width: 12.5ch;
  font-size: clamp(3.4rem, 8.4vw, 6rem);
  letter-spacing: -0.03em;
}

.page-hero h1 {
  max-width: 13.5ch;
}

h2 {
  max-width: 14.5ch;
  font-size: clamp(2.2rem, 4.8vw, 4.6rem);
  letter-spacing: -0.026em;
}

h3 { font-size: clamp(1.28rem, 2vw, 1.72rem); }

.lede,
.section-intro p,
.split-copy p,
.page-hero p,
.content-body p,
.form-note {
  max-width: 68ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  text-wrap: pretty;
}

.hero-actions,
.quick-links,
.trust-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions { margin: 30px 0 26px; }
.trust-row span,
.quick-links a,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero-media {
  animation: media-in 900ms var(--ease-out) 160ms both;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-tight);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.03);
  animation: slow-pan 14s ease-in-out infinite alternate;
}

.doc-float {
  position: absolute;
  left: -18px;
  bottom: 28px;
  width: min(260px, 48%);
  padding: 14px;
  border-radius: 12px;
  background: oklch(1 0 0 / 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-tight);
  backdrop-filter: blur(8px);
  animation: float-card 5.6s ease-in-out infinite;
}

.doc-line {
  display: block;
  height: 8px;
  margin: 9px 0;
  border-radius: 999px;
  background: var(--line);
}
.doc-line.hot { width: 44%; background: var(--primary); }
.doc-line.mid { width: 72%; }
.doc-line.short { width: 55%; }

.notice-ribbon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
  color: oklch(0.97 0.004 29);
}
.notice-ribbon > div {
  padding: 22px clamp(16px, 4vw, 46px);
  border-right: 1px solid oklch(1 0 0 / 0.16);
}
.notice-ribbon > div:last-child { border-right: 0; }
.notice-ribbon strong { color: oklch(0.94 0.05 72); }

section,
.page-hero,
.content-section {
  padding: clamp(58px, 8vw, 112px) clamp(16px, 5vw, 72px);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.54fr);
  gap: clamp(24px, 5vw, 74px);
  align-items: end;
  background: var(--paper);
}

.page-hero .hero-note {
  padding: 22px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(260px, 0.55fr);
  gap: clamp(18px, 5vw, 70px);
  align-items: end;
  margin-bottom: clamp(34px, 5vw, 64px);
}

.timeline {
  display: grid;
  border-top: 1px solid var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 68px minmax(170px, 0.42fr) minmax(0, 1fr);
  gap: clamp(12px, 3vw, 32px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 900;
}
.timeline-item p,
.law-card p,
.state-card p,
.mini-card p,
.content-body li,
.disclaimer p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: start;
  background: var(--paper);
}

.animated-map {
  min-height: 420px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, oklch(1 0 0), oklch(0.93 0.04 190)),
    var(--bg);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.animated-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.route-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-dasharray: 9 12;
  animation: dash 14s linear infinite;
}
.map-dot {
  fill: var(--accent);
  filter: drop-shadow(0 0 10px oklch(0.48 0.115 190 / 0.32));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.law-card,
.state-card,
.mini-card,
.form-panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.law-card,
.state-card,
.mini-card,
.content-card {
  padding: 24px;
}
.state-card {
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}
.state-card:hover {
  transform: translateY(-3px);
  border-color: oklch(0.65 0.07 190);
  background: var(--accent-soft);
}

.dark-section {
  background: var(--ink);
  color: oklch(0.97 0.004 29);
}
.dark-section .kicker,
.dark-section .section-intro p,
.dark-section .lede {
  color: oklch(0.85 0.055 72);
}
.dark-section .law-card,
.dark-section .mini-card {
  background: oklch(1 0 0 / 0.05);
  border-color: oklch(1 0 0 / 0.18);
}
.dark-section .law-card p,
.dark-section .mini-card p {
  color: oklch(0.86 0.006 29);
}

.assessment-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(320px, 0.8fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}
.form-panel {
  padding: clamp(20px, 4vw, 34px);
}
.progress-track {
  height: 9px;
  margin-bottom: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper);
}
.progress-bar {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--primary);
  transition: width 240ms var(--ease-out);
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.form-step { display: none; }
.form-step.active {
  display: grid;
  gap: 18px;
  animation: step-in 260ms var(--ease-out) both;
}
legend {
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.08;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem var(--body);
}
textarea { min-height: 116px; resize: vertical; }
.choice {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  font-weight: 400;
}
.choice input {
  width: 18px;
  min-height: 18px;
  margin-top: 4px;
}
.state-note {
  padding: 14px;
  border-radius: 12px;
  background: oklch(0.95 0.045 78);
  color: oklch(0.28 0.07 78);
  font-weight: 800;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.content-body {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: start;
}
.article-flow {
  display: grid;
  gap: 28px;
}
.article-flow h2 { max-width: 18ch; font-size: clamp(2rem, 3.6vw, 3.3rem); }
.article-flow ul {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}
.side-box {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}
.disclaimer {
  padding: 18px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 10px;
}
details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
}
summary {
  cursor: pointer;
  padding: 18px 20px;
  font-family: var(--display);
  font-weight: 800;
}
details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(260px, 0.5fr);
  gap: 28px;
  padding: 42px clamp(16px, 5vw, 72px);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 8px 0 0; color: var(--muted); }
.footer-links { justify-content: flex-end; align-content: start; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms var(--ease-out),
    transform 520ms var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes page-in {
  from { opacity: 0; filter: blur(7px); }
  to { opacity: 1; filter: blur(0); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes media-in {
  from { opacity: 0; transform: translateY(22px) scale(0.98); clip-path: inset(0 0 18% 0); }
  to { opacity: 1; transform: translateY(0) scale(1); clip-path: inset(0); }
}
@keyframes slow-pan {
  from { transform: scale(1.05) translate3d(-1%, -1%, 0); }
  to { transform: scale(1.1) translate3d(1.5%, 1%, 0); }
}
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes mark-shine {
  0%, 35% { transform: translateX(-120%) rotate(18deg); }
  55%, 100% { transform: translateX(120%) rotate(18deg); }
}
@keyframes dash {
  to { stroke-dashoffset: -240; }
}
@keyframes step-in {
  from { opacity: 0; transform: translateX(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-1px); }
  .photo-frame:hover img { animation-play-state: paused; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: auto auto; }
  .nav-toggle {
    display: inline-flex;
    justify-self: end;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
  }
  .site-nav {
    grid-column: 1 / -1;
    display: none;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
  }
  .site-nav.open { display: flex; }
  .header-cta { display: none; }
  .hero,
  .page-hero,
  .section-intro,
  .split,
  .assessment-shell,
  .content-body,
  .site-footer {
    grid-template-columns: 1fr;
  }
  .notice-ribbon { grid-template-columns: 1fr; }
  .notice-ribbon > div {
    border-right: 0;
    border-bottom: 1px solid oklch(1 0 0 / 0.16);
  }
  .side-box { position: static; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(2.82rem, 15vw, 4rem); }
  .hero { min-height: auto; }
  .timeline-item {
    grid-template-columns: 52px 1fr;
  }
  .timeline-item p { grid-column: 2; }
  .doc-float { display: none; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button,
  .form-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
