/* =========================================================
   Clínica Dental Integral — v4
   Animaciones por CSS; JS solo agrega clases y calcula efectos
   a partir de la posición real del scroll en cada cuadro.
   ========================================================= */

/* Tipografías propias (subconjunto latino: alcanza para español). Geist es variable (400 y 500). */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/geist-latin.woff2") format("woff2"); }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/quicksand-500-latin.woff2") format("woff2"); }

:root {
  --paper: #f5f4f0;
  --ink: #0f0f0e;
  --gold: #c9973a;
  --gold-logo: #d3a13b;
  --gold-text: #7a5a14; /* dorado oscuro para texto sobre fondos claros (contraste AA) */

  --radius: 12px;
  --gutter: clamp(20px, 4vw, 56px);
  --container: 1320px;
  --header-h: 72px;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Quicksand", "Geist", ui-sans-serif, system-ui, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
picture { display: contents; }
.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; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html.modal-open, html.menu-open { overflow: hidden; }

body {
  --bg: var(--paper);
  --fg: var(--ink);
  --surface: #e7e5df;
  --muted: color-mix(in srgb, var(--fg) 64%, transparent);
  --subtle: color-mix(in srgb, var(--fg) 58%, transparent);
  --faint: color-mix(in srgb, var(--fg) 42%, transparent);
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .8s var(--ease-io), color .8s var(--ease-io);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 999px; }
.skip:focus { left: 16px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Texto partido en palabras / letras */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.wi { display: inline-block; }

h2 { font-size: clamp(2rem, 3.8vw, 3.5rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.035em; }
.lead { max-width: 40ch; font-size: 1.0625rem; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: .9rem; font-weight: 500; white-space: nowrap;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn .ic { width: 16px; height: 16px; transition: transform .5s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn:active { scale: .98; }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--gold); }
.btn-glass { background: rgba(255, 255, 255, .13); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-glass:hover { border-color: #fff; background: rgba(255, 255, 255, .16); }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover { background: var(--gold); color: var(--ink); }
.btn-line { border-color: color-mix(in srgb, currentColor 28%, transparent); }
.btn-line:hover { border-color: currentColor; }

/* ---------- Intro ---------- */
.loader { display: none; }
.is-loading .loader {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink);
  clip-path: inset(0% 0% 0% 0%);
  animation: loaderFailsafe .5s ease 4s forwards;
}
.is-loading .loader.is-out { clip-path: inset(0% 0% 100% 0%); transition: clip-path .9s var(--ease-io); }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }
.loader-mark { width: 88px; height: 106px; transition: opacity .5s ease, scale .6s var(--ease); }
.loader.is-out .loader-mark { opacity: 0; scale: .85; }
.lm { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.lm-gray { stroke: #9d9d9d; stroke-width: 9; animation: draw .6s var(--ease) .1s forwards; }
.lm-ink { stroke: var(--ink); stroke-width: 9; animation: draw .65s var(--ease) .3s forwards; }
.lm-gold { stroke: var(--gold-logo); stroke-width: 8; animation: draw .55s var(--ease) .52s forwards; }
.lm-dot { fill: var(--gold-logo); transform-origin: 86px 95px; transform: scale(0); animation: pop .45s var(--ease) .8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
.loader-meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between;
  font-size: .8125rem; font-variant-numeric: tabular-nums;
}

/* ---------- Barra de progreso / foto flotante ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; pointer-events: none; will-change: transform; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  color: #fff;
  transition: transform .6s var(--ease), background-color .4s, color .4s;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
  padding-inline: var(--gutter);
}
.header.is-solid {
  color: var(--fg);
  background: var(--bg);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, currentColor 10%, transparent);
}
.header.is-hidden { transform: translateY(-100%); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand-mark { width: 30px; height: 36px; flex: none; }
.brand-text { font-family: var(--brand); font-size: .78rem; font-weight: 500; line-height: 1.02; }

.nav { display: flex; gap: 32px; font-size: .875rem; }
.nav a { position: relative; padding-block: 6px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-pill { height: 40px; padding: 0 18px; font-size: .8125rem; background: #fff; color: var(--ink); }
.btn-pill:hover { background: var(--gold); }
.header.is-solid .btn-pill { background: var(--fg); color: var(--bg); }
.header.is-solid .btn-pill:hover { background: var(--gold); color: var(--ink); }

.menu-btn { display: none; position: relative; width: 44px; height: 44px; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 25px; }
.menu-open .menu-btn span:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 21.5px; transform: rotate(-45deg); }
.menu-open .header { color: var(--paper); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }

.menu {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 40px;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  background: var(--ink); color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s linear .8s;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease-io), visibility 0s; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { overflow: hidden; font-size: clamp(2.4rem, 11vw, 4rem); font-weight: 500; line-height: 1.12; letter-spacing: -.04em; }
.menu nav a span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); }
.menu-open .menu nav a span { transform: none; transition-delay: calc(.25s + var(--i) * .06s); }
.menu-foot { display: flex; justify-content: space-between; font-size: .875rem; color: rgba(245, 244, 240, .7); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: #141413; color: #fff; }
.hero-media { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
.hero-parallax { position: absolute; inset: -3%; will-change: transform; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 42%; transform-origin: 50% 55%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 24%, rgba(10,10,10,.1) 50%, rgba(10,10,10,.85) 100%),
    linear-gradient(90deg, rgba(10,10,10,.45) 0%, rgba(10,10,10,0) 65%);
}
.grain {
  position: absolute; inset: -8%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07; pointer-events: none; will-change: transform;
  animation: grain 1.1s steps(6) infinite;
}
.hero-fuera .grain { animation-play-state: paused; visibility: hidden; }
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -4%); }
  60% { transform: translate(-2%, 4%); }
  80% { transform: translate(4%, 2%); }
}

.hero-content {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 28px) var(--gutter) clamp(28px, 4.5vw, 56px);
  will-change: transform, opacity;
}
.hero-label { display: inline-flex; align-items: center; gap: 10px; font-size: .9375rem; color: rgba(255, 255, 255, .85); }
.hero-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-logo); }
.hero-title { max-width: 12ch; font-size: clamp(3rem, 8.4vw, 9rem); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.hero-bottom {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px;
  margin-top: clamp(24px, 3vw, 40px); padding-top: clamp(20px, 2.4vw, 28px);
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.hero-lead { max-width: 40ch; color: rgba(255, 255, 255, .78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }


/* ---------- Secciones ---------- */
.section { position: relative; padding-block: clamp(80px, 9vw, 140px); }

.split-12 { display: grid; grid-template-columns: 5fr 7fr; align-items: start; gap: clamp(40px, 7vw, 120px); }
.sticky-col { position: sticky; top: calc(var(--header-h) + 40px); }
.sticky-col h2 { margin-bottom: 24px; }
.sticky-col .btn { margin-top: 32px; }

.head-row { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px 80px; margin-bottom: clamp(36px, 4.5vw, 64px); }
.head-row h2 { max-width: 16ch; }
.head-row .lead { justify-self: end; max-width: 42ch; }
.head-stack { display: grid; gap: 20px; margin-bottom: clamp(32px, 4vw, 52px); }
.head-stack h2 { max-width: 22ch; }
.head-stack .lead { max-width: 52ch; }
.head-center { display: grid; justify-items: center; gap: 20px; margin: 0 auto clamp(40px, 5vw, 72px); text-align: center; }
.head-center h2 { max-width: 20ch; text-wrap: balance; }
.head-center .lead { max-width: 44ch; }
.section-band { --faint: color-mix(in srgb, var(--fg) 60%, transparent); background: #ecebe5; }
.section-band .obra-result { text-align: center; }

/* ---------- Nosotros ---------- */
.nosotros-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 88px); align-items: center; }
.nosotros-img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.nosotros-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% center; transform: scale(1.12); will-change: transform; }
.statement { font-size: clamp(1.3rem, 2.1vw, 2rem); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; max-width: 36ch; }
.statement .w { overflow: visible; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 3vw, 36px) clamp(24px, 4vw, 56px); margin-top: clamp(32px, 4vw, 56px); }
.stat { padding-top: 18px; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
.stat-num { display: block; font-size: clamp(2rem, 3.2vw, 2.9rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-num small { margin-left: 6px; font-size: .34em; font-weight: 400; letter-spacing: 0; color: var(--subtle); }
.stat-label { display: block; margin-top: 10px; font-size: .875rem; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding-block: clamp(16px, 1.6vw, 22px); border-block: 1px solid color-mix(in srgb, currentColor 10%, transparent); color: var(--muted); }
.marquee-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.marquee-item { font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.3; letter-spacing: -.01em; white-space: nowrap; }
.marquee-sep { flex: none; width: 5px; aspect-ratio: 1; margin-inline: clamp(20px, 2.4vw, 36px); border-radius: 50%; background: var(--gold); }

/* ---------- Tratamientos (grilla de celdas) ---------- */
.t-list {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-left: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.t-list > li { display: flex; border-right: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.t-row {
  flex: 1;
  display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 16px 14px;
  padding: 24px 22px 28px;
  transition: background-color .4s var(--ease);
}
.t-icon { grid-column: 1; grid-row: 1; width: 26px; height: 26px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: scale .5s var(--ease); }
.t-arrow { grid-column: 2; grid-row: 1; justify-self: end; width: 20px; height: 20px; color: var(--faint); transition: rotate .6s var(--ease), color .4s; }
.t-name { grid-column: 1 / -1; grid-row: 2; font-size: clamp(1.2rem, 1.55vw, 1.5rem); font-weight: 500; line-height: 1.2; letter-spacing: -.02em; transition: translate .6s var(--ease); }
.t-desc { grid-column: 1 / -1; grid-row: 3; font-size: .9rem; line-height: 1.5; color: var(--muted); }

@media (hover: hover) {
  .t-row:hover { background: color-mix(in srgb, var(--fg) 3%, transparent); }
  .t-row:hover .t-name { translate: 4px 0; }
  .t-row:hover .t-icon { scale: 1.08; }
  .t-row:hover .t-arrow { color: var(--gold); rotate: 45deg; }
}

/* ---------- Cómo trabajamos ---------- */
.process-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(40px, 7vw, 120px); }
.reveal-img { position: relative; aspect-ratio: 1 / 1.05; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.reveal-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% center; transform: scale(1.12); will-change: transform; }
.steps { margin-top: clamp(40px, 5vw, 64px); }
.step { padding-block: 24px; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.step:last-child { border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.step h3 { margin-bottom: 6px; font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; }
.step p { color: var(--muted); }

/* ---------- Equipo ---------- */
.filters {
  display: flex; flex-wrap: nowrap; gap: 6px;
  margin-bottom: clamp(32px, 4vw, 52px); padding-block: 2px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-user-select: none; user-select: none;
}
.filters::-webkit-scrollbar { display: none; }
/* Degradé en los bordes solo cuando hay más filtros para ver */
.filters.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.filters.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.filters.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 85%, transparent); }
.filters.is-dragging { cursor: grabbing; }
.filter {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 13px;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 999px;
  font-size: .8125rem; white-space: nowrap; color: var(--muted);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.filter-count { font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--subtle); transition: color .3s; }
.filter:hover { color: var(--fg); border-color: color-mix(in srgb, currentColor 45%, transparent); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter[aria-pressed="true"] .filter-count { color: rgba(245, 244, 240, .6); }

.team { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(32px, 3.4vw, 56px) clamp(12px, 1.6vw, 24px); }
.member { display: block; width: 100%; text-align: left; }
.member.is-hidden { display: none; }
.member-photo { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: transform 1.1s var(--ease), filter .7s var(--ease); }
.member-photo::after {
  content: "Ver ficha";
  position: absolute; right: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: .75rem; font-weight: 500;
  opacity: 0; translate: 0 6px;
  transition: opacity .4s var(--ease), translate .4s var(--ease);
}
.member-meta { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.member-name { display: block; font-size: 1.0625rem; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.member-rol { display: block; margin-top: 4px; font-size: .8125rem; line-height: 1.4; color: var(--subtle); }

.member:focus-visible .member-photo::after { opacity: 1; translate: 0 0; }
@media (hover: hover) {
  .member:hover .member-photo img, .member:focus-visible .member-photo img { transform: scale(1.035); }
  .member:hover .member-photo::after { opacity: 1; translate: 0 0; }
}

/* ---------- Obras sociales (índice en dos columnas) ---------- */
.obras { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 96px); }
.obras > li { border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.obras > li:first-child, .obras > li:nth-child(2) { border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.obra, .obra-extra {
  width: 100%;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 17px 2px;
  text-align: left; color: var(--faint);
  transition: color .35s var(--ease), padding-left .45s var(--ease);
}
.obra-name { font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.obra-name small { font-size: .72em; font-weight: 400; }
.obra-count { flex: none; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.obra:hover { color: var(--fg); padding-left: 10px; }
.obra[aria-pressed="true"] { color: var(--fg); }
.obra[aria-pressed="true"] .obra-name { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.obra-extra { color: var(--gold-text); }
.obra-result { min-height: 3.2em; margin-top: 32px; font-size: 1rem; color: var(--muted); }
.obra-result strong { font-weight: 500; color: var(--fg); }
.obra-result button { color: var(--fg); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- Preguntas ---------- */
.faq-item { border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.faq-item:last-child { border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.faq-item h3 { font-size: inherit; font-weight: inherit; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; padding: 26px 0;
  text-align: left; font-size: clamp(1.125rem, 1.7vw, 1.4rem); font-weight: 500; letter-spacing: -.015em;
}
.faq-icon { position: relative; flex: none; width: 34px; height: 34px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 50%; transition: transform .6s var(--ease), background-color .35s, color .35s, border-color .35s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .6s var(--ease); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .faq-icon { transform: rotate(180deg); background: var(--fg); color: var(--bg); border-color: var(--fg); }
.faq-item.is-open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { max-width: 58ch; padding: 0 58px 28px 0; color: var(--muted); }
.faq-a a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- Contacto: una sola tarjeta con datos y mapa ---------- */
.section.contact { padding-block: clamp(40px, 5vw, 72px) clamp(64px, 7vw, 104px); }
.contact-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr .95fr;
  border-radius: 20px;
  background: var(--ink); color: var(--paper);
}
.contact-card::before {
  content: ""; position: absolute; left: -18%; bottom: -60%;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(201, 151, 58, .26), rgba(201, 151, 58, 0) 72%);
  pointer-events: none;
}
.contact-main { position: relative; padding: clamp(32px, 4.4vw, 60px); }
.contact-card h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
.contact-lead { max-width: 40ch; margin-top: 14px; color: rgba(245, 244, 240, .7); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ic-fill { fill: currentColor; stroke: none; }

.contact-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px;
  margin: clamp(32px, 4vw, 44px) 0 0; padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid rgba(245, 244, 240, .14);
}
.contact-info dt { font-size: .8125rem; color: rgba(245, 244, 240, .55); }
.contact-info dd { margin: 5px 0 0; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.contact-info-wide { grid-column: 1 / -1; }
.contact-info a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease), color .3s; }
.contact-info a:hover { color: var(--gold); background-size: 100% 1px; }

.contact-map { position: relative; display: grid; min-height: 320px; padding: 10px 10px 10px 0; }
.contact-map iframe {
  grid-area: 1 / 1; display: block; width: 100%; height: 100%; border: 0; border-radius: 14px;
  opacity: 0; transition: opacity .5s ease;
}
.contact-map iframe.is-cargado { opacity: 1; }
/* Mientras el mapa carga se ve la dirección, que ya es un enlace a Google Maps */
.map-espera {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-radius: 14px; background: #1b1b1a; color: rgba(245, 244, 240, .85); text-align: center; font-size: .9375rem;
}
.map-espera svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.map-abrir { font-size: .8125rem; color: rgba(245, 244, 240, .6); }
.map-espera:hover .map-abrir { color: var(--gold); }

/* ---------- Footer ---------- */
.footer {
  --bg: var(--ink); --fg: var(--paper);
  --muted: rgba(245, 244, 240, .68); --subtle: rgba(245, 244, 240, .6); --faint: rgba(245, 244, 240, .42);
  padding-block: clamp(48px, 5vw, 72px) 24px; overflow: hidden;
  background: var(--ink); color: var(--paper);
}
.footer-top { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 40px 64px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 32px clamp(40px, 6vw, 96px); }
.footer-brand p { max-width: 28ch; margin-top: 16px; font-size: .9375rem; color: var(--subtle); }
.footer-title { margin: 0 0 14px; font-size: .875rem; font-weight: 400; line-height: 1.4; letter-spacing: 0; color: var(--subtle); }
.footer li { font-size: .9375rem; }
.footer li + li { margin-top: 8px; }
.footer li a { transition: color .3s; }
.footer li a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  position: relative;
  margin-top: clamp(40px, 5vw, 56px); padding-top: 20px;
  font-size: .8125rem;
  color: var(--subtle);
}
.footer-bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: color-mix(in srgb, currentColor 22%, transparent); }
.footer-bottom a { display: inline-block; padding-block: 8px; margin-block: -8px; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4);
  transition: transform .6s var(--ease);
}
.js .wa-float { transform: scale(0); }
.js .wa-float.is-visible { transform: scale(1); }
.js .wa-float.is-visible:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Ficha (drawer) ---------- */
.drawer {
  --bg: var(--paper); --fg: var(--ink);
  position: fixed; inset: 0 0 0 auto;
  width: min(560px, 100%); height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer::backdrop { background: rgba(10, 10, 10, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.drawer[open] { animation: drawerIn .8s var(--ease); }
.drawer[open]::backdrop { animation: fadeIn .5s ease; }
.drawer.is-closing { animation: drawerOut .5s var(--ease-io) forwards; }
.drawer.is-closing::backdrop { animation: fadeOut .5s ease forwards; }
@keyframes drawerIn { from { transform: translateX(100%); } }
@keyframes drawerOut { to { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.drawer-inner { position: relative; min-height: 100%; }
.drawer-close { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(245, 244, 240, .92); transition: transform .6s var(--ease); }
.drawer-close:hover { transform: rotate(90deg); }
.drawer-photo { aspect-ratio: 5 / 4; overflow: hidden; background: #e5e3dd; }
.drawer-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.drawer-body { padding: clamp(24px, 4vw, 44px); }
.drawer-kicker { margin-bottom: 12px; font-size: .875rem; font-weight: 500; color: var(--gold-text); }
.drawer h3 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.drawer-rol { margin-top: 12px; font-size: 1rem; color: #5f5f5a; }
.profile-block { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(15, 15, 14, .1); }
.profile-block h4 { margin-bottom: 10px; font-size: .875rem; font-weight: 500; color: #6c6c67; }
.profile-list li { position: relative; padding-left: 16px; font-size: .9375rem; }
.profile-list li + li { margin-top: 6px; }
.profile-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.mini-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-pills span { padding: 5px 11px; border: 1px solid rgba(15, 15, 14, .14); border-radius: 999px; font-size: .8125rem; }
.mini-pills .is-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.drawer-actions {
  position: sticky; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 32px calc(clamp(24px, 4vw, 44px) * -1) calc(clamp(24px, 4vw, 44px) * -1);
  padding: 20px clamp(24px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(245, 244, 240, 0), var(--paper) 35%);
}

/* =========================================================
   ANIMACIONES
   - .anim la agrega el <head> (sin "reducir movimiento").
   - .is-ready dispara la entrada del hero.
   - [data-anim] + .is-in revela al entrar en pantalla; al terminar,
     JS quita el atributo y el elemento vuelve a su estado natural.
   ========================================================= */
.no-trans, .no-trans * { transition: none !important; }

/* Entrada del hero */
.anim .hero-img { scale: 1.18; }
.anim .hero-title { opacity: 0; }
.anim .hero-title[data-split-ready] { opacity: 1; }
.anim .hero-title .wi { translate: 0 115%; rotate: 6deg; }
.anim .hero-label, .anim .hero-bottom { opacity: 0; translate: 0 24px; }
.anim .header-inner { opacity: 0; translate: 0 -100%; }

.anim.is-ready .hero-img { scale: 1; transition: scale 2.2s var(--ease); }
.anim.is-ready .hero-title .wi { translate: 0 0; rotate: 0deg; transition: translate 1.3s var(--ease), rotate 1.3s var(--ease); transition-delay: calc(.12s + var(--i, 0) * 60ms); }
.anim.is-ready .hero-label { opacity: 1; translate: 0 0; transition: opacity 1s var(--ease) .35s, translate 1s var(--ease) .35s; }
.anim.is-ready .hero-bottom { opacity: 1; translate: 0 0; transition: opacity 1.1s var(--ease) .6s, translate 1.1s var(--ease) .6s; }
.anim.is-ready .header-inner { opacity: 1; translate: 0 0; transition: opacity .9s var(--ease) .45s, translate 1.1s var(--ease) .45s; }

/* Aparición al entrar en pantalla */
.anim [data-anim="up"] { opacity: 0; translate: 0 44px; }
.anim [data-anim="up"].is-in { opacity: 1; translate: 0 0; transition: opacity 1s var(--ease) var(--d, 0s), translate 1.2s var(--ease) var(--d, 0s); }

.anim [data-anim="split"] .wi { translate: 0 115%; rotate: 5deg; }
.anim [data-anim="split"].is-in .wi { translate: 0 0; rotate: 0deg; transition: translate 1.1s var(--ease), rotate 1.1s var(--ease); transition-delay: calc(var(--d, 0s) + var(--i, 0) * 45ms); }


.anim [data-anim="row"] .t-icon, .anim [data-anim="row"] .t-name,
.anim [data-anim="row"] .t-desc, .anim [data-anim="row"] .t-arrow { opacity: 0; transform: translateY(24px); }
.anim [data-anim="row"].is-in .t-icon,
.anim [data-anim="row"].is-in .t-name,
.anim [data-anim="row"].is-in .t-desc,
.anim [data-anim="row"].is-in .t-arrow { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
.anim [data-anim="row"].is-in .t-name { transition-delay: calc(var(--d, 0s) + .12s); }
.anim [data-anim="row"].is-in .t-desc { transition-delay: calc(var(--d, 0s) + .2s); }
.anim [data-anim="row"].is-in .t-arrow { transition-delay: calc(var(--d, 0s) + .26s); }

.anim [data-anim="clip"] { clip-path: inset(100% 0 0 0); }
.anim [data-anim="clip"].is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.5s var(--ease-io) var(--d, 0s); }

/* Red de seguridad: si el JS no llegara a iniciar, todo se muestra igual */
@keyframes forceShow { to { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; transform: none; clip-path: inset(0 0 0 0); } }
.anim:not(.is-ready) .hero-img,
.anim:not(.is-ready) .hero-title,
.anim:not(.is-ready) .hero-title .wi,
.anim:not(.is-ready) .hero-label,
.anim:not(.is-ready) .hero-bottom,
.anim:not(.is-ready) .header-inner { animation: forceShow .01s linear 6s forwards; }
.anim:not(.js-ok) [data-anim],
.anim:not(.js-ok) [data-anim] .wi,
.anim:not(.js-ok) [data-anim] .t-icon,
.anim:not(.js-ok) [data-anim] .t-name,
.anim:not(.js-ok) [data-anim] .t-desc,
.anim:not(.js-ok) [data-anim] .t-arrow { animation: forceShow .01s linear 6s forwards; }

/* ---------- Responsive ---------- */
/* Recorte vertical de la portada en pantallas altas (celulares) */
@media (max-aspect-ratio: 3/4) and (max-width: 640px) {
  .hero-img { object-position: 42% 50%; }
}

@media (max-width: 1080px) {
  .team { grid-template-columns: repeat(3, 1fr); }
  .t-list { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 22px; }
}

@media (max-width: 900px) {
  .nav, .header .btn-pill { display: none; }
  .menu-btn { display: block; }
  .split-12, .process-grid, .head-row, .nosotros-grid { grid-template-columns: 1fr; }
  .nosotros-img { aspect-ratio: 4 / 3; }
  .sticky-col { position: static; margin-bottom: 16px; }
  .head-row .lead { justify-self: start; }
  .hero-bottom { grid-template-columns: 1fr; }
  .reveal-img { aspect-ratio: 4 / 3.4; }
  .footer-top { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-map { min-height: 0; height: 280px; padding: 0 10px 10px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: clamp(2.4rem, 10.5vw, 2.9rem); line-height: .98; }
  .hero-lead { font-size: .9375rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .t-list { grid-template-columns: 1fr; }
  .t-row { padding: 20px 18px 22px; }
  .obras { grid-template-columns: 1fr; }
  .obras > li:nth-child(2) { border-top: 0; }
  .cta-actions .btn { flex: 1 1 auto; }
  .filters { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .member-rol { font-size: .625rem; }
  .faq-a p { padding-right: 0; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 24px; }
  .contact-info { gap: 18px 20px; }
  .contact-info-wide-m { grid-column: 1 / -1; }
  .contact-map { height: 240px; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  .grain { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .drawer[open], .drawer.is-closing, .drawer[open]::backdrop { animation: none; }
}
