:root {
  --bg: #6bb4ee;
  --surface: #7dbdf0;
  --ink: #0e1822;
  --muted: #1b3d5c;
  --accent: #ff5a1f;
  --accent-ink: #0e1822;
  --field-1: #ffffff;  --field-1-ink: #0e1822;
  --field-2: #0e1822;  --field-2-ink: #ffffff;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --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);

  --m: clamp(20px, 2vw, 28px);
  --gap-section: clamp(96px, 12vw, 200px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.45;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h2, h3 { font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; text-wrap: balance; }

/* Buttons: square, one fill */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: var(--step-body);
  text-decoration: none;
  padding: 18px 28px;
  border-radius: 0;
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.btn:hover { background: var(--ink); color: var(--field-2-ink); }
.btn:active { transform: scale(0.97); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--bg);
}
.hero-bar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--m) var(--m) 0;
  font-weight: 600;
  font-size: var(--step-body);
}
.wordmark { text-decoration: none; font-weight: 800; letter-spacing: -0.03em; }
.hero-nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.hero-nav a, .hero-menu a { text-decoration: none; background-image: none; transition: color 160ms; }
.hero-nav a:hover { color: var(--field-1); }
.hero-menu { display: none; }

.hero-copy {
  position: relative; z-index: 2;
  margin: 72px var(--m) 0 calc(50% + var(--m) / 2);
  max-width: 30ch;
}
.hero-line {
  font-size: var(--step-lead);
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hero-word {
  position: absolute;
  left: -8vw;
  bottom: -6svh;
  margin: 0;
  font-size: clamp(300px, min(53vw, 98svh), 900px);
  line-height: 0.8;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--ink);
  transform-origin: 30% 100%;
}

/* ---------- Intro: staircase ---------- */
.intro {
  position: relative;
  min-height: 100svh;
  background: var(--field-2);
  color: var(--field-2-ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20vw;
  column-gap: 4vw;
  align-items: center;
  padding: var(--gap-section) var(--m) var(--gap-section) 4vw;
}
.stair {
  font-size: var(--step-head);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.stair p { display: block; white-space: nowrap; }
.stair p:nth-child(1) { padding-left: 0; }
.stair p:nth-child(2) { padding-left: 6vw; color: var(--bg); }
.stair p:nth-child(3) { padding-left: 12vw; }
.stair p:nth-child(4) { padding-left: 18vw; color: var(--bg); }
.stair p:nth-child(5) { padding-left: 24vw; color: var(--accent); }
.intro-pics { display: grid; gap: 16px; align-self: start; margin-top: 2vw; }
.intro-pics img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.intro-pics figure:first-child img { object-position: 50% 40%; }
.intro-note {
  position: absolute; left: 4vw; bottom: var(--m);
  font-size: var(--step-small);
  max-width: 58ch;
  color: var(--field-2-ink);
}

/* ---------- Work: frame run ---------- */
.work {
  background: var(--field-1);
  color: var(--field-1-ink);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--m);
  padding: var(--gap-section) var(--m);
}
.work-side { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 32px; }
.work-head h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.work-links { margin-top: 12px; font-weight: 600; line-height: 1.6; }
.work-links a { text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: color 160ms; }
.work-links a:hover { color: var(--accent); }
.work-note { font-size: var(--step-small); max-width: 30ch; }
.work-note:first-of-type { margin-top: auto; }
.frames { grid-column: 4 / -1; display: grid; gap: 6px; align-content: start; }
.frame-row { display: flex; gap: 6px; }
.frame-row figure { flex: var(--r) 1 0; }
.frame-row img { width: 100%; height: auto; transition: transform 320ms var(--ease-out); }
.frame-row figure:hover img { transform: scale(1.015); }
.lifted { translate: 0 -28px; }
.frames-note { font-size: var(--step-small); margin-top: 10px; }

/* ---------- Build: the menu sheet ---------- */
.build {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--m);
  padding: var(--gap-section) var(--m);
  align-items: start;
}
.sheet {
  grid-column: 2 / span 5;
  max-width: 600px;
  background: var(--field-1);
  padding: 72px clamp(24px, 3.4vw, 52px) 80px;
  --z: 14px;
  clip-path: polygon(
    0 var(--z), 5% 0, 10% var(--z), 15% 0, 20% var(--z), 25% 0, 30% var(--z), 35% 0, 40% var(--z), 45% 0, 50% var(--z), 55% 0, 60% var(--z), 65% 0, 70% var(--z), 75% 0, 80% var(--z), 85% 0, 90% var(--z), 95% 0, 100% var(--z),
    100% calc(100% - var(--z)), 95% 100%, 90% calc(100% - var(--z)), 85% 100%, 80% calc(100% - var(--z)), 75% 100%, 70% calc(100% - var(--z)), 65% 100%, 60% calc(100% - var(--z)), 55% 100%, 50% calc(100% - var(--z)), 45% 100%, 40% calc(100% - var(--z)), 35% 100%, 30% calc(100% - var(--z)), 25% 100%, 20% calc(100% - var(--z)), 15% 100%, 10% calc(100% - var(--z)), 5% 100%, 0 calc(100% - var(--z))
  );
}
.sheet h2 { font-size: var(--step-head); text-align: center; margin-bottom: 40px; }
.group + .group { margin-top: 44px; }
.group h3 { font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 14px; }
.group li + li { margin-top: 18px; }
.item { display: flex; align-items: baseline; gap: 8px; font-size: var(--step-body); font-weight: 600; }
.name { flex: 0 1 auto; }
.leader { flex: 1 1 24px; overflow: hidden; white-space: nowrap; min-width: 24px; }
.leader::before { content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·"; color: var(--muted); }
.val { flex: 0 0 auto; color: var(--muted); }
.desc { display: block; font-size: var(--step-small); color: var(--muted); max-width: 40ch; margin-top: 3px; }
.build-pic { grid-column: 8 / span 5; position: sticky; top: var(--m); margin-top: 120px; }
.build-pic img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; }

/* ---------- Process: lines that step across ---------- */
.process {
  background: var(--field-1);
  color: var(--field-1-ink);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--m);
  row-gap: 56px;
  padding: var(--gap-section) var(--m);
}
.stage { grid-column-end: -1; }
.stage:nth-child(1) { grid-column-start: 1; }
.stage:nth-child(2) { grid-column-start: 3; }
.stage:nth-child(3) { grid-column-start: 5; }
.stage:nth-child(4) { grid-column-start: 7; }
.stage h2, .stage h3 { font-size: var(--step-head); line-height: 1; }
.stage p { margin-top: 12px; max-width: 34ch; color: var(--muted); }
.stage.last h3 { color: var(--accent); }

/* ---------- Photo band ---------- */
.band { position: relative; overflow: hidden; background: var(--field-1); }
.band img { width: 100%; height: clamp(360px, 72svh, 820px); object-fit: cover; transform-origin: 50% 60%; }
.band figcaption {
  position: absolute; left: var(--m); bottom: var(--m);
  background: var(--field-2); color: var(--field-2-ink);
  padding: 10px 14px;
  font-size: var(--step-small); font-weight: 600;
  max-width: calc(100% - 2 * var(--m));
}

/* ---------- Shelf of ideas ---------- */
.shelf { padding: var(--gap-section) var(--m) clamp(64px, 8vw, 96px); background: var(--bg); }
.shelf-head { display: flex; gap: 32px; align-items: baseline; flex-wrap: wrap; margin-bottom: 32px; }
.shelf-head h2 { font-size: var(--step-lead); letter-spacing: -0.02em; }
.shelf-head p { font-size: var(--step-small); font-weight: 600; }
.spines { display: flex; gap: 6px; justify-content: space-between; }
.spines li { flex: 1 1 32px; max-width: 46px; }
.spine {
  display: flex; flex-direction: row; align-items: flex-start; gap: 12px;
  writing-mode: vertical-rl;
  width: 100%; height: 330px;
  padding: 12px 0;
  background: var(--surface);
  text-decoration: none;
  font-size: var(--step-body); font-weight: 600; line-height: 1;
  transition: transform 200ms var(--ease-out), background-color 160ms, color 160ms;
}
.spine .sd { font-size: var(--step-small); padding: 8px 4px; }
.d-web .sd { background: var(--field-1); color: var(--ink); }
.d-app .sd { background: var(--accent); color: var(--ink); }
.d-both .sd { background: var(--field-2); color: var(--field-2-ink); }
.d-int .sd { background: var(--muted); color: var(--field-2-ink); }
.spine:hover { transform: translateY(-10px); }
.spine:active { transform: translateY(-4px) scale(0.98); }
.spine[aria-pressed="true"] { background: var(--ink); color: var(--field-2-ink); transform: translateY(-18px); }
.picked { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 48px; }
.picked p { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; max-width: 60ch; }
.picked-label { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { background: var(--field-1); color: var(--field-1-ink); padding: var(--gap-section) var(--m); }
.row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--m); }
.row + .row { margin-top: clamp(56px, 6vw, 84px); }
.q { grid-column: 1 / span 6; font-size: clamp(1.625rem, 1rem + 2.2vw, 2.5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.q.soft { color: var(--muted); font-weight: 800; }
.a { grid-column: 8 / span 5; max-width: 40ch; line-height: 1.55; padding-top: 0.35em; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  min-height: 100svh;
  background: var(--field-2);
  color: var(--field-2-ink);
  padding: var(--m);
  display: flex; flex-direction: column;
}
.contact-ask { font-size: var(--step-lead); font-weight: 600; max-width: 24ch; letter-spacing: -0.02em; }
.email {
  margin-top: auto;
  margin-bottom: 12svh;
  font-size: 9.4vw;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}
.email:hover, .email:focus-visible { color: var(--accent); }
.contact-foot { display: flex; justify-content: space-between; gap: 24px; font-size: var(--step-small); }
.contact-foot .right { text-align: right; }

/* ---------- Footer ---------- */
.foot {
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--m) var(--m) var(--m);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.foot-name {
  font-size: 14.2vw;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.86;
  white-space: nowrap;
  margin-left: -0.04em;
  transform-origin: 0 100%;
}
.foot-row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--m); margin-top: 72px; }
.places { grid-column: 1 / span 5; font-size: clamp(1.625rem, 1rem + 2.2vw, 2.5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.places a, .foot-links a, .legal a, .credits a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.places a { text-decoration: none; }
.places a:hover { text-decoration: underline; }
.foot-links { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--m); font-size: var(--step-small); font-weight: 600; padding-top: 0.5em; }
.foot-links li + li { margin-top: 8px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.credits { margin-top: auto; padding-top: 96px; font-size: var(--step-small); max-width: 90ch; }
.legal { display: flex; justify-content: space-between; margin-top: 16px; font-size: var(--step-small); font-weight: 600; }

/* ---------- Motion ---------- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

@supports (animation-timeline: scroll()) {
  .hero-word { animation: word-settle linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  .band img { animation: band-drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  .foot-name { animation: name-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
}
@keyframes word-settle { from { scale: 1; } to { scale: 0.93; } }
@keyframes band-drift { from { scale: 1.14; translate: 0 -3%; } to { scale: 1; translate: 0 3%; } }
@keyframes name-grow { from { scale: 0.94; } to { scale: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise] { transform: none; transition: opacity 300ms linear; }
  .hero-word, .band img, .foot-name { animation: none !important; }
  .spine, .btn { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .sheet { grid-column: 1 / span 7; }
  .work-side { grid-column: 1 / span 4; }
  .frames { grid-column: 5 / -1; }
  .build-pic { grid-column: 8 / span 5; }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .stair p { white-space: normal; }
  .intro-pics { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .intro-note { position: static; margin-top: 32px; }
  .spines { flex-wrap: wrap; justify-content: flex-start; row-gap: 24px; }
  .spines li { flex: 0 0 40px; }
}

/* ---------- Phone and portrait tablet hero ---------- */
@media (max-width: 720px), (max-width: 1024px) and (orientation: portrait) {
  .hero { min-height: 640px; }
  .hero-nav { display: none; }
  .hero-bar { position: static; display: block; width: 50%; padding: 20px 0 0 20px; }
  .wordmark { display: block; }
  .hero-menu { display: block; position: relative; z-index: 3; margin-top: 14px; width: max-content; }
  .hero-menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 6px 10px; background: var(--ink); color: var(--field-2-ink); }
  .hero-menu summary::-webkit-details-marker { display: none; }
  .hero-menu nav { position: absolute; left: 0; top: 44px; background: var(--ink); color: var(--field-2-ink); display: grid; gap: 14px; padding: 18px 20px; width: max-content; }
  .hero-copy { margin: 48px 0 0 20px; max-width: 50%; }
  .hero-line { font-size: var(--step-body); line-height: 1.35; margin-bottom: 20px; }
  .btn { padding: 15px 18px; }
  .hero-word {
    writing-mode: vertical-rl;
    font-size: 62vw;
    left: auto; right: -11vw;
    top: 50%; bottom: auto;
    translate: 0 -50%;
    line-height: 0.8;
    transform-origin: 100% 50%;
  }
}
@media (min-width: 721px) and (max-width: 1024px) and (orientation: portrait) {
  .hero-word { font-size: 56vw; right: -9vw; }
  .hero-line { font-size: var(--step-lead); }
  .hero-copy { margin-top: 96px; max-width: 46%; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  .intro { padding: 96px 20px 64px; }
  .stair { font-size: var(--step-head); }
  .stair p { white-space: normal; }
  .stair p:nth-child(2) { padding-left: 5vw; }
  .stair p:nth-child(3) { padding-left: 10vw; }
  .stair p:nth-child(4) { padding-left: 15vw; }
  .stair p:nth-child(5) { padding-left: 0; }
  .intro-pics { gap: 12px; }

  .work { display: block; padding: 96px 20px; }
  .work-side { gap: 16px; margin-bottom: 32px; }
  .work-note:first-of-type { margin-top: 8px; }
  .work-note { max-width: none; }
  .frame-row:first-child { flex-direction: column; }
  .lifted { translate: none; }
  .build { display: block; padding: 96px 12px; }
  .sheet { padding: 56px 20px 64px; max-width: none; }
  .build-pic { position: static; margin: 32px 8px 0; }
  .build-pic img { aspect-ratio: 4 / 3; }

  .process { display: block; padding: 96px 20px; }
  .stage + .stage { margin-top: 40px; }
  .stage h2, .stage h3 { font-size: var(--step-head); }
  .stage:nth-child(2) { padding-left: 6vw; }
  .stage:nth-child(3) { padding-left: 12vw; }
  .stage:nth-child(4) { padding-left: 18vw; }

  .shelf { padding: 96px 20px 64px; }
  .spines { display: block; line-height: 1.9; }
  .spines li { display: inline; max-width: none; }
  .spine { display: inline; writing-mode: horizontal-tb; height: auto; padding: 0; background: none; margin-right: 10px; font-size: var(--step-body); }
  .spine .sd { font-size: var(--step-small); padding: 2px 6px; margin-left: 6px; }
  .spine .sn { padding: 2px 0; }
  .spine:hover, .spine:active { transform: none; }
  .spine[aria-pressed="true"] { transform: none; background: none; color: var(--ink); }
  .spine[aria-pressed="true"] .sn { background: var(--ink); color: var(--field-2-ink); padding: 2px 6px; }

  .faq { padding: 96px 20px; }
  .row { display: block; }
  .row + .row { margin-top: 56px; }
  .q { font-size: var(--step-lead); }
  .a { margin-top: 12px; padding: 0; }

  .contact { min-height: 86svh; padding: 20px; }
  .email { font-size: 11.5vw; white-space: normal; margin-bottom: 30svh; }
  .contact-foot { flex-direction: column; gap: 12px; }
  .contact-foot .right { text-align: left; }

  .foot { min-height: auto; padding: 20px; }
  .foot-name { font-size: 13.4vw; }
  .foot-row { display: block; margin-top: 48px; }
  .places { font-size: var(--step-lead); }
  .foot-links { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .credits { padding-top: 64px; }
}
