/* Carlo Ceballos Development Group, by their brand book (Astra&Co, 2024): black, white and Iron #817F7E;
   titles in Hyperspace Race Bold, subtitles in Hyperspace Race Regular, text in Helvetica. Tokens first;
   everything below reads them. */

/* The display face. Hyperspace Race (Swell Type) needs a web licence the client has not bought yet (their
   designer's files are Fontspring demos), so Saira v23 (OFL, the same squared letters, a width axis from
   condensed titles to the wide name) stands in, served from here. Once the licence exists its files go
   first in --font-display and nothing else changes. Every page preloads the latin file. */
@font-face {
  font-family: 'Saira'; font-style: normal; font-weight: 100 900; font-stretch: 50% 125%; font-display: swap;
  src: url(../fonts/saira-latin-ext-v23.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Saira'; font-style: normal; font-weight: 100 900; font-stretch: 50% 125%; font-display: swap;
  src: url(../fonts/saira-latin-v23.woff2) format('woff2');
  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;
}
/* The faces the owner may pick in the panel (Letras: keys type.* on <html>, named in admin/labels.js). A face is
   fetched only once a page uses it. OFL faces from Google Fonts, latin subset (Spanish complete), one variable file
   each. size-adjust evens each one out against the default it replaces, so a pick changes the letters, not the
   layout: a title face against Saira at 78% by the width of a line of capitals (partly: fully, Chivo's capitals
   stood a quarter shorter), a text face against Helvetica/Arial by the width of a line. A single-weight face claims
   every weight, so a bold title never comes out smeared by a synthetic bold. */
@font-face { font-family: 'Archivo Titles'; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; size-adjust: 91%; src: url(../fonts/archivo-latin-v1.woff2) format('woff2'); }
@font-face { font-family: 'Chivo Titles'; font-weight: 100 900; font-display: swap; size-adjust: 82%; src: url(../fonts/chivo-latin-v1.woff2) format('woff2'); }
@font-face { font-family: 'Marcellus Titles'; font-weight: 100 900; font-display: swap; size-adjust: 84%; src: url(../fonts/marcellus-latin-v1.woff2) format('woff2'); }
@font-face { font-family: 'Archivo Text'; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(../fonts/archivo-latin-v1.woff2) format('woff2'); }
@font-face { font-family: 'Figtree Text'; font-weight: 300 900; font-display: swap; size-adjust: 102%; src: url(../fonts/figtree-latin-v1.woff2) format('woff2'); }
@font-face { font-family: 'Onest Text'; font-weight: 100 900; font-display: swap; size-adjust: 97%; src: url(../fonts/onest-latin-v1.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans Text'; font-weight: 100 900; font-display: swap; size-adjust: 95%; src: url(../fonts/worksans-latin-v1.woff2) format('woff2'); }

:root {
  --bg: #000000;
  --surface: #141414; /* a tone step of black, for the parts that follow a black one */
  --ink: #ffffff;
  --muted: #817f7e;   /* Iron: 5.3:1 on black */
  --accent: #ffffff;
  --accent-ink: #000000;
  --field: #ffffff;
  --field-ink: #000000;
  --iron: #817f7e;
  --mark-grey: #817f7e;
  --line: rgba(255, 255, 255, .16);

  --m: clamp(18px, 2.6vw, 32px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(112px, 13vw, 200px);

  /* the owner's two sizes (Letras in the panel; html[data-titles-size] and [data-text-size] below): every title's size
     is multiplied by --fs-title, every other word's by --fs-text. Not multiplied: the lines fitted to their width
     (--fit: the contact e-mail, the claim's band) and the loader's figures */
  --fs-title: 1;
  --fs-text: 1;
  --t-xl: calc(clamp(52px, 10.5vw, 168px) * var(--fs-title));
  --t-l: calc(clamp(34px, 4.2vw, 64px) * var(--fs-title));
  --t-m: calc(clamp(19px, 1.5vw, 24px) * var(--fs-text));
  --t-s: calc(17px * var(--fs-text));
  --t-xs: calc(15px * var(--fs-text));

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  /* Helvetica is on every Apple device; Arial has its widths elsewhere. Nothing to download */
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Saira', 'Helvetica Neue', Arial, sans-serif;
}
/* the owner's picks (the panel's Letras writes these attributes on <html>; the HTML ships the defaults, and the head
   script lays a published pick on before the first paint). A face that fails to load falls back to the default. */
html[data-titles-font="archivo"] { --font-display: 'Archivo Titles', 'Saira', 'Helvetica Neue', Arial, sans-serif; }
html[data-titles-font="chivo"] { --font-display: 'Chivo Titles', 'Saira', 'Helvetica Neue', Arial, sans-serif; }
html[data-titles-font="marcellus"] { --font-display: 'Marcellus Titles', 'Saira', 'Helvetica Neue', Arial, sans-serif; }
html[data-text-font="archivo"] { --font: 'Archivo Text', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
html[data-text-font="figtree"] { --font: 'Figtree Text', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
html[data-text-font="onest"] { --font: 'Onest Text', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
html[data-text-font="worksans"] { --font: 'Work Sans Text', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
html[data-titles-size="90"] { --fs-title: .9; }
html[data-titles-size="95"] { --fs-title: .95; }
html[data-titles-size="110"] { --fs-title: 1.1; }
html[data-titles-size="120"] { --fs-title: 1.2; }
html[data-text-size="90"] { --fs-text: .9; }
html[data-text-size="95"] { --fs-text: .95; }
html[data-text-size="110"] { --fs-text: 1.1; }
html[data-text-size="120"] { --fs-text: 1.2; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* no scroll anchoring: when the hero grows into the flight (js/flight.js) it pushed a reloaded page 2159 px down, and the
   flight flew backwards from the plan. The scrollbar's room is kept while the viewer or the menu hold the page still,
   or the page behind them jumped 15 px sideways (Windows scrollbars) */
html { overflow-anchor: none; scrollbar-gutter: stable; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-s);
  line-height: 1.55;
  letter-spacing: .005em;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
/* selected words: Iron, see-through, letters unchanged. The brand's inverted block (white under black letters) turned a
   selected title into white boxes that cut its lines (Jose, 2026-11-04: "I don't like the white background") */
::selection { background: rgba(129, 127, 126, .5); }
/* the hero is a film: a drag or a long press on it never selects its words (the editor, html.cms-edit, still can) */
html.js .flight { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
[tabindex='-1']:focus { outline: none; } /* a section focused by an in-page link is a landing point, not a control */

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: var(--m); top: -80px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px;
}
.skip:focus { top: var(--m); }

.wrap { padding-inline: var(--m); }

/* the brand's two display styles: titles condensed bold in capitals, subtitles regular in spaced capitals */
.h-l, .chapter-title, .menu nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 78%;
  text-transform: uppercase;
}
.h-l {
  font-size: var(--t-l);
  line-height: .95;
  letter-spacing: 0;
  text-wrap: balance;
}

/* Buttons: square corners, one fill, everywhere */
/* a label that has to break (a narrow column, the owner's largest text on a phone) breaks into two centred, even
   lines inside a taller button, never one word left alone on a line: "Hablemos de un proyecto así" did at 1024 px */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 8px 26px;
  text-align: center; line-height: 1.25; text-wrap: balance;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 600; font-stretch: 100%;
  letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--mark-grey); color: var(--accent-ink); }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 44px; padding: 6px 20px; font-size: var(--t-xs); }

/* ---------- Bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 40px;
  padding: 18px var(--m);
  color: var(--ink);
  transition: transform .5s var(--ease), background-color .4s var(--ease);
}
.bar.is-solid { background: var(--bg); }
.bar.is-hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; margin-right: auto; }
/* their imagotipo, inverted version (img/logo-inv-v1.svg, traced from their brand book's own file) */
.brand-logo { width: auto; height: 46px; transition: filter .4s var(--ease); }
/* over the hero's photograph, the monochrome white version (their book's cover): iron would vanish in the sky */
body:has(.flight) .bar:not(.is-solid) .brand-logo { filter: brightness(0) invert(1); }
.brand-mid { fill: var(--mark-grey); }
.bar-nav {
  display: flex; gap: 32px;
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.bar-nav a { position: relative; padding: 10px 0; }
.bar-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.bar-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.bar-menu, .menu-close {
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  min-height: 44px; padding: 0 4px;
}
.bar-menu { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 96px var(--m) 32px;
  overflow-y: auto; overscroll-behavior: contain;          /* the last resort on a very short screen (keys reach it) */
}
.menu[hidden] { display: none; }
/* it fades in, its words rising one after another; a link fades the words first, the page jumps under the black,
   and the black lifts off the section (js/site.js, leaveMenuTo) */
.menu { transition: opacity .3s var(--ease); }
.menu nav a, .menu-close { transition: opacity .35s var(--ease), transform .55s var(--ease); }
.menu nav a:nth-child(2) { transition-delay: 35ms; }
.menu nav a:nth-child(3) { transition-delay: 70ms; }
.menu nav a:nth-child(4) { transition-delay: 105ms; }
.menu-close { transition-delay: 140ms; }
.menu.is-shut, .menu.is-shut nav a, .menu.is-shut .menu-close { opacity: 0; transition: none; }
.menu.is-shut nav a { transform: translateY(18px); }
.menu.is-going nav a, .menu.is-going .menu-close { opacity: 0; transition: opacity .2s var(--ease); transition-delay: 0ms; }
.menu.is-lifting { opacity: 0; transition-duration: .45s; pointer-events: none; }
.menu nav { display: flex; flex-direction: column; gap: 8px; }
.menu nav a { font-size: calc(clamp(48px, 14vw, 80px) * var(--fs-title)); line-height: 1; }
.menu-close { align-self: flex-start; }
/* a short screen (a phone held sideways: Cerrar was below it): the four links and Cerrar fit from 360 px tall, at the
   largest type pick too */
@media (max-height: 560px) {
  .menu { padding-top: 76px; }
  .menu nav a { font-size: calc(clamp(28px, 10vh, 80px) * var(--fs-title)); }
}

/* ---------- Hero: the flight (js/flight.js). Default: four stacked full-screen chapters ---------- */
.flight { position: relative; background: var(--bg); color: var(--ink); }
.flight-media, .rail { display: none; }
.chapter {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate;
}
.chapter-frame, .chapter-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.chapter::after, html.flight-on .flight-stage::after {
  /* neutral scrim under the words and the bar, over the photograph: the one allowed gradient */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .84) 0%, rgba(0, 0, 0, .46) 30%, rgba(0, 0, 0, 0) 56%), /* taste-skill-ignore */
    linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 160px); /* taste-skill-ignore */
}
.chapter-copy { padding: 140px var(--m) clamp(48px, 10vh, 112px); }
.chapter-kicker {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.chapter-kicker span:first-child {
  padding-right: 14px; border-right: 1px solid rgba(255, 255, 255, .45);
  font-variant-numeric: tabular-nums; letter-spacing: .06em;
}
.chapter-title {
  max-width: 10em; /* two balanced lines: "Diseñamos espacios / que inspiran" */
  font-size: calc(clamp(42px, 6vw, 104px) * var(--fs-title)); line-height: .92;
  text-wrap: balance;
}
.chapter-text { margin-top: 24px; max-width: 36ch; font-size: var(--t-m); line-height: 1.45; color: rgba(255, 255, 255, .88); }
.chapter-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.btn-line:hover { background: var(--ink); color: var(--bg); }

.hero-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.hero-line { max-width: 36ch; font-size: var(--t-s); line-height: 1.45; }
.hero-line strong { font-weight: 600; }
/* the first stop's headline: a .chapter-title like the four after it, held to two lines ("PROYECTOS / QUE INSPIRAN")
   so it stays left of the tower, which stands in the picture's middle third on every landscape screen */
.hero-title { max-width: 7em; margin-bottom: clamp(20px, 2.4vw, 36px); }
.hero-title > span { display: block; }
.hero-side { text-align: right; max-width: 30ch; font-size: var(--t-xs); line-height: 1.45; color: rgba(255, 255, 255, .86); }
.hero-hint { display: none; }
.cta-short { display: none; }

/* ---- the flight: pinned stage, one film, the chapters stacked over it ---- */
html.flight-on .flight { height: var(--flight-h, 640vh); }
html.flight-init .chapter-frame, html.flight-init .chapter-copy, html.flight-init .chapter-copy > * { transition: none !important; }
html.flight-on .flight-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; isolation: isolate; }
html.flight-on .flight-media { display: block; position: absolute; inset: 0; }
/* the film turns on at once under the still on screen (the same frame), and the still fades off it: a fade of
   the film itself let the dark stage show through both for half a second */
html.flight-on .flight-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
}
html.flight-on .flight.has-video .flight-video.is-leg { opacity: 1; }   /* one video per leg: the one on screen (js/flight.js) */
/* a visitor ahead of a leg still coming: the film stays under the stop's still while that fades in (.9s), instead of
   going at once and the still rising out of the dark stage */
html.flight-on .flight:not(.has-video) .flight-video.is-leg { transition: opacity 0s .9s; }
html.flight-on .flight-stage::after { z-index: 1; }
html.flight-on .flight-chapters { position: absolute; inset: 0 0 auto; height: 100svh; }
html.flight-on .chapter { position: absolute; inset: 0; min-height: 0; isolation: auto; overflow: visible; }
html.flight-on .chapter::after { content: none; }
html.flight-on .chapter-frame, html.flight-on .chapter-frame img { z-index: 0; }
html.flight-on .chapter-frame { opacity: 0; transition: opacity .9s var(--ease); }
html.flight-on .chapter.is-frame .chapter-frame { opacity: 1; }
html.flight-on .flight.has-video .chapter-frame { opacity: 0; transition-duration: .25s; }
html.flight-on .flight.has-video.at-stop .chapter.is-frame .chapter-frame { opacity: 1; transition-duration: .5s; }
/* Under the loader the film has the link to itself: the later stops' stills and the plan are not laid out, so their
   lazy pictures are not fetched, until .stills-in (js/flight.js: the film is in, there is none, or the visitor moves;
   js/loader.js: the loader lifts). html.motion (the head script) is the visit the flight runs for, set before the
   first layout: under flight-on alone the browser's own lazy loading had already asked for them. On a phone they took
   2.2 MB of the link while the 17 MB film came in (2026-11-10). */
html.motion .flight:not(.stills-in) .chapter:not(.chapter-first) .chapter-frame,
html.motion .flight:not(.stills-in) .plan-img { display: none; }
html.flight-on .chapter-copy { position: relative; z-index: 2; visibility: hidden; }
html.flight-on .chapter-copy > * { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .9s var(--ease); }
html.flight-on .chapter.is-on .chapter-copy { visibility: visible; }
html.flight-on .chapter.is-on .chapter-copy > * { opacity: 1; transform: none; }
html.flight-on .chapter.is-on .chapter-copy > :nth-child(2) { transition-delay: .08s; }
html.flight-on .chapter.is-on .chapter-copy > :nth-child(3) { transition-delay: .16s; }
html.flight-on .chapter.is-on .chapter-copy > :nth-child(4) { transition-delay: .24s; }
html.flight-on .chapter:not(.is-on) .chapter-copy { transition: visibility 0s .7s; }
html.flight-on .hero-hint { display: inline; }

/* the rail: where the visitor is in the flight, and a way to jump */
html.flight-on .rail { display: block; position: absolute; z-index: 3; right: var(--m); top: 50%; transform: translateY(-50%); }
.rail ol { display: grid; gap: 22px; }
.rail button {
  display: flex; align-items: center; gap: 14px; margin-left: auto; padding: 6px 0;
  font-family: var(--font-display); font-size: calc(13px * var(--fs-text)); font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  opacity: .58; text-shadow: 0 1px 12px rgba(0, 0, 0, .6);
  transition: opacity .4s var(--ease);
}
.rail button em { font-style: normal; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.rail button span { transform: translateX(6px); transition: transform .5s var(--ease); }
.rail button:hover, .rail button.is-on { opacity: 1; }
.rail button.is-on span { transform: none; }
.rail-track { position: absolute; right: -18px; top: 6px; bottom: 6px; width: 1px; background: rgba(255, 255, 255, .25); }
.rail-track i { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(var(--p, 0)); }
.flight-load {
  position: absolute; z-index: 3; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--ink); transform-origin: left; transform: scaleX(var(--load, 0));
  opacity: .7; transition: opacity .6s var(--ease);
}
.flight-load.is-done { opacity: 0; }

/* ---------- The plan (v26): the hero's last chapter, the typical floor; its rooms open their renders (js/plan.js) ---------- */
/* Without the flight (no script, reduced motion): the plan above the words, a screen of its own */
.chapter-plan { justify-content: center; gap: 32px; padding: 104px var(--m) 64px; background: var(--bg); }
.chapter-plan .chapter-copy { padding: 0; }
.chapter-plan .chapter-title { font-size: calc(clamp(34px, 3.8vw, 66px) * var(--fs-title)); }
.plan-slot { position: relative; }
.plan-map { position: relative; margin: 0 auto; width: min(100%, 900px, calc(100vh - 200px)); width: min(100%, 900px, calc(100svh - 200px)); aspect-ratio: 3200 / 3214; }
/* the hint and the area buttons only where js/plan.js runs (without it they would promise what nothing does) */
html:not(.plan-on) .plan-hint, html:not(.plan-on) .plan-areas { display: none; }
.plan-img { width: 100%; height: 100%; }
.plan-hots { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plan-room { fill: rgba(255, 255, 255, 0); pointer-events: all; cursor: pointer; }
.plan-shade { fill: rgba(0, 0, 0, .52); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.plan-ring { fill: none; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.plan-map.has-room .plan-shade, .plan-map.has-room .plan-ring { opacity: 1; }
.plan-dots { position: absolute; inset: 0; pointer-events: none; }
/* a marker on each room with a render: a white dot in a soft ring, the room's button */
.plan-dot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: auto; }
.plan-dot::before {
  content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .3), 0 2px 10px rgba(0, 0, 0, .45);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.plan-dot:hover::before, .plan-dot.is-on::before { transform: scale(1.3); box-shadow: 0 0 0 6px rgba(255, 255, 255, .45), 0 2px 12px rgba(0, 0, 0, .5); }
.plan-dot:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.plan-tip {
  position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 12px));
  padding: 9px 12px 10px; background: #fff; color: #000; white-space: nowrap; pointer-events: none;
  font-family: var(--font-display); font-size: calc(12px * var(--fs-text)); line-height: 1.3; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; transition: opacity .25s var(--ease);
}
.plan-tip strong { display: block; font-weight: 700; }
.nocaps { text-transform: none; }
.plan-tip > span { display: block; font-weight: 500; color: #3d3d3d; }
.plan-tip.is-below { transform: translate(-50%, 16px); }
.plan-tip.is-start { transform: translate(-24px, calc(-100% - 12px)); }
.plan-tip.is-end { transform: translate(calc(-100% + 24px), calc(-100% - 12px)); }
.plan-tip.is-below.is-start { transform: translate(-24px, 16px); }
.plan-tip.is-below.is-end { transform: translate(calc(-100% + 24px), 16px); }
.plan-map.has-room .plan-tip { opacity: 1; }
.plan-facts { margin-top: 18px; max-width: 42ch; font-size: var(--t-xs); line-height: 1.45; color: rgba(255, 255, 255, .72); }
.plan-hint { margin-top: 10px; max-width: 36ch; font-size: var(--t-s); line-height: 1.45; }
.plan-areas { margin-top: 22px; }
.plan-areas-label { margin-bottom: 10px; font-family: var(--font-display); font-size: calc(12px * var(--fs-text)); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.plan-areas ul { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-areas button {
  min-height: 40px; padding: 0 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42); white-space: nowrap;
  font-family: var(--font-display); font-size: calc(13px * var(--fs-text)); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.plan-areas button:hover { background: var(--ink); color: var(--bg); }
.chapter-plan .chapter-actions { margin-top: 26px; }

/* In the flight: the words in the left column, the plan to their right; it is shown once the roof has opened and the
   camera rests on it (.at-plan): till then the plan-stage draws it */
html.flight-on .chapter-plan { padding: 0; gap: 0; background: none; justify-content: flex-end; }
html.flight-on .chapter-plan .plan-slot {
  position: absolute; z-index: 2; top: 96px; bottom: max(5vh, 40px);
  left: calc(var(--m) + var(--plan-copy, min(34vw, 540px)) + 40px); right: calc(var(--m) + 170px);
}
html.flight-on .flight:not(.at-plan) .chapter-plan .plan-dot, html.flight-on .flight:not(.at-plan) .chapter-plan .plan-room { pointer-events: none; }
/* At rest (.at-plan) the chapter's own plan, on the stage's to the pixel, takes the clicks. Leaving, its picture goes at
   once (the stage's, under it, is the same and starts to move) and the markers fade on their own, as they came in */
html.flight-on .chapter-plan .plan-map { position: absolute; width: auto; margin: 0; aspect-ratio: auto; visibility: hidden; pointer-events: none; transition: visibility 0s .35s; }
html.flight-on .chapter-plan .plan-img { visibility: hidden; opacity: 0; transition: opacity .15s var(--ease), visibility 0s .15s; }
html.flight-on .flight.at-plan .chapter-plan .plan-map { visibility: visible; pointer-events: auto; transition: none; }
/* it fades in over the stage's (drawn a little softer by the moving layer): a focus, not a jump */
html.flight-on .flight.at-plan .chapter-plan .plan-img { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
html.flight-on .chapter-plan .plan-dots { opacity: 0; transition: opacity .3s var(--ease); }
html.flight-on .flight.at-plan .chapter-plan .plan-dots { opacity: 1; transition: opacity .6s var(--ease) .15s; }
html.flight-on .chapter-plan .chapter-copy { width: var(--plan-copy, min(34vw, 540px)); padding: 96px 0 clamp(40px, 8vh, 96px) var(--m); pointer-events: none; }
html.flight-on .chapter-plan .chapter-copy > * { pointer-events: auto; }
/* the words wait until the camera has nearly settled on the plan (.plan-settled): a plan that looked finished beside
   them could not be clicked yet, and on a phone, where they sit under it, they crossed it. They leave quicker. */
html.flight-on .flight:not(.plan-settled) .chapter-plan .chapter-copy { visibility: hidden; transition: visibility 0s .35s; }
html.flight-on .flight:not(.plan-settled) .chapter-plan .chapter-copy > * { opacity: 0; transform: translateY(28px); transition-duration: .35s; transition-delay: 0s; }
/* the hero's scrim is for words over a photograph: over the dark plan it only greys the plan, so it goes once the city
   has gone dark (js/flight.js; lifted sooner, the city's lower edge brightened before it darkened) */
html.flight-on .flight.in-plan .flight-stage::after { opacity: var(--plan-scrim, 1); }

/* the roof opening onto the plan (js/flight.js): laid out in the film frame's pixels, moved as one camera */
.plan-stage { display: none; }
html.flight-on .plan-stage { display: block; position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); visibility: hidden; opacity: 0; pointer-events: none; }
/* painted, unseen, from the lounge's stop on (.is-pre): the first time it was shown it took 2-5 frames to decode and
   draw its 4K pictures, and the screen was black meanwhile */
html.flight-on .plan-stage.is-pre { visibility: visible; opacity: .001; }
html.flight-on .plan-stage.is-on { visibility: visible; opacity: 1; }
/* without the film the lounge's still is under it: a cross-fade, both ways */
html.flight-on .flight:not(.has-video) .plan-stage { transition: opacity .9s var(--ease); }
.ps-cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.ps-cam > *, .ps-out > * { position: absolute; display: block; }
.ps-hole, .ps-out, .ps-city, .ps-shade, .ps-half { left: 0; top: 0; width: 100%; height: 100%; }
.ps-city, .ps-plan, .ps-half img { max-width: none; }
.ps-half img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* under the roof: a slab's dark (black, it cut stepped notches around the plan), gone to black with the city */
.ps-hole { background: #161616; will-change: opacity; }
/* the city around the roof (the roof cut out of it), over the plan: its balconies reach past the roof's outline in
   places. Each changing layer is its own: inside the camera's layer a change repainted the 4K pictures */
.ps-out { will-change: opacity; }
/* the city and the plan their own layers, as the halves are: drawn inside the camera's layer the city came out 30%
   softer than the film it takes over from, the plan 25% softer than the chapter's own (Chrome, 1920 x 1080) */
.ps-city, .ps-plan { will-change: transform; }
.ps-dark { inset: -2px; background: var(--bg); opacity: 0; will-change: opacity; }
/* each half's shadow lies under both halves (a drop-shadow on the half fell on its neighbour: a dark seam down the
   roof) and comes in as they part */
.ps-shade { filter: blur(20px); opacity: 0; will-change: transform, opacity; }
.ps-shade i { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); transform: translateY(22px); }
.ps-half { will-change: transform; }

/* ---------- The room viewer (js/plan.js): one render full screen, its name, the way to the next ---------- */
.viewer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); overflow: hidden;
  opacity: 0; transition: opacity .3s var(--ease);
  z-index: 70;                                               /* opened in place (no showModal): over the bar (50) */
}
.viewer.is-in { opacity: 1; }
.viewer:not([open]) { display: none; } /* where <dialog> is unknown (Safari before 15.4) it would lie, unseen, over the page */
.viewer::backdrop { background: transparent; }
html.viewer-open { overflow: hidden; }
.viewer-frame { position: absolute; inset: 76px var(--m) 128px; touch-action: pan-y pinch-zoom; }
.viewer-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; opacity: 0; transition: opacity .45s var(--ease); }
.viewer-img.is-on { opacity: 1; }
.viewer-img:not(.is-on) { pointer-events: none; } /* the one on show takes the click (the owner's editor selects it) */
.viewer-bar { position: absolute; left: var(--m); right: var(--m); bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.viewer-kicker { font-family: var(--font-display); font-size: calc(12px * var(--fs-text)); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.viewer-title { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-stretch: 78%; text-transform: uppercase; font-size: calc(clamp(26px, 3vw, 46px) * var(--fs-title)); line-height: .95; }
.viewer-nav { display: flex; align-items: center; gap: 10px; }
.viewer-count { margin-right: 10px; font-family: var(--font-display); font-size: calc(13px * var(--fs-text)); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.viewer-btn { display: grid; place-items: center; width: 52px; height: 52px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); transition: background-color .3s var(--ease), color .3s var(--ease); }
.viewer-btn[hidden] { display: none; }
.viewer-btn:hover { background: var(--ink); color: var(--bg); }
.viewer-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.viewer-close {
  position: absolute; top: 16px; right: var(--m); min-height: 44px; padding: 0 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
  font-family: var(--font-display); font-size: var(--t-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.viewer-close:hover { background: var(--ink); color: var(--bg); }

/* portrait screens (the phone film): the plan on top, the words under it */
@media (max-aspect-ratio: 4/5) {
  html.flight-on .chapter-plan .plan-slot { position: relative; inset: auto; flex: 1 1 auto; min-height: 140px; margin: 78px var(--m) 16px; }
  html.flight-on .chapter-plan .chapter-copy { width: auto; padding: 0 var(--m) 40px; }
  html.flight-on .chapter-plan .chapter-text, html.flight-on .chapter-plan .plan-facts { display: none; }
  .chapter-plan .chapter-title { font-size: calc(clamp(28px, 7.6vw, 48px) * var(--fs-title)); }
  .plan-areas ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--m)); padding-right: var(--m); }
  .plan-areas ul::-webkit-scrollbar { display: none; }
  /* the words kept short, so the plan gets the screen's width */
  html.flight-on .chapter-plan .chapter-kicker { margin-bottom: 12px; }
  html.flight-on .chapter-plan .plan-hint { margin-top: 8px; font-size: var(--t-xs); }
  html.flight-on .chapter-plan .plan-areas { margin-top: 14px; }
  html.flight-on .chapter-plan .plan-areas-label { display: none; }
  html.flight-on .chapter-plan .chapter-actions { margin-top: 16px; flex-wrap: nowrap; }
  html.flight-on .chapter-plan .chapter-actions .btn { min-height: 48px; padding: 4px 12px; }
}
@media (max-aspect-ratio: 4/5) and (min-width: 768px) {
  html.flight-on .chapter-plan .plan-slot { margin-right: calc(var(--m) + 150px); }
  /* a portrait tablet's side rail stood over the plan while the camera pulled back from it: away till it rests */
  html.flight-on .rail { transition: opacity .4s var(--ease); }
  html.flight-on .flight.in-plan:not(.at-plan) .rail { opacity: 0; pointer-events: none; }
}
/* short phones: the plan gets the height the hint took (375 x 667: the plan was 223 px, its markers touching) */
@media (max-aspect-ratio: 4/5) and (max-height: 700px) {
  html.flight-on .flight .chapter.chapter-plan .chapter-copy { padding-bottom: 64px; }
  html.flight-on .chapter-plan .plan-hint { display: none; }
  html.flight-on .chapter-plan .plan-slot { margin-top: 70px; }
}
@media (max-width: 767px) {
  .plan-dot { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .plan-dot::before { inset: 9px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .3), 0 2px 8px rgba(0, 0, 0, .45); }
  .viewer-frame { inset: 64px 0 152px; }
  .viewer-bar { flex-direction: column; align-items: stretch; gap: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .viewer-count { margin-right: auto; }
}
/* laptop screens (621-800 px tall): the long paragraph goes, or the words reached under the bar */
@media (min-aspect-ratio: 4/5) and (max-height: 800px) {
  html.flight-on .chapter-plan .chapter-text { display: none; }
}
/* short landscape screens: the words that fit */
@media (min-aspect-ratio: 4/5) and (max-height: 620px) {
  html.flight-on .chapter-plan .chapter-text, html.flight-on .chapter-plan .plan-facts, html.flight-on .chapter-plan .plan-areas-label { display: none; }
  html.flight-on .chapter-plan .chapter-copy { padding-top: 72px; }
  .chapter-plan .chapter-title { font-size: calc(clamp(26px, 3vw, 40px) * var(--fs-title)); }
}
/* a phone held sideways: the rail as the phone's ticks along the bottom (its side column took the plan's room), the
   words in one short column (the kicker and the title sat above the screen), the plan beside them */
@media (min-aspect-ratio: 4/5) and (max-height: 500px) {
  html.flight-on .rail { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); right: auto; left: calc(var(--m) + env(safe-area-inset-left)); transform: none; opacity: 0; transition: opacity .5s var(--ease); }
  html.flight-on .flight.is-flying .rail { opacity: 1; }
  .rail ol { display: flex; gap: 8px; }
  .rail button { padding: 10px 0; }
  .rail button span { display: none; }
  .rail button em { display: block; width: 30px; padding-top: 8px; border-top: 1px solid currentColor; text-align: left; font-size: calc(12px * var(--fs-text)); }
  .rail-track { display: none; }
  html.flight-on .chapter:not(.chapter-first) .chapter-copy { padding-bottom: 72px; }
  html.flight-on .flight { --plan-copy: max(36vw, 280px); }
  html.flight-on .flight .chapter.chapter-plan .chapter-copy { padding: 60px 0 64px calc(var(--m) + env(safe-area-inset-left)); }
  html.flight-on .chapter-plan .plan-slot { top: 60px; bottom: 16px; left: calc(var(--m) + env(safe-area-inset-left) + var(--plan-copy) + 24px); right: calc(var(--m) + env(safe-area-inset-right)); }
  html.flight-on .chapter-plan .chapter-kicker { margin-bottom: 8px; }
  .chapter-plan .chapter-title { font-size: calc(22px * var(--fs-title)); max-width: none; }
  html.flight-on .chapter-plan .plan-hint { display: none; }
  html.flight-on .chapter-plan .plan-areas { margin-top: 12px; }
  html.flight-on .chapter-plan .plan-areas ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  html.flight-on .chapter-plan .plan-areas ul::-webkit-scrollbar { display: none; }
  html.flight-on .chapter-plan .chapter-actions { margin-top: 12px; flex-wrap: nowrap; gap: 8px; }
  html.flight-on .chapter-plan .chapter-actions .btn { min-height: 44px; padding: 4px 12px; }
}
/* the viewer on a phone held sideways: the picture the screen's full height, its words and arrows in a column beside
   it (the bands above and below left the picture 144-186 px tall: smaller than upright) */
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
  .viewer-frame { inset: 0 calc(var(--m) + env(safe-area-inset-right) + 196px) 0 env(safe-area-inset-left); }
  .viewer-bar { left: auto; right: calc(var(--m) + env(safe-area-inset-right)); top: 76px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 180px; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 14px; }
  .viewer-title { font-size: calc(22px * var(--fs-title)); }
  .viewer-count { margin-right: auto; }
  .viewer-close { right: calc(var(--m) + env(safe-area-inset-right)); }
}

/* ---------- Intro: words in the left half, four facts two by two in the right, two pictures below ---------- */
.intro { padding: var(--section) 0 clamp(96px, 9vw, 140px); }
.intro-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
/* the title tops the first row of facts; the note's last line sits level with the second */
.intro-copy {
  grid-column: 1 / span 6;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.intro-note { max-width: 46ch; }
/* two equal columns in the right half: each fact spans three of the twelve */
.facts {
  grid-column: 7 / span 6;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4.5vh, 48px) var(--gap);
}
.facts > div { container-type: inline-size; }
.facts dt {
  font-family: var(--font-display); font-weight: 400; font-stretch: 100%; line-height: 1; text-transform: uppercase;
  font-size: var(--t-l);
  font-size: min(var(--t-l), 18cqi); /* "Ley 189-11" is the widest figure; it sets the size for all four */
  letter-spacing: 0;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.facts dd { margin-top: 16px; font-size: var(--t-xs); color: var(--muted); max-width: 30ch; }
.intro-pics {
  margin-top: clamp(80px, 8vw, 120px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap);
}
.intro-pic, .about-pic { overflow: hidden; }
.intro-pic img, .about-pic img { width: 100%; object-fit: cover; }
.intro-pic img { aspect-ratio: 4 / 3; }
.intro-pic-a img { object-position: 35% 20%; }
.intro-pic-b img { object-position: 50% 40%; }
/* desktop: words, facts and pictures fill one screen, the pictures taking what the words leave;
   the tail is dark ground below it, so a scroll that stops a little low never shows the white band of the claim */
@media (min-width: 1024px) {
  .intro {
    --tail: clamp(64px, 7vw, 120px);
    height: calc(max(100svh, 600px) + var(--tail));
    display: flex; flex-direction: column;
    padding: clamp(72px, 10vh, 112px) 0 calc(var(--m) + var(--tail));
  }
  .intro-pics { margin-top: clamp(40px, 6vh, 72px); }
  .intro-pics { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .intro-pic img { aspect-ratio: auto; height: 100%; }
}
figcaption { margin-top: 12px; font-size: var(--t-xs); color: var(--muted); }

/* ---------- Lema: the claim, still ---------- */
/* a white page of the brand book: the claim in the logo's second line (light, spaced capitals), its two phrases
   parted by the logo's iron chevron. It stands still on one line fitted between the margins (Jose, 2026-11-14: it
   ran edge to edge at title size). The row shrinks to its words, so js/site.js fitAll measures the words themselves;
   phones stack the two phrases, fitted by the longer one */
.lema {
  overflow: hidden; padding: clamp(28px, 3vw, 48px) 0;
  background: var(--ink); color: var(--bg);
}
.lema-line {
  padding: 0 var(--m); text-align: center;
  font-family: var(--font-display); font-size: var(--fit, 2.6vw); font-weight: 200; font-stretch: 100%; line-height: 1;
  letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
.lema-row { display: inline-flex; align-items: center; gap: .45em; vertical-align: top; }
/* the tracking after each phrase's last letter taken back, so the chevron sits midway and the line centres true */
.lema-row > span { margin-right: -.06em; }
.lema-row i {
  display: block; width: .5em; height: .283em; flex: none;
  background: var(--iron);
  clip-path: polygon(0 52.2%, 24.2% 0, 100% 0, 78.8% 52.2%, 96.3% 100%, 20% 100%);
}
@media (max-width: 767px) {
  .lema-line { font-size: var(--fit, 5.4vw); }
  .lema-row { flex-direction: column; gap: .42em; }
}

/* ---------- Services: six names, the chosen one's photo and sentence (js/site.js) ---------- */
/* A dark room lit by the chosen photo: the same picture, blurred to its colours, fills the section behind the words
   and changes with the choice (js/site.js adds .svc-glow; Jose, 2026-11-14: not the grey field). White words, the
   names not chosen at 45%. From 1024 px one screen split at column 7: the title, the note and the six names in
   the left half; the chosen service's photo, its stage and deliverable, one sentence and its button in the right
   half, the photo's top level with the title's, the button's foot level with the last name's. A name chooses when the
   pointer rests on it (a pass across the list on the way to the button changes nothing), on a click or on focus. Below 1024 px each name opens its own photo and sentence under it. Without script (no html.js, no
   html.cms-edit), every service open, one under the other. */
.process {
  position: relative; isolation: isolate; overflow: hidden;
  background: #000000; color: var(--ink); padding: var(--section) 0;
}
.svc-grid { position: relative; z-index: 1; }
.svc-note { margin-top: 28px; max-width: 46ch; }
.svc-list { margin-top: 48px; }
.svc-head { font: inherit; }
.svc-name {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 14px 0; text-align: left; color: #ffffff;
  font-family: var(--font-display); font-weight: 700; font-stretch: 78%; text-transform: uppercase;
  font-size: calc(clamp(28px, 2.9vw, 54px) * var(--fs-title)); line-height: 1;
  transition: color .35s var(--ease);
}
.svc-name > span { display: block; text-wrap: balance; transition: transform .5s var(--ease); }
/* the logo's chevron, turned to point at the photo, marks the chosen name */
.svc-name::before, .svc-meta i {
  content: ''; flex: none; width: .5em; height: .283em; background: currentColor;
  clip-path: polygon(100% 52.2%, 75.8% 0, 0 0, 21.2% 52.2%, 3.7% 100%, 80% 100%);
}
.svc-name::before { display: none; }
.svc-pic { overflow: hidden; background: #000000; }
.svc-pic img { width: 100%; height: 100%; object-fit: cover; }
.svc-text { padding-top: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.svc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--t-xs); color: rgba(255, 255, 255, .72); }
.svc-meta i { font-size: 18px; display: inline-block; }
.svc-detail { margin-top: 12px; max-width: 52ch; font-size: var(--t-m); line-height: 1.35; }
.svc-cta { margin-top: 28px; }

/* no script: everything open, the photos wide and short */
.svc + .svc { margin-top: 32px; }
.svc-pic img { aspect-ratio: 16 / 9; }
@media (min-width: 768px) { html:not(.js):not(.cms-edit) .svc-list { max-width: 880px; } }

/* with script: the names are controls */
:is(.js, .cms-edit) .svc + .svc { margin-top: 0; }
:is(.js, .cms-edit) .svc-name { cursor: pointer; color: rgba(255, 255, 255, .45); }
:is(.js, .cms-edit) .svc-name::before { display: block; }
:is(.js, .cms-edit) .svc.is-open .svc-name { color: #ffffff; }
@media (hover: hover) { :is(.js, .cms-edit) .svc-name:hover { color: #ffffff; } } /* a phone's tap would leave it white */

/* the light: every photo blurred far past its edges (no dark rim), the chosen one fading in over the last, then a
   veil that keeps the words on near-black and lets the colour through around the photo. js/site.js bakes the blur
   into a small picture (.is-baked, stretched to the box); only where a canvas cannot filter is it the photo with the
   CSS blur */
.svc-glow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.svc-glow > * {
  position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; max-width: none;
  opacity: 0; visibility: hidden; transition: opacity 0s 1.1s, visibility 0s 1.1s;
}
.svc-glow > :not(.is-baked) { object-fit: cover; filter: blur(72px) saturate(1.5); }
.svc-glow > .is-on { z-index: 1; opacity: 1; visibility: visible; transition: opacity 1.1s var(--ease); }
.svc-glow::after { content: ''; position: absolute; inset: 0; z-index: 2; background: rgba(0, 0, 0, .6); }
@media (min-width: 1024px) {
  /* the photo in the right half lights the room: brightest around it, near-black under the names */
  .svc-glow::after {
    background:
      radial-gradient(60% 80% at 74% 36%, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55) 60%, rgba(0, 0, 0, .9)),
      linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 55%);
  }
}

@media (min-width: 1024px) {
  .process { display: flex; min-height: max(100svh, 640px); padding: clamp(88px, 11vh, 120px) 0; }
  :is(.js, .cms-edit) .svc-grid {
    flex: 1; width: 100%;
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
    grid-template-rows: auto auto minmax(40px, 1fr) repeat(6, auto);
  }
  :is(.js, .cms-edit) .svc-title { grid-column: 1 / span 6; grid-row: 1; }
  :is(.js, .cms-edit) .svc-note { grid-column: 1 / span 6; grid-row: 2; }
  :is(.js, .cms-edit) .svc-list, :is(.js, .cms-edit) .svc { display: contents; }
  :is(.js, .cms-edit) .svc-head { grid-column: 1 / span 6; justify-self: start; max-width: 100%; }
  :is(.js, .cms-edit) .svc:nth-child(1) .svc-head { grid-row: 4; }
  :is(.js, .cms-edit) .svc:nth-child(2) .svc-head { grid-row: 5; }
  :is(.js, .cms-edit) .svc:nth-child(3) .svc-head { grid-row: 6; }
  :is(.js, .cms-edit) .svc:nth-child(4) .svc-head { grid-row: 7; }
  :is(.js, .cms-edit) .svc:nth-child(5) .svc-head { grid-row: 8; }
  :is(.js, .cms-edit) .svc:nth-child(6) .svc-head { grid-row: 9; }
  /* the last name's letters, not its line box, sit level with the button's foot */
  :is(.js, .cms-edit) .svc:last-child .svc-name { padding-bottom: 0; margin-bottom: -.12em; }
  /* the chevron waits at the column's edge; the chosen name moves over to show it */
  :is(.js, .cms-edit) .svc-name::before {
    position: absolute; left: 0; top: 50%; margin-top: -.1415em;
    opacity: 0; transform: scale(.6); transform-origin: 0 50%; transition: transform .45s var(--ease), opacity .3s var(--ease);
  }
  :is(.js, .cms-edit) .svc-name { padding-right: .75em; max-width: 100%; } /* the room the chosen name moves into */
  :is(.js, .cms-edit) .svc.is-open .svc-name > span { transform: translateX(.75em); }
  :is(.js, .cms-edit) .svc.is-open .svc-name::before { opacity: 1; transform: none; }

  /* the six photos and sentences share the right half; the chosen one on top. The one leaving stays under it until
     the new photo is in, so the frame never shows the field through two half-faded pictures */
  :is(.js, .cms-edit) .svc-body {
    grid-column: 7 / span 6; grid-row: 1 / -1; display: flex; min-height: 0;
    position: relative; z-index: 1; visibility: hidden; transition: visibility 0s .6s;
  }
  :is(.js, .cms-edit) .svc.is-open .svc-body { z-index: 2; visibility: visible; transition: none; }
  :is(.js, .cms-edit) .svc-in { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  :is(.js, .cms-edit) .svc-pic { flex: 1 1 0; min-height: 200px; position: relative; opacity: 0; transition: opacity 0s .6s; }
  :is(.js, .cms-edit) .svc-pic img { position: absolute; inset: 0; aspect-ratio: auto; transform: scale(1.05); transition: transform 0s .6s; }
  :is(.js, .cms-edit) .svc.is-open .svc-pic { opacity: 1; transition: opacity .55s var(--ease); }
  :is(.js, .cms-edit) .svc.is-open .svc-pic img { transform: none; transition: transform 1.4s var(--ease); }
  :is(.js, .cms-edit) .svc-text { opacity: 0; transform: translateY(10px); transition: opacity .15s, transform 0s .6s; }
  :is(.js, .cms-edit) .svc.is-open .svc-text { opacity: 1; transform: none; transition: opacity .45s var(--ease) .12s, transform .7s var(--ease) .12s; }
  :is(.js, .cms-edit) .svc-cta { margin-top: auto; }
  :is(.js, .cms-edit) .svc-detail { margin-bottom: 28px; }
}

@media (max-width: 1023px) {
  .svc-list { margin-top: 40px; }
  .svc-name { width: 100%; justify-content: space-between; padding: 14px 0; font-size: calc(clamp(22px, 4.4vw, 30px) * var(--fs-title)); }
  /* a plus at the end of the row that turns into a cross while open (the chevron, turned, read as a smudge this small) */
  :is(.js, .cms-edit) .svc-name::before {
    content: '+'; order: 2; width: auto; height: auto; background: none; clip-path: none;
    font-size: 1.5em; font-weight: 400; line-height: .7; transition: transform .45s var(--ease);
  }
  :is(.js, .cms-edit) .svc.is-open .svc-name::before { transform: rotate(45deg); }
  :is(.js, .cms-edit) .svc-body {
    display: grid; grid-template-rows: 0fr; visibility: hidden;
    transition: grid-template-rows .5s var(--ease), visibility 0s .5s;
  }
  :is(.js, .cms-edit) .svc.is-open .svc-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .5s var(--ease); }
  :is(.js, .cms-edit) .svc-in { min-height: 0; overflow: hidden; }
  .svc-pic img { aspect-ratio: 16 / 9; }
  .svc-text { padding: 20px 0 64px; } /* the open one's button stands apart from the next name */
}
@media (max-width: 767px) {
  .svc-pic img { aspect-ratio: 3 / 2; }
  .svc-cta { width: 100%; }
}
/* the owner's editor stands still, as reduced motion does */
html.cms-edit .svc-body, html.cms-edit .svc-pic, html.cms-edit .svc-pic img, html.cms-edit .svc-text,
html.cms-edit .svc-name > span, html.cms-edit .svc-name::before, html.cms-edit .svc-glow > * { transition: none !important; }

/* ---------- Work: the heading row, then four projects side by side (cards written by tools/projects.mjs) ---------- */
.work { padding: var(--section) 0; }
.work-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.work-top > :first-child { grid-column: 1 / span 6; }
.work-side { grid-column: 7 / span 5; }
.work-side p { max-width: 46ch; }
.work-side .btn { margin-top: 28px; }
.pcards {
  margin-top: clamp(56px, 6vw, 96px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px var(--gap);
}
.pcard a { display: block; }
.pcard-pic { display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
.pcard-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pcard a:hover .pcard-pic img { transform: scale(1.05); }
.pcard-name {
  display: block; margin-top: 20px;
  font-family: var(--font-display); font-size: var(--t-m); font-weight: 600; font-stretch: 90%; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase;
  text-decoration: underline transparent; text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: text-decoration-color .35s var(--ease);
}
.pcard a:hover .pcard-name { text-decoration-color: currentColor; }
.pcard-kind { display: block; margin-top: 6px; font-size: var(--t-xs); color: var(--muted); }

/* ---------- About: the words over two equal tables in the left half; two equal portraits in the right ---------- */
.about { padding: var(--section) 0; }
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
/* the title tops the pictures and the tables close level with their foot */
.about-copy {
  grid-column: 1 / span 6;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.about-lead { margin-top: 28px; font-size: var(--t-m); line-height: 1.4; }
/* the two tables split the half at column 4 of the twelve; six one-line rows each, so the rows pair up */
.about-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.about-table { container-type: inline-size; }
/* each table's title: the brand's subtitle (regular, spaced capitals), a step under the section title */
.about-word {
  font-family: var(--font-display); font-size: calc(clamp(22px, 1.6vw, 28px) * var(--fs-title)); font-weight: 500; font-stretch: 100%;
  line-height: 1.1; letter-spacing: .08em; text-transform: uppercase;
}
/* a spec sheet: a white rule under the title, a hairline under each row, the last one level with the pictures' foot;
   the label in grey, the answer in white */
.about-table dl { margin-top: 20px; border-top: 1px solid var(--ink); }
.about-table dl div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: clamp(7px, 1vh, 12px) 0; border-bottom: 1px solid var(--line);
  font-size: var(--t-s); font-size: min(var(--t-s), 4.6cqi); /* the longest row (Obras) stays on one line */
  white-space: nowrap;
}
.about-table dt { color: var(--muted); }
.about-table dd { text-align: right; }
.about-pics { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.about-pic { position: relative; min-height: 420px; }
.about-pic img { position: absolute; inset: 0; height: 100%; }
.about-pic-a img { object-position: 50% 30%; }
.about-pic-b img { object-position: 35% 50%; } /* both faces and the plans */
/* desktop: one screen, the block in its middle with the same dark above and below (--pad);
   the tail is dark ground before Contacto; Proyectos above gives up its bottom space */
@media (min-width: 1280px) {
  .work { padding-bottom: clamp(56px, 5vw, 96px); }
  .about {
    --pad: clamp(96px, 16vh, 160px);
    --tail: clamp(48px, 7vh, 96px);
    min-height: calc(max(100svh, 600px) + var(--tail));
    display: grid; align-content: center;
    padding: var(--pad) 0 calc(var(--pad) + var(--tail));
  }
  .about-grid { min-height: calc(max(100svh, 600px) - 2 * var(--pad)); }
}
/* laptops: the same screen with tighter words */
@media (min-width: 1280px) and (max-width: 1599px), (min-width: 1280px) and (max-height: 820px) {
  .about-copy { gap: 28px; }
  .about-lead { margin-top: 20px; font-size: var(--t-s); line-height: 1.5; }
  .about-table dl { margin-top: 16px; }
  .about-table dl div { padding: clamp(5px, .9vh, 9px) 0; font-size: var(--t-xs); font-size: min(var(--t-xs), 4.6cqi); }
}
/* short screens (720 px tall and under): thinner rows and a little less dark around, so the block still sits in the middle */
@media (min-width: 1280px) and (max-height: 720px) {
  .about { --pad: clamp(88px, 14vh, 160px); }
  .about-table dl { margin-top: 12px; }
  .about-table dl div { padding: clamp(3px, .6vh, 5px) 0; }
}
/* under 1280 px: words and tables first, then the two pictures */
@media (max-width: 1279px) {
  .about-grid { display: block; }
  .about-pics { margin-top: 56px; }
  .about-pic { min-height: 0; }
  .about-pic img { position: static; aspect-ratio: 3 / 4; }
}

/* ---------- Contact: black from edge to edge; the words in the left half, Terra Living draws itself in the right ---------- */
/* the build's blueprint, film and render carry their black as #0d0d0c: the section takes that black so the
   right half has no visible box (a filter on the scrubbed film would cost frames on phones) */
.contact { --bg: #0d0d0c; background: var(--bg); color: var(--ink); }
.contact-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: max(100svh, 600px); }
/* title and note at the top; the e-mail and the four ways to reach them as one block at the foot */
.contact-copy {
  min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: clamp(96px, 13vh, 150px) calc(var(--gap) / 2) clamp(40px, 6vh, 64px) var(--m);
}
.contact-note { margin-top: 24px; max-width: 34ch; font-size: var(--t-m); line-height: 1.4; color: var(--muted); }
/* the e-mail on one line, fitted to the half (js/site.js fitAll) */
.contact-mail {
  display: block;
  font-family: var(--font-display); font-size: var(--fit, 3.4vw); font-weight: 400; font-stretch: 100%; line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: color .35s var(--ease);
}
.contact-mail span { display: inline-block; transition: transform .6s var(--ease); }
.contact-mail:hover { color: var(--mark-grey); }
.contact-mail:hover span:last-child { transform: translateX(.06em); }
/* one column held to the half's width: an auto track grew with the one-line e-mail, so after a zoom or a narrower
   window the line and the rows under it ran past the half and under the tower */
.contact-reach { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vh, 32px); }
/* the sheet under the e-mail, ruled like Nosotros': a white rule on top, a line under each way in */
.contact-links { border-top: 1px solid var(--ink); font-size: calc(clamp(17px, 1.1vw, 20px) * var(--fs-text)); line-height: 1.4; }
.contact-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: clamp(10px, 1.8vh, 18px) 0; border-bottom: 1px solid var(--line);
}
.cl-name { flex: none; display: inline-flex; align-items: center; gap: 14px; color: var(--muted); }
.cl-val { text-align: right; transition: color .3s var(--ease); }
.cl-val span { white-space: nowrap; } /* the address breaks only between street and city */
.contact-links svg {
  flex: none; width: 1.2em; height: 1.2em;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.contact-links svg .dot { fill: currentColor; stroke: none; }
.contact-links a:hover .cl-val { color: var(--mark-grey); }
/* the black half: blueprint, film and finished tower stacked in one 9:16 box, the tower on the page's black */
.contact-run { min-width: 0; }
.contact-build { position: relative; height: 100%; min-height: 600px; background: var(--bg); overflow: hidden; }
.contact-build img, .contact-build video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.build-plan, .build-film { opacity: 0; }
/* the build runs on scroll only with script and motion: the stage holds while the tower goes up */
html.build-on .contact { height: calc(max(100svh, 600px) + var(--build-run, 160svh)); }
html.build-on .contact-stage { position: sticky; top: 0; height: max(100svh, 600px); }
html.build-on .build-plan { opacity: 1; clip-path: inset(calc((1 - var(--draw, 0)) * 100%) 0 0 0); }
html.build-on .build-film { opacity: 0; }
html.build-on .contact.has-film .build-film { opacity: var(--film, 0); }
html.build-on .build-final { opacity: var(--done, 0); transition: opacity .5s var(--ease); }

/* ---------- Footer: the logo and the ways in ---------- */
/* split at column 7 like the sections: the logo, their claim and the social links in the left half (the links at its
   foot, level with the columns' last row), three equal columns in the right half; a rule, then the legal line.
   Until 2026-11-14 the name CEBALLOS ran across the whole width here; the client did not like it */
.foot { border-top: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: clamp(72px, 7vw, 112px) 0 28px; }
.foot-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.foot-brand { grid-column: 1 / span 6; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.foot-logo { display: block; }
.foot-logo img { display: block; width: auto; height: clamp(48px, 3.4vw, 60px); }
.foot-claim { max-width: 26ch; font-size: var(--t-m); line-height: 1.35; color: rgba(255, 255, 255, .72); }
.foot-social { margin-top: auto; display: flex; gap: 12px; }
.foot-social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; color: var(--ink);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.foot-social a:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.foot-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.foot-social svg .dot { fill: currentColor; stroke: none; }
.foot-cols { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); }
.foot-h {
  font-family: var(--font-display); font-size: calc(13px * var(--fs-text)); font-weight: 500; font-stretch: 100%;
  line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
}
.foot-cols ul { margin-top: 22px; display: grid; gap: 12px; font-size: var(--t-xs); line-height: 1.4; }
.foot-cols a { color: var(--muted); transition: color .3s var(--ease); }
.foot-cols a:hover { color: var(--ink); }
.foot-k { margin-right: .3em; color: var(--ink); } /* Teléfono, WhatsApp: the name white, the number grey */
.foot-legal {
  margin-top: clamp(56px, 6vw, 96px); padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-xs); color: var(--muted);
}
.foot-legal a { white-space: nowrap; transition: color .3s var(--ease); }
.foot-legal a:hover { color: var(--ink); }
/* under 1280 px a third of the half is narrower than the e-mail (it ran 11 px off the page at 1024): the logo and
   the claim above, the three columns under them at full width */
@media (max-width: 1279px) {
  .foot-top { display: block; }
  .foot-cols { margin-top: 56px; }
}

/* ---------- /proyectos/: the page title, every project as a card, then each one in full ---------- */
.plist { padding: clamp(140px, 15vw, 220px) 0 var(--section); }
.page-title { font-size: var(--t-xl); line-height: .9; }
/* beside the intro (768 px up) the word must fit its six columns: at 10.5vw it ran into the text from 1024 to 1500 px */
@media (min-width: 768px) { .page-title { font-size: min(var(--t-xl), 9vw); } }
.proj { padding-block: clamp(96px, 9vw, 150px); }
.proj:nth-child(odd) { background: var(--surface); } /* a step in tone between projects, no rule */
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.proj-text { grid-column: 1 / span 4; align-self: start; position: sticky; top: 112px; }
.proj-kind { margin-top: 16px; color: var(--muted); }
.proj-body { margin-top: 28px; max-width: 44ch; }
.proj-facts { margin-top: 32px; display: grid; gap: 14px; }
.proj-facts div { display: flex; justify-content: space-between; gap: 16px; }
.proj-facts dd { color: var(--muted); text-align: right; }
/* the button and the project's PDF: one over the other at the wider one's width, both edges shared (the column is
   435 px at most, too narrow for the two side by side) */
.proj-actions { margin-top: 40px; display: grid; width: fit-content; max-width: 100%; gap: 12px; }
/* a project without a brochure: its button waits hidden until the owner puts a PDF in it (tools/projects.mjs,
   NO_DOC); in the editor it shows faint, so the owner can click it there */
html:not(.cms-edit) .proj-doc[href="/pdf/sin-brochure.pdf"] { display: none; }
html.cms-edit .proj-doc[href="/pdf/sin-brochure.pdf"] { opacity: .35; outline: 1px dashed rgba(255, 255, 255, .6); outline-offset: 3px; }
/* landscapes run the full width; portraits two by two at 2:3; an odd portrait runs wide, cut to 4:3 */
.proj-pics { grid-column: 6 / span 7; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.proj-pic { overflow: hidden; }
.proj-pic.is-wide { grid-column: 1 / -1; }
.proj-pic img { width: 100%; height: 100%; object-fit: cover; }
.proj-pic:not(.is-wide) img { aspect-ratio: 2 / 3; }
.proj-pic.is-cut img { aspect-ratio: 4 / 3; object-position: 50% 30%; }

/* ---------- 404 ---------- */
.lost {
  min-height: 100svh; padding: 32px var(--m) 64px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 24px;
}
.lost .brand { position: absolute; top: 18px; left: var(--m); }
.lost p { max-width: 36ch; color: var(--muted); }

/* ---------- The loader (js/loader.js): the film opens from black ---------- */
/* Only with script; without it, and in the owner's editor (html.cms-edit), it is never drawn. If loader.js never
   runs, the timer on .loader lifts it at 16 s. */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background-color: var(--bg);
  animation: loader-lift .6s var(--ease) 16s forwards;
}
@keyframes loader-lift { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.loader-box { display: grid; justify-items: center; width: clamp(180px, 15vw, 236px); margin-top: -4vh; }
.loader-mark { width: 52%; height: auto; overflow: visible; will-change: transform; }
.lm { fill: var(--ink); }
.lm-iron { fill: var(--iron); transition: fill .7s var(--ease); }
/* the four members slide onto the structure from the foundation up */
.js .lm { animation: lm-in 1s var(--ease) backwards; }
.js .lm-1 { --lx: -90px; animation-delay: .12s; }
.js .lm-2 { --lx: 90px; animation-delay: .26s; }
.js .lm-3 { --lx: -70px; animation-delay: .4s; }
.js .lm-4 { --lx: 90px; animation-delay: .54s; }
@keyframes lm-in { from { opacity: 0; transform: translateX(var(--lx)); } }
.loader-line {
  position: relative; width: 100%; height: 1px; margin-top: clamp(32px, 4.4vh, 44px);
  background: var(--line); overflow: hidden;
  animation: loader-fade .8s var(--ease) .7s backwards;
}
.loader-line i {
  position: absolute; inset: 0; background: var(--ink);
  transform-origin: left; transform: scaleX(var(--p, 0));
}
.loader-count {
  justify-self: end; margin-top: 12px; min-width: 4ch; text-align: right;
  font-family: var(--font-display); font-size: 13px; font-weight: 500; font-stretch: 100%; letter-spacing: .14em;
  font-variant-numeric: tabular-nums; color: var(--muted);
  animation: loader-fade .8s var(--ease) .8s backwards;
}
@keyframes loader-fade { from { opacity: 0; } }
/* out: the line runs off to the right, the black lifts off the picture, the symbol flies to the bar (js/loader.js) */
.loader.is-out { background-color: transparent; transition: background-color 1.15s var(--ease-io) .12s; pointer-events: none; }
.loader.is-out .loader-line, .loader.is-out .loader-count { opacity: 0; transition: opacity .45s var(--ease) .1s; }
.loader.is-out .loader-line i { transform-origin: right; transform: scaleX(0); transition: transform .55s var(--ease-io); }
.loader.is-white .lm-iron { fill: var(--ink); }
.loader.is-fade .loader-mark { opacity: 0; transition: opacity .6s var(--ease); }
.loader.is-plain { opacity: 0; transition: opacity .5s var(--ease); }
/* the bar waits under the black, then its symbol is the one that landed and its words open beside it */
html.is-loading .bar > * { opacity: 0; }
html.is-unveil .brand-logo { animation: logo-open .9s var(--ease-io); }
html.is-unveil .bar > :not(.brand) { animation: bar-in .8s var(--ease) backwards; }
html.is-unveil .bar > :nth-child(3) { animation-delay: .1s; }
html.is-unveil .bar > :nth-child(4) { animation-delay: .16s; }
@keyframes logo-open { from { clip-path: inset(0 67% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes bar-in { from { opacity: 0; transform: translateY(-8px); } }
/* the picture settles as it comes up from black (only when the page opens at the top) */
.flight.is-unveil .flight-media, .flight.is-unveil .chapter.is-frame .chapter-frame { animation: hero-settle 2.4s cubic-bezier(.33, 0, .2, 1); }
@keyframes hero-settle { from { transform: scale(1.06); } }   /* slow off the mark: it moves while the picture shows */

/* ---------- Entrances (only when JS runs; content is visible without it) ---------- */
.js [data-rise] { opacity: 0; transform: translateY(28px); }
.js [data-rise].is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
/* phones: a thumb brings a part on screen in a moment, so it arrives quicker and travels less (the stagger, js/site.js) */
@media (max-width: 767px) {
  .js [data-rise] { transform: translateY(16px); }
  .js [data-rise].is-in { transform: none; transition-duration: .5s, .65s; }
}
/* the hero's headline and two lines rise on their own clock from the first paint. One is the page's largest paint,
   and waiting for is-ready (the fonts, then site.js behind six deferred scripts) held it back about 2 s on phones */
.js .flight [data-hero-line] { animation: hero-line 1s var(--ease) .6s both; }
@keyframes hero-line { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1023px) {
  .bar-nav { display: none; }
  .bar-menu { display: block; } /* the menu takes over wherever the nav is hidden (768-1023 px had neither) */
  .bar { gap: 16px; }
  .contact-stage { display: block; min-height: 0; }
  .contact-copy { padding: clamp(96px, 14vw, 140px) var(--m) 56px; gap: 40px; }
  .contact-build { height: max(100svh, 560px); min-height: 0; }
  html.build-on .contact { height: auto; }
  html.build-on .contact-stage { position: static; height: auto; }
  html.build-on .contact-run { height: calc(max(100svh, 560px) + var(--build-run, 140svh)); }
  html.build-on .contact-build { position: sticky; top: 0; }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-grid { display: block; }
  .proj-text { position: static; }
  .proj-pics { margin-top: 48px; }
}
@media (max-width: 767px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .bar-cta { min-height: 40px; padding: 0 14px; }
  .brand-logo { height: 36px; }

  .chapter-first .chapter-copy { padding-bottom: 48px; }
  .hero-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-line { font-size: var(--t-xs); }
  .hero-side { text-align: left; }
  .chapter-title { font-size: calc(clamp(32px, 9.4vw, 56px) * var(--fs-title)); }
  .chapter-text { font-size: var(--t-s); }
  .chapter-actions .btn { flex: 1 1 auto; }
  /* the rail becomes four ticks on the bottom edge, once the flight has left the first stop behind */
  html.flight-on .rail { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); right: auto; left: var(--m); transform: none; opacity: 0; transition: opacity .5s var(--ease); }
  html.flight-on .flight.is-flying .rail { opacity: 1; }
  .rail ol { display: flex; gap: 8px; }
  .rail button { padding: 10px 0; }
  .rail button span { display: none; }
  .rail button em { display: block; width: 30px; padding-top: 8px; border-top: 1px solid currentColor; text-align: left; font-size: calc(12px * var(--fs-text)); }
  .rail-track { display: none; }
  html.flight-on .chapter:not(.chapter-first) .chapter-copy { padding-bottom: 92px; }

  .intro-top, .intro-pics, .work-top { display: block; }
  .facts { margin-top: 56px; row-gap: 40px; }
  .intro-pic-b { margin-top: 40px; }

  .work-side { margin-top: 20px; }
  .pcards { gap: 36px 16px; }
  .pcard-name { margin-top: 14px; font-size: var(--t-s); }

  .about-copy { gap: 48px; }
  .about-tables { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }

  /* phones: the way in over its detail, so the address keeps the full width */
  .contact-links a { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cl-val { text-align: left; padding-left: calc(1.2em + 14px); }
  .cl-val span { display: inline-block; white-space: normal; } /* each half whole when it fits */

  .foot-cols { margin-top: 48px; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .foot-col-contact { grid-column: 1 / -1; }
  .foot-legal { margin-top: 56px; flex-direction: column; gap: 12px; }

  .proj-pics { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduced motion: everything is there, nothing travels ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-rise], .js .flight [data-hero-line] { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .js .lm, .js .loader-line, .js .loader-count, .flight.is-unveil .flight-media, .flight.is-unveil .chapter-frame { animation: none !important; }
  .pcard-pic img { transition: none; }
  .svc-body, .svc-pic, .svc-pic img, .svc-text, .svc-name > span, .svc-name::before, .svc-glow > * { transition: none !important; }
  .svc-pic img, .svc-text { transform: none !important; }
  * { scroll-behavior: auto !important; }
  .menu, .menu nav a, .menu-close { transition: none !important; transform: none !important; }
}

@media print {
  .bar, .lema, .flight-media, .rail { display: none !important; }
  .js [data-rise] { opacity: 1; transform: none; }
}

/* ---------- Message: the words and WhatsApp in the left half, the form in the right (js/leads.js) ---------- */
/* Exactly one screen on desktop, the content centred (equal space above and below), on the surface tone so it
   reads as its own part after the black contact. The title tops the first row of fields; the WhatsApp button
   sits level with the send row. The form shows only where it can send (html.lead-on). */
.message { background: var(--surface); min-height: max(100svh, 640px); display: flex; align-items: center; padding: 96px 0; }
.message-grid { width: 100%; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
.message-copy {
  grid-column: 1 / span 6;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.message-note { margin-top: 28px; max-width: 42ch; font-size: var(--t-m); line-height: 1.4; color: var(--muted); }
.message-wa { align-self: flex-start; gap: 12px; }
.message-wa svg {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.lead { grid-column: 7 / span 6; display: none; gap: 20px; }
.lead-on .lead { display: grid; }
/* no form (no script, or no back end yet): no section; the contact sheet above already holds e-mail, phone and WhatsApp */
html:not(.lead-on) .message { display: none; }
.lead-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--gap); }
.lead-field { display: grid; gap: 8px; min-width: 0; }
.lead-label { font-size: var(--t-xs); color: var(--muted); }
.lead-input {
  width: 100%; min-height: 56px; padding: 0 18px;
  background: var(--bg); color: var(--ink); border: 0; border-radius: 0;
  font: inherit; font-size: var(--t-s);
  transition: background-color .3s var(--ease);
}
.lead-input:hover { background: #1c1c1c; }
.lead-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; background: var(--bg); }
.lead-input[aria-invalid='true'] { outline: 2px solid var(--mark-grey); outline-offset: 0; }
select.lead-input {
  appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
select.lead-input option { background: var(--bg); color: var(--ink); }
.lead-text { min-height: 150px; padding: 16px 18px; resize: vertical; line-height: 1.5; }
.lead-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 4px; }
.lead-send:disabled { opacity: .6; cursor: progress; }
.lead-states { flex: 1 1 260px; font-size: var(--t-xs); line-height: 1.45; }
.lead-states [data-lead-state='invalid'], .lead-states [data-lead-state='failed'] { color: var(--ink); }
.lead-states [data-lead-state='sending'] { color: var(--muted); }
.lead-states a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1023px) {
  .message { display: block; min-height: 0; padding: var(--section) 0; }
  .message-grid { display: block; }
  .message-copy { gap: 0; }
  .message-wa { margin-top: 32px; }
  .lead { margin-top: 56px; }
}
@media (max-width: 767px) {
  .lead-pair { grid-template-columns: minmax(0, 1fr); }
  .message-wa, .lead-send { width: 100%; }
}

/* ---------- The owner's panel (click-edit-admin) ---------- */
/* a part switched off in the panel, and the links into it */
.is-cms-hidden, .is-cms-dead { display: none !important; }
/* the editor ghosts a switched-off part instead of removing it */
.is-cms-ghost { opacity: .35; }
/* no cms-wait rule on purpose: a first visit paints the page's own words at once and published ones swap in when
   they arrive (the hero line's .75 s fade hides most of it). Holding the hero line for them cost phone LCP 4.6 s. */
/* in the editor the hint is hidden, so the side line is one block: a click anywhere on it opens its words */
html.cms-edit .hero-side > span { display: block; }
