/* ISEHOMES STEEL landing page. frontend_SDD rev. 7 ("Plano de taller"): register editorial, density comfortable,
   one locked dark theme. Layers: primitive tokens (:root, the only place colour literals live) -> semantic tokens
   -> components (semantic tokens only). */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/archivo-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/archivo-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}

:root {
  /* Primitive colours */
  --ink-950: #0a0e11;
  --ink-850: #141b20;
  --draft-900: #112131;
  --draft-850: #172b3e;
  --steel-50: #eef2f4;
  --steel-200: #b4c0c7;
  --steel-350: #98a6af;
  --steel-500: #7a8a93;
  --blue-200: #b5d3f4;
  --blue-300: #96c1f0;
  --blue-400: #7fb0e8;
  --signal-300: #ffa066;
  --signal-400: #ff8540;
  --signal-500: #f27a3a;
  --white: #ffffff;
  --steel-50-a07: rgb(238 242 244 / 0.07);
  --steel-50-a14: rgb(238 242 244 / 0.14);
  --blue-300-a05: rgb(150 193 240 / 0.05);
  --blue-300-a08: rgb(150 193 240 / 0.08);
  --blue-300-a09: rgb(150 193 240 / 0.09);
  --blue-300-a12: rgb(150 193 240 / 0.12);
  --blue-300-a22: rgb(150 193 240 / 0.22);
  --blue-300-a24: rgb(150 193 240 / 0.24);
  --ink-950-a80: rgb(10 14 17 / 0.8);

  /* Elevation: one shadow, reference dialogs only; every other surface is flat */
  --shadow-3: 0 4px 12px rgb(0 0 0 / 0.3), 0 24px 64px rgb(0 0 0 / 0.48);

  /* Radius, motion, type, space */
  --radius-sm: 2px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-draw: 1200ms;
  --font-display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  /* Type scale (desktop / below 600): 100/42, 64/36, 48/24, 24, 20, 17/16, 13/12. The h1 is fluid from 600 to 1440. */
  --text-display: clamp(2.625rem, 0.036rem + 6.905vw, 6.25rem);
  --text-h2: 2.25rem;
  --text-figure: 1.5rem;
  --text-title: 1.5rem;
  --text-lede: 1.25rem;
  --text-body: 1rem;
  --text-control: 1rem;
  --text-label: 0.75rem;
  /* Uppercase display leading: below 1.02 the marks of Ñ, Á, É, Ú touch the line above when a heading wraps */
  --leading-display: 1.02;
  --gutter: 16px;
  --section-pad: 64px;
  --header-h: 64px;
  /* CallBar height: 1 px top rule + 12 px + 52 px target + 12 px = 77 px, excluding the safe-area inset; every use adds env(safe-area-inset-bottom) itself (CallBar padding, body padding-bottom, html scroll-padding-bottom) */
  --bar-h: 77px;
  --legal-term-w: 13rem;
  --footer-brand-w: 20rem;

  /* Semantic layer */
  --bg: var(--ink-950);
  --bg-band: var(--draft-900);
  --bg-plate: var(--ink-850);
  --bg-plate-band: var(--draft-850);
  --fg: var(--steel-50);
  --fg-muted: var(--steel-200);
  --fg-subtle: var(--steel-350);
  --accent: var(--blue-300);
  --accent-hover: var(--blue-200);
  --accent-press: var(--blue-400);
  --on-accent: var(--ink-950);
  --focus: var(--accent);
  --border-control: var(--steel-500);
  --grid-minor: var(--blue-300-a05);
  --grid-major: var(--blue-300-a09);
  --glow: var(--blue-300-a24);
  /* D-072 signal orange: the call buttons and the FiguresBand price only */
  --cta: var(--signal-400);
  --cta-hover: var(--signal-300);
  --cta-press: var(--signal-500);
  --on-cta: var(--ink-950);
  --figure-key: var(--signal-400);
  --line-soft: var(--steel-50-a07);
  --line: var(--steel-50-a14);
  --line-accent: var(--blue-300-a22);
  --fill-hover: var(--blue-300-a08);
  --fill-press: var(--blue-300-a12);
  --sheet: var(--white);
  --scrim: var(--ink-950-a80);
}

/* Surfaces: page --bg, alternating bands --bg-band (frontend_SDD rev. 7 Section structure). Bands (D-072): texture and
   scale bar are in-flow items in the container's cell, so axe reads text on the solid band; never an absolute pseudo
   with a background (deviations 9, 13, 20). minmax(0, 1fr): the scroll regions must not widen the track. */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background-color: var(--bg-band);
}
.section.band {
  padding-block: 0;
}
.band > .container {
  grid-area: 1 / 1;
  padding-block: var(--section-pad);
}
.band::before,
.band::after {
  content: '';
  grid-area: 1 / 1;
  pointer-events: none;
}
/* 24 / 120 px grid, faded over 160 px at the edges */
.band::before {
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-minor) 1px, transparent 1px);
  background-size:
    120px 120px,
    120px 120px,
    24px 24px,
    24px 24px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    var(--bg) 160px,
    var(--bg) calc(100% - 160px),
    transparent
  );
  mask-image: linear-gradient(
    to bottom,
    transparent,
    var(--bg) 160px,
    var(--bg) calc(100% - 160px),
    transparent
  );
}
/* Scale bar on the top edge: rule, 24 and 120 px ticks */
.band::after {
  align-self: start;
  height: 14px;
  background-image:
    linear-gradient(var(--line-accent), var(--line-accent)),
    repeating-linear-gradient(to right, var(--line-accent) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to right, var(--accent) 0 1px, transparent 1px 120px);
  background-size:
    100% 1px,
    100% 8px,
    100% 14px;
  background-repeat: no-repeat;
  background-position: center top;
}
/* Plates in a band; dialogs stay on --bg-plate. Any new plate inside a band must join this list (e2e-6 flags a plate left on --bg-plate) */
.band .notice,
.band .diagrams,
.band .ref-card,
.band .video-frame {
  background-color: var(--bg-plate-band);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* F1: display headings are uppercase through CSS only; the DOM text stays sentence case */
h1,
h2 {
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
h1 {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: -0.035em;
}
h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-display);
  letter-spacing: -0.03em;
}
h3 {
  font-size: var(--text-lede);
}
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
picture {
  display: contents;
}
picture > source {
  display: none;
}
svg {
  flex: none;
}
a {
  color: inherit;
}
main:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}

/* Focus: 2 px ring, offset 3 px; never removed */
:where(a, button, [tabindex]) {
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition:
    color var(--dur-1) var(--ease),
    background-color var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease),
    text-decoration-color var(--dur-1) var(--ease),
    box-shadow var(--dur-1) var(--ease),
    transform var(--dur-1) var(--ease),
    outline-offset var(--dur-1) var(--ease);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-pad);
}
.section-head {
  display: grid;
  gap: 16px;
  max-width: 44rem;
  margin-bottom: 48px;
}
.lede {
  color: var(--fg-muted);
  font-size: var(--text-lede);
  line-height: 1.55;
  max-width: 34em;
}
.body-copy {
  color: var(--fg-muted);
  max-width: 70ch;
}

/* Skip link: inside the header, so the sticky header never covers it */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
}

/* Buttons: radius sm, IBM Plex Sans 500 16 px; primary = --cta fill, ghost = control border; flat */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-control);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-lg {
  min-height: 52px;
  padding-inline: 24px;
}
.btn-primary {
  background-color: var(--cta);
  color: var(--on-cta);
}
.btn-primary:hover {
  background-color: var(--cta-hover);
}
.btn-primary:active {
  background-color: var(--cta-press);
  transform: translateY(1px);
}
/* Blue accent primary, for a button that is not a call (the 404 "Volver al inicio"); D-072 keeps orange to calls */
.btn-accent {
  background-color: var(--accent);
  color: var(--on-accent);
}
.btn-accent:hover {
  background-color: var(--accent-hover);
}
.btn-accent:active {
  background-color: var(--accent-press);
  transform: translateY(1px);
}
.btn-ghost {
  background-color: transparent;
  border-color: var(--border-control);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background-color: var(--fill-hover);
  color: var(--accent);
}
.btn-ghost:active {
  border-color: var(--accent);
  background-color: var(--fill-press);
  color: var(--accent);
  transform: translateY(1px);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.text-link .icon {
  color: var(--accent);
}
.text-link:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}
.text-link:hover .icon {
  color: var(--accent-hover);
}

/* Header: >= 1000 logo + wordmark, 6 links and the phone button; < 1000 logo + "Menú" only (the call bar calls) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Opaque, like the call bar: over scrolled content axe cannot resolve a translucent header (deviation 9) */
  background-color: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-right: auto;
  color: var(--fg);
  text-decoration: none;
}
.brand img {
  width: 64px;
  height: 38px;
}
.brand-text {
  display: none;
  font-family: var(--font-display);
  font-size: var(--text-lede);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.brand-text small {
  color: var(--fg-subtle);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-desktop {
  display: none;
}
.nav-desktop ul {
  display: flex;
  gap: 4px;
}
.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  color: var(--fg-muted);
  font-size: var(--text-control);
  font-weight: 500;
  text-decoration: none;
}
.nav-desktop a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}
.header-call {
  display: none;
}
.menu-toggle {
  font-size: var(--text-control);
  padding-inline: 16px;
}

/* Photos: own photos, flat, no filter or overlay; never larger than their output width */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.photo img {
  width: 100%;
}
.caption {
  margin-top: 8px;
  color: var(--fg-subtle);
  font-size: var(--text-label);
  line-height: 1.45;
}

/* Plate: registration frame for own photos (8 px padding, 1 px rule, accent corner ticks top-left and bottom-right) */
.plate {
  position: relative;
  padding: 8px;
  border: 1px solid var(--line-soft);
}
.plate::before,
.plate::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0 solid var(--accent);
  pointer-events: none;
}
.plate::before {
  top: -1px;
  left: -1px;
  border-top-width: 2px;
  border-left-width: 2px;
}
.plate::after {
  right: -1px;
  bottom: -1px;
  border-right-width: 2px;
  border-bottom-width: 2px;
}

/* Hero (LF-1): the FrameDrawing sits behind everything (isolated stacking context, z-index -1) and is clipped by the
   hero, so it never widens the page. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: 32px 48px;
}
.hero-sheet {
  display: grid;
  gap: 24px;
}
/* It starts at the horizontal centre: every left-aligned text line has its centre in the left half, so no text sits
   on the drawing where axe samples its background (F-CONTRAST counts "incomplete" as a failure). Below 600 it ends
   above the FiguresBand, whose right cells reach the right half; from 600 to 999 it sits in the Plate's row, below
   the band; from 1000 in the h1 + copy rows (F-17). A mask reads only alpha: its gradient uses an opaque token.
   --hero-w is its width and sets the line-draw dash (F-16). */
.hero-drawing {
  --hero-w: 440px;
  position: absolute;
  z-index: -1;
  top: 24px;
  left: 50%;
  width: var(--hero-w);
  height: auto;
  opacity: 0.7;
  fill: none;
  stroke: var(--accent);
  pointer-events: none;
  /* D-072 glow and grid patch on the text-free box */
  background-image:
    radial-gradient(closest-side, var(--glow), transparent),
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px);
  background-size:
    100% 100%,
    40px 40px,
    40px 40px;
  background-position: center;
  -webkit-mask-image: linear-gradient(to bottom, var(--bg) 40%, transparent 90%);
  mask-image: linear-gradient(to bottom, var(--bg) 40%, transparent 90%);
}
/* Stroke classes of the <symbol>: rules match its elements and apply to every <use> clone. vector-effect is not
   inherited, so it sits on each path. fd-a: ground line and main members (tracks, studs, opening frames,
   truss chords); fd-b: secondary members (cripple and jack studs, rim ticks, inner chords, webs, X bracing);
   fd-c: ground hatch and dimension lines; fd-f: the three filled level arrowheads. */
.fd-a path,
.fd-b path,
.fd-c path {
  vector-effect: non-scaling-stroke;
}
.fd-a {
  stroke-width: 1.2;
  stroke-opacity: 0.55;
}
.fd-b {
  stroke-width: 1;
  stroke-opacity: 0.32;
}
.fd-c {
  stroke-width: 1;
  stroke-opacity: 0.28;
}
.fd-f {
  fill: var(--accent);
  fill-opacity: 0.55;
  stroke: none;
}
.accent-text {
  color: var(--accent);
}
.hero-copy {
  display: grid;
  gap: 24px;
  align-content: start;
}
.hero-actions,
.hero-link {
  display: none;
}
.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}
/* FiguresBand (F-11): an --line-accent rule over the band, --line-soft dividers that start on it. Below 600 the
   price cell sizes to its 24 px figure (no wrap from 360 px up) and the first cell takes the rest (mockup 02). */
.facts {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  border-top: 1px solid var(--line-accent);
}
.facts > div:nth-child(3) {
  display: none;
}
.facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
}
.facts > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}
/* Figures: 24 px below 600, then 6vw - 12 px (24 px at 600, 48 px at 1000), 48 px from 1000 (Mockup deviation 18) */
.facts dt {
  font-family: var(--font-display);
  font-size: clamp(var(--text-title), 6vw - 0.75rem, var(--text-figure));
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.facts .fact-price dt {
  color: var(--figure-key);
}
.facts dd {
  color: var(--fg-muted);
  font-size: var(--text-label);
  line-height: 1.45;
}
/* The Plate hugs its photo: 534 px (hero-main-mobile) below 600, 400 px (hero-main) from 600; 18 px = padding + rule.
   From 1000 it is capped at 25vw - 12 px (photo 25vw - 30) up to 1199 and at 290 (photo 272) from 1200. */
.hero-media {
  max-width: calc(534px + 18px);
  margin-top: 8px;
  background-color: var(--bg);
}
@media (min-width: 600px) {
  .hero-media {
    max-width: calc(400px + 18px);
  }
}

/* Sistema (LF-2 split sheet): head, main Plate, ruled FeatureList and the finish pair stack in DOM order below
   1000 px; from 1000 the head spans the 12 columns, the Plate takes 1-5 and the list 6-12 (tops aligned), the
   finish pair sits under the Plate in 1-5 (D-079). Every Plate hugs its photo: 18 px = 8 px padding + 1 px rule on
   each side. From 600 the list is a one-column ledger like Precio (h3 label column + text, closed by a bottom rule):
   5 items never leave an orphan. */
.photo-figure {
  max-width: calc(528px + 18px);
}
.features {
  display: grid;
  gap: 32px 48px;
  margin-top: 48px;
}
.features li {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.features p {
  color: var(--fg-muted);
}
.finishes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, calc(360px + 18px)));
  gap: 16px;
  margin-top: 48px;
}
.finishes .photo img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
/* The timber house's roof (named in its alt) is at the top of the frame: crop from the bottom. */
.finish-figure-top .photo img {
  object-position: 50% 0;
}

/* Que construimos (LF-2 mirrored): ruled UseList (two columns from 600) in columns 1-7, the Plate in 8-12 from 1000 */
.usos-layout {
  display: grid;
  gap: 48px;
}
.use-list {
  display: grid;
  gap: 24px 48px;
}
.use-list li {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.use-list p {
  color: var(--fg-muted);
}
.usos-figure {
  max-width: calc(520px + 18px);
}

/* Del render a la obra: the VideoSlot Plate; the poster never exceeds its 917 px file */
.video-slot {
  max-width: calc(917px + 18px);
}
.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-plate);
}
.video-frame img,
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 917 / 516;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
.video-play:hover {
  background-color: var(--accent-hover);
}
.video-play:active {
  background-color: var(--accent-press);
  transform: translateY(1px);
}

/* Proceso: LF-3 Timeline. DOM order is numeral, h3, date, photo, text (heading first for assistive technology); grid
   rows give the mockup order (numeral and date, photo, h3, text). Below 1000 px: a vertical 2 px ruler on the left,
   ticks centred on it, content 28 px in. The ruler is ol::before (scroll-drawn, see Motion), each tick li::before.
   The ruler is an in-flow grid item, never absolute: axe reads an absolutely positioned pseudo-element with a
   background on an ancestor as "background could not be determined" (incomplete) for the text above it. */
.kicker,
.phases .phase-date {
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
/* --tick is the tick size and the ruler column; the column gap equals it, so a tick sits 2 x --tick left of the content. */
.phases {
  --phase-num: 2.5rem;
  --tick: 14px;
  display: grid;
  grid-template-columns: var(--tick) minmax(0, 1fr);
  gap: 48px var(--tick);
}
.phases::before {
  content: '';
  grid-row: 1 / span 5;
  grid-column: 1;
  justify-self: center;
  width: 2px;
  margin-top: calc(var(--phase-num) / 2);
  background-color: var(--accent);
}
.phases li {
  position: relative;
  display: grid;
  grid-column: 2;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
}
.phases li::before {
  content: '';
  position: absolute;
  top: calc((var(--phase-num) - var(--tick)) / 2);
  left: calc(var(--tick) * -2);
  width: var(--tick);
  height: var(--tick);
  border: 2px solid var(--accent);
  background-color: var(--bg);
}
.phase-num {
  grid-row: 1;
  font-family: var(--font-display);
  font-size: var(--phase-num);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.phases .phase-date {
  grid-row: 1;
  grid-column: 2;
  color: var(--fg-subtle);
}
.phases .photo {
  grid-row: 2;
  grid-column: 1 / -1;
  max-width: 520px;
  margin-top: 16px;
}
.phases h3 {
  grid-row: 3;
  grid-column: 1 / -1;
  margin-top: 20px;
}
.phases .phase-text {
  grid-row: 4;
  grid-column: 1 / -1;
  max-width: 70ch;
  margin-top: 8px;
  color: var(--fg-muted);
}

/* Referencias del sistema constructivo (third-party material, security_SDD framing) */
.notice {
  display: flex;
  gap: 12px;
  max-width: 50rem;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background-color: var(--bg-plate);
  color: var(--fg-muted);
}
.notice strong {
  color: var(--fg);
  font-weight: 500;
}
.notice svg {
  margin-top: 4px;
  color: var(--accent);
}
.refs-subtitle {
  margin: 64px 0 24px;
}
/* Scroll regions (DiagramSheet below 1000 px, ReferenceRail always): focusable, named by their h3, themed bar */
.diagram-sheet,
.rail {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--border-control) transparent;
}
/* DiagramSheet: one ruled sheet; a strip of 230 px cells below 1000 px, 5 equal cells from 1000 px */
.diagrams {
  display: flex;
  width: max-content;
  min-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--bg-plate);
}
.diagrams > li {
  flex: 0 0 230px;
}
.diagrams > li + li {
  border-left: 1px solid var(--line);
}
.diagram {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.diagram-plate {
  display: grid;
  place-items: center;
  height: 10rem;
  padding: 12px;
  background-color: var(--sheet);
}
.diagram-plate img {
  width: auto;
  max-height: 8.5rem;
}
.diagram figcaption,
.ref-plate {
  display: grid;
  gap: 4px;
  padding: 16px;
}
.diagram figcaption strong {
  font-family: var(--font-display);
  font-size: var(--text-control);
  font-weight: 600;
}
.diagram-desc {
  color: var(--fg-muted);
  font-size: var(--text-label);
}
.credit {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--fg-subtle);
  font-size: var(--text-label);
  line-height: 1.45;
}
/* ReferenceRail heading row: the h3, then the J5 counter and arrows (main.js); they wrap under it when narrow */
.rail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 64px 0 24px;
}
.rail-head .refs-subtitle {
  margin: 0;
}
.rail-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rail-count {
  margin-right: 8px;
  color: var(--fg-subtle);
  font-size: var(--text-label);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}
.rail-arrow {
  width: 44px;
  padding: 0;
}
.rail-prev .icon {
  transform: scaleX(-1);
}
.rail-arrow[aria-disabled='true'],
.rail-arrow[aria-disabled='true']:hover,
.rail-arrow[aria-disabled='true']:active {
  border-color: var(--border-control);
  background-color: transparent;
  color: var(--fg-subtle);
  cursor: default;
  transform: none;
}
/* n cards per view and the gap set W = max(280 px, (C - n * gap) / (n + 0.12)): the next card shows 12 % (F2
   <= 15 %), or down to 9 % where a reserved scrollbar narrows C (700 and 1000 px) and the 280 px floor holds.
   The rail has no inline padding, so it lines up with the heading; each card keeps its focus ring inside itself. */
.rail {
  --rail-n: 1;
  --rail-gap: 12px;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
}
.rail-list {
  display: flex;
  gap: var(--rail-gap);
}
.rail-list > .ref-card {
  flex: 0 0 max(280px, (100% - var(--rail-n) * var(--rail-gap)) / (var(--rail-n) + 0.12));
  scroll-snap-align: start;
}
.ref-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background-color: var(--bg-plate);
  transition: border-color var(--dur-1) var(--ease);
}
.ref-card:hover,
.ref-card:focus-within {
  border-color: var(--line);
}
.ref-card > figure {
  display: flex;
  flex: 1;
  flex-direction: column;
}
/* W x 220 (240 from 700 px): every card file is >= 691 x 318, so cover never renders above its pixels */
.ref-photo {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.ref-plate {
  flex: 1;
  align-content: start;
  padding: 20px 20px 12px;
}
.tag {
  justify-self: start;
  margin-bottom: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ref-title {
  font-size: var(--text-title);
}
.ref-meta {
  color: var(--fg-muted);
  font-size: var(--text-label);
}
.ref-plate .credit {
  border-top: 0;
  padding-top: 0;
}
/* In the card's flow, right-aligned under the plate; the 16 px inset keeps its 5 px focus ring inside the card. */
.ver-ficha {
  align-self: flex-end;
  margin: 0 16px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-control);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
  cursor: pointer;
}
.ver-ficha .icon {
  color: var(--accent);
}
.ver-ficha:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}
.refs-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}
.refs-cta p {
  margin-top: 4px;
  color: var(--fg-subtle);
}

/* Page scroll is locked while a modal dialog is open (main.js). From 640 px the root always reserves its scrollbar
   gutter, so on classic-scrollbar desktops locking neither shifts the page behind a dialog nor forces a full
   relayout on open (INP). Not below 640 px: the reserved 15 px would leave the rail card under 280 px at 360 px
   (F-RAIL) with the 16 px gutters of R2; touch devices overlay their scrollbars anyway. */
html.is-locked {
  overflow: hidden;
}
@media (min-width: 640px) {
  html {
    scrollbar-gutter: stable;
  }
}

/* Dialogs: pure CSS motion (CSP), closed state = display none */
dialog {
  /* A modal dialog paints in the top layer, where z-index has no effect. axe models stacking by z-index only, so
     without this it reads the header and call bar as covering the open dialog (colour-contrast "incomplete"). */
  z-index: 20;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg);
  background-color: var(--bg);
  opacity: 0;
  transition:
    opacity var(--dur-1) var(--ease),
    transform var(--dur-1) var(--ease),
    overlay var(--dur-1) var(--ease) allow-discrete,
    display var(--dur-1) var(--ease) allow-discrete;
}
dialog[open] {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-2) var(--ease),
    transform var(--dur-2) var(--ease),
    overlay var(--dur-2) var(--ease) allow-discrete,
    display var(--dur-2) var(--ease) allow-discrete;
}
dialog::backdrop {
  background-color: transparent;
  transition:
    background-color var(--dur-1) var(--ease),
    overlay var(--dur-1) var(--ease) allow-discrete,
    display var(--dur-1) var(--ease) allow-discrete;
}
dialog[open]::backdrop {
  background-color: var(--scrim);
  transition:
    background-color var(--dur-2) var(--ease),
    overlay var(--dur-2) var(--ease) allow-discrete,
    display var(--dur-2) var(--ease) allow-discrete;
}
.ref-dialog {
  width: min(100% - 32px, 1040px);
  max-height: calc(100% - 32px);
  margin: auto;
  overflow-y: auto;
  background-color: var(--bg-plate);
  box-shadow: var(--shadow-3);
  transform: translateY(8px) scale(0.98);
}
@starting-style {
  dialog[open] {
    opacity: 0;
  }
  dialog[open]::backdrop {
    background-color: transparent;
  }
  .ref-dialog[open] {
    transform: translateY(8px) scale(0.98);
  }
  .sheet[open] {
    transform: translateY(-8px);
  }
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}
.dialog-kind {
  color: var(--fg-subtle);
  font-size: var(--text-label);
}
.dialog-title {
  font-size: var(--text-title);
}
.dialog-body {
  display: grid;
  gap: 24px;
  padding: 16px 24px 24px;
}
.dialog-line {
  color: var(--fg-muted);
}
.dialog-photos {
  display: grid;
  gap: 16px;
}
.dialog-photos img {
  width: auto;
  border-radius: var(--radius-sm);
}
.dialog-photos figcaption {
  margin-top: 8px;
  color: var(--fg-subtle);
  font-size: var(--text-label);
}
.datos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}
.datos div {
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.datos dt {
  color: var(--fg-subtle);
  font-size: var(--text-label);
}
.dialog-body > p {
  color: var(--fg-muted);
  max-width: 70ch;
}

/* Menu sheet (< 1000 px): the whole layout viewport. Sized in 100vw, as inset 0 alone fits the containing block, which
   from 640 px leaves out the 15 px root scrollbar gutter of classic-scrollbar browsers (Mockup deviation 25). On short
   viewports the sheet scrolls itself; scroll-padding keeps the 5 px focus ring clear of its edges. */
.sheet {
  inset: 0;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  overflow-y: auto;
  scroll-padding-block: 8px;
  border: 0;
  border-radius: 0;
  background-color: var(--bg);
  transform: translateY(-8px);
}
.sheet[open] {
  display: flex;
  flex-direction: column;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.sheet-head img {
  width: 64px;
  height: 38px;
}
.sheet-nav {
  padding: 8px 16px;
}
.sheet-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-transform: uppercase;
}
.sheet-nav .icon {
  color: var(--accent);
}
.sheet-nav a:hover {
  color: var(--accent);
}
/* Static FrameDrawing: it takes the height left between the links and the contact block (so the block sits at the
   bottom) and yields first, down to 0, when the viewport is short; drawn whole and centred (Mockup deviation 26). */
.sheet-drawing {
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  padding-inline: 16px;
  opacity: 0.3;
  fill: none;
  stroke: var(--accent);
  pointer-events: none;
}
/* Contact block: no box, a 1 px rule across the sheet; inner padding, so the buttons fill the content width */
.sheet-contact {
  display: grid;
  gap: 10px;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.sheet-contact .text-link {
  justify-self: center;
  margin-top: 4px;
}

/* Precio y plazos (LF-5 ledger): the head and the price plate, then the 4 groups as ruled rows across the container
   (h3 label column + list from 600, stacked below). The figure takes the h2 size (36 / 64 px) and never wraps: the
   <p> is a wrapping flex row, so "sin IVA" drops under the figure when the plate is too narrow for both. */
.price-block {
  display: grid;
  gap: 8px;
  padding: 24px 16px;
  border: 1px solid var(--line);
  background-color: var(--bg-plate);
}
.price-label {
  color: var(--fg-subtle);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.price-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  color: var(--figure-key);
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-vat {
  color: var(--fg);
  font-size: var(--text-lede);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
}
.price-cols {
  border-bottom: 1px solid var(--line);
}
.price-cols > div {
  padding-block: 20px 24px;
  border-top: 1px solid var(--line);
}
.checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.checklist li {
  display: flex;
  gap: 12px;
  color: var(--fg-muted);
}
.checklist svg {
  margin-top: 4px;
  color: var(--accent);
}

/* Contacto */
.contact-grid {
  display: grid;
  gap: 48px;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
/* ContactTitleBlock (LF-6): the <dl> draws the outer 1 px --line frame, each cell after the first rules its shared
   edge; one column at every width, so each value keeps its own line from 600 px (a 2-up row left Oficina 235 px at
   1440 and broke "36" and "Mallorca" onto lines of their own). Below 600 NBSPs in the markup keep "Can Calafat 36",
   "07199 Palma" and "de Baleares" together. */
.contact-list {
  display: grid;
  border: 1px solid var(--line);
}
.contact-list > div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
}
.contact-list > div + div {
  border-top: 1px solid var(--line);
}
.contact-list dt {
  color: var(--fg-subtle);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* The email may break anywhere rather than leave its cell (only at 320 px, under the 360 px design minimum) */
.contact-list dd {
  font-size: var(--text-lede);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Footer: --bg with a --line top rule; the brand column has a fixed maximum width (polish P3) */
.site-footer {
  padding-block: 64px;
  border-top: 1px solid var(--line);
  background-color: var(--bg);
  color: var(--fg-subtle);
}
.footer-grid {
  display: grid;
  gap: 32px;
}
.footer-brand {
  display: grid;
  gap: 12px;
  justify-items: start;
  max-width: var(--footer-brand-w);
}
.footer-brand img {
  width: 80px;
  height: 48px;
}
.footer-legal-name {
  color: var(--fg-muted);
  font-weight: 500;
}
.footer-title {
  margin-bottom: 8px;
  color: var(--fg-muted);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-nav ul {
  display: grid;
  gap: 8px;
}
.footer-nav a,
.footer-top {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--fg-subtle);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.footer-nav a:hover,
.footer-top:hover {
  color: var(--fg);
  text-decoration-color: var(--accent);
}

/* Sticky call bar (< 1000 px) */
.call-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  /* Opaque: through a translucent bar over content axe cannot resolve the ghost button's contrast (F-CONTRAST) */
  background-color: var(--bg);
}
.call-bar .btn {
  min-height: 52px;
}

/* WhatsApp switch: <html data-whatsapp="off"> hides every .wa link */
[data-whatsapp='off'] .wa {
  display: none;
}
[data-whatsapp='off'] .call-bar {
  grid-template-columns: minmax(0, 1fr);
}

/* 404 layout */
.page-simple {
  min-height: 60vh;
}
.page-simple .lede {
  margin-block: 16px 32px;
}
/* LegalLayout: the dark theme, prose measure 68ch, no call bar (no body padding for it) */
.page-legal {
  padding-bottom: 0;
}
.legal {
  padding-block: var(--section-pad);
}
.prose {
  max-width: 68ch;
  line-height: 1.6;
}
.prose h1 {
  font-size: var(--text-h2);
  line-height: var(--leading-display);
  letter-spacing: -0.03em;
}
/* Legal subsections stay sentence case for long reading */
.prose h2 {
  margin-block: 48px 16px;
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none;
}
.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 16px;
}
.prose ul {
  display: grid;
  gap: 8px;
  padding-left: 1.25em;
  list-style: disc;
}
.prose li::marker {
  color: var(--accent);
}
.prose a {
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.prose a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}
.legal-updated {
  margin-top: 16px;
  color: var(--fg-muted);
  font-size: var(--text-label);
}
.legal-data {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.legal-data > div {
  display: grid;
  gap: 4px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.legal-data dt {
  color: var(--fg-muted);
  font-size: var(--text-label);
  font-weight: 500;
}
.footer-side {
  display: grid;
  gap: 24px;
  align-content: start;
  justify-items: start;
}
.footer-nav a[aria-current='page'] {
  color: var(--fg);
  text-decoration-color: var(--accent);
}

/* Below 1000 px: the bar never covers content or focus */
@media (max-width: 999px) {
  html {
    scroll-padding-bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
  }
}

/* Under the 360 px design minimum (reflow at 320 px), a figure may wrap after its dash rather than overflow */
@media (max-width: 359px) {
  .facts dt {
    white-space: normal;
  }
  /* The Precio figure keeps one line: 36 px needs 254.5 px, the plate leaves 254.5 at 320 */
  .price-value {
    font-size: 2rem;
  }
}

@media (min-width: 600px) {
  :root {
    --text-h2: 4rem;
    --text-figure: 3rem;
    --text-body: 1.0625rem;
    --text-label: 0.8125rem;
  }
  /* One row of 3: equal thirds where the figures fit; a 1fr track never shrinks below its nowrap figure. */
  .facts {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 24px;
  }
  .facts > div:nth-child(3) {
    display: flex;
  }
  .facts > div + div {
    padding-left: 24px;
  }
  /* F-17: the FrameDrawing leaves the h1 + copy rows for the Plate's row, below the FiguresBand. grid-row: 4 counts
     on the DOM order h1, copy, FiguresBand, Plate: a change to that order moves it. From the centre it reaches into
     the right page margin and stops 24 px short of the viewport edge (50% of the sheet plus the margin
     (100vw - 100%) / 2 is 50vw; 100vw includes the reserved scrollbar), so the whole viewBox stays visible. Capped at
     700 px. From 1000 it returns to the h1 + copy rows. */
  .hero-sheet {
    position: relative;
  }
  .hero-drawing {
    --hero-w: min(50vw - 24px, 700px);
    top: auto;
    grid-row: 4;
    align-self: start;
  }
  .phases {
    --phase-num: 4rem;
  }
  .use-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .features {
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  .features li {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    column-gap: 32px;
    padding-bottom: 20px;
  }
  .dialog-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .datos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .price-block {
    padding-inline: 24px;
  }
  .price-cols > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    column-gap: 32px;
  }
  .price-cols .checklist {
    margin-top: 0;
  }
  .contact-list > div {
    padding: 20px 24px 24px;
  }
  .contact-list dd {
    font-size: var(--text-title);
  }
  .footer-grid {
    grid-template-columns: minmax(0, var(--footer-brand-w)) repeat(2, minmax(0, 1fr));
  }
  /* The legal footer has two children (brand, nav): no empty third column. */
  .page-legal .footer-grid {
    grid-template-columns: minmax(0, var(--footer-brand-w)) minmax(0, 1fr);
  }
  .legal-data > div {
    grid-template-columns: var(--legal-term-w) minmax(0, 1fr);
    gap: 16px;
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 700px) {
  .rail {
    --rail-n: 2;
    --rail-gap: 24px;
  }
  .ref-photo {
    height: 240px;
  }
}

@media (min-width: 1000px) {
  :root {
    --section-pad: 96px;
    --header-h: 80px;
  }
  body {
    padding-bottom: 0;
  }
  .brand img {
    width: 80px;
    height: 48px;
  }
  .nav-desktop {
    display: block;
  }
  .header-call {
    display: inline-flex;
  }
  .menu-toggle,
  .call-bar {
    display: none;
  }
  .hero {
    padding-block: 32px 96px;
  }
  /* LF-1 on the 12-column grid: h1 across 12, copy 1-6, Plate in 9-12, FiguresBand across 12 at the foot. The C1 h1
     takes 3 lines at 100 px, so the Plate is capped at 290 px: band bottom: 893.2 of 900 px (Mockup deviation 18).
     Below 1200 the cap is 25vw - 12 px, so the Plate stays at most half as wide as the FrameDrawing (F-17). */
  .hero-sheet {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
  }
  .hero-sheet > h1,
  .facts {
    grid-column: 1 / -1;
  }
  .hero-copy {
    grid-column: 1 / span 6;
  }
  .hero-media {
    grid-column: 9 / span 4;
    grid-row: 2;
    align-self: start;
    justify-self: end;
    width: 100%;
    max-width: 290px;
    margin-top: 0;
  }
  /* Placed in the h1 + copy rows (an absolutely positioned grid item does not size them): it ends where the band
     begins. Width as from 600 (50vw - 24 px, capped at 700 px): its top then stays below the second h1 line. */
  .hero-drawing {
    grid-column: 1 / -1;
    grid-row: 1 / 3;
    bottom: 0;
    opacity: 0.85;
    -webkit-mask-image: linear-gradient(to right, transparent, var(--bg) 30%);
    mask-image: linear-gradient(to right, transparent, var(--bg) 30%);
  }
  .hero-actions {
    display: flex;
  }
  .hero-link {
    display: inline-flex;
    justify-self: start;
  }
  .split-sheet,
  .usos-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    column-gap: 32px;
  }
  /* Option B (D-079): the finish pair sits under the main Plate in columns 1-5, beside the list, which spans rows 2-3.
     Row 3 is the 1fr track, so a list taller than the photo grows row 3 and never opens a gap under the photo. */
  .split-sheet {
    grid-template-rows: auto auto 1fr;
  }
  .split-sheet > .section-head {
    grid-column: 1 / -1;
  }
  .split-sheet > .photo-figure {
    grid-column: 1 / span 5;
    grid-row: 2;
  }
  .split-sheet > .features {
    grid-column: 6 / span 7;
    grid-row: 2 / span 2;
    margin-top: 0;
  }
  .split-sheet > .finishes {
    grid-column: 1 / span 5;
    grid-row: 3;
    margin-top: 16px;
  }
  .usos-layout > div {
    grid-column: 1 / span 7;
  }
  .usos-layout > .usos-figure {
    grid-column: 8 / span 5;
  }
  /* Timeline: 5 columns of 6 subgrid rows (numeral, tick, date, photo, h3, text), so each row aligns across phases;
     the ruler is placed in the tick row and spans the 5 columns. Columns are 171 px at 1000 and 221 from 1248. */
  .phases {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(6, auto);
    gap: 0 24px;
  }
  /* Every item has a definite area: an auto-placed phase would never overlap the ruler's row and would move aside. */
  .phases::before {
    grid-row: 2;
    grid-column: 1 / -1;
    align-self: center;
    justify-self: stretch;
    width: auto;
    height: 2px;
    margin-top: 0;
  }
  .phases li {
    grid-row: 1 / span 6;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    align-items: start;
  }
  .phases li:nth-child(1) {
    grid-column: 1;
  }
  .phases li:nth-child(2) {
    grid-column: 2;
  }
  .phases li:nth-child(3) {
    grid-column: 3;
  }
  .phases li:nth-child(4) {
    grid-column: 4;
  }
  .phases li:nth-child(5) {
    grid-column: 5;
  }
  /* In flow on the tick row; relative so it paints above the ruler. */
  .phases li::before {
    position: relative;
    top: auto;
    left: auto;
    grid-row: 2;
  }
  .phase-num {
    margin-bottom: 16px;
  }
  .phases .phase-date {
    grid-row: 3;
    grid-column: 1;
    margin-top: 12px;
  }
  .phases .photo {
    grid-row: 4;
    max-width: 280px;
  }
  .phases h3 {
    grid-row: 5;
    margin-top: 24px;
  }
  .phases .phase-text {
    grid-row: 6;
  }
  .diagrams {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: auto;
  }
  .rail {
    --rail-n: 3;
  }
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 64px;
  }
}

/* F-17: the hero Plate at most half the FrameDrawing's 50vw - 24 px (photo 25vw - 30, the hero `sizes` slot) */
@media (min-width: 1000px) and (max-width: 1199px) {
  .hero-media {
    max-width: calc(25vw - 12px);
  }
}

/* The wordmark joins the header once the 6 links, the logo and the phone button leave room for it */
@media (min-width: 1200px) {
  .brand-text {
    display: grid;
  }
}

/* Motion (F-16, CSS only). Hero line-draw: every line has pathLength="1" and a non-scaling stroke, so its dash units
   scale with the drawing; a dash and gap of S = --hero-w / 1200 (the display scale) span each whole line, and the
   offset S -> 0 draws it in proportion to progress (D-066). The dash lives only in the keyframes (fill backwards):
   after the end, under reduced motion, in print and without animations the stroke is solid. The arrowheads are
   fills and stay. 1200 is the viewBox width. */
@keyframes frame-draw {
  from,
  to {
    stroke-dasharray: var(--draw-s);
  }
  from {
    stroke-dashoffset: var(--draw-s);
  }
}
@keyframes plate-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes ruler-y {
  from {
    transform: scaleY(0);
  }
}
@keyframes ruler-x {
  from {
    transform: scaleX(0);
  }
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .hero-drawing {
    --draw-s: calc(var(--hero-w) / 1200);
    animation: frame-draw var(--dur-draw) var(--ease) 200ms 1 backwards;
  }
  /* Scroll-driven: Plates outside the hero and the Timeline ruler. Without view() (Firefox) they are static and
     shown. Transforms and opacity only: no layout box moves. */
  @supports (animation-timeline: view()) {
    .section .plate {
      animation: plate-reveal auto var(--ease) both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    /* A Plate holding focus (the video play control) is shown at its end state, not mid-reveal */
    .section .plate:focus-within {
      animation: none;
    }
    .phases::before {
      transform-origin: top;
      animation: ruler-y auto var(--ease) both;
      animation-timeline: view();
      animation-range: entry 20% cover 50%;
    }
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 1000px) {
  @supports (animation-timeline: view()) {
    .phases::before {
      transform-origin: left;
      animation-name: ruler-x;
    }
  }
}

/* Print: everything drawn and shown, whatever the screen had scrolled to */
@media print {
  .hero-drawing,
  .section .plate,
  .phases::before {
    animation: none;
  }
}

/* Reduced motion: colours only, no movement; dialogs fade at --dur-1 */
@media (prefers-reduced-motion: reduce) {
  :where(a, button, [tabindex]) {
    transition-property: color, background-color, border-color, text-decoration-color, box-shadow;
  }
  .btn-primary:active,
  .btn-accent:active,
  .btn-ghost:active,
  .video-play:active {
    transform: none;
  }
  dialog,
  dialog[open],
  .ref-dialog,
  .sheet {
    transform: none;
    transition:
      opacity var(--dur-1) var(--ease),
      overlay var(--dur-1) var(--ease) allow-discrete,
      display var(--dur-1) var(--ease) allow-discrete;
  }
  dialog::backdrop,
  dialog[open]::backdrop {
    transition:
      background-color var(--dur-1) var(--ease),
      overlay var(--dur-1) var(--ease) allow-discrete,
      display var(--dur-1) var(--ease) allow-discrete;
  }
  @starting-style {
    .ref-dialog[open],
    .sheet[open] {
      transform: none;
    }
  }
}
