/* =============================================================
   SOLDE Constructora — styles.css
   1. Tokens · 2. Reset · 3. Utilities · 4. Typography
   5. Components · 6. Sections · 7. Effects · 8. Responsive · 9. Reduced motion
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */
:root {
  --bg:      #0f1115;
  --bg-2:    #14171d;
  --bg-3:    #1b1f27;
  --cream:   #efe9dc;
  --cream-2: #cfc8b8;
  --mute:    #8f8b82;
  --gold:    #d6a92e;
  --gold-2:  #f0d57a;
  --gold-3:  #a8821f;
  --line:    rgba(239, 233, 220, .12);
  --line-gold: rgba(214, 169, 46, .35);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1320px;
  --nav-h: 72px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* 3. Utilities ------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg); border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* 4. Typography ------------------------------------------------ */
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--gold-2); }
.kicker {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.4rem;
}
.section-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  max-width: 18ch; margin-bottom: 1.6rem;
}
.section-lead { color: var(--cream-2); font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 58ch; }
.sub-title {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}
.sub-title span {
  font-family: var(--mono); font-size: .75rem; color: var(--gold);
  border: 1px solid var(--line-gold); border-radius: 50%;
  width: 2rem; height: 2rem; display: inline-grid; place-items: center; flex: none;
  transform: translateY(-.3rem);
}
.footnote { font-family: var(--mono); font-size: .72rem; color: var(--mute); letter-spacing: .02em; margin-top: 2rem; max-width: 80ch; }
.link { color: var(--gold-2); border-bottom: 1px solid var(--line-gold); transition: border-color .3s var(--ease-out); }
.link:hover { border-color: var(--gold-2); }

/* 5. Components ------------------------------------------------ */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(15, 17, 21, .94); border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(12px)) {
  .nav.is-scrolled { background: rgba(15, 17, 21, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
}
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: none; align-items: center; gap: 2rem; font-size: .9rem; }
.nav-links a:not(.nav-cta) { position: relative; color: var(--cream-2); transition: color .3s var(--ease-out); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover { color: var(--cream); }
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; border-radius: 999px; font-weight: 600;
  background: var(--gold); color: var(--bg);
  transition: background .3s var(--ease-out), transform .3s var(--ease-out);
}
.nav-cta:hover { background: var(--gold-2); transform: translateY(-1px); }
.wa-icon { width: 1.1em; height: 1.1em; fill: currentColor; }
.nav-toggle { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; }
.nav-toggle span:not(.sr-only) { width: 24px; height: 1.5px; background: var(--cream); transition: transform .35s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.75px) rotate(-45deg); }
.nav.is-open .nav-links {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem;
  position: fixed; inset: var(--nav-h) 0 auto 0; padding: 2rem var(--gutter) 2.4rem;
  background: var(--bg); border-bottom: 1px solid var(--line); font-size: 1.15rem;
}
.nav.is-open { background: var(--bg); }

/* Buttons */
.btn-wa {
  display: inline-flex; align-items: center; gap: .8rem;
  padding: 1.1rem 1.9rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
  color: var(--bg); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 18px 50px -18px rgba(214, 169, 46, .6);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.btn-wa:hover { transform: translateY(-3px); box-shadow: 0 26px 60px -18px rgba(214, 169, 46, .75); }
.btn-wa .wa-icon { width: 1.4em; height: 1.4em; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 55;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--bg);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6);
  transition: transform .35s var(--ease-out), background .3s var(--ease-out);
}
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }
.wa-float:hover { transform: scale(1.07); background: var(--gold-2); }

.tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--cream-2); margin-right: .6rem;
}
.tag-gold { border-color: var(--line-gold); color: var(--gold-2); }

/* 6. Sections -------------------------------------------------- */
.section { position: relative; padding-block: clamp(96px, 14vw, 180px); }

/* --- Inicio: the track record in figures, over a finished work ---
   The entrance is pure CSS (no JS needed to see it); main.js only syncs the counters
   with it and adds the scroll parallax. */
.home {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: calc(var(--nav-h) + 4vh) clamp(24px, 5.5vh, 72px);
  background: var(--bg);
}
/* the photo fades in and settles once it has loaded (inline onload), never half-drawn */
.home-media { position: absolute; inset: 0; z-index: -2; }
.js .home-media:not(.is-loaded) { opacity: 0; animation: heroSafety .01s 2.5s forwards; }
.js .home-media.is-loaded { animation: homeFade 1.4s ease-out both, homeZoom 3.4s var(--ease-out) both; }
.home-img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; object-position: 46% 50%; }
.home-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 17, 21, .72) 0%, rgba(15, 17, 21, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, rgba(15, 17, 21, .8) 32%, rgba(15, 17, 21, .28) 70%, rgba(15, 17, 21, .1) 100%),
    linear-gradient(90deg, rgba(15, 17, 21, .6), rgba(15, 17, 21, 0) 66%);
}
/* full width, aligned with the nav logo (as the 3D copy below), so the title stays clear of the sign */
.home-inner { position: relative; max-width: none; }
.home-title {
  font-family: var(--serif); font-weight: 300; line-height: .98; letter-spacing: -.03em;
  font-size: clamp(2.5rem, min(7vw, 10.5vh), 6.6rem); max-width: 14ch; margin-bottom: 1.2rem;
  text-shadow: 0 2px 34px rgba(15, 17, 21, .55);
}
.home-lead { color: var(--cream); font-size: clamp(1.05rem, 1.5vw, 1.35rem); max-width: 46ch; text-shadow: 0 1px 18px rgba(15, 17, 21, .6); }
.home-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(1rem, 3vh, 2rem); }
.home-more {
  display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2);
  transition: color .3s var(--ease-out);
}
.home-more:hover { color: var(--gold-2); }
.home-links { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 2.2rem; }
.home-team { min-height: 28px; padding-left: 1.1rem; border-left: 1px solid var(--line-gold); }
.home-note {
  margin-top: .9rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; color: var(--cream-2);
  text-shadow: 0 1px 12px rgba(15, 17, 21, .7);
}
.home-more span { width: 1px; height: 28px; background: linear-gradient(var(--gold), transparent); transform-origin: top; animation: hintDrop 2.4s var(--ease-soft) infinite; }
.home-cap {
  display: none; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream-2); padding: .3rem 0 .3rem .8rem; border-left: 2px solid var(--gold);
}
.home-stats { margin-top: clamp(1.2rem, 4.5vh, 3.4rem); max-width: 1480px; }
.home .stat { position: relative; border-top-color: rgba(239, 233, 220, .16); }
.home .stat::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--gold);
  transform-origin: left; animation: lineIn 1.4s var(--ease-out) both; animation-delay: calc(var(--d, 0s) + .2s);
}
.home .stat strong { font-size: clamp(2rem, min(4.2vw, 7vh), 4.2rem); white-space: nowrap; }
.home .stat p { font-size: clamp(.88rem, 1vw, 1rem); }
.home [data-in] { animation: homeIn 1.1s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes homeIn { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }
@keyframes homeFade { from { opacity: 0; } }
@keyframes homeZoom { from { transform: scale(1.14); } }
@keyframes lineIn { from { transform: scaleX(0); } }
/* phones: the copy covers the whole photo, so it gets an even shade; the figures end above the WhatsApp button */
@media (max-width: 719px) {
  .home { padding-bottom: clamp(24px, 11vh, 96px); }
  .home-shade {
    background: linear-gradient(180deg, rgba(15, 17, 21, .6) 0%, rgba(15, 17, 21, .3) 11%, rgba(15, 17, 21, .64) 26%,
                rgba(15, 17, 21, .8) 55%, rgba(15, 17, 21, .92) 80%, var(--bg) 100%);
  }
}
@media (max-width: 719px) {
  /* both links on one line, so the screen keeps its height */
  .home-links { gap: .6rem 1.1rem; }
  .home .home-more { font-size: .64rem; letter-spacing: .1em; }
  .home-team { padding-left: .9rem; }
  .home-note { margin-top: .7rem; font-size: .62rem; }
}
@media (max-width: 719px) and (max-height: 760px) {
  .home-row { display: none; }
}
@media (max-width: 719px) and (max-height: 700px) {
  .home-title { font-size: 2.25rem; }
  .home-lead { font-size: .97rem; }
  .home-stats { gap: 1.6rem 1.2rem; }
}
@media (min-width: 960px) and (max-width: 1279px) {
  .home .stat:last-child p { max-width: 21ch; }   /* clear of the WhatsApp button */
}
@media (min-width: 960px) {
  .home-cap { display: block; }
  /* the photo runs 25% past the right edge, so the sign sits right of the copy (46%+ of the width) */
  .home-media { right: -25%; }
  .home-img { object-position: 8% 50%; }
  .home-inner .kicker { max-width: 40vw; }
}

/* --- Cómo trabajamos (3D, second on the page) ---
   Static layout first (no JS / no canvas): photo + the five steps as a list.
   .has-scene switches to the full-screen 3D stage driven by main.js. */
.hero { position: relative; }
.hero-stage {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 1fr; align-content: center; gap: 1.6rem;
  padding: calc(var(--nav-h) + 16px) var(--gutter) 32px;
  overflow: hidden;
  background: radial-gradient(70% 60% at 68% 42%, rgba(214, 169, 46, .07), transparent 70%), var(--bg);
}
.hero-canvas, .hero-ambient, .hero-scrim, .hero-hud, .hero-rail, .hero-skip { display: none; }
.hero-copy { position: relative; z-index: 4; order: 2; }
.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 6rem); line-height: .98; max-width: 11ch;
  text-shadow: 0 2px 30px rgba(15, 17, 21, .8);
}
.hero-sub { margin-top: 1.1rem; font-size: clamp(1.08rem, 1.7vw, 1.4rem); color: var(--cream); }
.hero-hint {
  display: flex; align-items: center; gap: .8rem; margin-top: 2rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-2);
}
.hero-hint span { width: 1px; height: 38px; background: linear-gradient(var(--gold), transparent); animation: hintDrop 2.4s var(--ease-soft) infinite; transform-origin: top; }
@keyframes hintDrop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.hero-steps { margin-top: 2.4rem; display: grid; gap: 2rem; }
.hero-step { position: relative; max-width: 32ch; }
.step-num {
  display: block; font-family: var(--serif); font-weight: 300; line-height: .85;
  font-size: clamp(3.4rem, 6.4vw, 6.2rem); color: transparent;
  -webkit-text-stroke: 1px var(--gold); letter-spacing: -.03em;
}
.step-tag { display: block; margin-top: .9rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.step-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.5vw, 3.3rem); margin: .55rem 0 .9rem; color: var(--cream); }
.hero-step p { color: var(--cream); font-size: clamp(1.04rem, 1.35vw, 1.24rem); line-height: 1.55; }

.hero-frame {
  position: relative; z-index: 1; order: 1; justify-self: center; margin: 0;
  width: min(100%, calc(46svh * 1084 / 1451));
  aspect-ratio: 1084 / 1451;
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
}
.frame-corners i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--gold); }
.frame-corners i:nth-child(1) { top: -10px; left: -10px; border-top-width: 1px; border-left-width: 1px; }
.frame-corners i:nth-child(2) { top: -10px; right: -10px; border-top-width: 1px; border-right-width: 1px; }
.frame-corners i:nth-child(3) { bottom: -10px; left: -10px; border-bottom-width: 1px; border-left-width: 1px; }
.frame-corners i:nth-child(4) { bottom: -10px; right: -10px; border-bottom-width: 1px; border-right-width: 1px; }
.hero-caption {
  position: absolute; right: 12px; bottom: 12px; display: grid; gap: .15rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(15, 17, 21, .82); color: var(--cream); padding: .5rem .8rem; border-left: 2px solid var(--gold);
}
.hero-caption span { color: var(--gold-2); font-size: .62rem; }

/* hide the static hero until main.js decides the layout (safety: shows anyway after 2.5 s) */
.js:not(.is-ready) .hero-copy, .js:not(.is-ready) .hero-frame { opacity: 0; animation: heroSafety .01s 2.5s forwards; }
@keyframes heroSafety { to { opacity: 1; } }

/* ---- 3D stage (JS) ---- */
.has-scene .hero-stage { display: block; height: 100vh; height: 100svh; padding: 0; background: var(--bg); }
.has-scene .hero-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.has-scene .hero-ambient {
  display: block; position: absolute; inset: -60px; z-index: 0; opacity: 0;
  background: url("assets/img/smu-superanimacion-unimarc-fachada-480.webp") center 35% / cover no-repeat;
  filter: blur(46px) saturate(1.15) brightness(.7);
}
.has-scene .hero-scrim { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.has-scene .hero-frame {
  position: absolute; z-index: 1; margin: 0; width: auto;
  height: 44svh; left: 50%; top: calc(var(--nav-h) + 10px); transform: translateX(-50%);
}
.has-scene .hero-photo { box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .95); }
.has-scene .frame-corners { display: none; }
.has-scene .hero-copy {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  padding: 3.2rem 16px 18px;
  background: linear-gradient(to top, rgba(15, 17, 21, .98) 62%, rgba(15, 17, 21, .86) 82%, rgba(15, 17, 21, 0));
  display: grid;
}
.has-scene .hero-copy > .hero-intro, .has-scene .hero-copy > .hero-steps { grid-area: 1 / 1; align-self: end; }
.has-scene .hero-steps { margin: 0; display: grid; }
.has-scene .hero-step { grid-area: 1 / 1; visibility: hidden; align-self: end; }
.has-scene .step-num { font-size: 2.6rem; }
.has-scene .step-title { font-size: 1.75rem; margin: .35rem 0 .5rem; }
.has-scene .hero-step p { font-size: 1rem; line-height: 1.5; }
.has-scene .hero-title { font-size: clamp(2.3rem, 10vw, 3.2rem); }
.has-scene .hero-sub { font-size: 1.05rem; margin-top: .7rem; }
.has-scene .hero-hint { margin-top: 1rem; }
.has-scene .hero-caption { opacity: 0; }

.has-scene .hero-rail {
  display: flex; gap: 6px; grid-area: 2 / 1; margin-top: 1.1rem;
}
.hero-rail li {
  flex: 1; padding-top: .55rem; border-top: 2px solid var(--line);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
  transition: color .4s var(--ease-out), border-color .4s var(--ease-out);
}
.hero-rail b { font-weight: 500; }
.hero-rail span { display: none; }
.hero-rail li.is-done { border-color: var(--gold-3); color: var(--cream-2); }
.hero-rail li.is-active { border-color: var(--gold-2); color: var(--gold-2); }

.has-scene .hero-hud { display: block; position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hud-phase, .hud-cam, .hud-sheet {
  position: absolute; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
}
.hud-phase { display: none; left: 16px; top: calc(var(--nav-h) + 6px); color: var(--gold-2); }
.hud-cam, .hud-sheet { display: none; color: var(--mute); }

.has-scene .hero-skip {
  display: block; position: absolute; z-index: 5; right: 16px; top: calc(var(--nav-h) + 2px);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-2);
  padding: .3rem 0; border-bottom: 1px solid var(--line-gold);
}
.has-scene .hero-skip:hover { color: var(--gold-2); }

@media (min-width: 960px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6vw;
    padding-top: calc(var(--nav-h) + 16px); padding-bottom: 56px;
  }
  .hero-copy { order: 1; }
  .hero-frame { order: 2; width: auto; height: min(76svh, 860px); }

  .has-scene .hero-frame {
    left: auto; right: max(4vw, 36px); transform: none;
    height: min(72svh, 800px); top: calc(var(--nav-h) + (100svh - var(--nav-h) - min(72svh, 800px)) / 2);
  }
  .has-scene .hero-scrim {
    background: linear-gradient(90deg, rgba(15, 17, 21, .97) 0%, rgba(15, 17, 21, .9) 28%, rgba(15, 17, 21, .45) 42%, rgba(15, 17, 21, 0) 56%);
  }
  .has-scene .hero-copy {
    left: var(--gutter); right: auto; top: calc(var(--nav-h) + 3vh); bottom: 4vh; transform: none;
    width: min(36vw, 560px); padding: 0; background: none; align-content: center;
  }
  .has-scene .hero-copy > .hero-intro, .has-scene .hero-copy > .hero-steps, .has-scene .hero-step { align-self: center; }
  .has-scene .step-num { font-size: clamp(4.6rem, 7vw, 7rem); }
  .has-scene .step-title { font-size: clamp(2.4rem, 3.4vw, 3.4rem); margin: .6rem 0 1rem; }
  .has-scene .hero-step p { font-size: clamp(1.1rem, 1.3vw, 1.28rem); }
  .has-scene .hero-title { font-size: clamp(2.6rem, min(4.6vw, 8.2vh), 5.4rem); }
  .has-scene .hero-sub { font-size: clamp(1.15rem, 1.5vw, 1.45rem); margin-top: 1.2rem; }
  .has-scene .hero-hint { margin-top: 2.2rem; }
  .has-scene .hero-rail { margin-top: 2.6rem; gap: 10px; }
  .hero-rail span { display: block; margin-top: .25rem; font-size: .6rem; }
  .hud-phase { display: block; left: 41vw; top: calc(var(--nav-h) + 22px); font-size: .68rem; }
  .hud-cam { display: block; left: 41vw; bottom: 26px; }
  .hud-sheet { display: block; left: 41vw; bottom: 46px; color: var(--gold); }
  .has-scene .hero-skip { right: max(4vw, 36px); top: calc(var(--nav-h) + 18px); }
}
@media (min-width: 1280px) {
  .hero-title { font-size: clamp(4rem, 6vw, 6.2rem); }
}
@media (max-width: 959px) {
  .has-scene .hero-hint { display: none; }
}

/* --- 01 · Lo que usted recibe (photo story) ---
   Static: photos in a grid + the four pillars. .is-pinned (JS): full-screen pinned story. */
.story { position: relative; padding-block: clamp(80px, 12vw, 140px); }
.story-stage { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.story-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.story-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.story-shade, .story-dots { display: none; }
.story-copy { margin-top: 2.4rem; }
.story-list { display: grid; gap: 2rem; }
.story-num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.4rem; }
.story-title { font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 9vw, 8.4rem); line-height: .92; letter-spacing: -.03em; margin: .2rem 0 .8rem; }
.story-item p { color: var(--cream); font-size: clamp(1.1rem, 1.6vw, 1.45rem); line-height: 1.45; max-width: 28ch; }

.story.is-pinned { padding: 0; }
.story.is-pinned .story-stage { position: relative; height: 100vh; height: 100svh; max-width: none; padding: 0; overflow: hidden; }
.story.is-pinned .story-media { position: absolute; inset: 0; display: block; }
.story.is-pinned .story-img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; will-change: clip-path, transform; }
.story.is-pinned .story-img:nth-child(2) { object-position: 78% 50%; }
.story.is-pinned .story-shade {
  display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(15, 17, 21, .96) 0%, rgba(15, 17, 21, .72) 34%, rgba(15, 17, 21, .1) 70%);
}
.story.is-pinned .story-copy {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter);
  bottom: clamp(28px, 8vh, 96px); margin: 0; display: grid;
}
.story.is-pinned .story-list { display: grid; }
.story.is-pinned .story-item { grid-area: 1 / 1; align-self: end; }
.story.is-pinned .story-item p { text-shadow: 0 2px 24px rgba(15, 17, 21, .7); }
.story.is-pinned .story-dots { display: flex; gap: 8px; margin-top: 1.8rem; }
.story-dots li { width: 34px; height: 2px; background: rgba(239, 233, 220, .25); transition: background .4s var(--ease-out); }
.story-dots li.is-active { background: var(--gold-2); }

/* --- Galería de proyectos (second on the page) ---
   Static: each project shows its data and a row of photos you can swipe.
   .is-pinned (main.js): each project pins, the photos travel sideways and the last one,
   the result, grows to full screen before the next project comes up. */
.gallery-projects { position: relative; background: var(--bg); }
.gp-intro { padding-block: clamp(96px, 16vh, 180px) clamp(28px, 6vh, 64px); }
.gp { position: relative; }
.gp-stage { position: relative; padding-block: clamp(2rem, 5vh, 3.5rem); }
.gp-info { position: relative; z-index: 4; padding-inline: var(--gutter); text-shadow: 0 1px 16px rgba(15, 17, 21, .7); }
.gp-count { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.gp-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, min(4.4vw, 7vh), 3.8rem); line-height: 1; letter-spacing: -.02em; max-width: 20ch; }
.gp-scope { margin-top: .5rem; color: var(--cream-2); font-size: clamp(.95rem, 1.2vw, 1.08rem); }
.gp-data { display: flex; flex-wrap: wrap; gap: .6rem 2.4rem; margin-top: clamp(.8rem, 2vh, 1.3rem); }
.gp-data dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.gp-data dd { margin-top: .15rem; font-size: .98rem; color: var(--cream); }
.gp-by { margin-top: .8rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-2); }
.gp .is-tbd { color: var(--cream-2); font-style: italic; opacity: .75; }
.gp-viewport { position: relative; z-index: 1; margin-top: clamp(1.2rem, 3.5vh, 2.4rem); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gp-viewport::-webkit-scrollbar { display: none; }
.gp-track { --fh: min(40svh, calc(100svh - 400px), 380px); position: relative; display: flex; gap: 12px; width: max-content; padding-inline: var(--gutter); }
.gp-frame {
  position: relative; flex: none; width: min(82vw, calc(var(--fh) * var(--ar))); aspect-ratio: var(--ar);
  overflow: hidden; border-radius: 6px; background: var(--bg-3); scroll-snap-align: center;
}
.gp-frame img { width: 100%; height: 100%; object-fit: cover; }
/* optional focal point for a project's result photo (set --pos on the .gp), shared by the frame and the full-screen copy */
.gp-last img, .gp-result img { object-position: var(--pos, 50% 50%); }
.gp-frame span, .gp-result figcaption {
  position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(15, 17, 21, .8); padding: .4rem .7rem; border-left: 2px solid var(--gold);
}
.gp-result, .gp-skip { display: none; }

.gallery-projects.is-pinned .gp-stage {
  height: 100vh; height: 100svh; overflow: hidden; padding: calc(var(--nav-h) + 2vh) 0 3vh;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);   /* solid, so nothing behind can show through while it is pinned */
}
.gallery-projects.is-pinned .gp-viewport { overflow: visible; scroll-snap-type: none; }
.gallery-projects.is-pinned .gp-result { display: block; position: absolute; inset: 0; z-index: 2; margin: 0; visibility: hidden; }
/* sized and placed by main.js (the whole photo at cover size, never cropped by its own box) */
.gp-result img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; transform-origin: 0 0; }
.gp-scrim {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(180deg, rgba(15, 17, 21, .9) 0%, rgba(15, 17, 21, .62) 38%, rgba(15, 17, 21, 0) 62%),
              linear-gradient(0deg, rgba(15, 17, 21, .55) 0%, rgba(15, 17, 21, 0) 22%);
}
.gp-result figcaption { left: var(--gutter); bottom: clamp(20px, 4vh, 36px); display: grid; gap: .15rem; opacity: 0; }
.gp-result figcaption span { color: var(--gold-2); font-size: .6rem; }
.gallery-projects.is-pinned .gp-skip {
  display: block; position: absolute; z-index: 5; right: var(--gutter); top: calc(var(--nav-h) + 14px);
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-2);
  padding: .3rem 0; border-bottom: 1px solid var(--line-gold); text-shadow: 0 1px 10px rgba(15, 17, 21, .9);
}
.gallery-projects.is-pinned .gp-skip:hover { color: var(--gold-2); }
/* phones: taller photos (cropped, portrait-like) fill the screen better than small landscape strips */
@media (max-width: 959px) {
  .gp-track { --mh: max(220px, min(48svh, calc(100svh - 450px))); }
  .gp-frame { aspect-ratio: auto; height: var(--mh); width: min(80vw, calc(var(--mh) * .8), 420px); }
  .gp-data { gap: .4rem 1.4rem; }
  .gp-data dd { font-size: .9rem; }
}
@media (min-width: 960px) {
  .gp-track { --fh: min(52svh, calc(100svh - 380px), 560px); gap: 16px; }
  /* dark only around the project data (top left) and the caption; the rest of the photo stays bright */
  .gp-scrim {
    background: radial-gradient(115% 95% at 0% 0%, rgba(15, 17, 21, .92) 0%, rgba(15, 17, 21, .8) 34%, rgba(15, 17, 21, .45) 52%, rgba(15, 17, 21, 0) 70%),
                linear-gradient(180deg, rgba(15, 17, 21, .45) 0%, rgba(15, 17, 21, 0) 18%),
                linear-gradient(0deg, rgba(15, 17, 21, .5) 0%, rgba(15, 17, 21, 0) 22%);
  }
}

/* --- 02 · Terminaciones --- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: clamp(2.5rem, 5vw, 4rem); }
.g { position: relative; margin: 0; overflow: hidden; border-radius: 6px; background: var(--bg-3); aspect-ratio: 3 / 4; }
.g1 { grid-column: span 2; aspect-ratio: 16 / 10; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.g figcaption {
  position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(15, 17, 21, .8); padding: .4rem .7rem; border-left: 2px solid var(--gold);
}
.g:hover img { transform: scale(1.05); }

/* --- 04 · Retail en operación --- */
.obras { padding-bottom: 0; }
.obras-by { margin-top: 1rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--gold); max-width: 60ch; }
.ba-block { margin-top: clamp(2.5rem, 5vw, 4rem); }
.ba { display: grid; gap: 1rem; margin-bottom: 1.6rem; }
.ba-item { margin: 0; }
.ba-item figcaption { margin-top: .9rem; font-size: .92rem; color: var(--cream-2); }
.ba-media { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 16 / 10; background: var(--bg-3); }
.ba-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.ba-before img { filter: saturate(.55) brightness(.85); }
.ba-item:hover img { transform: scale(1.04); }

.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.m { position: relative; margin: 0; overflow: hidden; border-radius: 6px; background: var(--bg-3); aspect-ratio: 4 / 3; }
.m img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; }
.m1 { grid-column: span 2; aspect-ratio: 16 / 10; }
.m2, .m5 { aspect-ratio: 3 / 4; }
.m3 { grid-column: span 2; aspect-ratio: 16 / 9; }
/* phones: the two portraits side by side, then the wide shot, then the two 4:3 */
.m2 { order: 1; } .m5 { order: 2; } .m3 { order: 3; } .m4 { order: 4; } .m6 { order: 5; }
@media (min-width: 720px) { .mosaic .m { order: 0; } }

.process { margin-top: clamp(4.5rem, 9vw, 8rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.process-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem 2rem; margin-bottom: 1.6rem; }
.process-note { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.process-viewport {
  overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 1.6rem;
}
.process-viewport::-webkit-scrollbar { display: none; }
.process-track { display: flex; gap: 14px; padding-inline: var(--gutter); width: max-content; }
.frame { position: relative; flex: none; scroll-snap-align: center; height: 62svh; max-height: 560px; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
.frame-l { aspect-ratio: 4 / 3; }
.frame-p { aspect-ratio: 3 / 4; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.frame:hover img { transform: scale(1.05); }
.frame span {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(15, 17, 21, .8); padding: .4rem .7rem; border-left: 2px solid var(--gold);
}

/* --- 04 · Trayectoria (the career figures open the page, in .home) --- */
.trayectoria { background: var(--bg-2); padding-top: clamp(96px, 14vw, 180px); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4rem 1.6rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.stat { border-top: 1px solid var(--line-gold); padding-top: 1.2rem; }
.stat strong {
  display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 3.4vw, 3.3rem); line-height: 1;
  color: var(--cream); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.stat small { font-family: var(--mono); font-size: .9rem; color: var(--gold); letter-spacing: .06em; }
.stat strong, .ledger-fig, .net-fig { white-space: nowrap; }   /* a figure and its unit never split across lines */
/* count-up (main.js initCounters): the final figure holds its exact width, invisibly, while the
   running figure is drawn over it, so the unit beside it and the rows below never move */
[data-count].is-counting { position: relative; display: inline-block; }
.count-ghost { color: transparent; }
.count-live { position: absolute; left: 0; top: 0; white-space: nowrap; transform-origin: 0 50%; }
.stat p { margin-top: .8rem; color: var(--cream-2); font-size: .95rem; max-width: 26ch; }

.cs-head { display: grid; gap: 2rem; align-items: end; }
.cs-lead { color: var(--cream-2); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 42ch; }
.stats-compact { margin-top: 0; gap: 1.6rem 1.2rem; }
.stats-compact .stat strong { font-size: clamp(1.8rem, 2.6vw, 2.5rem); }
.stats-compact .stat p { margin-top: .5rem; font-size: .85rem; }


.marquee { margin-top: clamp(4.5rem, 9vw, 7rem); border-block: 1px solid var(--line); overflow: hidden; padding-block: 1.6rem; }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee ul { display: flex; flex: none; }
.marquee li {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.6vw, 2.2rem); color: var(--cream-2);
  padding-inline: 1.6rem; white-space: nowrap; display: flex; align-items: center; gap: 3.2rem;
}
.marquee li::after { content: "◆"; font-size: .5em; color: var(--gold); margin-left: 1.6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- 06 · Viviendas --- */
.route { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; }
.route li {
  display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; color: var(--cream-2);
}
.route span { font-family: var(--mono); font-size: .7rem; color: var(--gold); }
/* Three house models: plan -> rooms -> installations -> walls rise -> the render (main.js initHouses) */
.houses { margin-top: clamp(2.5rem, 5vw, 4rem); }
.houses-stage { position: relative; overflow: hidden; background: var(--bg); }
.houses-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: none; }
.has-houses .houses-canvas { display: block; }
.houses-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.4rem; }
.houses-kicker { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.houses-rail { display: none; }
.has-houses .houses-rail { display: flex; flex-wrap: wrap; gap: .35rem; }
.houses-rail li {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-2);
  padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; opacity: .45;
  transition: opacity .4s, color .4s, border-color .4s;
}
.houses-rail li.is-done { opacity: .75; }
.houses-rail li.is-active { opacity: 1; color: var(--gold-2); border-color: var(--line-gold); }
.houses-view { padding-block: 1.2rem 1.4rem; }
.houses-track { display: grid; gap: 2rem; }
.house-frame {
  position: relative; margin: 0; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background:
    linear-gradient(rgba(214,169,46,.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(214,169,46,.05) 1px, transparent 1px) 0 0 / 24px 24px, var(--bg-2);
}
.house-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.house-cover {
  position: absolute; inset: 0; display: none; will-change: transform;
  background:
    linear-gradient(rgba(214,169,46,.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(214,169,46,.05) 1px, transparent 1px) 0 0 / 24px 24px, var(--bg-2);
}
.has-houses .house-cover { display: block; }
.house-tag {
  position: absolute; left: .7rem; bottom: .7rem; font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream); background: rgba(15, 17, 21, .55); padding: .3rem .55rem; border-radius: 999px;
}
.house-info { padding-top: .9rem; }
.house-num { font-family: var(--mono); font-size: .68rem; color: var(--gold); }
.house-name { font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 1.8vw, 1.65rem); margin-top: .1rem; }
.house-meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; color: var(--gold); margin-top: .3rem; white-space: nowrap; }
.house-pitch { color: var(--cream-2); font-size: .9rem; line-height: 1.45; margin-top: .5rem; max-width: 38ch; }
.house-cta {
  display: inline-flex; gap: .4rem; margin-top: .6rem; font-size: .9rem; color: var(--gold-2);
  border-bottom: 1px solid var(--line-gold); padding-bottom: .15rem; transition: color .3s;
}
.house-cta:hover { color: var(--cream); }
.houses-note { margin-top: 1rem; font-size: .84rem; }
/* pinned stage: one screen tall; the frame size leaves room for the name, pitch and button */
.has-houses .houses-stage { height: 100vh; height: 100svh; padding-top: calc(var(--nav-h) + 10px); display: flex; flex-direction: column; }
.has-houses .houses-view { flex: 1; min-height: 0; display: flex; align-items: flex-start; }
.has-houses .houses-track { width: 100%; }
.has-houses .house { width: min(100%, calc((100svh - var(--nav-h) - 290px) * .8)); justify-self: center; }
@media (max-width: 959.98px) {
  .houses-kicker { display: none; }
  .has-houses .houses-view { padding-inline: 0; }
  .has-houses .houses-track { display: flex; flex: none; gap: 0; width: 300%; will-change: transform; }
  .has-houses .house { flex: 0 0 33.3333%; width: auto; padding-inline: var(--gutter); display: flex; flex-direction: column; align-items: center; }
  .has-houses .house-frame, .has-houses .house-info { width: min(100%, calc((100svh - var(--nav-h) - 300px) * .8)); }
  .has-houses .houses-rail { flex-wrap: nowrap; gap: .25rem; }
  .has-houses .houses-rail li { font-size: .52rem; padding: .25rem .42rem; letter-spacing: .06em; }
}
@media (min-width: 960px) {
  .houses-head.container, .houses-view.container { max-width: 1680px; }
  .houses-track { grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.6vw, 3rem); }
}

/* --- 07 · CTA --- */
.cta { position: relative; overflow: hidden; min-height: 92vh; min-height: 92svh; display: grid; place-items: center; text-align: center; padding-block: 16vh; }
.cta-bg { position: absolute; inset: 0; }
.cta-bg img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; }
.cta-shade { position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 50%, rgba(15, 17, 21, .62), rgba(15, 17, 21, .94) 92%); }
.cta-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.cta-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 6.4vw, 5.6rem); max-width: 14ch; margin-bottom: 1.4rem; }
.cta .section-lead { margin-bottom: 2.4rem; color: var(--cream); }
.cta-phone { margin-top: 1.4rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; color: var(--cream-2); }

/* --- Footer --- */
.footer { border-top: 1px solid var(--line); padding-block: 3.5rem 5.5rem; }
.footer-inner { display: grid; gap: 1.8rem; align-items: center; }
.footer img { width: 120px; }
.footer p { color: var(--cream-2); font-size: .92rem; }
.footer-small { margin-top: .9rem; color: var(--mute) !important; font-size: .78rem !important; max-width: 70ch; }

/* 7. Effects --------------------------------------------------- */
.has-io [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.has-io [data-reveal].is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
/* Before/after: "after" wipes in */
.has-io .ba .ba-after .ba-media { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s var(--ease-out) .25s; }
.has-io .ba.is-revealed .ba-after .ba-media { clip-path: inset(0 0 0 0); }
/* Finishes gallery: photos rise out of a mask */
.has-io .g[data-reveal] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-out); }
.has-io .g[data-reveal].is-revealed { clip-path: inset(0 0 0 0); }
.has-io .g[data-reveal] img { transform: scale(1.18); }
.has-io .g[data-reveal].is-revealed img { transform: scale(1); }
.has-io .g[data-reveal].is-revealed:hover img { transform: scale(1.05); }

/* 8. Responsive ------------------------------------------------ */
@media (min-width: 540px) {
  .ba { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .story-media { grid-template-columns: repeat(4, 1fr); }
  .story-list { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .mosaic { grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 14px; }
  .m1 { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
  .m2 { grid-column: span 2; grid-row: span 2; }
  .m3, .m4 { grid-column: span 3; aspect-ratio: 3 / 2; }   /* same height side by side */
  .m5 { grid-column: span 2; }
  .m6 { grid-column: span 4; aspect-ratio: auto; }
  .gallery { grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(150px, 17vw, 250px); gap: 12px; }
  .g { aspect-ratio: auto; grid-row: span 2; grid-column: span 4; }
  .g1 { grid-column: span 8; }
  .footer-inner { grid-template-columns: auto 1fr; gap: 3rem; }
}
@media (min-width: 960px) {
  :root { --nav-h: 84px; }
  .nav-logo img { height: 34px; }
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .ba { gap: 1.6rem; }
  .wa-float { right: 28px; bottom: 28px; }
  .cs-head { grid-template-columns: 1fr 1.5fr; gap: 3rem; }
  .story.is-pinned .story-shade {
    background: linear-gradient(90deg, rgba(15, 17, 21, .9) 0%, rgba(15, 17, 21, .55) 36%, rgba(15, 17, 21, 0) 68%),
                linear-gradient(0deg, rgba(15, 17, 21, .7) 0%, rgba(15, 17, 21, 0) 45%);
  }
  .story.is-pinned .story-copy { right: auto; width: min(52vw, 760px); bottom: clamp(48px, 12vh, 130px); }
  .story.is-pinned .story-img:nth-child(2) { object-position: 50% 50%; }
  /* horizontal pinned showcase */
  .has-gsap .process-viewport { overflow: visible; scroll-snap-type: none; }
  .has-gsap .process { overflow: hidden; background: var(--bg); }
}
@media (min-width: 1280px) {
}

@media (min-width: 960px) and (max-width: 1199px) {
  .nav-links { gap: 1.05rem; font-size: .82rem; }
  .nav-cta { padding: .55rem .9rem; }
}

/* 9. Reduced motion (only intrusive) --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-hint span, .home-more span { animation: none; }
}

/* --- Equipo (first block of Quiénes somos): one row per person, all three with the same weight,
   ordered by closeness to the work; what the client gets first, the full career behind a native
   <details>. Static on purpose: no reveal; only the toggle moves. --- */
.team { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.team-lead { color: var(--cream-2); font-size: clamp(1rem, 1.3vw, 1.12rem); max-width: 58ch; }
.team-list { display: grid; gap: clamp(2.8rem, 6vw, 4.2rem); margin-top: clamp(2.2rem, 4.5vw, 3.4rem); }
.person { padding-top: 1.4rem; border-top: 1px solid var(--line); min-width: 0; }
.person h4 {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.02; letter-spacing: -.02em; overflow-wrap: anywhere;
}
.person-role { margin-top: .75rem; color: var(--gold-2); font-weight: 600; font-size: 1rem; line-height: 1.45; }
.person-role span { display: block; color: var(--cream-2); font-weight: 400; }
.person-body { margin-top: 1.2rem; min-width: 0; }
.person-does {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.4; color: var(--cream); max-width: 40ch;
}
.person-proof { display: grid; gap: .75rem; margin-top: 1.3rem; max-width: 60ch; }
.person-proof li { position: relative; padding-left: 1.2rem; color: var(--cream-2); font-size: .98rem; line-height: 1.55; }
.person-proof li::before { content: ""; position: absolute; left: 0; top: .78em; width: .5rem; height: 1px; background: var(--gold); }

/* the career toggle: native details, opens in 280ms (instant where the browser can't animate it) */
.career-toggle { margin-top: 1.6rem; interpolate-size: allow-keywords; }
.career-toggle > summary {
  display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; padding-block: .4rem;
  list-style: none; cursor: pointer; color: var(--gold-2); font-weight: 600; font-size: .98rem;
  transition: color .18s ease, transform .12s var(--ease-out);
}
.career-toggle > summary::-webkit-details-marker { display: none; }
.career-toggle > summary:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .career-toggle > summary:hover { color: var(--cream); } }
.plus { position: relative; flex: none; width: 13px; height: 13px; }
.plus::before, .plus::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px;
  background: currentColor; transition: transform .2s var(--ease-out);
}
.plus::after { transform: rotate(90deg); }
.career-toggle[open] .plus::after { transform: rotate(0deg); }
.career-toggle .when-open, .career-toggle[open] .when-closed { display: none; }
.career-toggle[open] .when-open { display: inline; }
.career-toggle::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .28s var(--ease-out), content-visibility .28s allow-discrete;
}
.career-toggle[open]::details-content { block-size: auto; }

.career-intro { margin-top: 1rem; color: var(--cream); max-width: 62ch; }
.career { margin-top: 1rem; border-bottom: 1px solid var(--line); }
.career li { display: grid; gap: .25rem 1.6rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.career-year { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: var(--gold); padding-top: .15rem; }
.career-what { color: var(--cream); font-weight: 600; line-height: 1.45; }
.career-what span { display: block; font-weight: 400; color: var(--gold-2); font-size: .92rem; }
.career li div > p:not(.career-what) { margin-top: .3rem; color: var(--cream-2); font-size: .95rem; line-height: 1.55; max-width: 62ch; }
.career-note, .career-edu { margin-top: 1.1rem; color: var(--cream-2); font-size: .95rem; line-height: 1.6; max-width: 66ch; }
.career-edu { color: var(--cream); }
@media (min-width: 720px) {
  .career li { grid-template-columns: 8.5rem 1fr; }
}
@media (min-width: 960px) {
  .person { display: grid; grid-template-columns: 5fr 7fr; column-gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .person-body { margin-top: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .career-toggle::details-content { transition: none; }
}

/* --- 02 · Quiénes somos (no photos: story, leader, capabilities, experience) --- */
.about { position: relative; overflow: hidden; }
.about-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(214, 169, 46, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 169, 46, .055) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(70% 45% at 78% 12%, #000 15%, transparent 80%);
          mask-image: radial-gradient(70% 45% at 78% 12%, #000 15%, transparent 80%);
}
.about .container { position: relative; }
.about-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: -.03em; max-width: 14ch; }
.about-lead { margin-top: 1.6rem; font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.25; color: var(--cream); max-width: 34ch; }
.about-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.about-tags li {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2);
  border: 1px solid var(--line-gold); border-radius: 999px; padding: .45rem .9rem;
}
.about-main { display: grid; gap: 2.4rem; margin-top: clamp(3rem, 6vw, 5rem); align-items: start; }
.about-story p { color: var(--cream); font-size: clamp(1.02rem, 1.25vw, 1.15rem); line-height: 1.7; max-width: 58ch; margin-bottom: 1.3rem; }
.about-story .about-name { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; color: var(--cream-2); font-size: 1rem; }
.about-name img { width: 58px; flex: none; }

.about-chain { margin-top: clamp(4rem, 8vw, 7rem); }
.chain { display: grid; gap: 1.4rem 1.2rem; margin-top: 1.6rem; }
.chain li { position: relative; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--serif); font-size: clamp(1.15rem, 1.5vw, 1.35rem); color: var(--cream); }
.chain li::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--gold);
  transform-origin: left; transition: transform 1.1s var(--ease-out);
}
.chain li:nth-child(2)::before { transition-delay: .12s; }
.chain li:nth-child(3)::before { transition-delay: .24s; }
.chain li:nth-child(4)::before { transition-delay: .36s; }
.chain li:nth-child(5)::before { transition-delay: .48s; }
.chain li:nth-child(6)::before { transition-delay: .6s; }
.has-io .chain:not(.is-revealed) li::before { transform: scaleX(0); }
.chain span { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--gold); margin-bottom: .4rem; }
.chain-note { margin-top: 1.6rem; color: var(--cream-2); max-width: 62ch; }


.company-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.company-list li { padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--cream-2); }
.about-commit {
  margin-top: clamp(4rem, 8vw, 6rem); padding-left: 1.4rem; border-left: 2px solid var(--gold);
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.25; max-width: 34ch; color: var(--cream);
}

/* brand band: two rows, opposite directions */
.brands { margin-top: clamp(4.5rem, 9vw, 7rem); }
.brands-head { margin-bottom: 1.4rem; }
.brands-head .kicker { margin-bottom: .6rem; }
.brands-note { color: var(--cream-2); font-size: .92rem; max-width: 62ch; }
.brands .marquee { margin-top: 0; }
.brands .marquee + .marquee { border-top: 0; }
.marquee-rev .marquee-track { animation-direction: reverse; animation-duration: 56s; }

@media (min-width: 720px) {
  .chain { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
}
@media (min-width: 1280px) {
  .chain { grid-template-columns: repeat(6, 1fr); }
}

/* --- 03 · Trayectoria: the figures explained, scale bars, recent work, branch network --- */
.ledger-title { margin-top: clamp(2.5rem, 5vw, 4rem); font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.ledger { margin-top: 1rem; border-top: 1px solid var(--line); }
.ledger-row { display: grid; gap: .6rem 2.5rem; padding: clamp(1.3rem, 2.6vw, 2rem) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ledger-fig { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1; color: var(--cream); letter-spacing: -.02em; }
.ledger-fig small { font-family: var(--mono); font-size: .85rem; color: var(--gold); letter-spacing: .06em; }
.ledger-txt h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 1.8vw, 1.55rem); margin-bottom: .35rem; }
.ledger-txt p { color: var(--cream-2); max-width: 60ch; }
.ledger-tag {
  display: inline-block; margin-top: .6rem; padding: .3rem .7rem; border: 1px solid var(--line-gold); border-radius: 999px;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2);
}

.scale { margin-top: clamp(4.5rem, 9vw, 7rem); }
.scale-note { color: var(--cream-2); max-width: 60ch; }
.bars { margin-top: clamp(1.6rem, 3vw, 2.4rem); display: grid; gap: clamp(1.2rem, 2.2vw, 1.6rem); }
.bars li { display: grid; gap: .45rem; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.bar-head b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--cream); }
.bar-head span { flex: none; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; color: var(--gold-2); }
.bars i {
  display: block; height: 6px; border-radius: 999px; width: calc(var(--v) * 100%);
  background: linear-gradient(90deg, var(--gold-3), var(--gold) 60%, var(--gold-2));
  transform-origin: left; transition: transform 1.3s var(--ease-out);
}
.bars li:nth-child(2) i { transition-delay: .08s; }
.bars li:nth-child(3) i { transition-delay: .16s; }
.bars li:nth-child(4) i { transition-delay: .24s; }
.bars li:nth-child(5) i { transition-delay: .32s; }
.bars li:nth-child(6) i { transition-delay: .4s; }
.bars li:nth-child(7) i { transition-delay: .48s; }
.bars li:nth-child(8) i { transition-delay: .56s; }
.has-io .bars:not(.is-revealed) i { transform: scaleX(0); }
.bars p { font-size: .88rem; color: var(--cream-2); }
.scale-more { margin-top: clamp(1.8rem, 3vw, 2.4rem); padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--cream-2); font-size: .92rem; max-width: 80ch; }

.cs { margin-top: clamp(4.5rem, 9vw, 7rem); }
.cs-cards { display: grid; gap: 12px; margin-top: clamp(2rem, 4vw, 3rem); }
.cs-card {
  padding: clamp(1.2rem, 2vw, 1.6rem); border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  transition: border-color .5s var(--ease-out), transform .5s var(--ease-out);
}
.cs-card:hover { border-color: var(--line-gold); transform: translateY(-4px); }
.cs-tag { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.cs-card h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 1.8vw, 1.55rem); margin: .45rem 0 .6rem; }
.cs-fig { font-family: var(--serif); font-weight: 300; font-size: 1.35rem; color: var(--cream); white-space: nowrap; }
.cs-fig small { font-family: var(--mono); font-size: .7rem; color: var(--gold); }
.cs-card p:last-child { margin-top: .7rem; font-size: .9rem; color: var(--cream-2); }
.cs-more { background: none; border-style: dashed; border-color: var(--line-gold); }
.cs-more ul { margin-top: .2rem; }
.cs-more li { padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--cream-2); }
.cs-more li:last-child { border-bottom: 0; }

.net {
  display: grid; gap: 2rem; margin-top: clamp(4.5rem, 9vw, 7rem); padding: clamp(1.6rem, 4vw, 3rem);
  border: 1px solid var(--line-gold); border-radius: 18px; background: linear-gradient(135deg, rgba(214, 169, 46, .08), transparent 60%);
}
.net-fig { font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1; margin-bottom: 1rem; }
.net-fig small { font-family: var(--mono); font-size: .8rem; color: var(--gold); letter-spacing: .08em; }
.net-main > p:last-child { color: var(--cream-2); max-width: 46ch; }
.net-title { font-family: var(--serif); font-size: clamp(1.2rem, 1.6vw, 1.4rem); margin-bottom: 1rem; }
.net-link { display: inline-block; margin-top: 1.4rem; font-size: .92rem; }

/* --- 06 · Quiénes somos: capabilities --- */
.caps { margin-top: clamp(4.5rem, 9vw, 8rem); }
.cap-list { display: grid; gap: 12px; margin-top: 1.6rem; }
.cap-list li { position: relative; padding: 1.2rem 0 0; border-top: 1px solid var(--line); }
.cap-list li::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 2px; background: var(--gold);
}
.cap-list span { font-family: var(--mono); font-size: .7rem; color: var(--gold); }
.cap-list h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 1.7vw, 1.45rem); margin: .35rem 0 .5rem; }
.cap-list p { color: var(--cream-2); font-size: .95rem; max-width: 42ch; }
.caps-more { margin-top: 1.8rem; color: var(--cream-2); }

@media (min-width: 720px) {
  .ledger-row { grid-template-columns: minmax(260px, .9fr) 1.6fr; }
  .cs-cards { grid-template-columns: repeat(2, 1fr); }
  .cap-list { grid-template-columns: repeat(2, 1fr); gap: 2rem 2.4rem; }
}
@media (min-width: 960px) {
  .net { grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: center; }
  .bars { grid-template-columns: 1fr 1fr; column-gap: 4rem; }
}
@media (min-width: 1280px) {
  .cs-cards { grid-template-columns: repeat(4, 1fr); }
  .cap-list { grid-template-columns: repeat(5, 1fr); gap: 2rem; }
}
