@font-face {
  font-family: "RF Dewi";
  src: url("./assets/RFDewi-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "RF Dewi";
  src: url("./assets/RFDewi-Semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "RF Dewi";
  src: url("./assets/RFDewi-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "RF Dewi";
  src: url("./assets/RFDewi-Ultrabold.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #efeeea;
  --frame: clamp(12px, 3.7vmin, 58px);
  --radius: clamp(22px, 2.35vw, 44px);
  --chrome-x: clamp(22px, 3.45vw, 74px);
  --body-x: clamp(28px, 6vw, 132px);
  --font: "RF Dewi", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}
body {
  margin: 0;
  font: 400 1rem/1.42 var(--font);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.screen {
  --ink: #fff;
  --soft: #e5ecfa;
  --line: rgb(255 255 255 / 36%);
  --tint: rgb(255 255 255 / 13%);
  --accent: #ffdc79;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--frame);
  scroll-snap-align: start;
}
.hero { --surface: #193f92; --art-h: min(54svh, 660px); }
.mission {
  --surface: #f0c468;
  --ink: #252a32;
  --soft: #463a2c;
  --accent: #644117;
  --line: rgb(47 40 30 / 36%);
  --tint: rgb(62 48 27 / 9%);
  --art-h: min(34svh, 415px);
}
.plan {
  --surface: #10585c;
  --soft: #def1ed;
  --accent: #b9f0db;
  --art-h: min(30svh, 350px);
}
.factory {
  --surface: #c9ddec;
  --ink: #132d47;
  --soft: #334c62;
  --accent: #2b5477;
  --line: rgb(23 54 81 / 35%);
  --tint: rgb(23 54 81 / 9%);
  --art-h: min(37svh, 455px);
}
.experience {
  --surface: #222f4c;
  --soft: #dce5f4;
  --art-h: min(33svh, 395px);
}
.contact {
  --surface: #a34537;
  --soft: #fce9df;
  --accent: #ffe2a8;
  --art-h: min(49svh, 570px);
}
.panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: clip;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: var(--chrome-x);
}
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
  background: var(--surface);
}
.site-header .bar { padding-block: clamp(14px, 2.25svh, 32px); }
.brand {
  font: 800 clamp(1rem, 1.55vw, 1.65rem)/1 var(--font);
  letter-spacing: -.055em;
  white-space: nowrap;
}
.header-actions, .language-switch { display: flex; align-items: center; }
.header-actions { gap: 10px; }
.language-switch {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.language-switch a, .header-contact, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  font-weight: 600;
}
.language-switch a {
  min-height: 30px;
  min-width: 42px;
  padding: 0 8px;
  font-size: .73rem;
  letter-spacing: .025em;
}
.language-switch a[aria-current="page"], .header-contact {
  color: var(--surface);
  background: var(--ink);
}
.header-contact { min-height: 38px; padding: 0 18px; font-size: .85rem; }
.header-contact:focus-visible, .language-switch [aria-current]:focus-visible { outline-color: var(--ink); }

.stage {
  width: min(calc(100% - 2 * var(--body-x)), 84rem);
  min-width: 0;
  align-self: center;
  margin-inline: auto;
  padding-block: clamp(18px, 3.3svh, 46px);
}
.intro { min-width: 0; }
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(10px, 1.6svh, 20px);
  color: var(--accent);
  font-weight: 700;
  font-size: clamp(.68rem, .8vw, .84rem);
  letter-spacing: .105em;
  line-height: 1.4;
  text-transform: uppercase;
}
.kicker::before { content: ""; flex: 0 0 24px; height: 2px; background: currentColor; }
h1, h2 {
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.052em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.8rem, 4.9vw, 6.35rem); }
h2 { font-size: clamp(2.5rem, 4.5vw, 5.55rem); }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.65rem); font-weight: 700; line-height: 1.08; letter-spacing: -.027em; }
.lead {
  max-width: 44ch;
  margin-top: clamp(14px, 2.3svh, 28px);
  color: var(--soft);
  font-size: clamp(1rem, 1.37vw, 1.38rem);
  line-height: 1.42;
}
.scene-block { min-width: 0; }
.scene {
  position: relative;
  isolation: isolate;
  width: min(100%, calc(var(--art-h) * 1.126));
  margin-inline: auto;
}
.scene img { display: block; width: 100%; height: auto; }
.hero .scene::before, .experience .scene::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 79%;
  aspect-ratio: 1;
  left: 9%;
  bottom: 2%;
  border-radius: 50%;
  background: var(--tint);
}
.voice {
  max-width: 42ch;
  margin: clamp(8px, 1.5svh, 18px) auto 0;
  text-align: center;
}
.voice blockquote {
  color: var(--soft);
  font-size: clamp(.9rem, 1.1vw, 1.12rem);
  line-height: 1.4;
  text-wrap: balance;
}
.voice figcaption {
  margin-top: 5px;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
}
.supporting { max-width: 67ch; color: var(--soft); font-size: .91rem; line-height: 1.45; }

.cover-layout, .contact-layout, .plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(26px, 4vw, 84px);
}
.cover-layout { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(20px, 3.4svh, 40px);
}
.button {
  gap: 10px;
  min-height: 45px;
  padding: 11px 19px;
  border: 1px solid transparent;
  font-size: .9rem;
}
.button-primary { background: var(--accent); color: #17284a; }
.button-primary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.button-primary:focus-visible { outline-color: var(--ink); }
.button-outline { border-color: var(--line); }

.mission-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas: "intro intro" "visual list";
  align-items: center;
  gap: clamp(18px, 3.7svh, 50px) clamp(32px, 5vw, 110px);
}
.mission-layout > .intro, .factory-layout > .intro {
  max-width: 67rem;
  margin-inline: auto;
  text-align: center;
}
.mission-layout > .intro { grid-area: intro; }
.mission-layout .kicker, .factory-layout .kicker { justify-content: center; }
.mission-layout .kicker::before, .factory-layout .kicker::before { display: none; }
.mission-layout .lead, .factory-layout .lead {
  max-width: 62ch;
  margin: clamp(10px, 1.7svh, 22px) auto 0;
  text-wrap: balance;
}
.mission-layout .scene-block { grid-area: visual; }
.industries {
  grid-area: list;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(12px, 2.1vw, 37px);
  list-style: none;
  padding: 0;
}
.industries li {
  padding: clamp(9px, 1.55svh, 19px) 0;
  border-top: 1px solid var(--line);
  font: 600 clamp(.99rem, 1.35vw, 1.4rem)/1.24 var(--font);
  letter-spacing: -.015em;
}

.plan-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.plan-overview .scene { margin: clamp(12px, 2.3svh, 28px) auto 0 0; }
.steps { padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 16px;
  padding-block: clamp(12px, 1.7svh, 21px);
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  align-self: start;
  padding-top: 2px;
  color: var(--accent);
  font: 600 .96rem/1.25 var(--font);
  font-variant-numeric: tabular-nums;
}
.steps p, .production p, .contact-details { color: var(--soft); font-size: clamp(.94rem, 1.13vw, 1.12rem); line-height: 1.42; }
.steps p { grid-column: 2; margin-top: 5px; }
.process .supporting { border-top: 1px solid var(--line); padding-top: 13px; }

.factory-layout { display: grid; gap: clamp(24px, 4svh, 56px); }
.production {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-areas: "maker visual installer";
  gap: clamp(18px, 3vw, 55px);
  align-items: center;
}
.production .maker { grid-area: maker; }
.production .installer { grid-area: installer; }
.production .scene-block { grid-area: visual; }
.production article { padding-top: 16px; border-top: 1px solid var(--line); }
.production p { margin-top: 9px; max-width: 34ch; }

.experience-layout { display: grid; gap: clamp(16px, 2.9svh, 40px); }
.network {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(0, .83fr);
  align-items: center;
  gap: clamp(25px, 5vw, 80px);
}
.stat-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; padding-block: clamp(15px, 2.4svh, 30px); border-block: 1px solid var(--line); }
.stat-grid > div { display: flex; flex-direction: column-reverse; justify-content: end; gap: 9px; min-width: 0; }
.stat-grid > div + div { padding-left: clamp(16px, 3.2vw, 58px); border-left: 1px solid var(--line); }
.stat-grid dd {
  color: var(--accent);
  font: 700 clamp(3.25rem, 6vw, 7.2rem)/.94 var(--font);
  letter-spacing: -.065em;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
.stat-grid dt { max-width: 26ch; color: var(--soft); font-size: clamp(.9rem, 1.14vw, 1.15rem); }

.contact-layout {
  grid-template-areas: "visual copy";
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
}
.contact-copy { grid-area: copy; }
.contact-layout .scene-block { grid-area: visual; }
.contact-brief { margin-top: clamp(16px, 2.9svh, 30px); max-width: 50ch; }
.contact-brief strong { display: block; margin-bottom: 3px; color: var(--ink); }
.contact-details dl {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: clamp(16px, 2.6svh, 32px);
}
.contact-details dl > div { padding-top: 11px; border-top: 1px solid var(--line); }
.contact-details dt { color: var(--ink); font-weight: 700; }
.contact-details dd { margin-top: 2px; font-size: .9rem; }

.chapter-controls { position: relative; z-index: 2; background: var(--surface); }
.chapter-controls .bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding-block: 10px clamp(14px, 2svh, 30px);
}
.chapter-position, .chapter-buttons, .screen-nav { display: flex; align-items: center; }
.chapter-position { gap: 12px; min-width: 0; }
.chapter-position [data-chapter-count] {
  color: var(--accent);
  font: 700 .74rem/1.2 var(--font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chapter-position [data-current] { color: var(--soft); font-size: .81rem; }
.screen-nav a { display: grid; place-items: center; width: 28px; height: 36px; border-radius: 6px; }
.screen-nav a::before { content: ""; width: 22px; height: 3px; background: var(--line); border-radius: 3px; }
.screen-nav a[aria-current="location"]::before { background: var(--ink); }
.chapter-buttons { justify-self: end; gap: 7px; }
.chapter-buttons a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.chapter-buttons a[aria-disabled="true"] { opacity: .46; }
.direction { position: relative; width: 14px; height: 16px; }
.direction::before, .direction::after { content: ""; position: absolute; }
.direction::before { left: 6px; top: 1px; width: 1.5px; height: 13px; background: currentColor; }
.direction::after { left: 3px; bottom: 2px; width: 7.5px; height: 7.5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
[data-previous] .direction { transform: rotate(180deg); }

@media (hover: hover) {
  .header-contact:hover, .button-primary:hover { opacity: .88; }
  .button-outline:hover, .language-switch a:not([aria-current]):hover,
  .chapter-buttons a[href]:hover { background: var(--tint); }
  .screen-nav a:hover::before { background: var(--ink); }
}
@media (min-width: 900px) and (min-height: 700px) {
  html { scroll-snap-type: y mandatory; }
  .screen { scroll-snap-stop: always; }
}
@media (max-width: 1000px) {
  :root { --body-x: clamp(24px, 4.9vw, 48px); }
  .steps li { grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; }
}
@media (min-width: 801px) and (max-height: 820px) {
  .site-header .bar { padding-block: 13px; }
  .stage { padding-block: 14px; }
  .factory { --art-h: min(32svh, 270px); }
  .factory-layout { gap: 19px; }
  .mission-layout { row-gap: 18px; }
  .steps li { padding-block: 10px; }
}
@media (max-width: 800px) {
  :root {
    --frame: clamp(10px, 3.1vw, 21px);
    --radius: clamp(19px, 4.8vw, 28px);
    --chrome-x: clamp(15px, 4.45vw, 32px);
    --body-x: clamp(20px, 5.8vw, 42px);
  }
  /* Keep the paper edge visible as longer chapters scroll between the two controls. */
  body::after {
    content: "";
    position: fixed;
    z-index: 4;
    inset: var(--frame);
    border-radius: var(--radius);
    box-shadow: 0 0 0 100vmax var(--paper);
    pointer-events: none;
  }
  .site-header { inset-block-start: var(--frame); }
  .site-header .bar { padding-block: 12px; }
  .header-actions { gap: 6px; }
  .language-switch { padding: 2px; }
  .language-switch a { min-width: 32px; min-height: 29px; padding-inline: 5px; font-size: .66rem; }
  .header-contact { min-height: 35px; padding-inline: 12px; font-size: .76rem; }
  .stage { padding-block: clamp(16px, 2.7svh, 28px); }
  .kicker { font-size: .65rem; margin-bottom: 9px; }
  h1 { font-size: clamp(2.15rem, 9.9vw, 4rem); }
  h2 { font-size: clamp(2.15rem, 8.75vw, 3.6rem); }
  h3 { font-size: 1.17rem; }
  .lead { margin-top: 12px; font-size: 1rem; }
  .cover-layout, .mission-layout, .plan-layout, .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 19px;
  }
  .hero { --art-h: clamp(170px, 28svh, 305px); }
  .mission { --art-h: clamp(155px, 23svh, 245px); }
  .plan { --art-h: clamp(135px, 23svh, 230px); }
  .factory { --art-h: clamp(150px, 26svh, 255px); }
  .experience { --art-h: clamp(145px, 25svh, 255px); }
  .contact { --art-h: clamp(150px, 25svh, 270px); }
  .voice { max-width: 38ch; margin-top: 8px; }
  .voice blockquote { font-size: .89rem; }
  .voice figcaption { margin-top: 3px; font-size: .74rem; }
  .actions { gap: 7px; margin-top: 15px; }
  .button { min-height: 40px; padding: 8px 13px; gap: 7px; font-size: .8rem; }
  .mission-layout { grid-template-areas: "intro" "visual" "list"; }
  .mission-layout > .intro, .factory-layout > .intro { margin: 0; text-align: start; }
  .mission-layout .kicker, .factory-layout .kicker { justify-content: start; }
  .mission-layout .lead, .factory-layout .lead { margin-inline: 0; text-wrap: wrap; }
  .industries { column-gap: 14px; }
  .industries li { padding-block: 9px; font-size: .96rem; }
  .plan-overview .scene { margin: 14px auto 0; }
  .steps li { grid-template-columns: 24px minmax(0, 1fr); gap: 0 10px; padding-block: 12px; }
  .steps li::before { font-size: .83rem; }
  .steps p, .production p, .contact-details { font-size: .94rem; }
  .supporting { font-size: .85rem; }
  .factory-layout { gap: 16px; }
  .production { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "visual visual" "maker installer"; gap: 16px 18px; }
  .production article { padding-top: 12px; }
  .production p { margin-top: 5px; }
  .network { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .experience-layout { gap: 17px; }
  .stat-grid { padding-block: 14px; gap: 12px; }
  .stat-grid > div { gap: 7px; }
  .stat-grid > div + div { padding-left: 12px; }
  .stat-grid dd { font-size: clamp(2rem, 6.8vw, 3.5rem); }
  .stat-grid dt { font-size: .83rem; }
  .contact-layout { grid-template-areas: "intro" "visual" "details"; }
  .contact-copy { display: contents; }
  .contact-copy .intro { grid-area: intro; }
  .contact-details { grid-area: details; }
  .contact-brief { margin: 0; }
  .contact-details dl { margin-top: 16px; gap: 12px; }
  .chapter-controls { position: sticky; inset-block-end: var(--frame); }
  .chapter-controls::before {
    content: "";
    position: absolute;
    inset: 0 var(--chrome-x) auto;
    height: 1px;
    background: var(--line);
  }
  .chapter-controls .bar { display: flex; padding-block: 8px 12px; }
  .chapter-position { gap: 7px; }
  .chapter-position [data-chapter-count] { font-size: .71rem; }
  .chapter-position [data-current] { font-size: .75rem; }
  .screen-nav { display: none; }
  .chapter-buttons a { width: 36px; height: 36px; }
}
@media (max-width: 500px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .stat-grid > div, .stat-grid > div + div {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    grid-template-areas: "value label";
    align-items: center;
    padding: 11px 0;
    border-left: 0;
  }
  .stat-grid > div + div { border-top: 1px solid var(--line); }
  .stat-grid dd { grid-area: value; font-size: clamp(2.1rem, 9.6vw, 3rem); }
  .stat-grid dt { grid-area: label; }
}
@media (max-width: 440px) {
  .production { grid-template-columns: minmax(0, 1fr); grid-template-areas: "visual" "maker" "installer"; }
}
@media (max-width: 350px) {
  :root { --chrome-x: 12px; --body-x: 16px; }
  .site-header .bar { gap: 5px; }
  .brand { font-size: .9rem; }
  .header-contact { padding-inline: 8px; }
  .contact-details dl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) and (max-height: 735px) {
  .cover-layout { display: flex; align-items: stretch; flex-direction: column; gap: 0; }
  .cover-copy, .cover-layout .intro, .cover-layout .scene-block { display: contents; }
  .cover-layout .kicker { order: 1; }
  .cover-layout h1 { order: 2; }
  .cover-layout .scene { order: 3; --art-h: clamp(155px, 30svh, 210px); margin-top: 13px; }
  .cover-layout .lead { order: 4; }
  .cover-layout .actions { order: 5; }
  .cover-layout .voice { order: 6; margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  html { scroll-snap-type: none; }
  .screen { min-height: auto; padding: 0; break-inside: avoid; break-after: page; }
  .panel { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .site-header, .chapter-controls, .actions { display: none; }
  .stage { width: 90%; padding-block: 24px; }
  .scene { max-width: 240px; }
}
