/* SS Arquitectura — hoja de estilos única.
   Paleta: negro + azul corporativo #003399 (el del portfolio). Tipografía Inter (latino y cirílico), alojada aquí. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0218-021B, U+02C6, U+02DA, U+02DC, U+0400-045F, U+0490-0491, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+20BD, U+2116, U+2122, U+2190-2193, U+2197, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0218-021B, U+02C6, U+02DA, U+02DC, U+0400-045F, U+0490-0491, U+2010-2015, U+2018-201E, U+2020-2022, U+2026, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+20BD, U+2116, U+2122, U+2190-2193, U+2197, U+2212;
}

:root {
  --negro: #0b0b0c;
  --carbon: #151517;
  --linea: rgba(255, 255, 255, .18);
  --linea-suave: rgba(255, 255, 255, .1);
  --blanco: #f6f6f4;
  --texto: #dadad6;
  --gris: #a6a6a1;
  --azul: #003399;          /* azul corporativo exacto */
  --azul-borde: #3d6be0;    /* mismo tono, aclarado, para bordes sobre negro */
  --azul-claro: #7396ff;    /* mismo tono, aclarado, para texto sobre negro */
  --pad: clamp(20px, 4vw, 64px);
  --cab: 84px;
  --pie: 52px;
  --hueco: clamp(12px, 1.4vw, 22px);
  --fuente: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--negro); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--negro); color: var(--texto);
  font-family: var(--fuente); font-weight: 400; font-size: 1rem; line-height: 1.6;
  font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; display: block; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
strong, b { font-weight: 400; color: var(--blanco); }
::selection { background: var(--azul); color: #fff; }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.saltar {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--azul); color: #fff; padding: 10px 16px; text-decoration: none;
}
.saltar:focus { top: 12px; }
.oculto-visual {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { color: var(--blanco); font-weight: 300; letter-spacing: -.015em; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 3.1vw, 3.4rem); line-height: 1.06; }
.titulo-pag { font-size: clamp(1.7rem, 2.3vw, 2.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.25rem, 1.5vw, 1.6rem); line-height: 1.2; }
h3 { font-size: clamp(1.3rem, 1.7vw, 1.9rem); line-height: 1.15; }
.sobre {
  font-size: .75rem; font-weight: 400; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--azul-claro);
}
.meta { font-size: .75rem; font-weight: 400; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.prosa p + p { margin-top: .9em; }
.prosa { max-width: 68ch; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 46px; padding: 0 1.5em;
  background: var(--azul); color: #fff; border: 1px solid var(--azul-borde);
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; text-align: center;
  transition: background-color .25s, border-color .25s;
}
.btn:hover { background: #0a41b8; border-color: #7396ff; }
.btn--linea { background: transparent; border-color: var(--linea); color: var(--blanco); }
.btn--linea:hover { background: rgba(255, 255, 255, .07); border-color: var(--blanco); }
.btn svg { width: 1.5em; height: 1.5em; flex: none; }
.enlace { color: var(--blanco); text-decoration: underline; text-decoration-color: var(--azul-borde); text-decoration-thickness: 1px; text-underline-offset: .28em; }
.enlace:hover { text-decoration-color: var(--blanco); }
.ic {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--linea); color: var(--blanco); transition: background-color .2s, border-color .2s;
}
.ic:hover:not(:disabled) { background: rgba(255, 255, 255, .08); border-color: var(--blanco); }
.ic:disabled { opacity: .35; cursor: default; }
.ic svg { width: 18px; height: 18px; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: relative; z-index: 20; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px; padding: 8px var(--pad);
  border-bottom: 1px solid var(--linea-suave); background: var(--negro);
}
.marca { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.marca img { height: 44px; width: auto; }
.marca::after { content: ""; width: 2px; height: 36px; background: var(--azul); }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px clamp(14px, 2.2vw, 36px); justify-content: flex-end; }
.nav a {
  display: inline-block; padding: 12px 0; position: relative;
  font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; text-decoration: none; color: var(--texto);
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--azul-borde);
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav a:hover { color: #fff; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: #fff; }
.nav-btn {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px;
  font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--blanco);
}
.nav-btn i { display: block; width: 22px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; transition: height .2s; }
.nav-btn[aria-expanded="true"] i { height: 2px; border-bottom: 0; }

/* ---------- Pie ---------- */
.pie {
  position: relative; z-index: 15; flex: none;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
  min-height: var(--pie); padding: 6px var(--pad);
  border-top: 1px solid var(--linea-suave); background: var(--negro);
  font-size: .78rem; color: var(--gris);
}
.pie-fin { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.redes { display: flex; gap: 6px; }
.redes a { display: grid; place-items: center; width: 40px; height: 40px; color: var(--texto); transition: color .2s; }
.redes a:hover { color: #fff; }
.redes svg { width: 20px; height: 20px; }
.legal > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 40px;
  color: var(--texto); text-decoration: underline; text-decoration-color: var(--azul-borde); text-underline-offset: .28em;
}
.legal > summary::-webkit-details-marker { display: none; }
.legal > summary:hover { color: #fff; }
.legal-panel { padding: 20px 0 8px; color: var(--texto); font-size: .92rem; line-height: 1.6; max-width: 78ch; }
.legal-panel h2 { font-size: 1.5rem; margin-bottom: .6em; letter-spacing: .02em; }
.legal-panel h3 { font-size: 1.05rem; font-weight: 400; letter-spacing: 0; margin: 1.5em 0 .5em; color: var(--blanco); }
.legal-panel p + p, .legal-panel ul + p, .legal-panel p + ul { margin-top: .6em; }
.legal-panel li + li { margin-top: .25em; }
.legal-cerrar { display: none; }
.js .legal[open] > .legal-panel {
  position: fixed; z-index: 40; left: 0; right: 0; top: 0; bottom: 0; max-width: none;
  overflow-y: auto; overscroll-behavior: contain; background: var(--negro);
  padding: clamp(24px, 5vh, 56px) var(--pad) 48px;
}
.js .legal[open] .legal-in { max-width: 78ch; margin: 0 auto; }
.js .legal[open] .legal-cerrar {
  display: inline-grid; position: fixed; z-index: 41; top: 16px; right: var(--pad); background: var(--negro);
}

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 2px clamp(16px, 2vw, 34px); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--linea-suave); }
.tabs::-webkit-scrollbar { display: none; }
.tabs.hay-mas { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.tabs.hay-menos { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px); mask-image: linear-gradient(to right, transparent, #000 44px); }
.tabs.hay-mas.hay-menos { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.tab {
  position: relative; flex: none; min-height: 44px; padding: 0 0 2px; white-space: nowrap;
  font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--gris); transition: color .2s;
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--azul-borde); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { color: #fff; }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab:focus-visible { outline-offset: -3px; }
.js [data-panel] > .panel-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
[data-panel]:focus-visible { outline: 2px solid var(--azul-borde); outline-offset: 6px; }
html:not(.js) [data-panel] + [data-panel] { margin-top: 40px; }
html:not(.js) .panel-t { margin-bottom: 14px; }

/* ---------- Página partida (Estudio, Servicios, Contacto) ---------- */
.dos { display: grid; grid-template-columns: minmax(0, 1fr); }
.dos-img { position: relative; background: var(--carbon); height: 30vh; min-height: 180px; overflow: hidden; }
.dos-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dos-img img[data-img-de] { opacity: 0; transition: opacity .6s; }
.dos-img img.visible { opacity: 1; }
html:not(.js) .dos-img img[data-img-de]:first-child { opacity: 1; }
.dos-txt { padding: clamp(24px, 4vh, 48px) var(--pad) clamp(28px, 4vh, 48px); display: flex; flex-direction: column; min-width: 0; }
.dos-txt > .sobre { margin-bottom: 10px; }
.dos-txt > h1 { margin-bottom: clamp(16px, 2.6vh, 28px); }
.dos-txt .tabs { margin-bottom: clamp(16px, 2.8vh, 28px); }

/* Estudio */
.hitos { display: grid; gap: 0; margin: 1.2em 0; border-top: 1px solid var(--linea-suave); max-width: 68ch; }
.hitos > div { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; align-items: baseline; padding: .75em 0; border-bottom: 1px solid var(--linea-suave); }
.hitos dt { font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--azul-claro); letter-spacing: -.01em; }
.hitos dd { color: var(--blanco); }

/* Servicios */
.servicios { counter-reset: s; border-top: 1px solid var(--linea-suave); max-width: 720px; }
.servicios li {
  counter-increment: s; display: grid; grid-template-columns: 3em 1fr; align-items: baseline; gap: 8px;
  padding: clamp(.5em, 1.35vh, .85em) 0; border-bottom: 1px solid var(--linea-suave);
  font-weight: 300; font-size: clamp(1.05rem, 1.45vw, 1.4rem); line-height: 1.25; color: var(--blanco);
}
.servicios li::before { content: counter(s, decimal-leading-zero); font-size: .72rem; font-weight: 400; letter-spacing: .12em; color: var(--azul-claro); }
.cta { margin-top: clamp(18px, 3vh, 32px); }

/* Contacto */
.wa { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.wa .btn { min-height: 54px; padding: 0 1.7em; font-size: .82rem; }
.wa p { max-width: 30ch; color: var(--blanco); line-height: 1.45; }
.sedes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px clamp(24px, 4vw, 56px); margin-top: clamp(22px, 4.5vh, 44px); padding-top: clamp(20px, 4vh, 36px); border-top: 1px solid var(--linea-suave); }
.sede h2 { margin-bottom: 8px; }
.sede .sobre { margin-bottom: 6px; }
.sede address { color: var(--texto); line-height: 1.55; }
.sede .datos { margin-top: 12px; display: grid; gap: 2px; }
.sede .datos span { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.sede .datos a { display: inline-flex; min-height: 36px; align-items: center; font-size: 1rem; letter-spacing: 0; text-transform: none; }
.contacto-redes { margin-top: clamp(20px, 4vh, 36px); display: flex; align-items: center; gap: 14px; }
.contacto-redes .redes a { width: 46px; height: 46px; border: 1px solid var(--linea); }
.contacto-redes .redes a:hover { border-color: #fff; }
.contacto-redes .redes { gap: 10px; }

/* ---------- Inicio ---------- */
.inicio { display: grid; grid-template-columns: minmax(0, 1fr); }
.pase { position: relative; background: var(--carbon); height: 46vh; height: 46svh; min-height: 240px; overflow: hidden; order: -1; }
.pase-lista, .pase-lista li { position: absolute; inset: 0; }
.pase-lista li { display: none; opacity: 0; transition: opacity 1.1s ease; }
.pase-lista li.pre { display: block; z-index: 1; }
.pase-lista li.sale { display: block; opacity: 1; transition: none; z-index: 0; }
.pase-lista li.activo { display: block; opacity: 1; z-index: 1; }
.pase-lista img { width: 100%; height: 100%; object-fit: cover; }
.pase-ctl { position: absolute; z-index: 3; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; }
.pase-ctl .ic { background: rgba(11, 11, 12, .72); border-color: rgba(255, 255, 255, .35); width: 40px; height: 40px; }
.pase-ctl .ic:hover { background: rgba(11, 11, 12, .92); }
.pase-pausa .i-seguir, .pase-pausa.en-pausa .i-pausa { display: none; }
.pase-pausa.en-pausa .i-seguir { display: block; }
.pase-cuenta { padding: 0 10px; min-height: 40px; display: inline-flex; align-items: center; background: rgba(11, 11, 12, .72); color: #fff; font-size: .75rem; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.hero-txt { padding: clamp(22px, 4vh, 44px) var(--pad) clamp(24px, 4vh, 40px); display: flex; flex-direction: column; min-width: 0; }
.hero-txt h1 { max-width: 12em; }
.hero-sub { margin-top: clamp(14px, 2.4vh, 22px); display: flex; align-items: center; gap: 14px; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blanco); }
.hero-sub::before { content: ""; width: 34px; height: 2px; background: var(--azul-borde); flex: none; }
.hero-acc { margin-top: clamp(18px, 3.4vh, 34px); display: flex; flex-wrap: wrap; gap: 12px; }
.dest { margin-top: clamp(22px, 4vh, 40px); }
.dest .sobre { margin-bottom: 8px; }
.dest ol { border-top: 1px solid var(--linea-suave); }
.dest a {
  display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px;
  padding: clamp(7px, 1.25vh, 11px) 0; border-bottom: 1px solid var(--linea-suave); text-decoration: none; position: relative;
  transition: color .2s;
}
.dest .n { font-size: .72rem; letter-spacing: .12em; color: var(--gris); font-variant-numeric: tabular-nums; }
.dest .t { color: var(--texto); font-size: .98rem; line-height: 1.3; }
.dest .m { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); white-space: nowrap; }
.dest a::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--azul-borde); transform: scaleX(0); transform-origin: left; transition: transform .45s; }
.dest li.activo a::after, .dest a:hover::after, .dest a:focus-visible::after { transform: scaleX(1); }
.dest li.activo .t, .dest a:hover .t { color: #fff; }
.dest li.activo .n { color: var(--azul-claro); }

/* ---------- Proyectos ---------- */
.proyectos { padding: clamp(18px, 3vh, 30px) var(--pad) clamp(18px, 3vh, 26px); display: flex; flex-direction: column; min-width: 0; }
.proyectos > .titulo-pag { margin-bottom: clamp(8px, 1.6vh, 16px); }
.barra { display: flex; align-items: flex-end; gap: 20px; margin-bottom: clamp(14px, 2.4vh, 22px); border-bottom: 1px solid var(--linea-suave); }
.barra .tabs { flex: 1 1 auto; min-width: 0; border-bottom: 0; }
.pag { display: flex; align-items: center; gap: 8px; flex: none; padding-bottom: 6px; }
.pag .ic { width: 38px; height: 38px; }
.pag-cuenta { min-width: 3.4em; text-align: center; font-size: .75rem; letter-spacing: .12em; color: var(--gris); font-variant-numeric: tabular-nums; }
.cat { min-width: 0; }
.rejilla {
  display: grid; grid-auto-flow: column; gap: var(--hueco);
  grid-template-rows: repeat(2, auto); grid-auto-columns: calc((100% - var(--hueco)) / 2);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rejilla::-webkit-scrollbar { display: none; }
.rejilla--1f { grid-template-rows: auto; grid-auto-columns: 78%; }
.rejilla > li { scroll-snap-align: start; min-width: 0; min-height: 0; }
.proyecto { height: 100%; }
.card { display: grid; grid-template-rows: auto auto; gap: 10px; height: 100%; text-decoration: none; }
.card-f { position: relative; overflow: hidden; background: var(--carbon); aspect-ratio: 4 / 3; }
.card-f img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .6, .2, 1); }
.card:hover .card-f img, .card:focus-visible .card-f img { transform: scale(1.04); }
.card-x { display: block; min-height: 3.5em; }
.card-t { display: block; color: var(--blanco); font-size: .95rem; line-height: 1.3; }
.card-m { display: block; margin-top: 3px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.card:hover .card-t { text-decoration: underline; text-decoration-color: var(--azul-borde); text-underline-offset: .25em; }

/* Ficha (sin JavaScript: bloque de lectura; con JavaScript: visor a pantalla completa) */
.ficha-info > .sobre { margin-bottom: 8px; }
.ficha-info .meta { margin-top: 10px; }
.ficha-info .prosa { margin-top: 16px; }
.fotos { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 16px; scrollbar-width: thin; }
.fotos li { flex: 0 0 min(86%, 720px); scroll-snap-align: start; }
.fotos figure { position: relative; }
.fotos img { width: 100%; height: auto; }
.fotos figcaption {
  position: absolute; left: 10px; top: 10px; padding: 5px 10px; background: rgba(11, 11, 12, .82); color: #fff;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
}
html:not(.js) .card { display: none; }
html:not(.js) .rejilla { display: block; overflow: visible; }
html:not(.js) .rejilla > li + li { margin-top: 56px; }
html:not(.js) .cat + .cat { margin-top: 72px; }
html:not(.js) .cat > .panel-t { font-size: 1.6rem; padding-bottom: 12px; margin-bottom: 28px; border-bottom: 1px solid var(--linea); }
.js .ficha { display: none; }
.js .ficha.abierta {
  display: grid; position: fixed; inset: 0; z-index: 50; background: var(--negro);
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 52vh) auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 52svh) auto minmax(0, 1fr);
  animation: aparecer .35s ease both;
}
.js .ficha.abierta .fotos { grid-row: 1; margin: 0; gap: 0; scrollbar-width: none; background: #050506; overscroll-behavior: contain; }
.js .ficha.abierta .fotos::-webkit-scrollbar { display: none; }
.js .ficha.abierta .fotos li { flex: 0 0 100%; scroll-snap-align: center; height: 100%; }
.js .ficha.abierta .fotos figure { width: 100%; height: 100%; }
.js .ficha.abierta .fotos img { width: 100%; height: 100%; object-fit: contain; }
.ficha-ctl { grid-row: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--pad); border-bottom: 1px solid var(--linea-suave); }
.ficha-ctl .pasos { display: flex; align-items: center; gap: 8px; }
.cuenta { min-width: 4.4em; text-align: center; font-size: .78rem; letter-spacing: .14em; color: var(--blanco); font-variant-numeric: tabular-nums; }
.js .ficha.abierta .ficha-info { grid-row: 3; overflow-y: auto; padding: 22px var(--pad) 32px; overscroll-behavior: contain; }
/* Fichas con una o dos fotos: sin flechas ni contador; con dos, se ven las dos a la vez */
.js .ficha[data-fotos="1"] .ficha-ctl, .js .ficha[data-fotos="2"] .ficha-ctl { display: none; }
.js .ficha.abierta[data-fotos="2"] .fotos { gap: 3px; }
.js .ficha.abierta[data-fotos="2"] .fotos li { flex: 0 0 86%; scroll-snap-align: start; }
.ficha-cerrar { position: absolute; z-index: 2; top: 12px; right: 12px; background: rgba(11, 11, 12, .78); border-color: rgba(255, 255, 255, .4); }
.ficha-cerrar:hover:not(:disabled) { background: rgba(11, 11, 12, .95); }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
.con-ficha { overflow: hidden; }

/* ---------- 404 ---------- */
.nada { padding: clamp(40px, 12vh, 120px) var(--pad); display: grid; gap: 22px; justify-items: start; align-content: center; }

/* ---------- Móvil: menú desplegable ---------- */
@media (max-width: 1023.98px) {
  .js .nav-btn { display: inline-flex; }
  .js .nav ul {
    display: none; position: fixed; z-index: 30; left: 0; right: 0; top: 64px; bottom: 0;
    flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; gap: 0;
    padding: 12px var(--pad) 40px; background: var(--negro); overflow-y: auto;
  }
  .js .nav.abierto ul { display: flex; }
  .js .nav ul a { display: block; padding: 18px 0; font-size: 1.5rem; font-weight: 300; letter-spacing: -.01em; text-transform: none; color: var(--blanco); border-bottom: 1px solid var(--linea-suave); }
  .js .nav ul a::after { display: none; }
  .js .nav ul a[aria-current="page"] { color: var(--azul-claro); }
  html:not(.js) .cabecera { flex-wrap: wrap; }
  .barra { display: contents; }
  .proyectos > .titulo-pag { order: 0; }
  .proyectos .tabs { order: 1; flex: none; border-bottom: 1px solid var(--linea-suave); margin-bottom: 16px; }
  .proyectos .cat { order: 2; }
  .proyectos .pag { order: 3; justify-content: center; padding: 16px 0 0; }
  .dos-img--no-movil { display: none; }
  .js .dest li:not(.activo) { display: none; }
  .js .dest ol { border-top: 0; }
  .dest a { grid-template-columns: 2.4em minmax(0, 1fr); }
  .dest .m { grid-column: 2; }
}

/* ---------- Tableta ---------- */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .rejilla { grid-auto-columns: calc((100% - 2 * var(--hueco)) / 3); }
  .rejilla--1f { grid-auto-columns: calc((100% - var(--hueco)) / 2); }
  .pase { height: 50vh; height: 50svh; }
}

/* ---------- Escritorio: cada página en una sola pantalla ---------- */
@media (min-width: 1024px) {
  .cabecera { min-height: var(--cab); }
  .marca img { height: 56px; }
  .marca::after { height: 44px; }
  .dos { grid-template-columns: minmax(0, 43fr) minmax(0, 57fr); }
  .dos--img-der { grid-template-columns: minmax(0, 57fr) minmax(0, 43fr); }
  .dos--img-der .dos-img { order: 2; }
  .dos-img { height: auto; min-height: 420px; }
  .dos-img--no-movil { display: block; }
  .dos-txt { padding-left: clamp(32px, 4.5vw, 80px); padding-right: clamp(32px, 4.5vw, 80px); justify-content: center; }
  .inicio { grid-template-columns: minmax(380px, 36fr) minmax(0, 64fr); }
  .pase { order: 0; height: auto; min-height: 460px; }
  .hero-txt { padding-right: clamp(24px, 3vw, 48px); justify-content: space-between; }
  .dest { margin-top: 28px; }
  .rejilla { grid-auto-columns: calc((100% - 3 * var(--hueco)) / 4); }
  .rejilla--1f { grid-auto-columns: calc((100% - 2 * var(--hueco)) / 3); }
  .rejilla--1f[data-n="2"] { grid-auto-columns: calc((100% - var(--hueco)) / 2); }
  .js .ficha.abierta { grid-template-columns: minmax(0, 1fr) minmax(320px, 28vw); grid-template-rows: minmax(0, 1fr) auto; }
  .js .ficha.abierta .fotos { grid-column: 1; grid-row: 1 / 3; }
  .js .ficha.abierta .ficha-info { grid-column: 2; grid-row: 1; padding: 84px clamp(24px, 2.6vw, 44px) 24px; border-left: 1px solid var(--linea-suave); }
  .ficha-ctl { grid-column: 2; grid-row: 2; padding: 16px clamp(24px, 2.6vw, 44px); border-bottom: 0; border-top: 1px solid var(--linea-suave); border-left: 1px solid var(--linea-suave); }
  .ficha-cerrar { top: 20px; right: clamp(24px, 2.6vw, 44px); }
  .js .ficha.abierta[data-fotos="1"] .ficha-info, .js .ficha.abierta[data-fotos="2"] .ficha-info { grid-row: 1 / 3; }
  .js .ficha.abierta[data-fotos="2"] .fotos { overflow: hidden; }
  .js .ficha.abierta[data-fotos="2"] .fotos li { flex: 1 1 0; min-width: 0; }
}
@media (min-width: 1024px) and (min-height: 600px) {
  html.js, .js body { height: 100%; }
  .js body { height: 100vh; height: 100dvh; overflow: hidden; }
  .js main { flex: 1 1 0; min-height: 0; overflow: hidden; }
  .js .dos, .js .inicio { grid-template-rows: minmax(0, 1fr); }
  .js .dos-img, .js .pase { min-height: 0; height: 100%; }
  .js .dos-txt, .js .hero-txt { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #444 transparent; }
  .js .dos-txt { justify-content: flex-start; padding-top: clamp(28px, 7vh, 88px); }
  .js .proyectos { height: 100%; }
  .js .cat:not([hidden]) { flex: 1 1 0; min-height: 0; }
  .js .rejilla { height: 100%; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .js .rejilla--1f { grid-template-rows: minmax(0, 1fr); }
  .js .card { grid-template-rows: minmax(0, 1fr) auto; }
  .js .card-f { aspect-ratio: auto; }
  .js .legal[open] > .legal-panel { top: var(--cab); bottom: var(--pie); border-top: 1px solid var(--linea-suave); }
  .js .legal[open] .legal-cerrar { top: calc(var(--cab) + 16px); }
}
@media (min-width: 1024px) and (min-height: 600px) and (max-height: 760px) {
  :root { --cab: 76px; --pie: 46px; }
  .marca img { height: 50px; }
  body { font-size: .95rem; }
  .js .dos-txt { padding-top: clamp(18px, 4vh, 36px); padding-bottom: 18px; }
  .dos-txt > h1 { margin-bottom: 12px; }
  .dos-txt .tabs { margin-bottom: 14px; }
  .prosa p + p { margin-top: .7em; }
  .hero-txt { padding-top: 22px; padding-bottom: 16px; }
  .hero-acc { margin-top: 18px; }
  .dest { margin-top: 16px; }
  .dest a { padding: 6px 0; }
  .sedes { margin-top: 18px; padding-top: 16px; gap: 14px 32px; }
  .contacto-redes { margin-top: 16px; }
  .wa .btn { min-height: 48px; }
}
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .dos-txt { padding-left: 32px; padding-right: 32px; }
  body { font-size: .94rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .cabecera .nav, .pie .redes, .pase-ctl, .pag { display: none; }
}
