:root{--bg:#f2f0ea;--bg-soft:#e7e4dc;--text:#1f1f1c;--muted:#56544f;--line:rgba(31,31,28,.22);--white:#f7f6f2}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14.5px;line-height:1.55;letter-spacing:-.012em}img{max-width:100%;display:block}a{color:inherit;text-decoration:none}button{font:inherit}.site-header{position:fixed;z-index:20;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:26px 4.2vw;color:var(--text)}.brand{font-size:1.05rem;font-weight:500;letter-spacing:-.035em}.main-nav{display:flex;gap:2.85rem;font-size:.95rem;letter-spacing:-.01em;font-weight:500}.main-nav a:hover{text-decoration:underline;text-underline-offset:.28em}.menu-toggle{display:none;cursor:pointer;border:0;background:transparent;color:var(--text);padding:0;font-size:.95rem;font-weight:500}.lang-switch{display:flex;gap:.35rem;align-items:center;margin-left:1.2rem}.lang-switch button{cursor:pointer;border:0;background:transparent;color:var(--text);padding:0;font-size:.82rem;letter-spacing:-.01em;opacity:.45}.lang-switch button.is-active{opacity:1;text-decoration:underline;text-underline-offset:.25em}.hero{position:relative;min-height:100vh;background-image:url("../images/portada/hero-ag-arquitectos.jpg");background-size:cover;background-position:center;display:flex;align-items:flex-end;overflow:hidden}.hero__overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.66),rgba(255,255,255,.45) 42%,rgba(255,255,255,.22))}.hero__content{position:relative;width:min(1180px,90vw);margin:0 auto;padding:0 0 12vh}.hero__content--brand h1{margin:0;font-size:clamp(3.6rem,6.5vw,7.4rem);line-height:.9;letter-spacing:-.082em;font-weight:500}.hero__claim{margin:1.05rem 0 0;max-width:760px;font-size:clamp(.86rem,1.05vw,1.08rem);line-height:1.35;letter-spacing:.025em;font-weight:500;color:rgba(31,31,28,.75)}.projects-strip{width:100%;margin:0;padding:0 0 112px;background:var(--bg-soft);border-bottom:1px solid var(--line)}.project-filters{display:flex;gap:.45rem;flex-wrap:wrap;width:min(1320px,91vw);margin:0 auto .55rem;padding-top:14px}.project-filters button{cursor:pointer;border:1px solid rgba(31,31,28,.28);background:transparent;color:var(--text);padding:.38rem .58rem;border-radius:0;font-size:.69rem;letter-spacing:.01em}.project-filters button:hover,.project-filters button.is-active{background:var(--text);border-color:var(--text);color:var(--white)}.projects-grid{display:block;width:min(1540px,94vw);margin:0 auto;column-count:4;column-gap:.38rem}.project-card{display:inline-block;width:100%;position:relative;overflow:hidden;margin:0 0 .38rem;break-inside:avoid;cursor:zoom-in;vertical-align:top}.project-card.is-hidden{display:none}.project-card img{width:100%;max-height:292px;height:auto;object-fit:contain;background:transparent;filter:grayscale(.08) saturate(.86) contrast(1.01);transition:opacity .25s ease,filter .25s ease}.project-card:hover img{opacity:.62;filter:grayscale(.02) saturate(.9) contrast(1.04)}.project-card__body{display:none}.project-card__meta{position:absolute;left:0;bottom:0;max-width:100%;padding:.45rem .55rem;background:rgba(31,31,28,.82);color:#f7f6f2;font-size:.68rem;line-height:1.1;letter-spacing:.02em;opacity:0;transform:translateY(4px);transition:opacity .18s ease,transform .18s ease;pointer-events:none}.project-card:hover .project-card__meta,.project-card:focus-visible .project-card__meta{opacity:1;transform:translateY(0)}.section{width:min(1220px,90vw);margin:0 auto;padding:118px 0;border-bottom:1px solid var(--line)}.section--studio-text{display:grid;grid-template-columns:110px minmax(0,1fr);gap:6vw;max-width:1180px;padding-top:120px}.section__number,.section__kicker,.contact-label{font-size:.72rem;letter-spacing:.12em;color:var(--text);text-transform:uppercase}.section__kicker{margin:0 0 .9rem}.section__content{max-width:920px}.section h2{max-width:980px;margin:0 0 2rem;font-size:clamp(1.9rem,3.35vw,3.85rem);line-height:.95;letter-spacing:-.075em;font-weight:500}.large-text{max-width:860px;font-size:clamp(1.02rem,1.35vw,1.22rem);line-height:1.48;margin-bottom:1.35rem;color:#3f3d39}.section p{color:var(--muted)}.contact-grid{display:grid;grid-template-columns:1.55fr 1fr 1.3fr;gap:2rem;margin-top:2.7rem;padding-top:2rem;border-top:1px solid rgba(31,31,28,.28)}.contact-label{margin:0 0 .6rem}.contact-grid p{margin-top:0;color:var(--text);font-size:1.05rem}.contact-actions{display:flex;gap:1.35rem;flex-wrap:wrap;margin-top:2.4rem}.contact-actions a{border-bottom:1px solid currentColor;padding-bottom:.28rem;font-size:.82rem;text-transform:uppercase;letter-spacing:.08em}.lightbox{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:5vh 5vw;background:rgba(15,15,14,.92);color:var(--white)}.lightbox.is-open{display:flex}.lightbox__figure{margin:0;max-width:min(1500px,86vw);max-height:86vh}.lightbox__image{max-width:100%;max-height:78vh;width:auto;height:auto;object-fit:contain;margin:0 auto;box-shadow:0 24px 80px rgba(0,0,0,.35)}.lightbox__caption{display:block;max-width:980px;margin:1.15rem auto 0;font-size:.9rem;letter-spacing:-.005em;text-align:center;color:rgba(247,246,242,.88)}.lightbox__close,.lightbox__nav{position:absolute;border:0;background:transparent;color:var(--white);cursor:pointer;line-height:1}.lightbox__close{z-index:110;top:28px;right:34px;width:48px;height:48px;border:1px solid rgba(247,246,242,.45);border-radius:999px;font-size:2rem;display:flex;align-items:center;justify-content:center}.lightbox__close:hover{background:rgba(247,246,242,.12)}.lightbox__nav{z-index:110;top:50%;transform:translateY(-50%);font-size:4rem;opacity:.72}.lightbox__nav--prev{left:3vw}.lightbox__nav--next{right:3vw}body.lightbox-open{overflow:hidden}.site-footer{display:flex;justify-content:space-between;gap:2rem;padding:34px 5vw;background:#20201d;color:var(--white);font-size:.85rem}.site-footer p{margin:0}.site-footer nav{display:flex;gap:1.5rem;flex-wrap:wrap}.seo-intro,.seo-nombre{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}@media(min-width:1500px){.projects-grid{column-count:5}.project-card img{max-height:300px}}@media(max-width:1200px){.projects-grid{column-count:3}}@media(max-width:900px){.site-header{padding:22px 5vw}.main-nav{gap:1rem;font-size:.82rem}.section--studio-text,.section{display:block;padding:86px 0}.contact-grid{grid-template-columns:1fr}.site-footer{flex-direction:column}}@media(max-width:760px){.projects-grid{column-count:2;column-gap:.65rem}.project-card{margin-bottom:.65rem}.project-card img{max-height:255px}.project-card__meta{display:none}.projects-strip{padding-bottom:78px}.project-filters{padding-top:10px;margin-bottom:.7rem}}@media(max-width:680px){.site-header{align-items:flex-start;gap:1rem}.lang-switch{position:relative;z-index:31;margin-left:auto;margin-right:1rem}.menu-toggle{display:block;position:relative;z-index:31}.main-nav{display:none;position:fixed;z-index:30;top:0;right:0;left:0;padding:76px 5vw 28px;background:rgba(243,241,235,.97);border-bottom:1px solid var(--line)}.site-header.is-open .main-nav{display:flex;flex-direction:column;gap:1rem;font-size:1rem}.hero{min-height:92vh}.hero__content{padding-bottom:9vh}.hero__content--brand h1{font-size:clamp(3.1rem,14vw,4.6rem)}.hero__claim{font-size:.82rem;letter-spacing:.035em}.section h2{font-size:2.25rem}.project-filters button{flex:1 1 auto}.lightbox{padding:6vh 4vw}.lightbox__figure{max-width:92vw}.lightbox__image{max-height:72vh}.lightbox__nav{display:none!important}.lightbox__close{top:18px;right:20px}}@media(max-width:480px){.projects-grid{column-count:1}.project-card img{max-height:240px}.project-filters{gap:.4rem}.project-filters button{font-size:.68rem;padding:.42rem .58rem}}

/* v40 — correcciones móvil: portada y navegación de galerías */
@media (max-width: 680px) {
  .hero {
    min-height: 88vh;
    background-size: auto 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #f2f0ea;
  }

  .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(255,255,255,.48),
      rgba(255,255,255,.34) 45%,
      rgba(255,255,255,.72)
    );
  }

  .hero__content {
    width: 88vw;
    padding-bottom: 7vh;
  }

  .hero__content--brand h1 {
    font-size: clamp(2.65rem, 12vw, 4rem);
    letter-spacing: -.078em;
  }

  .hero__claim {
    max-width: 82vw;
    font-size: .74rem;
    line-height: 1.35;
  }

  .lightbox__nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    top: auto;
    bottom: 18px;
    transform: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(247,246,242,.45);
    border-radius: 999px;
    font-size: 2.4rem;
    background: rgba(15,15,14,.28);
  }

  .lightbox__nav--prev {
    left: 22px;
  }

  .lightbox__nav--next {
    right: 22px;
  }

  .lightbox__caption {
    margin-bottom: 62px;
    font-size: .78rem;
  }

  .lightbox__image {
    max-height: 68vh;
  }
}

@media (max-width: 420px) {
  .hero {
    background-size: auto 92%;
  }

  .hero__content--brand h1 {
    font-size: clamp(2.35rem, 11.5vw, 3.5rem);
  }
}


/* v41 — móvil vertical: portada completa y galería usable */
@media (orientation: portrait) and (max-width: 760px) {
  .hero {
    min-height: 100svh;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #f2f0ea;
  }

  .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(242,240,234,.26),
      rgba(242,240,234,.12) 42%,
      rgba(242,240,234,.70) 78%,
      rgba(242,240,234,.88)
    );
  }

  .hero__content {
    width: 88vw;
    padding-bottom: 8.5vh;
  }

  .hero__content--brand h1 {
    font-size: clamp(2.35rem, 11vw, 3.75rem);
    line-height: .92;
  }

  .hero__claim {
    font-size: .70rem;
    max-width: 78vw;
  }

  .lightbox {
    padding: 5vh 4vw 92px;
    align-items: center;
  }

  .lightbox__figure {
    max-width: 94vw;
    max-height: none;
  }

  .lightbox__image {
    max-width: 94vw;
    max-height: 62svh;
  }

  .lightbox__caption {
    margin-top: .85rem;
    margin-bottom: 0;
    padding: 0 3.4rem;
    font-size: .76rem;
    line-height: 1.25;
  }

  .lightbox__nav {
    display: flex !important;
    position: fixed;
    top: auto;
    bottom: 24px;
    transform: none;
    width: 48px;
    height: 48px;
    z-index: 130;
    border: 1px solid rgba(247,246,242,.58);
    border-radius: 999px;
    background: rgba(15,15,14,.46);
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
  }

  .lightbox__nav--prev {
    left: 24px;
  }

  .lightbox__nav--next {
    right: 24px;
  }

  .lightbox__close {
    z-index: 140;
  }
}


/* v42 — SEO fino: línea profesional visible y discreta */
.seo-visible-name {
  margin-top: 1.4rem;
  font-size: .86rem;
  letter-spacing: .02em;
  color: rgba(31,31,28,.62) !important;
}


/* v43 — menú legible durante scroll */
.site-header { transition: background .22s ease, border-color .22s ease, padding .22s ease, backdrop-filter .22s ease; }
.site-header.is-scrolled { background: rgba(242, 240, 234, .92); border-bottom: 1px solid rgba(31,31,28,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header.is-scrolled .brand, .site-header.is-scrolled .main-nav a, .site-header.is-scrolled .menu-toggle, .site-header.is-scrolled .lang-switch button { color: #1f1f1c; }
@media (min-width: 681px) { .site-header.is-scrolled { padding-top: 18px; padding-bottom: 18px; } }
@media (max-width: 680px) { .site-header.is-scrolled { background: rgba(242, 240, 234, .96); } }

/* v44 — botón ampliar en visor móvil */
.lightbox__zoom { position: absolute; z-index: 140; top: 28px; right: 94px; width: 48px; height: 48px; border: 1px solid rgba(247,246,242,.45); border-radius: 999px; background: transparent; color: var(--white); cursor: pointer; font-size: 1.65rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox__zoom:hover { background: rgba(247,246,242,.12); }
.lightbox.is-zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lightbox.is-zoomed .lightbox__figure { max-width: none; max-height: none; width: max-content; margin: 82px auto 110px; }
.lightbox.is-zoomed .lightbox__image { max-width: none; max-height: none; width: min(1600px, 170vw); height: auto; cursor: zoom-out; }
.lightbox.is-zoomed .lightbox__caption { display: none; }
@media (max-width: 680px) {
  .lightbox__zoom { top: 18px; right: 78px; width: 46px; height: 46px; font-size: 1.55rem; background: rgba(15,15,14,.20); }
  .lightbox.is-zoomed { padding: 0; -webkit-overflow-scrolling: touch; }
  .lightbox.is-zoomed .lightbox__figure { margin: 82px 0 96px; }
  .lightbox.is-zoomed .lightbox__image { width: 190vw; max-width: none; max-height: none; }
  .lightbox.is-zoomed .lightbox__nav { display: none !important; }
}

/* v45 — hover refinado */
.project-card img { transition: transform .55s cubic-bezier(.2,.6,.2,1), opacity .35s ease, filter .45s ease; }
.project-card:hover img { transform: scale(1.015); opacity: .72; filter: grayscale(.04) contrast(1.03); }
.project-card__meta { transition: opacity .35s ease, transform .35s ease; transform: translateY(6px); opacity: 0; }
.project-card:hover .project-card__meta { opacity: 1; transform: translateY(0); }
@media (min-width: 900px) { .project-card img { transition: transform .7s cubic-bezier(.2,.6,.2,1), opacity .4s ease, filter .5s ease; } }


/* v47 — menú siempre legible y zoom móvil real */
.site-header {
  background: rgba(242,240,234,.90) !important;
  border-bottom: 1px solid rgba(31,31,28,.12) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .brand,
.site-header .main-nav a,
.site-header .menu-toggle,
.site-header .lang-switch button {
  color: #1f1f1c !important;
}

@media (min-width: 681px) {
  .site-header {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
}

/* Botón de ampliación */
.lightbox__zoom {
  position: fixed !important;
  z-index: 180 !important;
  top: 28px !important;
  right: 94px !important;
  width: 48px !important;
  height: 48px !important;
  border: 1px solid rgba(247,246,242,.62) !important;
  border-radius: 999px !important;
  background: rgba(15,15,14,.35) !important;
  color: #f7f6f2 !important;
  cursor: pointer !important;
  font-size: 1.65rem !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.lightbox.is-zoomed {
  overflow: auto !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  -webkit-overflow-scrolling: touch;
}

.lightbox.is-zoomed .lightbox__figure {
  max-width: none !important;
  max-height: none !important;
  width: max-content !important;
  margin: 92px auto 120px !important;
}

.lightbox.is-zoomed .lightbox__image {
  max-width: none !important;
  max-height: none !important;
  width: min(1700px, 180vw) !important;
  height: auto !important;
  cursor: zoom-out !important;
}

.lightbox.is-zoomed .lightbox__caption {
  display: none !important;
}

.lightbox.is-zoomed .lightbox__nav {
  display: none !important;
}

@media (max-width: 680px) {
  .site-header {
    background: rgba(242,240,234,.96) !important;
  }

  .lightbox__zoom {
    top: 18px !important;
    right: 78px !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 1.55rem !important;
  }

  .lightbox.is-zoomed .lightbox__figure {
    margin: 84px 0 100px !important;
  }

  .lightbox.is-zoomed .lightbox__image {
    width: 210vw !important;
  }
}


/* v49 — refuerzo anti-caché y zoom móvil */
.lightbox__image { touch-action: manipulation; }
.lightbox.is-zoomed { touch-action: pan-x pan-y; }
.lightbox.is-zoomed .lightbox__image { image-rendering: auto; }
@media (max-width: 680px) {
  .lightbox__zoom::after { content: ""; }
  .lightbox.is-zoomed .lightbox__image { width: 220vw !important; }
}


/* v50 — Estudio editorial sin imagen + menú más ligero */
.site-header {
  background: rgba(242,240,234,.58) !important;
  border-bottom: 1px solid rgba(31,31,28,.075) !important;
  backdrop-filter: blur(8px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.05) !important;
}
.site-header.is-scrolled {
  background: rgba(242,240,234,.66) !important;
  border-bottom: 1px solid rgba(31,31,28,.10) !important;
}
@media (max-width: 680px) {
  .site-header { background: rgba(242,240,234,.64) !important; }
  .site-header.is-scrolled { background: rgba(242,240,234,.72) !important; }
  .site-header.is-open { background: rgba(242,240,234,.92) !important; }
}

.estudio-editorial {
  min-height: 100vh;
  padding: 180px 40px 140px;
  background: #f7f7f5;
  color: #222;
  border-bottom: 1px solid rgba(31,31,28,.16);
}
.estudio-inner {
  max-width: 980px;
  margin: 0 auto;
}
.estudio-header {
  max-width: 720px;
  margin-bottom: 90px;
}
.estudio-kicker {
  margin: 0 0 28px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 1.8px;
  font-weight: 500;
  text-transform: uppercase;
  color: #222;
}
.estudio-linea {
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,.16);
}
.estudio-texto {
  max-width: 620px;
  margin: 0 0 110px 18%;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -.01em;
}
.estudio-texto p {
  margin: 0 0 24px;
  color: #34332f;
}
.estudio-equipo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 820px;
  margin-left: 18%;
}
.persona h2 {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -.01em;
}
.persona p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #56544f;
}
@media (max-width: 768px) {
  .estudio-editorial {
    padding: 120px 22px 90px;
  }
  .estudio-header {
    margin-bottom: 60px;
  }
  .estudio-texto {
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 80px;
    font-size: 15px;
    line-height: 1.62;
  }
  .estudio-equipo {
    grid-template-columns: 1fr;
    gap: 45px;
    margin-left: 0;
  }
}


/* V57: filtros de proyectos robustos */
.project-filters { display: flex !important; visibility: visible !important; opacity: 1 !important; }
.project-filters button[data-filter="concursos"] { display: inline-flex !important; align-items: center; justify-content: center; }


/* v58 — ajustes finales AG arquitectos */
.site-header {
  background: rgba(242,240,234,.52) !important;
  border-bottom: 1px solid rgba(31,31,28,.06) !important;
  backdrop-filter: blur(8px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.05) !important;
}
.site-header.is-scrolled {
  background: rgba(242,240,234,.64) !important;
  border-bottom: 1px solid rgba(31,31,28,.09) !important;
}
.project-filters {
  position: sticky;
  top: 72px;
  z-index: 10;
  padding-bottom: 12px;
  background: linear-gradient(to bottom, rgba(231,228,220,.92), rgba(231,228,220,.72));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.project-filters button {
  transition: background .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease;
}
.project-card {
  background: rgba(255,255,255,.18);
}
.project-card img {
  filter: grayscale(.04) saturate(.94) contrast(1.015) brightness(1.015);
}
.project-card:hover img {
  transform: scale(1.012);
  opacity: .78;
  filter: grayscale(.02) saturate(.98) contrast(1.035) brightness(1.02);
}
.estudio-editorial {
  background: #f7f7f5 !important;
}
.seo-visible-name {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 680px) {
  .site-header { background: rgba(242,240,234,.66) !important; }
  .site-header.is-scrolled { background: rgba(242,240,234,.76) !important; }
  .project-filters { position: static; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* v62: mosaico compacto recuperado + estudio final */
.seo-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}