/* Oettinger & Almada — galería minimalista, negro/blanco + acento bronce. */

:root {
  --bg: #0a0a0b;
  --bg-soft: #131314;
  --panel: #17171818;
  --ink: #f5f3ee;
  --ink-soft: #cbc7bd;
  --muted: #8d897e;
  --line: rgba(245, 243, 238, 0.12);
  --line-strong: rgba(245, 243, 238, 0.22);
  --gold: #c19a5b;
  --gold-soft: rgba(193, 154, 91, 0.14);

  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container: 1280px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --section-pad: clamp(5rem, 10vw, 9rem);
  --title-gap: clamp(2.5rem, 6vw, 4.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 700ms;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 1ms; }
  * { scroll-behavior: auto !important; }
}

/* everything past the hero switches to a white/black gallery theme — the hero
   (outside main/footer) keeps the dark tokens above. Re-declaring the same
   custom property names lets every component below inherit the new values
   without rewriting each rule. --gold is darkened here (vs. the hero's lighter
   bronze) so eyebrow/accent text still clears 4.5:1 against white. */
main, footer {
  --bg: #ffffff;
  --bg-soft: #f4f2ee;
  --ink: #17150f;
  --ink-soft: #46433c;
  --muted: #6b6660;
  --line: rgba(23, 21, 15, 0.12);
  --line-strong: rgba(23, 21, 15, 0.22);
  --gold: #8a6a3a;
  --gold-soft: rgba(138, 106, 58, 0.12);
  background: var(--bg);
  color: var(--ink-soft);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
svg { display: block; }

::selection { background: var(--gold); color: var(--bg); }

.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;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

/* film grain — pure CSS, no image request */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}
em { font-style: italic; color: var(--gold); }

h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1em; color: var(--ink-soft); }

section { padding: var(--section-pad) 0; }

/* the space above each title should match the space the title itself already
   keeps below it (--title-gap), instead of the section's full vertical
   rhythm (--section-pad) — only the top edge is tightened, bottom is
   untouched. */
#proyectos, #estudio, #servicios {
  padding-top: var(--title-gap);
  /* keeps anchor-scrolled titles clear of the fixed nav — --nav-h is measured
     and kept in sync by JS, since the nav's real height changes responsively. */
  scroll-margin-top: var(--nav-h, 90px);
}

/* #clientes is the first (and only) section on its page — no hero above it
   to already push content clear of the fixed nav, so its top padding has to
   add the nav's own height on top of the usual title-gap. */
#clientes { padding-top: calc(var(--nav-h, 90px) + var(--title-gap)); }

.section-head { margin-bottom: var(--title-gap); position: relative; }
.section-head.center { text-align: center; }

.proyectos-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.filter-pill {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0.42rem 1rem;
  font-family: var(--sans);
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.filter-pill:hover { border-color: var(--ink); color: var(--ink); }
.filter-pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.7rem;
  border-radius: 1px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 0.3s var(--ease);
}
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-line {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gold);
  color: var(--ink);
}
.btn-line:hover { color: var(--gold); transform: translateX(4px); }

/* ---------- clientes ---------- */
.clientes-intro { max-width: 34ch; margin: 0 auto 2.2rem; text-align: center; }
.clientes-login { max-width: 380px; margin: 0 auto; }
.clientes-login form { display: flex; flex-direction: column; gap: 1.5rem; }
.clientes-field { display: flex; flex-direction: column; gap: 0.5rem; }
.clientes-field span {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted);
}
.clientes-field input {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s var(--ease);
}
.clientes-field input:focus { border-color: var(--gold); }
.clientes-error { font-size: 0.85rem; color: #a8402f; margin: -0.6rem 0 0; }
.clientes-login .btn { align-self: center; margin-top: 0.5rem; }

.clientes-gallery { max-width: 620px; margin: 0 auto; text-align: center; }
.clientes-gallery h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.clientes-obra { color: var(--muted); margin: 0 0 2.5rem; }
.clientes-empty { color: var(--muted); }

/* ---------- clientes: budget summary (ring + stats) ---------- */
.clientes-summary {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.clientes-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; flex: none; }
.clientes-ring {
  --pct: 0;
  position: relative;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--pct) * 1%), var(--line) 0);
  display: flex; align-items: center; justify-content: center;
}
.clientes-ring::before {
  content: ""; position: absolute; inset: 9px;
  border-radius: 50%; background: var(--bg);
}
.clientes-ring-value {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 500;
  font-size: 1.7rem; color: var(--ink);
}
.clientes-ring-label {
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.clientes-stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 2.75rem); text-align: left; }
.clientes-stat { display: flex; flex-direction: column; gap: 0.4rem; }
.clientes-stat-label { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.clientes-stat-value { font-size: 1.15rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.clientes-tabs { display: flex; justify-content: center; gap: 0.6rem; margin: 0 0 2.2rem; }
.clientes-tab {
  background: none; margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0.42rem 1.1rem;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.clientes-tab:hover { border-color: var(--ink); color: var(--ink); }
.clientes-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.clientes-rubros { display: flex; flex-direction: column; gap: 1.4rem; text-align: left; }
.clientes-rubros[hidden] { display: none; }
.clientes-rubro-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }
.clientes-rubro-name { font-size: 0.85rem; letter-spacing: 0.02em; color: var(--ink); }
.clientes-rubro-pct { font-size: 0.8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.clientes-rubro-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.clientes-rubro-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 1s var(--ease);
}
.clientes-updated { margin: 2.5rem 0 0; font-size: 0.78rem; color: var(--muted); text-align: right; }

/* ---------- clientes: gantt ---------- */
.clientes-gallery.is-gantt-view { max-width: 920px; }
.clientes-gantt { text-align: left; }
.clientes-gantt-legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0 0 1.6rem; font-size: 0.68rem; letter-spacing: 0.03em; color: var(--muted); }
.clientes-gantt-legend .item { display: inline-flex; align-items: center; gap: 0.45rem; }
.clientes-gantt-legend i { width: 14px; height: 6px; border-radius: 2px; display: inline-block; background: var(--gold); flex: none; }
.clientes-gantt-legend i.is-curso { background: repeating-linear-gradient(45deg, var(--gold) 0 3px, var(--gold-soft) 3px 6px); }
.clientes-gantt-legend i.is-pend { background: none; border: 1.5px dashed var(--muted); }

.clientes-gantt-scroll { overflow-x: auto; }
.clientes-gantt-inner { min-width: 620px; }

.clientes-gantt-axis { position: relative; height: 20px; margin-left: 170px; border-bottom: 1px solid var(--line-strong); }
.clientes-gantt-axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.62rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.clientes-gantt-group { margin-top: 1.7rem; }
.clientes-gantt-group-label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.4rem 170px; }

.clientes-gantt-row { display: flex; align-items: center; min-height: 30px; border-bottom: 1px solid var(--line); }
.clientes-gantt-name { width: 170px; flex: none; padding-right: 0.8rem; font-size: 0.76rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clientes-gantt-track { position: relative; flex: 1; height: 30px; }
.clientes-gantt-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.clientes-gantt-today { position: absolute; top: -14px; bottom: 0; width: 1px; background: var(--ink); opacity: 0.45; }
.clientes-gantt-today-label { position: absolute; top: -28px; transform: translateX(-50%); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }

.clientes-gantt-bar { position: absolute; top: 8px; height: 14px; border-radius: 3px; background: var(--gold); display: flex; align-items: center; padding: 0 6px; overflow: hidden; }
.clientes-gantt-bar.is-curso { background: var(--gold-soft); background-image: repeating-linear-gradient(45deg, var(--gold) 0 3px, transparent 3px 7px); border: 1px solid var(--gold); }
.clientes-gantt-bar-pct { font-size: 0.6rem; font-weight: 600; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); white-space: nowrap; }
.clientes-gantt-bar.is-curso .clientes-gantt-bar-pct { color: var(--gold); text-shadow: none; }

.clientes-gantt-pending { position: absolute; top: 10px; right: 4px; width: 10px; height: 10px; border-radius: 2px; border: 1.5px dashed var(--muted); }

@media (max-width: 600px) {
  .clientes-gantt-name { width: 108px; font-size: 0.68rem; }
  .clientes-gantt-axis, .clientes-gantt-group-label { margin-left: 108px; }
}

/* ---------- clientes: fotos ---------- */
.clientes-fotos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; text-align: left; }
.clientes-fotos[hidden] { display: none; }
.clientes-foto {
  padding: 0; margin: 0; border: none; background: none; cursor: zoom-in;
  border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3;
}
.clientes-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.clientes-foto:hover img { transform: scale(1.05); }

.clientes-foto-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.5rem; background: rgba(10, 10, 11, 0.92);
  cursor: zoom-out;
}
.clientes-foto-lightbox[hidden] { display: none; }
.clientes-foto-lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: clamp(1.1rem, 2.7vw, 1.65rem) 0;
  transition: padding 0.4s var(--ease);
}
/* the blur/background lives on a pseudo-element, not .nav itself — `backdrop-filter`
   on .nav would make it a containing block for its own position:fixed children
   (the mobile menu), collapsing that fullscreen overlay to the navbar's height
   whenever it's opened while the page is scrolled. */
.nav::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(10, 10, 11, 0);
  transition: background var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
}
.nav.scrolled { padding: 1rem 0; }
.nav.scrolled::before {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
/* pages with no dark hero under the nav (e.g. clientes.html) need the
   scrolled backdrop always on, since the light nav text has nothing dark
   to sit on at scrollY 0 — the scroll-driven .scrolled toggle alone would
   strip it back off on load. */
.page-clientes .nav::before {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; }
.brand img {
  height: clamp(54px, 6.2vw, 68px);
  width: auto;
  object-fit: contain;
  filter: invert(1) brightness(1.35) contrast(0.92);
}

.nav-links { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); }
.nav-links a {
  display: inline-flex; align-items: baseline;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-soft);
  position: relative; padding: 0.2rem 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--ink); transition: right 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 0; margin: 0;
    flex-direction: column; justify-content: flex-start; align-items: center;
    gap: 1.65rem; padding: clamp(6.5rem, 20vh, 9rem) 8vw 2rem;
    background: var(--bg);
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 0.7rem 0; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; border: none; background: none; cursor: pointer;
    z-index: 101; position: relative;
  }
  .nav-toggle span { width: 22px; height: 1px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  background: var(--bg);
}
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 55% 45% at 50% 46%, rgba(6,6,7,0.6) 0%, rgba(6,6,7,0) 62%),
    radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(6,6,7,0.62) 100%);
}
.hero-fade-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  height: clamp(160px, 32vh, 420px);
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0) 0%, rgba(10, 10, 11, 0.6) 55%, var(--bg) 100%);
  pointer-events: none;
}
.hero-signature {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: opacity, transform;
}
.hero-logo {
  width: clamp(150px, 20vw, 260px);
  height: auto;
  filter: invert(1) brightness(1.4) contrast(0.9) drop-shadow(0 0 44px rgba(0, 0, 0, 0.55));
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 1.3s var(--ease), transform 1.3s var(--ease);
  transition-delay: 0.2s;
}
.loaded .hero-logo { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- reveal-on-scroll ---------- */
.reveal, .reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in-view, .reveal-up.in-view, .loaded .reveal-up {
  opacity: 1;
  transform: translateY(0);
}

/* section titles (and the footer's "Imaginamos. Proyectamos. Hacemos." words):
   same idea as the word-cycle in the referenced component — drops in with a
   springy overshoot — but scroll-triggered instead of timed, and it fires
   once then holds still (reuses the .reveal observer, which already
   unobserves after the first intersection). `--d` staggers multiple words
   in the same block so they pop in one after another instead of together. */
.title-pop {
  display: inline-block;
  opacity: 0;
  transform: translateY(-42px);
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: var(--d, 0s);
}
.title-pop.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- proyectos ---------- */
/* full-bleed: sits outside .wrap so it can run edge-to-edge; column count
   grows on wider screens instead of staying fixed, so more photos fit per
   row as the studio adds work rather than the grid ever needing a rewrite. */
.grid-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
}
.project-card { cursor: pointer; }
.project-card:nth-child(1) { transition-delay: 0.02s; }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.18s; }
.project-card:nth-child(4) { transition-delay: 0.02s; }
.project-card:nth-child(5) { transition-delay: 0.1s; }
.project-card:nth-child(6) { transition-delay: 0.18s; }
.project-card.is-hidden { opacity: 0; pointer-events: none; }

.project-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
}
.project-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
  filter: grayscale(1);
}
.project-card:hover .project-frame img { transform: scale(1.08); filter: grayscale(0); }

.project-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(6, 6, 7, 0.72) 0%, rgba(6, 6, 7, 0) 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay .name { font-family: var(--serif); font-size: 1.15rem; color: #f5f3ee; }
.project-overlay .cat { font-size: 0.7rem; color: rgba(245, 243, 238, 0.75); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.2rem; }

/* ---------- estudio ---------- */
.estudio-copy {
  column-count: 2;
  column-gap: clamp(2rem, 5vw, 4rem);
}
.estudio-copy p {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

@media (max-width: 860px) {
  .estudio-copy { column-count: 1; }
}

/* ---------- servicios ---------- */
.grid-servicios {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-radius: 2px;
}
.servicios-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
}
.servicio {
  position: relative;
  z-index: 1;
  background: rgba(10, 10, 11, 0);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 2.5vw, 2rem);
  transition: background 0.4s var(--ease);
}
.servicio:hover { background: rgba(10, 10, 11, 0.05); }
.servicio:nth-child(2) { transition-delay: 0.02s; }
.servicio:nth-child(3) { transition-delay: 0.08s; }
.servicio:nth-child(4) { transition-delay: 0.14s; }
.servicio:nth-child(5) { transition-delay: 0.2s; }
.servicio .ico { color: #4a4740; margin-bottom: 1.6rem; }
.servicio h3 { margin-bottom: 0.5rem; }
.servicio p { font-size: 0.88rem; margin: 0; }

@media (max-width: 860px) { .grid-servicios { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .grid-servicios { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer { padding: var(--section-pad) 0 0; }

.footer-lead { margin-bottom: clamp(4rem, 12vh, 8rem); }
.footer-lead p {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}
.footer-lead strong { font-weight: 700; }
.footer-lead-sub {
  display: inline-block;
  margin-top: 0.35em;
  font-size: 0.56em;
  font-weight: 400;
  white-space: nowrap;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.2fr 0.6fr 0.6fr 0.6fr;
  gap: 2rem;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.footer-col p { margin: 0 0 0.5rem; font-size: 0.88rem; line-height: 1.6; color: var(--ink-soft); white-space: nowrap; }
.footer-col p:last-child { margin-bottom: 0; }
.footer-col a { color: var(--ink-soft); transition: color 0.3s ease; }
.footer-col a:hover { color: var(--gold); }
.footer-col:first-child { margin-top: -1.5rem; }
.footer-brand-name { font-size: 0.88rem; font-weight: 700; color: var(--ink); }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { font-size: 0.88rem; }
.footer-social { display: flex; align-items: flex-start; gap: 1.1rem; }
.footer-social a { color: var(--ink-soft); transition: color 0.3s ease; }
.footer-social a:hover { color: var(--gold); }
.footer-social svg { width: 20px; height: 20px; }

.footer-bottom-bar {
  /* same translucent tone as the scrolled nav, not a flat opaque black */
  background: rgba(10, 10, 11, 0.82);
  --muted: #969185;
}
.footer-bottom { padding: 1.1rem 0; display: flex; justify-content: flex-end; }
.foot-copy { font-size: 0.75rem; color: var(--muted); }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 4vw;
  background: rgba(6, 6, 7, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-inner { max-width: 1100px; width: 100%; text-align: center; transform: scale(0.97); transition: transform 0.4s var(--ease); }
.lightbox.open .lightbox-inner { transform: scale(1); }

.lightbox-stage { position: relative; }
.lightbox-stage img { max-height: 74vh; margin: 0 auto; width: auto; object-fit: contain; }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(245, 243, 238, 0.3);
  background: rgba(10, 10, 11, 0.55);
  color: #f5f3ee; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.lightbox-nav:hover { border-color: var(--gold); background: rgba(10, 10, 11, 0.8); }
.lightbox-nav.prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-nav.next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-nav[hidden] { display: none; }

.lightbox-counter {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: rgba(10, 10, 11, 0.65);
  color: #f5f3ee;
  font-size: 0.75rem; letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem; border-radius: 999px;
}
.lightbox-counter[hidden] { display: none; }

.lightbox-cap { display: flex; justify-content: center; gap: 1rem; align-items: baseline; margin-top: 1.5rem; }
.lightbox-cap .name { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.lightbox-cap .cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.lightbox-thumbs {
  display: flex; justify-content: center; gap: 0.6rem;
  margin-top: 1.5rem; padding: 0 0.5rem 0.25rem;
  overflow-x: auto;
}
.lightbox-thumbs[hidden] { display: none; }
.lightbox-thumb {
  flex: 0 0 auto;
  width: 58px; aspect-ratio: 4 / 5; object-fit: cover;
  cursor: pointer; border-radius: 1px;
  opacity: 0.45; border: 2px solid transparent;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}
.lightbox-thumb:hover { opacity: 0.75; }
.lightbox-thumb.active { opacity: 1; border-color: var(--gold); }

.lightbox-close {
  position: absolute; top: clamp(1.25rem, 3vw, 2rem); right: clamp(1.25rem, 3vw, 2rem);
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 1px;
  background: transparent; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 600px) {
  .lightbox-stage img { max-height: 56vh; }
  .lightbox-nav { width: 38px; height: 38px; }
}
