/*
Theme Name: Hausbau
Theme URI: https://hausbau.example
Author: Deville Art Studios
Description: Tema a medida para Hausbau, estudio de arquitectura y constructora (Buenos Aires / Punta del Este). Traducción nativa del handoff de diseño v2.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hausbau
Tags: architecture, portfolio, minimal
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  --ink: #111111;
  --white: #ffffff;
  --photo-bg: #f2f1ef;
  --border: #e8e6e2;
  --border-input: #e0ded9;
  --label: #9c9992;
  --text-2: #46433f;
  --mid: #6f6c66;
  --nav-idle: #8d8a84;
  --muted: #b3b0aa;
  --on-glass: #55524d;

  --footer-text: rgba(255, 255, 255, 0.82);
  --footer-text-2: rgba(255, 255, 255, 0.58);
  --footer-legal: rgba(255, 255, 255, 0.42);
  --footer-line: rgba(255, 255, 255, 0.14);

  --glass-1: rgba(255, 255, 255, 0.58);
  --glass-1-scrolled: rgba(255, 255, 255, 0.74);
  --glass-2: rgba(255, 255, 255, 0.5);
  --glass-3: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-strong: rgba(255, 255, 255, 0.6);
  --glass-hover: rgba(255, 255, 255, 0.92);

  --shadow-pill: 0 14px 44px rgba(17, 17, 17, 0.12);
  --shadow-card: 0 22px 70px rgba(17, 17, 17, 0.22);
  --shadow-tile: 0 8px 18px rgba(17, 17, 17, 0.18);
  --shadow-tile-hover: 0 14px 28px rgba(17, 17, 17, 0.22);
  --shadow-hero: 0 18px 48px rgba(17, 17, 17, 0.16);
  --shadow-gallery-hover: 0 18px 44px rgba(17, 17, 17, 0.26);
  --shadow-lightbox: 0 40px 120px rgba(0, 0, 0, 0.6);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-slide: cubic-bezier(.76, 0, .24, 1);
  --ease-std: cubic-bezier(.4, 0, .2, 1);
  --ease-grid: cubic-bezier(.33, 1, .68, 1);

  /* Escala desktop. Se reasigna entera en el media query de 760px. */
  --pad-side: 40px;
  --side-gap: 40px;
  --block-gap: 24px;

  --header-h: 68px;
  --header-top: 24px;
  --header-side: 40px;
  --header-pad: 0 26px 0 30px;
  --logo-h: 21px;

  --home-pad: 24px 40px;
  --home-card-w: 460px;
  --home-card-pad: 24px 34px 26px;
  --home-title: 32px;
  --home-meta: 12px;
  --arrow-size: 48px;
  --arrow-gap: 24px;

  --about-cols: minmax(0, 46fr) minmax(0, 54fr);
  --about-img-margin: 24px 0 24px 24px;
  --about-img-radius: 26px;
  --about-img-minh: 560px;
  --about-pad: 150px 80px 100px 72px;
  --about-lead: 27px;
  --about-intro-cols: minmax(0, 1fr) minmax(0, 1fr);
  --about-body: 19px;
  --fact-cols: repeat(4, minmax(0, 1fr));

  --proj-pad: 124px 40px 90px;
  --proj-title: 27px;
  --proj-grid-gap: 46px 30px;

  --hero-h: 62vh;
  --back-top: 116px;
  --back-pad: 13px 22px;
  --detail-title-pad: 26px 36px 28px;
  --detail-title-font: 44px;
  --detail-body-dir: row;
  --detail-body-gap: 80px;
  --detail-body-pad: 80px 40px 20px;
  --detail-specs-w: 380px;
  --detail-desc-w: 840px;
  --detail-lead: 21px;
  --gal-gap: 30px;
  --gal-pad: 60px 40px 80px;
  --nav-dir: row;
  --nav-gap: 40px;
  --nav-item-gap: 22px;
  --nav-pad: 34px 40px 60px;
  --nav-font: 26px;

  --lb-pad: 64px 96px;
  --lb-btn: 52px;

  --contact-cols: minmax(0, 54fr) minmax(0, 46fr);
  --contact-pad: 144px 60px 90px 40px;
  --contact-title: 27px;
  --form-cols: minmax(0, 1fr) minmax(0, 1fr);
  --contact-img-minh: 0px;
  --contact-img-margin: 24px 24px 24px 0;
  --contact-img-radius: 26px;
  --form-order: 1;
  --img-order: 2;

  --footer-pad: 70px 40px 34px;
  --footer-gap: 56px;
  --footer-margin: 24px;
}

@media (max-width: 760px) {
  :root {
    --pad-side: 15px;
    --side-gap: 15px;
    --block-gap: 15px;

    --header-h: 56px;
    --header-top: 14px;
    --header-side: 15px;
    --header-pad: 0 15px;
    --logo-h: 17px;

    --home-pad: 16px 15px;
    --home-card-w: 88vw;
    --home-card-pad: 20px 22px 22px;
    --home-title: 24px;
    --home-meta: 10.5px;
    --arrow-size: 40px;
    --arrow-gap: 12px;

    --about-cols: minmax(0, 1fr);
    --about-img-margin: 0 15px 15px 15px;
    --about-img-radius: 0 0 26px 26px;
    --about-img-minh: 440px;
    --about-pad: 40px 15px 60px;
    --about-lead: 21px;
    --about-intro-cols: minmax(0, 1fr);
    --about-body: 16px;
    --fact-cols: repeat(2, minmax(0, 1fr));

    --proj-pad: 104px 15px 60px;
    --proj-title: 21px;
    --proj-grid-gap: 28px 14px;

    --hero-h: 50vh;
    --back-top: 88px;
    --back-pad: 10px 16px;
    --detail-title-pad: 18px 20px 20px;
    --detail-title-font: 26px;
    --detail-body-dir: column;
    --detail-body-gap: 36px;
    --detail-body-pad: 40px 15px 10px;
    --detail-specs-w: 100%;
    --detail-desc-w: 100%;
    --detail-lead: 17px;
    --gal-gap: 14px;
    --gal-pad: 36px 15px 50px;
    --nav-gap: 14px;
    --nav-item-gap: 10px;
    --nav-pad: 24px 15px 40px;
    --nav-font: 15px;

    --lb-pad: 20px 14px;
    --lb-btn: 40px;

    --contact-cols: minmax(0, 1fr);
    --contact-pad: 40px 15px 60px;
    --contact-title: 21px;
    --form-cols: minmax(0, 1fr);
    --contact-img-minh: 440px;
    --contact-img-margin: 0 15px 15px 15px;
    --contact-img-radius: 0 0 26px 26px;
    --form-order: 2;
    --img-order: 1;

    --footer-pad: 44px 15px 24px;
    --footer-gap: 32px;
    --footer-margin: 15px;
  }
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* En Home el slider ocupa el viewport completo y no debe scrollear. */
body.hb-home { overflow: hidden; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: #666666; }
::selection { background: var(--ink); color: var(--white); }

img { max-width: 100%; display: block; }
input, textarea, button { font-family: inherit; }

button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

h1, h2, h3, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.hb-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hb-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hb-skip-link:focus {
  top: 16px;
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Utilidades tipográficas recurrentes */
.hb-eyebrow {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--label);
}
.hb-eyebrow--glass { color: var(--on-glass); }

/* ==========================================================================
   3. Animaciones
   ========================================================================== */

@keyframes hbFadeUp    { from { opacity: 0; transform: translateY(30px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes hbInDown    { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes hbHeroDrop  { from { opacity: 0; transform: translateY(-14%); }  to { opacity: 1; transform: translateY(0); } }
@keyframes hbInLeft    { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: translateX(0); } }
@keyframes hbInRight   { from { opacity: 0; transform: translateX(48px); }  to { opacity: 1; transform: translateX(0); } }
@keyframes hbIntroFade { 0% { opacity: 1; } 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hbIntroLogo { 0% { opacity: 0; transform: translateY(8px); } 30%, 100% { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hb-parallax { transform: none !important; }
}

/* ==========================================================================
   4. Intro
   ========================================================================== */

.hb-intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: hbIntroFade 2000ms linear both;
}
.hb-intro img {
  height: 44px;
  width: auto;
  animation: hbIntroLogo 2000ms linear both;
}

/* ==========================================================================
   5. Header
   ========================================================================== */

.hb-header {
  position: absolute;
  top: var(--header-top);
  left: var(--header-side);
  right: var(--header-side);
  z-index: 60;
  height: var(--header-h);
  padding: var(--header-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  background: var(--glass-1);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  backdrop-filter: blur(26px) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-pill);
  transition: background 400ms ease;
  animation: hbInDown 900ms var(--ease-out) 1500ms both;
}
.hb-header.is-scrolled { background: var(--glass-1-scrolled); }

/* Sin intro (navegación interna), el header no espera 1.5s. */
body.hb-no-intro .hb-header { animation-delay: 0ms; }

.hb-header__logo img {
  height: var(--logo-h);
  width: auto;
}

.hb-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.hb-nav__link {
  position: relative;
  isolation: isolate;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.005em;
  white-space: nowrap;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: var(--nav-idle);
  transition: color 300ms ease, border-color 300ms ease;
}
.hb-nav__link::before {
  content: "";
  position: absolute;
  left: -14px; right: -14px;
  top: -7px; bottom: -7px;
  border-radius: 999px;
  background: var(--ink);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms var(--ease-out);
}
.hb-nav__link:hover::before,
.hb-nav__link:focus-visible::before { transform: scaleX(1); }
.hb-nav__link:hover,
.hb-nav__link:focus-visible { color: var(--white); opacity: 1; }

.hb-nav__link.is-active { color: var(--ink); }

/* Vistas con foto a sangre detrás del header: los inactivos van en blanco. */
body.hb-over-photo .hb-nav__link { color: var(--white); }
body.hb-over-photo .hb-nav__link.is-active { color: var(--ink); }

/* Si la foto es clara, se vuelve al tratamiento de fondo claro: el blanco sobre
   una foto clara da ~1,2:1 de contraste. La clase la pone el tema midiendo el
   brillo real de la imagen, así que esto no depende de que nadie lo configure. */
body.hb-over-photo--light .hb-nav__link { color: var(--nav-idle); }
body.hb-over-photo--light .hb-nav__link.is-active { color: var(--ink); }

.hb-burger {
  display: none;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
body.hb-over-photo .hb-burger { color: var(--white); }
body.hb-over-photo .hb-header.is-scrolled .hb-burger { color: var(--ink); }
body.hb-over-photo--light .hb-burger { color: var(--ink); }

@media (max-width: 760px) {
  .hb-nav { display: none; }
  .hb-burger { display: flex; }
}

/* ==========================================================================
   6. Menú mobile
   ========================================================================== */

.hb-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  padding: 32px 26px;
  animation: hbFadeUp 320ms var(--ease-out) both;
}
.hb-menu[hidden] { display: none !important; }

.hb-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 64px;
}
.hb-menu__top img {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
}
.hb-menu__close { color: var(--white); }

.hb-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hb-menu__link {
  font-size: 28px;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.45);
}
.hb-menu__link:hover { color: rgba(255, 255, 255, 0.75); }
.hb-menu__link.is-active { color: var(--white); }

/* ==========================================================================
   7. Home — slider
   ========================================================================== */

.hb-home-slider {
  position: relative;
  height: 100vh;
  height: 100dvh;
  background: var(--photo-bg);
  overflow: hidden;
  touch-action: pan-y;
}

.hb-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transform: translate3d(32%, 0, 0);
}
.hb-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hb-slide.is-active {
  z-index: 10;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: transform 1150ms var(--ease-slide), opacity 1150ms var(--ease-slide);
}
.hb-slide.is-leaving {
  z-index: 5;
  opacity: 1;
  transition: transform 1150ms var(--ease-slide), opacity 1150ms var(--ease-slide);
}
.hb-slide.is-leaving[data-dir="1"]  { transform: translate3d(-32%, 0, 0); }
.hb-slide.is-leaving[data-dir="-1"] { transform: translate3d(32%, 0, 0); }
.hb-slide[data-dir="-1"]:not(.is-active):not(.is-leaving) { transform: translate3d(-32%, 0, 0); }

.hb-home-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--home-pad);
}
.hb-home-overlay > * { pointer-events: auto; }

.hb-home-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--arrow-gap);
}

.hb-arrow {
  flex: none;
  width: var(--arrow-size);
  height: var(--arrow-size);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-3);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border-strong);
  transition: background 300ms ease;
}
.hb-arrow:hover { background: var(--glass-hover); }
.hb-arrow svg { transition: transform 420ms var(--ease-std); }
.hb-arrow[data-arrow="left"]:hover svg  { transform: translateX(-6px); }
.hb-arrow[data-arrow="right"]:hover svg { transform: translateX(6px); }

@media (max-width: 760px) {
  .hb-home-row .hb-arrow { display: none; }
}

.hb-home-card {
  width: var(--home-card-w);
  max-width: 100%;
  padding: var(--home-card-pad);
  border-radius: 26px;
  text-align: center;
  background: var(--glass-1);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  backdrop-filter: blur(26px) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: hbFadeUp 1000ms var(--ease-out) 1720ms both;
}
body.hb-no-intro .hb-home-card { animation-delay: 0ms; }

.hb-home-card__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.hb-home-card__panel[hidden] { display: none !important; }

.hb-home-card__title {
  font-size: var(--home-title);
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1.12;
}
.hb-home-card__meta {
  font-size: var(--home-meta);
  font-weight: 300;
  color: var(--on-glass);
}
.hb-home-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 300ms ease;
}
.hb-home-card__cta:hover { opacity: 0.65; color: var(--ink); }
.hb-home-card__cta svg { transition: transform 420ms var(--ease-std); }
.hb-home-card__cta:hover svg { transform: translateX(6px); }

.hb-dots {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.hb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--white);
  transition: background 300ms ease;
}
.hb-dot.is-active { background: var(--ink); }

@media (max-width: 760px) {
  .hb-dots { display: flex; }
}

/* ==========================================================================
   8. Quiénes somos
   ========================================================================== */

.hb-about {
  display: grid;
  grid-template-columns: var(--about-cols);
  align-items: stretch;
}

.hb-about__media {
  position: relative;
  overflow: hidden;
  margin: var(--about-img-margin);
  min-height: var(--about-img-minh);
  border-radius: var(--about-img-radius);
  background: var(--photo-bg);
  box-shadow: var(--shadow-hero);
  animation: hbInLeft 1100ms var(--ease-out) both;
}
.hb-about__media .hb-parallax {
  position: absolute;
  top: -12%;
  left: 0;
  right: 0;
  height: 124%;
  will-change: transform;
}
.hb-about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-about__body {
  max-width: 720px;
  padding: var(--about-pad);
}
.hb-about__body > * { animation: hbFadeUp 900ms var(--ease-out) both; }
.hb-about__eyebrow { animation-delay: 160ms; }
.hb-about__lead    { animation-delay: 260ms; }
.hb-about__cols    { animation-delay: 380ms; }
.hb-about__close   { animation-delay: 500ms; }
.hb-about__facts   { animation-delay: 620ms; }

.hb-about__lead {
  margin-top: 22px;
  font-size: var(--about-lead);
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1.42;
}
.hb-about__cols {
  margin-top: 34px;
  display: grid;
  grid-template-columns: var(--about-intro-cols);
  gap: 34px;
}
.hb-about__cols p {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.78;
  color: var(--text-2);
}
.hb-about__close {
  margin-top: 34px;
  font-size: var(--about-body);
  font-weight: 200;
  line-height: 1.6;
}
.hb-about__facts {
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: var(--fact-cols);
  gap: 24px;
}
.hb-fact__k {
  display: block;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--label);
}
.hb-fact__v {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 200;
}

/* ==========================================================================
   9. Proyectos
   ========================================================================== */

.hb-projects { padding: var(--proj-pad); }

.hb-projects__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 46px;
  border-bottom: 1px solid var(--border);
  animation: hbFadeUp 1000ms var(--ease-out) both;
}
.hb-projects__title-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.hb-projects__title {
  font-size: var(--proj-title);
  font-weight: 200;
  letter-spacing: 0.02em;
}
.hb-projects__count {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--label);
}

.hb-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hb-controls__label {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--label);
}
.hb-controls__group {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hb-controls__opt {
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nav-idle);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 300ms ease, border-color 300ms ease;
}
.hb-controls__opt:hover { color: var(--ink); }
.hb-controls__opt.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.hb-controls__divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}
.hb-controls__cols {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hb-controls__col {
  font-size: 10px;
  font-weight: 300;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 300ms ease, border-color 300ms ease;
}
.hb-controls__col.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

@media (max-width: 760px) {
  .hb-controls__label,
  .hb-controls__divider,
  .hb-controls__cols { display: none; }
  .hb-controls__group { gap: 14px; }
}

.hb-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--proj-grid-gap);
}
/* En mobile la grilla se limita a 2 columnas. repeat() no acepta min()/calc(),
   por eso es una regla fija y no una operación sobre --cols. */
@media (max-width: 760px) {
  .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.hb-grid > * { animation: hbFadeUp 1100ms var(--ease-grid) both; }
.hb-grid > *:nth-child(1)  { animation-delay: 120ms; }
.hb-grid > *:nth-child(2)  { animation-delay: 250ms; }
.hb-grid > *:nth-child(3)  { animation-delay: 380ms; }
.hb-grid > *:nth-child(4)  { animation-delay: 510ms; }
.hb-grid > *:nth-child(5)  { animation-delay: 640ms; }
.hb-grid > *:nth-child(6)  { animation-delay: 770ms; }
.hb-grid > *:nth-child(7)  { animation-delay: 900ms; }
.hb-grid > *:nth-child(8)  { animation-delay: 1030ms; }
.hb-grid > *:nth-child(9)  { animation-delay: 1160ms; }
.hb-grid > *:nth-child(10) { animation-delay: 1290ms; }
.hb-grid > *:nth-child(11) { animation-delay: 1420ms; }
.hb-grid > *:nth-child(n+12) { animation-delay: 1550ms; }

.hb-card { display: block; transition: opacity 400ms ease; }
.hb-card:hover { opacity: 0.72; color: var(--ink); }

.hb-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--photo-bg);
  box-shadow: var(--shadow-tile);
  transition: transform 520ms var(--ease-std), box-shadow 520ms var(--ease-std);
}
.hb-card:hover .hb-card__media {
  transform: scale(1.03);
  box-shadow: var(--shadow-tile-hover);
}
.hb-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-std);
}
.hb-card:hover .hb-card__media img { transform: scale(1.07); }

.hb-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.hb-card__title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.hb-card__year {
  flex: none;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--label);
}
.hb-card__location {
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--mid);
}

.hb-empty {
  padding: 40px 0 80px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-2);
}

/* ==========================================================================
   10. Ficha de obra
   ========================================================================== */

.hb-hero {
  position: relative;
  height: var(--hero-h);
  min-height: 320px;
  margin: 0 var(--side-gap) var(--side-gap);
  border-radius: 0 0 26px 26px;
  overflow: hidden;
  background: var(--photo-bg);
  box-shadow: var(--shadow-hero);
  animation: hbHeroDrop 1100ms var(--ease-out) both;
}
.hb-hero .hb-parallax {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  height: 140%;
  will-change: transform;
}
.hb-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-back {
  position: absolute;
  top: var(--back-top);
  left: var(--side-gap);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: var(--back-pad);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  background: var(--glass-2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid var(--glass-border);
  transition: background 300ms ease;
  animation: hbFadeUp 800ms var(--ease-out) 520ms both;
}
.hb-back:hover { background: rgba(255, 255, 255, 0.88); color: var(--ink); }
.hb-back svg { transition: transform 420ms var(--ease-std); }
.hb-back:hover svg { transform: translateX(-6px); }

.hb-hero__card {
  position: absolute;
  left: var(--side-gap);
  right: var(--side-gap);
  bottom: var(--side-gap);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--detail-title-pad);
  border-radius: 26px;
  background: var(--glass-2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  backdrop-filter: blur(26px) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  animation: hbFadeUp 900ms var(--ease-out) 620ms both;
}
.hb-hero__title {
  font-size: var(--detail-title-font);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hb-detail-body {
  display: flex;
  flex-direction: var(--detail-body-dir);
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--detail-body-gap);
  padding: var(--detail-body-pad);
  animation: hbFadeUp 900ms var(--ease-out) 760ms both;
}

.hb-specs { width: var(--detail-specs-w); flex: none; }
.hb-specs__list { margin-top: 22px; }
.hb-specs__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.hb-specs__k {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}
.hb-specs__v {
  font-size: 13.5px;
  font-weight: 300;
  text-align: right;
}

.hb-desc { width: var(--detail-desc-w); max-width: 100%; }
.hb-desc__lead {
  margin-top: 22px;
  font-size: var(--detail-lead);
  font-weight: 200;
  line-height: 1.5;
}
.hb-desc__body { margin-top: 26px; }
.hb-desc__body p {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-2);
}
.hb-desc__body p + p { margin-top: 18px; }

/* Galería */
.hb-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gal-gap);
  padding: var(--gal-pad);
}
.hb-shot {
  aspect-ratio: 3 / 2;
  border-radius: 22px;
  overflow: hidden;
  background: var(--photo-bg);
  box-shadow: var(--shadow-tile);
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), box-shadow 420ms var(--ease-std);
  cursor: zoom-in;
}
.hb-shot.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.hb-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-std);
}
.hb-shot.is-revealed:hover {
  box-shadow: var(--shadow-gallery-hover);
}
.hb-shot.is-revealed:hover img { transform: scale(1.02); }

/* Navegación entre obras */
.hb-prevnext {
  display: flex;
  flex-direction: var(--nav-dir);
  justify-content: space-between;
  gap: var(--nav-gap);
  padding: var(--nav-pad);
  border-top: 1px solid var(--border);
}
.hb-prevnext__item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--nav-item-gap);
  transition: opacity 300ms ease;
}
.hb-prevnext__item:hover { opacity: 0.6; color: var(--ink); }
.hb-prevnext__item--next { justify-content: flex-end; text-align: right; }
.hb-prevnext__item svg { flex: none; margin-bottom: 12px; transition: transform 420ms var(--ease-std); }
.hb-prevnext__item--prev:hover svg { transform: translateX(-6px); }
.hb-prevnext__item--next:hover svg { transform: translateX(6px); }
.hb-prevnext__title {
  display: block;
  margin-top: 10px;
  font-size: var(--nav-font);
  font-weight: 200;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-prevnext__label { display: block; }

/* ==========================================================================
   11. Lightbox
   ========================================================================== */

.hb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 10, 10, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: var(--lb-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  cursor: zoom-out;
  animation: hbFadeUp 320ms ease both;
}
.hb-lightbox[hidden] { display: none !important; }

.hb-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 300ms ease, color 300ms ease;
}
.hb-lightbox__close:hover {
  background: var(--white);
  color: var(--ink);
}

.hb-lightbox__stage {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  justify-content: center;
  cursor: default;
}
.hb-lightbox__arrow {
  flex: none;
  width: var(--lb-btn);
  height: var(--lb-btn);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 300ms ease;
}
.hb-lightbox__arrow:hover { background: rgba(255, 255, 255, 0.16); }
.hb-lightbox__arrow svg { transition: transform 420ms var(--ease-std); }
.hb-lightbox__arrow[data-arrow="left"]:hover svg  { transform: translateX(-6px); }
.hb-lightbox__arrow[data-arrow="right"]:hover svg { transform: translateX(6px); }

.hb-lightbox__figure {
  width: min(1100px, 100%);
  aspect-ratio: 3 / 2;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lightbox);
  background: #0a0a0a;
}
.hb-lightbox__figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hb-lightbox__count {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   12. Contacto
   ========================================================================== */

.hb-contact {
  display: grid;
  grid-template-columns: var(--contact-cols);
  align-items: stretch;
}

.hb-contact__form-col {
  order: var(--form-order);
  padding: var(--contact-pad);
}
.hb-contact__form-col > * { animation: hbFadeUp 900ms var(--ease-out) both; }
.hb-contact__eyebrow { animation-delay: 160ms; }
.hb-contact__lead    { animation-delay: 260ms; }
.hb-contact__form    { animation-delay: 380ms; }
.hb-contact__data    { animation-delay: 520ms; }

.hb-contact__lead {
  margin-top: 22px;
  font-size: var(--about-lead);
  font-weight: 200;
  line-height: 1.4;
}

.hb-contact__media {
  order: var(--img-order);
  position: relative;
  overflow: hidden;
  margin: var(--contact-img-margin);
  min-height: var(--contact-img-minh);
  border-radius: var(--contact-img-radius);
  background: var(--photo-bg);
  animation: hbInRight 1100ms var(--ease-out) both;
}
.hb-contact__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-form {
  margin-top: 40px;
  max-width: 620px;
  display: grid;
  grid-template-columns: var(--form-cols);
  gap: 26px 30px;
}
.hb-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.hb-field--full { grid-column: 1 / -1; }
.hb-field label {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--label);
}
.hb-field input,
.hb-field textarea {
  border: none;
  border-bottom: 1px solid var(--border-input);
  background: transparent;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  border-radius: 0;
  transition: border-color 300ms ease;
}
.hb-field input:focus,
.hb-field textarea:focus { border-bottom-color: var(--ink); }
.hb-field textarea { resize: none; }
.hb-field input::placeholder,
.hb-field textarea::placeholder { color: var(--muted); }

.hb-field.has-error input,
.hb-field.has-error textarea { border-bottom-color: #b4453c; }
.hb-field__error {
  font-size: 10.5px;
  font-weight: 300;
  color: #b4453c;
  letter-spacing: 0;
  text-transform: none;
}

.hb-form__submit-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hb-btn {
  padding: 15px 30px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  transition: background 320ms ease, color 320ms ease;
}
.hb-btn:hover {
  background: var(--ink);
  color: var(--white);
}
.hb-form__note {
  font-size: 10.5px;
  font-weight: 300;
  color: var(--label);
}

.hb-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.hb-notice {
  grid-column: 1 / -1;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
}
.hb-notice--ok    { background: #f1f4f0; color: #3a4a34; }
.hb-notice--error { background: #f7efee; color: #7a3b34; }

.hb-contact__data {
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
}
.hb-contact__data-k {
  display: block;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--label);
}
.hb-contact__data-v {
  display: block;
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 300;
}

/* ==========================================================================
   13. Footer
   ========================================================================== */

.hb-footer {
  background: var(--ink);
  color: var(--white);
  border-radius: 32px 32px 0 0;
  margin: 0 var(--footer-margin);
  padding: var(--footer-pad);
  display: flex;
  flex-direction: column;
  gap: var(--footer-gap);
  margin-top: auto;
}

.hb-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}
.hb-footer__brand img {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
}
.hb-footer__tagline {
  margin-top: 18px;
  max-width: 260px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--footer-text-2);
}

.hb-footer__nav,
.hb-footer__social,
.hb-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hb-footer a {
  font-size: 14px;
  font-weight: 300;
  color: var(--footer-text);
  transition: color 300ms ease;
}
.hb-footer a:hover { color: var(--white); }
.hb-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hb-footer__contact span {
  font-size: 14px;
  font-weight: 300;
  color: var(--footer-text);
}

.hb-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--footer-line);
  font-size: 10.5px;
  font-weight: 300;
  color: var(--footer-legal);
}

/* Estado sin foto y wordmark de reemplazo del logo
   ------------------------------------------------ */

.hb-photo-empty {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--photo-bg);
}

.hb-wordmark {
  display: inline-block;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  color: currentColor;
}
.hb-header__logo { color: var(--ink); }
.hb-header__logo .hb-wordmark { font-size: calc(var(--logo-h) * 1.05); }
.hb-menu__top .hb-wordmark { font-size: 21px; color: var(--white); }
.hb-footer__brand .hb-wordmark { font-size: 23px; color: var(--white); }
.hb-intro .hb-wordmark { font-size: 46px; color: var(--ink); }

/* ==========================================================================
   14. Layout de página / contenido genérico
   ========================================================================== */

.hb-site {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hb-main { flex: 1 0 auto; }

.hb-page {
  padding: calc(var(--header-top) + var(--header-h) + 60px) var(--pad-side) 90px;
  max-width: 860px;
}
.hb-page__title {
  font-size: var(--proj-title);
  font-weight: 200;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.hb-page__content {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-2);
}
.hb-page__content p { margin-bottom: 20px; }
.hb-page__content h2,
.hb-page__content h3 {
  color: var(--ink);
  font-weight: 200;
  margin: 34px 0 14px;
}
.hb-page__content h2 { font-size: 22px; }
.hb-page__content h3 { font-size: 17px; }
.hb-page__content a { text-decoration: underline; text-underline-offset: 3px; }
.hb-page__content img { border-radius: 20px; margin: 24px 0; }
