/* ALUR Arquitectos · sitio público */
:root {
  --ink: #1d2424;
  --ink-2: #2b3333;
  --ink-3: #3e4747;
  --sand: #bda87f;
  --sand-2: #a89065;
  --sand-soft: #e9e1cf;
  --paper: #faf8f4;
  --paper-2: #f2eee6;
  --line: #e4ded2;
  --muted: #6c7271;
  --white: #fff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(29, 36, 36, .05), 0 12px 32px -12px rgba(29, 36, 36, .18);
  --ff-head: 'Josefin Sans', 'Century Gothic', system-ui, sans-serif;
  --ff-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--ff-body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--sand); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--ff-head); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
.i { flex: none; vertical-align: middle; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.mb { margin-bottom: 1.4em; }
.eyebrow { font: 600 .78rem/1.2 var(--ff-body); letter-spacing: .22em; text-transform: uppercase; color: var(--sand-2); margin-bottom: 1rem; display: flex; align-items: center; gap: .7rem; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.center .eyebrow { justify-content: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-3); max-width: 62ch; }
.display { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 300; }
.display strong, .display b { font-weight: 600; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font: 600 .92rem/1 var(--ff-body); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); }
.btn-gold { --bg: var(--sand); --fg: var(--ink); --bd: var(--sand); }
.btn-gold:hover { --bg: #c9b68f; }
.btn-dark { --bg: var(--ink); --fg: var(--white); --bd: var(--ink); }
.btn-outline-dark { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn-ghost-light { --bg: rgba(255,255,255,.06); --fg: var(--white); --bd: rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { --bg: rgba(255,255,255,.16); }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink); }
.link-arrow .i { transition: transform .25s; color: var(--sand-2); }
.link-arrow:hover .i, a:hover .link-arrow .i { transform: translateX(4px); }
.tag { display: inline-block; font: 600 .7rem/1 var(--ff-body); letter-spacing: .14em; text-transform: uppercase; padding: .45rem .7rem; border-radius: 999px; background: var(--sand-soft); color: var(--ink); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(250, 248, 244, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,.35); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: block; position: relative; width: 150px; flex: none; }
.brand .logo { width: 150px; height: auto; transition: opacity .3s; }
.brand .logo-light { position: absolute; inset: 0; opacity: 0; }
.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav > ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: .55rem .8rem; font-size: .9rem; font-weight: 600; text-decoration: none; border-radius: 999px; color: var(--ink); transition: background .2s, color .2s; }
.main-nav > ul > li > a:hover, .main-nav a.active { background: rgba(189, 168, 127, .18); }
.main-nav .sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; list-style: none; margin: 0; padding: .5rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; }
.main-nav .sub::before { content: ''; position: absolute; inset: -10px 0 auto; height: 10px; }
.main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub a { border-radius: 10px; font-weight: 500; }
.main-nav .sub a:hover { background: var(--paper-2); }
.nav-cta { padding: .7rem 1.2rem; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 0; background: transparent; color: inherit; position: relative; border-radius: 50%; }
.menu-toggle span:not(.sr) { position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; border-radius: 2px; transition: .3s; }
.menu-toggle span:nth-child(1) { top: 16px; } .menu-toggle span:nth-child(2) { top: 22px; } .menu-toggle span:nth-child(3) { top: 28px; }
.menu-open .menu-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Header transparente sobre el hero de inicio */
body.home .site-header:not(.scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--white); }
body.home .site-header:not(.scrolled) .logo-light { opacity: 1; }
body.home .site-header:not(.scrolled) .logo-dark { opacity: 0; }
body.home .site-header:not(.scrolled) .main-nav > ul > li > a { color: var(--white); }
body.home .site-header:not(.scrolled) .main-nav > ul > li > a:hover, body.home .site-header:not(.scrolled) .main-nav a.active { background: rgba(255,255,255,.14); }
body.home .site-header:not(.scrolled) .menu-toggle { color: var(--white); }
body.home main { margin-top: calc(var(--header-h) * -1); }

/* ---------- Hero (inicio) ---------- */
.hero { position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--ink); isolation: isolate; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; z-index: -2; }
.hero-slide.is-active { opacity: 1; }
.hero-bg { position: absolute; inset: -2%; background-size: cover; background-position: center; transform: scale(1.06); transition: transform 8s ease-out; }
.hero-slide.is-active .hero-bg { transform: scale(1); }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,26,26,.55) 0%, rgba(20,26,26,.15) 35%, rgba(20,26,26,.78) 100%), linear-gradient(90deg, rgba(20,26,26,.6), transparent 70%); }
.hero-content { padding-top: calc(var(--header-h) + 60px); padding-bottom: clamp(60px, 10vh, 110px); }
.hero .eyebrow { color: var(--sand); }
.hero-titles { display: grid; }
.hero-title { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; pointer-events: none; }
.hero-title.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .25s; }
.hero h1, .hero .hero-h { font-size: clamp(2.5rem, 6.4vw, 5.4rem); font-weight: 300; max-width: 15ch; margin-bottom: .3em; text-wrap: balance; }
.hero .lead { color: rgba(255,255,255,.85); font-size: clamp(1.05rem, 1.8vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-dots { display: flex; gap: .5rem; margin-top: 2.6rem; }
.hero-dots button { width: 34px; height: 3px; border: 0; padding: 0; background: rgba(255,255,255,.35); border-radius: 2px; transition: background .3s, width .3s; }
.hero-dots button.is-active { background: var(--sand); width: 56px; }
.hero-scroll { position: absolute; left: 50%; margin-left: -24px; bottom: 32px; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: var(--white); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.tinted { background: var(--paper-2); }
.section.dark { background: var(--ink); color: var(--white); }
.section.dark .eyebrow { color: var(--sand); }
.section.dark .link-arrow { color: var(--white); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.stats { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); }
.stats li { padding-top: 1.2rem; }
.stats strong { display: block; font: 300 2.6rem/1 var(--ff-head); color: var(--sand-2); }
.stats span { display: block; font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card { position: relative; display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 1px 0 var(--line); transition: transform .35s ease, box-shadow .35s; transition-delay: var(--d, 0ms); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.service-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.service-card:hover .service-card-media img { transform: scale(1.06); }
.service-card-body { position: relative; padding: 1.6rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.service-card-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.service-num { position: absolute; top: 1.4rem; right: 1.4rem; font: 300 1.1rem var(--ff-head); color: var(--sand-2); }
.service-icon { width: 56px; height: 56px; margin-top: -3.4rem; margin-bottom: .6rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--sand); box-shadow: 0 0 0 6px var(--white); }

/* Proyectos */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.projects-grid.featured { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 230px; }
.projects-grid.featured .project-card { grid-column: span 2; }
.projects-grid.featured .project-card:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.projects-grid.featured .project-card:nth-child(2) { grid-row: span 2; }
.projects-grid.featured .project-card:nth-child(n+3) { grid-column: span 2; }
.project-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); min-height: 260px; aspect-ratio: 4 / 3; color: var(--white); text-decoration: none; isolation: isolate; }
.projects-grid.featured .project-card { aspect-ratio: auto; min-height: 0; }
.project-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .6s; }
.project-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(15,20,20,.85)); transition: opacity .4s; }
.project-card:hover img { transform: scale(1.07); }
.project-card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.3rem 1.4rem; transform: translateY(8px); transition: transform .4s; }
.project-card:hover .project-card-info { transform: none; }
.project-card h3 { margin: .7rem 0 .2rem; font-size: 1.35rem; }
.project-card p { margin: 0; font-size: .85rem; color: rgba(255,255,255,.8); display: flex; align-items: center; gap: .35rem; }
.project-card .tag { background: rgba(189,168,127,.92); }
.project-card.is-hidden { display: none; }
.projects-grid.three { grid-template-columns: repeat(3, 1fr); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; transition: .2s; }
.chip small { font-weight: 500; color: var(--muted); }
.chip:hover { border-color: var(--sand); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip.is-active small { color: var(--sand); }

/* Features (zig-zag) */
.feature { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 110px); }
.feature.reverse { grid-template-columns: 5fr 7fr; }
.feature.reverse .feature-media { order: 2; }
.feature-media { position: relative; }
.feature-media::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; border: 1.5px solid var(--sand); border-radius: var(--radius-lg); z-index: -1; }
.feature.reverse .feature-media::before { inset: 24px 24px -24px -24px; }
.feature-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); background: var(--paper-2); }
.feature-body .prose { color: var(--ink-3); }

/* Blog */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.post-card:hover .post-card-media img { transform: scale(1.05); }
.post-card-media .ph { display: grid; place-items: center; height: 100%; color: var(--sand); }
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card time { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sand-2); font-weight: 600; }
.post-card h3 { font-size: 1.25rem; margin: 0; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--sand-2); }
.post-card p { color: var(--muted); font-size: .94rem; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .link-arrow { margin-top: .4rem; }
.post-card.big { grid-column: 1 / -1; flex-direction: row; }
.post-card.big .post-card-media { aspect-ratio: auto; flex: 1.2; min-height: 340px; }
.post-card.big .post-card-body { flex: 1; justify-content: center; padding: 2rem; }
.post-card.big h3 { font-size: 1.7rem; }
.post-list { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 180px 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .3s, background .3s; }
.post-list a:hover { padding-left: 1rem; background: rgba(255,255,255,.6); }
.post-list time { font-size: .82rem; color: var(--muted); }
.post-list span { font-family: var(--ff-head); font-size: 1.15rem; font-weight: 600; }
.post-list .i { color: var(--sand-2); }

/* CTA */
.cta-band { background: var(--sand); padding: clamp(48px, 6vw, 80px) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: .2em; }
.cta-inner p { margin: 0; color: var(--ink-2); font-size: 1.1rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Páginas interiores ---------- */
.page-hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(44px, 6vw, 80px); background: var(--paper-2); overflow: hidden; isolation: isolate; }
.page-hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border: 1.5px solid var(--sand); border-radius: 50%; opacity: .5; z-index: -1; }
.page-hero.has-image { color: var(--white); background: var(--ink); }
.page-hero.has-image::after { opacity: .35; }
.page-hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .35; }
.page-hero.has-image .lead { color: rgba(255,255,255,.85); }
.page-hero.has-image .eyebrow { color: var(--sand); }
.page-hero h1 { max-width: 20ch; text-wrap: balance; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; margin-bottom: 1.6rem; color: var(--muted); }
.page-hero.has-image .crumbs, .project-hero .crumbs { color: rgba(255,255,255,.7); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--sand-2); }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1.2rem; }
.aside-card { background: var(--ink); color: var(--white); padding: 1.8rem; border-radius: var(--radius-lg); }
.aside-card p { color: rgba(255,255,255,.75); }
.aside-nav { background: var(--white); border-radius: var(--radius-lg); padding: 1.2rem; box-shadow: 0 1px 0 var(--line); }
.aside-nav h3 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: .3rem .6rem; }
.aside-nav a { display: flex; justify-content: space-between; align-items: center; padding: .75rem .6rem; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.aside-nav a:hover, .aside-nav a.active { background: var(--paper-2); }
.aside-nav a.active { color: var(--sand-2); }

/* Prosa (contenido editable) */
.prose { overflow-wrap: break-word; }
.prose-lg { font-size: 1.08rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.8em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.6em; }
.prose h4 { font-size: 1.1rem; margin-top: 1.4em; color: var(--sand-2); }
.prose p { margin: 0; }
.prose p + p { margin-top: 1em; }
.prose img { border-radius: var(--radius); margin: 0 auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .6em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--sand); text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--sand-2); }
.prose blockquote { margin: 1.8em 0; padding: 1.4em 1.6em; background: var(--paper-2); border-left: 3px solid var(--sand); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.02rem; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: .6em .8em; }
.prose iframe, .prose video { max-width: 100%; border-radius: var(--radius); }
.prose iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; }
.prose pre { white-space: pre-wrap; background: var(--paper-2); padding: 1em; border-radius: var(--radius); font-size: .9rem; }
.prose .wp-block-gallery, .prose .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.prose .wp-block-gallery figure { margin: 0; }
.prose .wp-block-gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose [data-lb], .prose img { cursor: zoom-in; }

/* Galerías */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery.masonry { display: block; columns: 3 300px; column-gap: 14px; }
.gallery.masonry.tight { columns: 4 240px; column-gap: 10px; }
.gallery-item { display: block; overflow: hidden; border-radius: var(--radius); margin-bottom: 14px; break-inside: avoid; background: var(--paper-2); cursor: zoom-in; position: relative; }
.gallery.tight .gallery-item { margin-bottom: 10px; border-radius: 10px; }
.gallery-item img { width: 100%; transition: transform .7s ease, opacity .3s; }
.gallery-item:hover img { transform: scale(1.04); }

/* Proyecto */
.project-hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; color: var(--white); background: var(--ink); isolation: isolate; padding: 120px 0 56px; }
.project-hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.project-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15,20,20,.25), rgba(15,20,20,.8)); }
.project-hero h1 { margin-top: .8rem; font-weight: 300; }
.project-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 6vw, 90px); margin-bottom: clamp(40px, 6vw, 72px); align-items: start; }
.project-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project-facts div { background: var(--white); padding: 1.2rem 1.3rem; }
.project-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-weight: 600; }
.project-facts dd { margin: .3rem 0 0; font: 600 1.15rem var(--ff-head); }
.project-desc { font-size: 1.15rem; color: var(--ink-3); }
.project-desc .btn { margin-top: 1rem; }

/* Blog */
.blog-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2.4rem; }
.search { display: flex; align-items: center; gap: .6rem; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 0 1.1rem; min-width: min(360px, 100%); color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; padding: .85rem 0; font: inherit; width: 100%; color: var(--ink); }
.search:focus-within { border-color: var(--sand); box-shadow: 0 0 0 4px rgba(189,168,127,.2); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 3rem; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 .9rem; display: inline-grid; place-items: center; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; background: var(--white); border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--sand); }
.pagination .current { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination .gap { border: 0; background: transparent; }
.empty { text-align: center; padding: 4rem 1rem; background: var(--white); border-radius: var(--radius-lg); }

/* Artículo */
.article-head { padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); text-wrap: balance; }
.article-cats { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.meta { color: var(--muted); font-size: .92rem; }
.article-cover { margin: 0 auto clamp(32px, 5vw, 64px); }
.article-cover img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius-lg); }
.article-tags { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 3rem; color: var(--muted); font-size: .9rem; }
.article-tags a { text-decoration: none; color: var(--ink-3); }
.article-tags a:hover { color: var(--sand-2); }
.share { display: flex; align-items: center; gap: .5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.share a, .share button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--ink); transition: .2s; }
.share a:hover, .share button:hover { background: var(--ink); color: var(--white); }
.share span { margin-right: .4rem; }
.author-box { display: flex; gap: 1rem; align-items: center; margin: 2.4rem 0 clamp(48px, 6vw, 80px); padding: 1.4rem; background: var(--paper-2); border-radius: var(--radius-lg); }
.author-box img { border-radius: 50%; }
.author-box p { margin: .2rem 0 0; font-size: .92rem; color: var(--ink-3); }

/* Nosotros */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-media { position: relative; }
.about-media::before { content: ''; position: absolute; inset: -20px 20px 20px -20px; background: var(--sand-soft); border-radius: var(--radius-lg); z-index: -1; }
.about-media img { border-radius: var(--radius-lg); width: 100%; }
.sector-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2rem 0 0; }
.sector-list li { padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--sand); font-weight: 600; font-size: .9rem; }
.mvv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mvv-item { padding: 2rem; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); background: rgba(255,255,255,.03); }
.mvv-item > span { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sand); color: var(--ink); margin-bottom: 1.2rem; }
.mvv-item blockquote { margin: 0; color: rgba(255,255,255,.8); font-size: 1.02rem; }
.partners { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.partners li { background: var(--white); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; box-shadow: 0 1px 0 var(--line); }
.partners img { height: 80px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: .3s; }
.partners li:hover img { filter: none; opacity: 1; }
.partners span { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* Proceso */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--white); padding: 1.8rem; border-radius: var(--radius-lg); position: relative; }
.steps li span { font: 300 2.6rem/1 var(--ff-head); color: var(--sand); display: block; margin-bottom: 1rem; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-info { display: grid; gap: 14px; }
.info-card { display: flex; gap: 1rem; padding: 1.4rem; background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 1px 0 var(--line); }
.info-card > span { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--sand-soft); color: var(--ink); }
.info-card h3 { font-size: 1rem; margin-bottom: .3rem; }
.info-card p { margin: 0; color: var(--ink-3); }
.info-card a { text-decoration: none; }
.info-card a:hover { color: var(--sand-2); }
.form-card { background: var(--white); padding: clamp(1.4rem, 4vw, 2.6rem); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--ink-3); }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 1rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--sand); box-shadow: 0 0 0 4px rgba(189,168,127,.2); background: var(--white); }
.form .btn { justify-self: start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.2rem; font-weight: 600; }
.alert.ok { background: #e7f3ea; color: #1f5a32; }
.alert.err { background: #fbeae8; color: #8a2a1d; }
.map iframe { display: block; width: 100%; height: 440px; border: 0; filter: grayscale(.35) contrast(1.05); }

.notfound { min-height: 60vh; display: grid; place-items: center; }
.thanks { min-height: 62vh; display: grid; place-items: center; }
.thanks-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--sand-soft); color: var(--ink); border: 1px solid var(--sand); margin-bottom: 1.4rem; }
.thanks .lead { max-width: 36rem; margin-inline: auto; }
.thanks-note { margin-top: 2rem; color: var(--muted); }
.thanks-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.thanks-links { margin-top: 2rem; }
.thanks-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.notfound .search { margin: 2rem auto; max-width: 420px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); font-size: .95rem; }
.footer-cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; padding-top: clamp(56px, 7vw, 90px); padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-cta h2 { color: var(--white); font-weight: 300; margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.footer-cta .eyebrow { color: var(--sand); }
.footer-cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 2.4rem; padding-top: 56px; padding-bottom: 40px; }
.footer-grid h3 { color: var(--white); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 1.2rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--sand); }
.footer-brand img { width: 170px; margin-bottom: 1.2rem; }
.contact-list li { display: flex; gap: .6rem; align-items: flex-start; }
.contact-list .i { margin-top: .3rem; color: var(--sand); }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); }
.socials a:hover { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 1.4rem; padding-bottom: 1.6rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: none; }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 30px -8px rgba(0,0,0,.45); transition: transform .25s; }
.wa-float:hover { transform: scale(1.08); }
.admin-edit[hidden] { display: none; }
.admin-edit { position: fixed; left: 20px; bottom: 20px; z-index: 40; display: inline-flex; gap: .4rem; align-items: center; padding: .7rem 1rem; border-radius: 999px; background: var(--ink); color: var(--sand); text-decoration: none; font-weight: 700; font-size: .85rem; box-shadow: var(--shadow); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12,16,16,.94); display: grid; place-items: center; padding: 60px 70px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: .8rem; justify-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: rgba(255,255,255,.75); font-size: .9rem; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.08); color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Animaciones de aparición */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .main-nav { gap: .8rem; }
  .main-nav a { padding: .5rem .55rem; font-size: .85rem; }
}
@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .menu-toggle { display: block; z-index: 2; }
  .main-nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; align-items: stretch; gap: 1.5rem; padding: 90px var(--gutter) 40px; background: var(--ink); color: var(--white); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .menu-open .main-nav { opacity: 1; visibility: visible; }
  /* backdrop-filter crea un bloque contenedor: el menú fixed quedaría atrapado dentro del header */
  .menu-open .site-header { color: var(--white); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .menu-open .logo-light { opacity: 1 !important; } .menu-open .logo-dark { opacity: 0 !important; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li > a, body.home .site-header:not(.scrolled) .main-nav > ul > li > a { color: var(--white); font: 400 1.7rem var(--ff-head); padding: .6rem 0; border-radius: 0; }
  .main-nav > ul > li > a:hover, .main-nav a.active { background: transparent !important; color: var(--sand) !important; }
  .main-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; box-shadow: none; padding: 0 0 .6rem 1rem; min-width: 0; }
  .main-nav .sub a { color: rgba(255,255,255,.7); font-size: .95rem; padding: .3rem 0; }
  .main-nav .sub a:hover { background: transparent; color: var(--sand); }
  .nav-cta { align-self: flex-start; }
  body.menu-open { overflow: hidden; }
  .brand { z-index: 2; }
  .intro-grid, .feature, .feature.reverse, .with-aside, .project-layout, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
  .feature-media::before { inset: 14px -10px -14px 14px !important; }
  .aside { position: static; }
  .projects-grid, .projects-grid.three { grid-template-columns: repeat(2, 1fr); }
  .projects-grid.featured { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .projects-grid.featured .project-card:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .projects-grid.featured .project-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card.big { grid-column: 1 / -1; }
  .mvv { grid-template-columns: 1fr; }
  .partners { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .services-grid, .projects-grid, .projects-grid.three, .posts-grid, .steps, .footer-grid, .row2 { grid-template-columns: 1fr; }
  .projects-grid.featured { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .projects-grid.featured .project-card:nth-child(1) { grid-column: span 1; grid-row: span 1; }
  .project-card { min-height: 0; }
  .post-card.big { grid-column: span 1; flex-direction: column; }
  .post-card.big .post-card-media { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
  .post-card.big .post-card-body { padding: 1.4rem 1.5rem 1.6rem; }
  .post-card.big h3 { font-size: 1.3rem; }
  .post-list a { grid-template-columns: 1fr auto; }
  .post-list time { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .project-facts { grid-template-columns: 1fr 1fr; }
  .hero-scroll { display: none; }
  .gallery.masonry { columns: 2 140px; column-gap: 8px; }
  .gallery-item { margin-bottom: 8px; border-radius: 10px; }
  .lightbox { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto !important; bottom: 12px; transform: none !important; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .admin-edit { left: 14px; bottom: 14px; }
  .partners { grid-template-columns: 1fr 1fr; }
  .page-hero::after { width: 260px; height: 260px; right: -100px; top: -100px; }
}
