/* Kalel. Sección constructiva: drafting film, technical ink, one installation blue. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #1a1e21;
  --ground-deep: #15181b;
  --panel: #22272b;
  --panel-2: #2a3034;
  --ink: #e3e0d8;
  --ink-2: #b4b8b5;
  --muted: #9aa3a8;
  --line: rgba(227, 224, 216, 0.14);
  --line-strong: rgba(227, 224, 216, 0.32);
  --accent: #4fa3ff;
  --accent-ink: #0b1622;
  --accent-soft: rgba(79, 163, 255, 0.14);
  --danger: #ff8a7a;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 64px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  --section-y: clamp(88px, 11vw, 168px);

  --fs-display: clamp(2.35rem, 1.4rem + 2.9vw, 3.5rem);
  --fs-h2: clamp(1.85rem, 1.2rem + 2vw, 2.85rem);
  --fs-h3: 1.25rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-note: 0.75rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  scrollbar-color: #3b4247 var(--ground);
  background: var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
}

/* Drafting-film grain: fixed, non-interactive, never on a scrolling layer. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--accent); color: var(--accent-ink); }
input, textarea { caret-color: var(--accent); }

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 500; }
p { text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Annotation voice: expanded caps, the lettering of the drawing. */
.note {
  font-size: var(--fs-note);
  font-stretch: 125%;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------ Buttons */

.btn {
  --h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 560;
  font-stretch: 108%;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 140ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--small { --h: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #6db4ff; }
  .btn--ghost:hover { border-color: var(--ink); }
}

.icon { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ------------------------------------------------------------ Header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--ground);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header .wrap {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-stretch: 125%;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.2em;
}
.brand svg { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-note);
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  min-width: 40px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }

.menu-toggle { display: none; }

@media (max-width: 1023px) {
  .nav-links, .site-header .btn--primary { display: none; }
  .lang { margin-left: auto; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    touch-action: manipulation;
  }
  .menu-toggle:active { transform: scale(0.96); }
}

.mobile-menu {
  position: fixed;
  inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 0 0;
  z-index: 49;
  background: var(--ground);
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
.mobile-menu.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.mobile-menu a:not(.btn) {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.5rem;
  font-stretch: 108%;
  text-decoration: none;
}
.mobile-menu .btn { margin-top: 24px; }

/* ------------------------------------------------------------ Story: hero + floors */

.story {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  column-gap: clamp(24px, 4vw, 64px);
  padding-top: var(--nav-h);
}

.story__steps { min-width: 0; }

.step {
  min-height: 86svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 64px;
  max-width: 34rem;
}
.step--hero {
  min-height: calc(100svh - var(--nav-h));
  max-width: none;
  padding-block: 48px 96px;
}

.hero-title {
  font-size: clamp(2.6rem, 1rem + 3.75vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 540;
  font-stretch: 86%;
}
.hero-sub {
  margin-top: 24px;
  max-width: 30rem;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.step h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-stretch: 104%;
}
.step p {
  margin-top: 20px;
  color: var(--ink-2);
  max-width: 32rem;
}

.spec {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.spec li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
}
.spec li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 0.55em;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

.step .btn { margin-top: 36px; align-self: flex-start; }

.story__drawing {
  position: sticky;
  top: var(--nav-h);
  height: calc(100svh - var(--nav-h));
  align-self: start;
  display: flex;
  flex-direction: column;
  padding: 16px 0 20px;
}
.story__drawing svg {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.drawing-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 899px) {
  .story {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--gutter);
  }
  .story__drawing {
    order: -1;
    z-index: 2;
    height: 42svh;
    padding: 8px 0 10px;
    background: var(--ground);
    border-bottom: 1px solid var(--line);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .drawing-caption { display: none; }
  .step { min-height: 62svh; padding-block: 48px; }
  .step--hero { min-height: 0; padding-block: 28px 64px; }
  .hero-sub { margin-top: 16px; font-size: 1.0625rem; }
  .hero-actions { margin-top: 24px; }
}

/* ------------------------------------------------------------ Drawing (SVG) */

.dw { --dw-ink: var(--ink); font-family: "Archivo", sans-serif; }
.dw text { fill: var(--ink); font-stretch: 125%; font-weight: 500; letter-spacing: 0.06em; }
.dw .t-note { font-size: 10.5px; fill: var(--muted); }
.dw .t-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; }
.dw .t-sub { font-size: 11px; fill: var(--muted); font-stretch: 100%; letter-spacing: 0.01em; font-weight: 400; }
.dw .t-sign { font-size: 13px; font-weight: 600; letter-spacing: 0.32em; }
.dw .t-dev { font-size: 9.5px; fill: var(--ink-2); font-stretch: 100%; letter-spacing: 0.02em; font-weight: 450; }

.dw .stroke { fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.dw .thin { fill: none; stroke: var(--ink); stroke-width: 0.8; vector-effect: non-scaling-stroke; opacity: 0.7; }
.dw .axis { fill: none; stroke: var(--ink); stroke-width: 0.8; opacity: 0.16; stroke-dasharray: 14 4 2 4; vector-effect: non-scaling-stroke; }
.dw .cut { stroke: var(--ink); stroke-width: 1.2; fill: url(#hatch-cut); vector-effect: non-scaling-stroke; }
.dw .earth { fill: url(#hatch-earth); }
.dw .glass { fill: rgba(79, 163, 255, 0.07); }
.dw .pipe { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: square; opacity: 0.45; }
.dw .trail { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }
.dw .joint { fill: var(--ground); stroke: var(--accent); stroke-width: 1.6; }
.dw .bar { fill: var(--accent); opacity: 0.55; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0.25); transition: transform 900ms var(--ease-out); }
.dw .lead { fill: var(--accent); }
.dw .lead-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }

.dw .facade { transition: opacity 700ms var(--ease-in-out), transform 900ms var(--ease-in-out); }
.dw .facade-ghost { opacity: 0; transition: opacity 600ms ease 300ms; }
.dw .facade-ghost * { stroke-dasharray: 4 4; opacity: 0.22; }
.dw .floor { opacity: 0.3; transition: opacity 600ms ease; }
.dw .label { opacity: 0.4; transition: opacity 500ms ease; }
.dw .label line { stroke: var(--ink); stroke-width: 0.8; opacity: 0.6; vector-effect: non-scaling-stroke; }
.dw .label circle { fill: var(--ink); }
.dw .pipes { opacity: 0; transition: opacity 600ms ease; }

/* step 0 and 1: the facade stands */
.dw[data-step="0"] .label[data-for="facade"],
.dw[data-step="1"] .label[data-for="facade"] { opacity: 1; }
.dw[data-step="0"] .label:not([data-for="facade"]),
.dw[data-step="1"] .label:not([data-for="facade"]) { opacity: 0; }
.dw[data-step="0"] .lead-ring { animation: wait 2.4s var(--ease-out) infinite; }

/* step 2+: the facade retires to a dashed ghost */
.dw[data-step="2"] .facade,
.dw[data-step="3"] .facade,
.dw[data-step="4"] .facade { opacity: 0; transform: translateX(-28px); pointer-events: none; }
.dw[data-step="2"] .facade-ghost,
.dw[data-step="3"] .facade-ghost,
.dw[data-step="4"] .facade-ghost { opacity: 1; }
.dw[data-step="2"] .label[data-for="facade"],
.dw[data-step="3"] .label[data-for="facade"],
.dw[data-step="4"] .label[data-for="facade"] { opacity: 0; }
.dw[data-step="2"] .pipes,
.dw[data-step="3"] .pipes,
.dw[data-step="4"] .pipes { opacity: 1; }

.dw[data-step="2"] .floor { opacity: 0.42; }
.dw[data-step="2"] .floor[data-floor="p1"],
.dw[data-step="2"] .label[data-for="p1"] { opacity: 1; }
.dw[data-step="3"] .floor[data-floor="p2"],
.dw[data-step="3"] .label[data-for="p2"] { opacity: 1; }
.dw[data-step="3"] .floor:not([data-floor="p2"]) { opacity: 0.42; }
.dw[data-step="3"] .bar,
.dw[data-step="4"] .bar { transform: scaleY(1); }
.dw[data-step="4"] .floor,
.dw[data-step="4"] .label { opacity: 1; }

@media (max-width: 899px) {
  .dw .label, .dw .levels text { display: none; }
}

@keyframes wait {
  0% { opacity: 0.7; transform: scale(0.6); }
  70% { opacity: 0; transform: scale(2.2); }
  100% { opacity: 0; transform: scale(2.2); }
}

/* ------------------------------------------------------------ Sections */

.section { padding-block: var(--section-y); }
.section--rule { border-top: 1px solid var(--line); }

.section-head { max-width: 46rem; }
.section-head h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-stretch: 104%;
}
.section-head p { margin-top: 18px; color: var(--ink-2); max-width: 38rem; }

/* Work: two mirrored assemblies, one large sheet and two stacked */
.works {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.work { grid-column: span 12; display: flex; flex-direction: column; min-width: 0; text-decoration: none; }
.work__sheet {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  aspect-ratio: 16 / 10;
}
.work__sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* the shot continues below the fold: fade it into the sheet instead of slicing a line of text */
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  transition: transform 700ms var(--ease-out);
}
.work--tall .work__sheet { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
.work__block {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--line-strong);
  border-top: 0;
}
.work__block > div { padding: 12px 16px; min-width: 0; }
.work__block > div + div { border-left: 1px solid var(--line-strong); display: flex; align-items: center; }
.work__name { font-size: 1.0625rem; font-weight: 560; font-stretch: 104%; }
.work__meta { margin-top: 2px; font-size: var(--fs-small); color: var(--ink-2); }
.work__open { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); white-space: nowrap; }
.work__open .icon { transition: transform 200ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .work:hover .work__sheet img { transform: scale(1.025); }
  .work:hover .work__open .icon { transform: translate(2px, -2px); }
  .work:hover .work__sheet, .work:hover .work__block, .work:hover .work__block > div + div { border-color: var(--muted); }
}

.works__stack { display: contents; }

@media (max-width: 899px) {
  .work--tall .work__sheet { aspect-ratio: 1200 / 1340; min-height: 0; }
}

@media (min-width: 900px) {
  .works { grid-auto-flow: dense; }
  .work--a { grid-column: 1 / span 7; grid-row: span 2; }
  .work--b, .work--c { grid-column: 8 / span 5; }
  .work--d, .work--e { grid-column: 1 / span 5; }
  .work--f { grid-column: 6 / span 7; grid-row: span 2; }
}

/* Sectors: drawing index + detail sheet */
.sectors {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  border: 1px solid var(--line-strong);
}
.sector-index {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
  margin: 0;
  padding: 0;
}
.sector-tab {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 200ms ease, color 200ms ease;
}
.sector-tab:last-child { border-bottom: 0; }
.sector-tab .icon { opacity: 0; transform: translateX(-4px); transition: opacity 200ms ease, transform 200ms var(--ease-out); }
.sector-tab[aria-selected="true"] { background: var(--ink); color: var(--ground); font-weight: 560; }
.sector-tab[aria-selected="true"] .icon { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .sector-tab[aria-selected="false"]:hover { background: var(--panel); color: var(--ink); }
}

.sector-sheet { padding: clamp(24px, 3.4vw, 48px); min-width: 0; }
.sector-sheet h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); font-stretch: 104%; letter-spacing: -0.015em; line-height: 1.15; }
.sector-today { margin-top: 12px; color: var(--ink-2); max-width: 40rem; }
.sector-rows { margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.sector-rows > div {
  display: grid;
  grid-template-columns: minmax(120px, 2fr) 7fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.sector-rows dt { padding-top: 3px; }
.sector-rows dd { margin: 0; }

.route {
  --n: 5;
  position: relative;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
}
.route::before {
  content: "";
  position: absolute;
  left: calc(50% / var(--n));
  right: calc(50% / var(--n));
  top: 9px;
  height: 2px;
  background: var(--accent);
  opacity: 0.55;
  transform-origin: left center;
}
.route li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-inline: 4px;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.35;
}
.route li::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  background: var(--ground);
  border-radius: 50%;
  position: relative;
}
.route li:first-child::before, .route li:last-child::before { background: var(--accent); }

.sector-sheet.is-entering h3,
.sector-sheet.is-entering .sector-today,
.sector-sheet.is-entering .sector-rows > div,
.sector-sheet.is-entering .route li {
  animation: rise 420ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.sector-sheet.is-entering .route::before { animation: draw 700ms var(--ease-out) both 120ms; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 899px) {
  .sectors { grid-template-columns: minmax(0, 1fr); }
  .sector-index {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .sector-index::-webkit-scrollbar { display: none; }
  .sector-tab {
    flex: none;
    width: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    scroll-snap-align: start;
    white-space: nowrap;
  }
  .sector-tab .icon { display: none; }
  .sector-rows > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .route { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .route::before { left: 9px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; transform-origin: center top; }
  .route li { flex-direction: row; text-align: left; align-items: center; gap: 14px; }
  .route li::before { flex: none; }
  .sector-sheet.is-entering .route::before { animation-name: draw-y; }
}
@keyframes draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Method: one dimension line across the sheet */
.method { margin-top: clamp(48px, 7vw, 88px); }
.method__line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.method__line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 15px;
  height: 1px;
  background: var(--ink);
  transform-origin: left center;
  transition: transform 1200ms var(--ease-out);
}
.js .method:not(.is-drawn) .method__line::before { transform: scaleX(0); }
.method__line li { position: relative; padding: 48px 28px 0 0; }
.method__line li::before,
.method__line li:last-child::after {
  content: "";
  position: absolute;
  top: 7px;
  left: -1px;
  width: 1px;
  height: 17px;
  background: var(--ink);
  transform: rotate(45deg);
}
.method__line li:last-child::after { left: auto; right: -1px; }
.method__line h3 { font-size: var(--fs-h3); font-stretch: 104%; font-weight: 560; }
.method__line p { margin-top: 10px; color: var(--ink-2); font-size: var(--fs-small); max-width: 22rem; }

@media (max-width: 899px) {
  .method__line { grid-template-columns: minmax(0, 1fr); }
  .method__line::before { left: 0; right: auto; top: 0; bottom: 0; width: 1px; height: auto; transform-origin: center top; }
  .js .method:not(.is-drawn) .method__line::before { transform: scaleY(0); }
  .method__line li { padding: 0 0 36px 32px; }
  .method__line li::before, .method__line li:last-child::after { top: 2px; left: -8px; width: 17px; height: 1px; }
  .method__line li:last-child::after { display: none; }
}

/* Statement */
.statement {
  margin-top: clamp(88px, 10vw, 144px);
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.statement blockquote {
  margin: 0;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 450;
  font-stretch: 100%;
  text-wrap: balance;
}
.statement p { color: var(--ink-2); border-left: 1px solid var(--line-strong); padding-left: 20px; }
@media (max-width: 899px) { .statement { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ Request form */

.request {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.form { display: grid; gap: 36px; }
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form legend, .field > label { display: block; padding: 0; margin-bottom: 10px; font-weight: 560; font-size: 1rem; }
.hint { display: block; margin-top: -6px; margin-bottom: 12px; font-size: var(--fs-small); color: var(--muted); font-weight: 400; }
.field { display: grid; gap: 0; min-width: 0; align-content: start; }
.field > label.consent { display: grid; margin: 0; font-weight: 400; font-size: var(--fs-small); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: 0.9688rem;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease-out);
}
.chip span::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: background-color 180ms ease;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--ground); font-weight: 560; }
.chip input:checked + span::before { background: currentColor; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.chip:active span { transform: scale(0.97); }
.chips:has(input:checked) .chip input:not(:checked) + span { color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .chip input:not(:checked):hover + span { border-color: var(--ink); color: var(--ink); }
}

.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--ground-deep);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 180ms ease;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%23e3e0d8' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.select option { background: var(--panel); color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: #8a9398; opacity: 1; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) {
  .input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
}

.error { display: none; margin-top: 8px; font-size: var(--fs-small); color: var(--danger); }
.is-invalid .error { display: block; }
.is-invalid .input, .is-invalid .select, .is-invalid .textarea { border-color: var(--danger); }
.is-invalid .chip span { border-color: rgba(255, 138, 122, 0.6); }

.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: var(--fs-small); color: var(--ink-2); }
.consent input {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1px solid var(--line-strong);
  background: var(--ground-deep);
  display: grid;
  place-content: center;
  cursor: pointer;
}
.consent input::after { content: ""; width: 10px; height: 10px; background: var(--accent); transform: scale(0); transition: transform 160ms var(--ease-out); }
.consent input:checked::after { transform: scale(1); }
.consent input:checked { border-color: var(--accent); }
.consent .error { grid-column: 2; }

.form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__status { font-size: var(--fs-small); color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sent { border: 1px solid var(--line-strong); padding: clamp(24px, 4vw, 48px); }
.sent h3 { font-size: 1.75rem; font-stretch: 104%; }
.sent p { margin-top: 12px; color: var(--ink-2); max-width: 32rem; }
.sent .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Live sheet: the visitor's own build */
.sheet {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border: 1px solid var(--line-strong);
  background: var(--ground-deep);
}
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line-strong); }
.sheet__draw {
  position: relative;
  min-height: 300px;
  padding: 28px 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet__empty {
  position: absolute;
  inset: 28px 28px 64px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-small);
  border: 1px dashed var(--line-strong);
  padding: 16px;
  transition: opacity 300ms ease;
}
.sheet__draw.has-floors .sheet__empty { opacity: 0; pointer-events: none; }
.tower { display: flex; flex-direction: column-reverse; margin: 0 22px; }
.tower__floor {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 14px;
  border: 1.2px solid var(--ink);
  border-bottom: 0;
  background: var(--ground-deep);
  font-size: 0.875rem;
}
.tower__floor::after {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  bottom: -5px;
  height: 5px;
  background: repeating-linear-gradient(45deg, var(--ink) 0 1px, transparent 1px 4px);
  border-block: 1px solid var(--ink);
}
.tower__floor--web { border-style: solid; }
.tower__floor--auto { background-image: linear-gradient(var(--accent), var(--accent)); background-size: calc(100% - 28px) 2px; background-position: 14px 70%; background-repeat: no-repeat; }
.tower__floor--tbd { border-style: dashed; color: var(--muted); }
.tower__floor.is-new { animation: settle 520ms var(--ease-settle) both; }
.tower__level { color: var(--muted); }
@keyframes settle { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }

.ground-line { height: 14px; margin: 0 0 0; border-top: 1.4px solid var(--ink); background: repeating-linear-gradient(-45deg, rgba(227, 224, 216, 0.28) 0 1px, transparent 1px 6px); }

.cartouche { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.cartouche > div { padding: 10px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.cartouche > div:nth-child(odd) { border-right: 1px solid var(--line); }
.cartouche > div:nth-last-child(-n+2) { border-bottom: 0; }
.cartouche dt { margin-bottom: 2px; }
.cartouche dd { margin: 0; font-size: var(--fs-small); overflow-wrap: anywhere; }

.direct { margin-top: 20px; display: grid; gap: 0; border: 1px solid var(--line); }
.direct a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.direct a:last-child { border-bottom: 0; }
.direct a span:last-child { color: var(--ink-2); overflow-wrap: anywhere; text-align: right; }
@media (hover: hover) and (pointer: fine) { .direct a:hover { background: var(--panel); } }

.sheet__count { margin-right: 14px; color: var(--ink); }
.sheet__count:empty { display: none; }

@media (max-width: 899px) {
  .request { grid-template-columns: minmax(0, 1fr); }
  .sheet { position: static; }
  .sheet .cartouche, .sheet__scale { display: none; }
  .sheet__draw { min-height: 0; padding: 18px 18px 0; }
  .sheet__empty { position: static; margin-bottom: 14px; padding: 14px; }
  .sheet__draw.has-floors .sheet__empty { display: none; }
  .tower { margin: 0 14px; }
  .tower__floor { height: 44px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .step { justify-content: flex-start; }
}

/* ------------------------------------------------------------ Footer: title block */

.site-footer { padding: 0 0 calc(32px + env(safe-area-inset-bottom, 0px)); }
.titleblock {
  display: grid;
  grid-template-columns: 1.3fr 2fr 1fr 1.6fr 1.6fr;
  border: 1px solid var(--line-strong);
}
.titleblock > div { padding: 16px 18px; border-right: 1px solid var(--line-strong); min-width: 0; }
.titleblock > div:last-child { border-right: 0; }
.titleblock dd { margin: 4px 0 0; font-size: var(--fs-small); overflow-wrap: anywhere; }
.titleblock dd a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .titleblock dd a:hover { text-decoration: underline; } }
.titleblock .brand { font-size: 0.9375rem; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 0.875rem; color: var(--muted); }
.footer-legal a { color: var(--ink-2); }

@media (max-width: 1023px) {
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock > div { border-bottom: 1px solid var(--line-strong); }
  .titleblock > div:nth-child(2n) { border-right: 0; }
  .titleblock > div:first-child { grid-column: 1 / -1; border-right: 0; }
  .titleblock > div:last-child { border-bottom: 0; }
}
@media (max-width: 559px) {
  .titleblock { grid-template-columns: minmax(0, 1fr); }
  .titleblock > div { border-right: 0; }
}

/* ------------------------------------------------------------ Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; }
  .dw .facade { transform: none !important; transition: opacity 200ms ease; }
  .dw .bar, .work__sheet img, .method__line::before { transition-duration: 1ms; }
  .tower__floor.is-new { animation: none; }
  .dw .lead-ring { display: none; }
}
