/* seitenneu landing: dark, green. Direction "The sentence is the layout" (taste seed 1320602614), Schibsted Grotesk.
   Tokens first; everything below references them. One radius, one margin pair, one button shape. */
:root {
  color-scheme: dark;
  --bg: #07120d;          /* ground */
  --surface: #0d1f17;     /* panels, inputs on fields */
  --deep: #0b1a13;        /* features chapter */
  --field: #0f3a25;       /* lower hero field, process chapter */
  --seg-1: #1f7a4d;
  --seg-2: #2fa36a;
  --ink: #e8f4ec;
  --muted: #a9c6b5;
  --accent: #5ee38c;      /* the action, the sentence above the seam, the inverse chapter */
  --accent-ink: #04130b;  /* text on the accent */
  --radius: 14px;
  --margin: clamp(20px, 5vw, 72px);
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-sub: clamp(1.75rem, 1.2rem + 1.6vw, 2.625rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.25rem, 9.5vw, 9rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --seam: 40svh;          /* where the two hero fields meet */
  --cut: calc(var(--step-display) * 0.37);   /* headline top to the seam: the seam cuts the letters in their upper third */
  --below: calc(var(--step-display) * 0.51); /* rest of the line under the seam */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-color: #2a6a49 var(--bg); background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.5 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--accent-ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.chapter--mint :focus-visible, .footer :focus-visible { outline-color: var(--accent-ink); }
input { caret-color: var(--accent); }

.skip { position: absolute; left: var(--margin); top: -80px; z-index: 50; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* ---------- header: takes the ink of the chapter beneath it ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--margin); color: var(--ink); background: var(--bg); transition: color .3s var(--ease), background-color .3s var(--ease);
}
.topbar[data-ink="dark"] { color: var(--accent-ink); }
.wordmark { font-weight: 800; font-size: 1.75rem; letter-spacing: -0.05em; line-height: 1; text-decoration: none; }
.topnav { display: flex; gap: clamp(14px, 2.4vw, 34px); font-weight: 600; font-size: var(--step-small); }
.topnav a { padding: 8px 2px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; text-decoration-color: transparent; transition: text-decoration-color .25s; }
.topnav a:hover, .topnav a:focus-visible { text-decoration-color: currentColor; }

/* ---------- 1. hero ---------- */
.hero { position: relative; min-height: max(80svh, 600px); overflow: hidden; background: var(--bg); }
.hero-field { position: absolute; inset: 0; }
.hero-field--top { background: var(--bg); }
.hero-field--bottom { background: var(--field); clip-path: inset(var(--seam) 0 0 0); }
.hero-type { position: absolute; inset: 0; }
.hero-type { color: var(--ink); }
.sentence {
  position: absolute; left: var(--margin); right: var(--margin); top: calc(var(--seam) - var(--cut));
  font: 800 var(--step-display)/0.88 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: -0.05em;
}
.sentence { white-space: nowrap; }
.sentence-line { display: inline; }
.sentence-line:first-child::after { content: " "; }
.frame { position: relative; display: inline-block; width: 1.9em; height: 0.72em; margin-right: 0.08em; border-radius: 0.1em; overflow: hidden; vertical-align: baseline; background: var(--surface); }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-after { animation: swap 9s var(--ease) infinite; }
.frame-before { animation: swap-back 9s var(--ease) infinite; }
@keyframes swap { 0%, 38% { opacity: 0; transform: scale(1.04); } 46%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }
@keyframes swap-back { 0%, 38% { opacity: 1; } 46%, 92% { opacity: 0; } 100% { opacity: 1; } }

.hero-act {
  position: relative; margin: calc(var(--seam) + var(--below) + clamp(10px, 1.6vw, 28px)) var(--margin) 0; padding-bottom: clamp(56px, 6vw, 88px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; color: var(--ink);
}
.hero-lead { font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; max-width: 26ch; text-wrap: balance; }
.check { display: grid; gap: 10px; }
.check-label { font-weight: 600; font-size: var(--step-small); color: var(--muted); }
.check-row { display: flex; gap: 10px; }
.check input, .mailform input {
  flex: 1; min-width: 0; height: 76px; padding: 0 24px; border: 0; border-radius: var(--radius);
  background: var(--bg); color: var(--ink); font: 600 var(--step-lead)/1 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: -0.02em;
}
.check input::placeholder, .mailform input::placeholder { color: #6f8f7d; }
.check input[aria-invalid="true"], .mailform input[aria-invalid="true"] { background: #2a1210; color: #ffd9d4; }
.check-hint { font-size: var(--step-small); color: var(--muted); min-height: 1.5em; }
.check-hint.is-error { color: #ffb4a8; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 76px; padding: 0 28px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font: 800 var(--step-body)/1 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: -0.02em;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s;
}
.btn:hover { background: #7aeda3; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.btn--dark { background: var(--accent-ink); color: var(--accent); }
.btn--dark:hover { background: #0b2a1a; }
.btn--ghost { background: var(--bg); color: var(--ink); }
.btn--ghost:hover { background: #12281d; }

/* result states live in the hero's action area */
.hero.is-working .check, .hero.is-working .hero-lead { display: none; }
.result { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; }
.result[hidden] { display: none; }
.result-main, .result-side { display: grid; gap: 14px; align-content: start; }
.result h2 { font-size: var(--step-sub); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; text-wrap: balance; }
.result p { font-size: var(--step-body); max-width: 52ch; color: var(--muted); }
.result p strong { color: var(--ink); font-weight: 600; }
.stages { display: flex; gap: 6px; height: 56px; }
.stage-seg { flex: var(--grow, 1); border-radius: 8px; background: var(--bg); display: flex; align-items: center; padding: 0 14px; font-weight: 600; font-size: var(--step-small); color: var(--muted); transition: background-color .5s var(--ease), color .5s; }
.stage-seg.is-active { background: var(--seg-2); color: var(--accent-ink); }
.stage-seg.is-done { background: var(--accent); color: var(--accent-ink); }
.mailform { display: grid; gap: 8px; }
.mailform input { height: 60px; font-size: var(--step-body); }
.mailform .btn { height: 60px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.textbtn { background: none; border: 0; padding: 10px 4px; color: var(--ink); font: 600 var(--step-small)/1 "Schibsted Grotesk", system-ui, sans-serif; text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }

/* ---------- chapters ---------- */
.hero + .chapter { padding-top: clamp(72px, 8vw, 120px); }
.chapter { position: relative; padding: clamp(96px, 12vw, 180px) var(--margin); }
.chapter--dark { background: var(--bg); }
.chapter--field { background: var(--field); }
.chapter--deep { background: var(--deep); }
.chapter--mint { background: var(--accent); color: var(--accent-ink); }
.chapter h2 { font-size: var(--step-head); font-weight: 800; letter-spacing: -0.045em; line-height: 0.96; text-wrap: balance; max-width: 16ch; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(28px, 5vw, 88px); align-items: start; }
.split-text { display: grid; gap: 22px; align-content: start; }
.split-text > p { max-width: 38ch; color: var(--muted); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.tab {
  height: 52px; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font: 600 var(--step-small)/1 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: -0.01em; cursor: pointer; transition: background-color .2s, transform .2s var(--ease), color .2s;
}
.tab:hover { background: #15301f; transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.stage { border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 16 / 10; }
.stage img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s var(--ease), transform .6s var(--ease); }
.stage img.is-swapping { opacity: 0; transform: scale(1.015); }

/* process bar */
.chapter--field h2 { margin-bottom: clamp(48px, 6vw, 80px); }
.bar { display: flex; gap: 6px; min-height: 24vh; }
.seg { flex: var(--grow) 1 0; min-width: 0; display: grid; grid-template-rows: minmax(22vh, auto) auto; gap: 18px; align-content: start; }
.seg-time { display: block; padding: 20px; border-radius: var(--radius); font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.03em; line-height: 1.05; transform-origin: left center; }
.seg--1 .seg-time { background: var(--seg-1); color: var(--ink); }
.seg--2 .seg-time { background: var(--seg-2); color: var(--accent-ink); }
.seg--3 .seg-time { background: var(--accent); color: var(--accent-ink); }
.seg-text { font-size: var(--step-body); max-width: 24ch; color: var(--ink); }
.seg-text b { font-weight: 800; }
.js .bar.is-rise .seg-time { animation: grow .9s var(--ease) both; }
.js .bar.is-rise .seg:nth-child(2) .seg-time { animation-delay: .12s; }
.js .bar.is-rise .seg:nth-child(3) .seg-time { animation-delay: .24s; }
@keyframes grow { from { transform: scaleX(.12); opacity: .4; } to { transform: scaleX(1); opacity: 1; } }

/* features: one vertical axis at about 35% */
.axis { display: grid; gap: clamp(72px, 8vw, 112px); }
.axis-head, .row { margin-left: 35%; }
.axis-head { display: grid; gap: 20px; }
.axis-head p { max-width: 40ch; color: var(--muted); font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.02em; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 4vw, 64px); align-items: start; }
.row-text { display: grid; gap: 14px; }
.row h3 { font-size: var(--step-sub); font-weight: 800; letter-spacing: -0.04em; line-height: 1; max-width: 18ch; text-wrap: balance; }
.row p { max-width: 34ch; color: var(--muted); }
.row-pic { border-radius: var(--radius); object-fit: cover; background: var(--surface); }
.row-pic--a { width: 320px; aspect-ratio: 3 / 2; }
.row-pic--b { width: 240px; aspect-ratio: 4 / 5; object-position: 35% 20%; }
.row-pic--c { width: 180px; aspect-ratio: 1 / 2; object-position: top; }
.row-pic--d { width: 280px; aspect-ratio: 3 / 2; }
.row-pic--e { width: 200px; aspect-ratio: 1; object-position: 50% 60%; }

/* questions: question left, answer beside, no rules */
.qa { display: grid; gap: clamp(48px, 6vw, 80px); }
.qa-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: clamp(28px, 6vw, 96px); align-items: baseline; }
.qa-row h2, .qa-row h3 { max-width: 20ch; }
.qa-row h3 { font-size: var(--step-sub); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; }
.qa-row p { color: var(--muted); max-width: 44ch; line-height: 1.55; }
.qa-row--head h2 { color: var(--muted); }

/* close: the inverse field */
.chapter--mint { min-height: 72svh; display: grid; align-content: space-between; padding-bottom: 56px; }
.close-title { font-size: var(--step-display) !important; line-height: 0.9 !important; letter-spacing: -0.05em !important; max-width: none !important; }
.close-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.close-row p { font-size: var(--step-lead); font-weight: 600; max-width: 22ch; line-height: 1.3; letter-spacing: -0.02em; }

.footer { position: relative; overflow: hidden; padding: 160px var(--margin) 0; min-height: 70svh; background: var(--accent); color: var(--accent-ink); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.footer-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(28px, 6vw, 96px); align-items: start; }
.footer-invite { font-size: var(--step-sub); font-weight: 800; letter-spacing: -0.04em; line-height: 1; max-width: 18ch; text-wrap: balance; }
.footer-links { display: grid; gap: 8px; font-weight: 600; font-size: var(--step-body); justify-items: start; }
.footer-links a { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: .08em; padding: 4px 0; }
.footer-legal { margin-top: clamp(64px, 10vw, 140px); display: flex; justify-content: space-between; gap: 16px; font-size: var(--step-small); font-weight: 600; }
.footer-name { font-weight: 800; font-size: 25vw; letter-spacing: -0.07em; line-height: .8; white-space: nowrap; margin-left: -0.04em; transform: translateY(30%); user-select: none; }

/* ---------- motion ---------- */
.js [data-rise] { opacity: 0; transform: translateY(26px); }
.js [data-rise].is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease) calc(var(--i, 0) * 90ms), transform .8s var(--ease) calc(var(--i, 0) * 90ms); }
.js .hero .hero-lead, .js .hero .check { animation: lift .9s var(--ease) both; }
.js .hero .check { animation-delay: .12s; }
@keyframes lift { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.js .sentence-line:first-child { animation: rise-line .9s var(--ease) both; }
.js .sentence-line:last-child { animation: rise-line .9s var(--ease) .1s both; }
@keyframes rise-line { from { opacity: 0; transform: translateY(.18em); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-rise] { opacity: 1; transform: none; }
  .frame-before { opacity: 0; }
  .frame-after { opacity: 1; transform: none; }
}

/* ---------- tablet and phone: their own compositions ---------- */
@media (max-width: 980px) {
  .hero-act { grid-template-columns: 1fr; row-gap: 22px; }
  .result { grid-template-columns: 1fr; row-gap: 20px; }
  .hero-lead { max-width: 36ch; }
  .split { grid-template-columns: 1fr; row-gap: 40px; }
  .axis-head, .row { margin-left: 0; }
  .qa-row { grid-template-columns: 1fr; row-gap: 14px; }
  .footer-top { grid-template-columns: 1fr; row-gap: 32px; }
}
@media (max-width: 640px) {
  :root { --step-display: 15.4vw; --seam: 40svh; --cut: calc(var(--step-display) * 1.3); --below: calc(var(--step-display) * 0.5); }
  .sentence-line { display: block; }
  .sentence-line:first-child::after { content: none; }
  .topnav a:not(:last-child) { display: none; }
  .hero { min-height: max(100svh, 720px); }
  
  .check-row { flex-direction: column; }
  .check input, .mailform input, .btn { height: 60px; width: 100%; flex: none; }
  .tabs { grid-template-columns: repeat(2, 1fr); }
  .bar { flex-direction: column; min-height: 0; }
  .seg { display: grid; grid-template-rows: auto auto; flex: none; }
  .seg-time { min-height: calc(40px + var(--grow) * 9px); }
  .row { grid-template-columns: 1fr; row-gap: 22px; }
  .row-pic { width: 100%; max-width: 100%; }
  .row-pic--b { width: 72%; margin-left: auto; }
  .row-pic--c { width: 52%; aspect-ratio: 1 / 1.6; }
  .row-pic--d { width: 100%; }
  .row-pic--e { width: 60%; }
  .chapter--mint { min-height: 70svh; }
  .close-row { flex-direction: column; align-items: stretch; }
  .footer-name { font-size: 33vw; }
  .footer-legal { flex-direction: column; }
}
