/* ============ Hola Plan — Dossier 2026 ============ */
:root {
  --blue: #0061FE;
  --cream: #FFFCF9;
  --ink: #0B0718;
  --gray: #373737;
  --pink: #FF7AD8;
  --red: #FF4400;
  --yellow: #FFCC00;
  --green: #009A1E;
  --purple: #674EA7;

  --bg: var(--cream);
  --fg: var(--ink);
  --muted: rgba(11, 7, 24, .58);
  --line: rgba(11, 7, 24, .12);
  --accent: var(--blue);

  --gutter: clamp(16px, 4vw, 56px);
  --radius: clamp(14px, 1.6vw, 26px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: var(--ink);
  --fg: #F6F2FF;
  --muted: rgba(246, 242, 255, .6);
  --line: rgba(246, 242, 255, .14);
}
html[data-theme="blue"] { --bg: var(--blue); --fg: #fff; --muted: rgba(255,255,255,.7); --line: rgba(255,255,255,.2); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(16px, 1.05vw + 8px, 19px);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  transition: background-color .7s var(--ease), color .7s var(--ease);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}
body.is-loading { overflow: hidden; height: 100svh; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--accent); color: #fff; }

/* Grilla de fondo de la marca */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: clamp(36px, 4.2vw, 72px) clamp(36px, 4.2vw, 72px);
  background-position: center center;
}

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 1.5em; display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--accent); }

/* ============ PRECARGA ============ */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--blue); color: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.loader__shapes { position: relative; display: flex; gap: clamp(8px, 1.6vw, 22px); }
.loader__shapes img {
  width: clamp(38px, 6.5vw, 92px); height: auto;
  transform: translateY(40px) scale(0); opacity: 0;
}
.loader__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) + 14px);
  display: flex; justify-content: space-between; align-items: flex-end;
  font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
}
.loader__count { font-size: clamp(48px, 9vw, 140px); font-weight: 900; letter-spacing: -.05em; line-height: .8; font-variant-numeric: tabular-nums; }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.18); }
.loader__bar i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.no-js .loader { display: none; }

/* ============ BARRA FIJA ============ */
.topbar {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  color: var(--fg); transition: color .7s var(--ease), background-color .7s var(--ease);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  pointer-events: none;
  transform: translateY(-110%);
}
.topbar > * { pointer-events: auto; }
.topbar__logo img { height: clamp(16px, 1.6vw, 22px); width: auto; transition: filter .7s var(--ease); }
html[data-theme="cream"] .topbar__logo img { filter: brightness(0) saturate(100%) invert(3%) sepia(30%) saturate(3000%) hue-rotate(240deg); }
.menu-open .topbar { color: #fff; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .topbar__logo img { filter: none; }
.topbar__now {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: .8em; align-items: baseline; white-space: nowrap;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.topbar__num { font-variant-numeric: tabular-nums; opacity: .6; }
.topbar__menu { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 6px 0; }
.topbar__burger { width: 22px; height: 12px; position: relative; display: block; }
.topbar__burger i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease); }
.topbar__burger i:first-child { top: 0; }
.topbar__burger i:last-child { top: 10px; }
.menu-open .topbar__burger i:first-child { top: 5px; transform: rotate(45deg); }
.menu-open .topbar__burger i:last-child { top: 5px; transform: rotate(-45deg); }
.topbar__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.topbar__progress i { display: block; height: 100%; background: var(--accent-bar, currentColor); transform-origin: left; transform: scaleX(0); }

@media (max-width: 720px) {
  .topbar__now { display: none; }
  .topbar__menu-label { display: none; }
}

/* ============ MENÚ ============ */
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--blue); color: #fff;
  padding: calc(70px + 2vh) var(--gutter) var(--gutter);
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .8s var(--ease), visibility 0s .8s;
  overflow-y: auto; overscroll-behavior: contain;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
.menu__list { list-style: none; margin: 0; padding: 0; position: relative; columns: 2; column-gap: var(--gutter); }
.menu__list li { break-inside: avoid; border-top: 1px solid rgba(255,255,255,.22); }
.menu__list a {
  display: flex; gap: 1em; align-items: baseline; padding: .55em 0; text-decoration: none;
  font-size: clamp(18px, 2.3vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  transform: translateY(20px); opacity: 0; transition: transform .7s var(--ease), opacity .7s var(--ease), padding .3s var(--ease);
}
.menu-open .menu__list a { transform: none; opacity: 1; transition-delay: calc(var(--i) * 30ms + 200ms); }
.menu__list a:hover { padding-left: .4em; }
.menu__list small { font-size: 12px; font-weight: 600; opacity: .6; font-variant-numeric: tabular-nums; min-width: 1.8em; }
.menu__list .yr { margin-left: auto; font-size: 13px; font-weight: 600; opacity: .7; }
.menu__foot { display: flex; gap: 24px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding-top: 32px; position: relative; }
@media (max-width: 720px) { .menu__list { columns: 1; } }

/* ============ HERO ============ */
.hero {
  position: relative; height: 100svh; min-height: 560px; overflow: hidden;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
}
.hero__shapes, .about__shapes, .outro__shapes { position: absolute; inset: 0; pointer-events: none; }
.hero__shapes img, .about__shapes img, .outro__shapes img {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(var(--s) * 1vw); min-width: calc(var(--s) * 9px); height: auto;
  will-change: transform;
}
.hero__center { position: relative; text-align: center; padding: 0 var(--gutter); }
.hero__logo { margin: 0; }
.hero__logo img { width: min(64vw, 900px); height: auto; margin: 0 auto; }
.hero__tag {
  margin: clamp(18px, 2.4vw, 34px) 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35em;
  font-size: clamp(14px, 1.5vw, 22px); font-weight: 500; letter-spacing: -.01em;
}
.hero__tag span { display: inline-block; }
.hero__corner {
  position: absolute; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25;
}
.hero__corner--tl { top: calc(var(--gutter) + 40px); left: var(--gutter); font-size: clamp(15px, 1.5vw, 22px); font-weight: 800; letter-spacing: -.01em; }
.hero__corner--bl { bottom: var(--gutter); left: var(--gutter); }
.hero__corner--br { bottom: var(--gutter); right: var(--gutter); }
.hero__scroll {
  position: absolute; bottom: var(--gutter); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.hero__scroll i { width: 1px; height: 46px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: #fff; animation: scrollcue 1.8s var(--ease) infinite; }
@keyframes scrollcue { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }
@media (max-width: 720px) {
  .hero__logo img { width: 84vw; }
  .hero__corner--tl { top: 72px; }
}

/* ============ ESTUDIO ============ */
.about {
  position: relative; padding: clamp(110px, 18vh, 220px) var(--gutter) clamp(90px, 14vh, 180px);
  --accent: var(--blue);
}
.about__shapes img { opacity: .95; }
.about__text {
  position: relative; margin: 0;
  font-size: clamp(24px, 3.3vw, 54px); line-height: 1.12; font-weight: 600; letter-spacing: -.028em;
  max-width: 1200px;
}
.about__text .w { opacity: .14; }
.about__disciplines {
  position: relative; list-style: none; padding: 0; margin: clamp(40px, 6vw, 80px) 0 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.about__disciplines li, .pill {
  display: inline-flex; align-items: center; gap: .5em;
  border: 1.5px solid currentColor; border-radius: 999px; padding: .5em 1.05em;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; line-height: 1.2; text-decoration: none;
}
.pill { transition: background-color .3s, color .3s, border-color .3s; }
.pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill--solid:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.pill--light:hover { background: #fff; color: var(--blue); border-color: #fff; }
.pill svg { width: 1em; height: 1em; }

/* ============ ÍNDICE ============ */
.index { position: relative; padding: 0 var(--gutter) clamp(100px, 16vh, 200px); --accent: var(--red); }
.index__head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid var(--fg); padding-bottom: 14px; }
.index__head .eyebrow { margin: 0; }
.index__count { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.index__list { list-style: none; margin: 0; padding: 0; }
.index__list li { border-bottom: 1px solid var(--line); }
.index__list a {
  display: grid; grid-template-columns: 3.2em 1fr auto 4em; align-items: center; gap: 1em;
  padding: clamp(14px, 1.6vw, 22px) 0; text-decoration: none; position: relative;
}
.index__list .n { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.index__list .t {
  font-size: clamp(22px, 3.6vw, 58px); font-weight: 900; letter-spacing: -.04em; line-height: .95; text-transform: uppercase;
  transition: transform .5s var(--ease), color .3s;
}
.index__list .pl { font-size: 13px; color: var(--muted); font-weight: 500; text-align: right; }
.index__list .y { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .index__list a:hover .t { transform: translateX(.35em); color: var(--c); }
}
.index__preview {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  width: clamp(220px, 22vw, 360px); aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  opacity: 0; transition: opacity .3s;
}
.index__preview.on { opacity: 1; }
.index__preview img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .index__list a { grid-template-columns: 2.2em 1fr auto; }
  .index__list .pl { display: none; }
}
@media (hover: none) { .index__preview { display: none; } }

/* ============ PROYECTO ============ */
.project { position: relative; padding: clamp(100px, 16vh, 200px) 0 clamp(60px, 10vh, 140px); }
.project__head { padding: 0 var(--gutter); position: relative; }
.project__top { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(18px, 2.5vw, 34px); }
.project__num {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums;
  display: inline-flex; gap: .4em;
}
.project__num em { font-style: normal; color: var(--muted); }
.project__rule { flex: 1; height: 1.5px; background: var(--fg); transform-origin: left; }
.project__shape { width: clamp(40px, 4.6vw, 72px); height: auto; }
.project__title {
  margin: 0; text-transform: uppercase; font-weight: 900; letter-spacing: -.05em; line-height: .86;
  font-size: clamp(46px, 10.5vw, 188px);
}
.project__title .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.project__title .line > span { display: block; }
.project__tags { list-style: none; padding: 0; margin: clamp(22px, 3vw, 40px) 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.project__tags li:last-child { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .project__tags li:last-child { color: var(--ink); }

.media { position: relative; overflow: hidden; background: var(--ph, #222); }
.media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .9s var(--ease);
}
.media img.is-in { opacity: 1; }
.media--parallax img { height: 118%; position: absolute; top: -9%; left: 0; will-change: transform; }

.project__hero { margin: clamp(40px, 6vw, 90px) 0 0; padding: 0; }
.project__hero .media {
  height: min(92svh, 64vw); min-height: 300px;
  clip-path: inset(0 var(--gutter) 0 var(--gutter) round var(--radius));
}

.project__body {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter);
  padding: clamp(50px, 8vw, 120px) var(--gutter) 0;
}
.project__aside { grid-column: 1 / span 4; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.project__stat { margin: 0; line-height: 1; }
.project__stat b { display: block; font-size: clamp(64px, 8vw, 140px); font-weight: 900; letter-spacing: -.06em; color: var(--accent); line-height: .85; }
.project__stat span { display: block; margin-top: .5em; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.project__text { grid-column: 6 / span 7; }
.project__text p { margin: 0 0 1.1em; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.5; letter-spacing: -.008em; }
.project__text p:first-child { font-size: clamp(21px, 2vw, 32px); line-height: 1.25; font-weight: 600; letter-spacing: -.022em; }
@media (max-width: 860px) {
  .project__aside, .project__text { grid-column: 1 / -1; }
  .project__aside { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
  .project__body { row-gap: 32px; }
}

/* Sub-instalaciones: carrusel horizontal (pin en desktop, swipe en mobile) */
.subs { margin-top: clamp(70px, 10vw, 150px); position: relative; }
.subs__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--gutter); margin-bottom: 24px; }
.subs__head .eyebrow { margin: 0; }
.subs__hint { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.subs__viewport { overflow: hidden; }
.subs__track { display: flex; gap: clamp(14px, 2vw, 28px); padding: 0 var(--gutter); width: max-content; }
.sub { width: clamp(270px, 36vw, 620px); flex: none; }
.sub .media { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.sub__meta { display: flex; gap: 12px; align-items: baseline; margin: 18px 0 8px; }
.sub__n { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.sub h3 { margin: 0; font-size: clamp(22px, 2.3vw, 38px); font-weight: 900; letter-spacing: -.035em; text-transform: uppercase; line-height: .95; }
.sub p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.05vw, 18px); line-height: 1.45; max-width: 46ch; }
.sub--end { width: clamp(120px, 14vw, 220px); display: grid; place-items: center; }
.sub--end img { width: 60%; height: auto; }
@media (max-width: 860px), (hover: none) {
  .subs__viewport {
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .subs__viewport::-webkit-scrollbar { display: none; }
  .sub { width: 80vw; max-width: 460px; scroll-snap-align: start; scroll-margin-left: var(--gutter); }
  .sub--end { display: none; }
}

/* Galería: filas justificadas */
.gallery { padding: clamp(60px, 9vw, 140px) var(--gutter) 0; display: flex; flex-direction: column; gap: clamp(14px, 2vw, 28px); }
.gallery__row { display: flex; gap: clamp(14px, 2vw, 28px); align-items: flex-start; }
.gallery__row .media { border-radius: var(--radius); flex: var(--ar) 1 0; aspect-ratio: var(--ar); }
.gallery__row--single { justify-content: flex-end; }
.gallery__row--single .media { flex: 0 1 auto; width: min(100%, calc(70vh * var(--ar)), 78%); }
.gallery__row--single.left { justify-content: flex-start; }
.gallery__row--offset > .media:last-child { margin-top: clamp(30px, 8vw, 140px); }
@media (max-width: 640px) {
  .gallery__row { flex-direction: column; }
  .gallery__row .media, .gallery__row--single .media { width: 100%; flex: none; }
  .gallery__row--offset > .media:last-child { margin-top: 0; }
}

.project__cta { padding: clamp(36px, 5vw, 70px) var(--gutter) 0; display: flex; justify-content: flex-end; }
.project__cta .pill { font-size: 14px; padding: .8em 1.4em; }

/* Separador entre proyectos */
.project + .project::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line);
}

/* ============ CIERRE ============ */
.outro {
  position: relative; min-height: 100svh; overflow: hidden; background: var(--blue); color: #fff;
  display: grid; place-items: center; padding: 120px var(--gutter);
}
.outro__center { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.outro__title {
  margin: 0; font-size: clamp(64px, 17vw, 300px); font-weight: 900; letter-spacing: -.06em; line-height: .85; text-transform: uppercase;
}
.outro__title .ch { display: inline-block; }
.outro__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: clamp(28px, 4vw, 54px); }
.outro__logo { width: clamp(150px, 16vw, 240px); height: auto; margin-top: clamp(40px, 6vw, 80px); }
.outro__top {
  position: absolute; bottom: var(--gutter); left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
}

/* Animación de entrada genérica (la activa JS) */
.js .reveal { opacity: 0; transform: translateY(40px); }

/* ============ Accesibilidad / sin animación ============ */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .about__text .w { opacity: 1; }
}
