/* ==========================================================================
   DOBLE AA Arquitecto Art — Estilos principales
   Paleta basada en la hoja membretada: rojo, negro y grises.
   Índice:
     1. Tipografías   2. Variables   3. Base   4. Utilidades y botones
     5. Encabezado    6. Hero        7. Nosotros   8. Servicios (8b. Topografía)
     9. Proceso (9b. Fiscalización)  10. Proyectos  12. CTA
    13. Contacto     14. Pie        15. Flotantes y lightbox  16. Animaciones
   ========================================================================== */

/* 1. TIPOGRAFÍAS (alojadas localmente, licencia SIL OFL) ------------------ */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* 2. VARIABLES ----------------------------------------------------------- */
:root {
  --red: #e01b1b;          /* rojo de marca (FF0000 suavizado para pantalla) */
  --red-dark: #b81414;
  --red-pure: #ff0000;
  --black: #1f1d1d;
  --charcoal: #3a3838;     /* gris oscuro de títulos (membrete) */
  --gray: #767171;         /* gris del membrete */
  --gray-light: #b9b5b5;
  --line: #e6e3e1;
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --white: #ffffff;

  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 8px rgba(20, 18, 18, .06);
  --shadow: 0 12px 32px rgba(20, 18, 18, .10);
  --shadow-lg: 0 24px 60px rgba(20, 18, 18, .18);
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 3. BASE ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--font-head); color: var(--black); line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--red); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--red-dark); }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--black); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--white); }

/* 4. UTILIDADES Y BOTONES ------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 110px 0; }

.section-header { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.section-subtitle { color: var(--gray); font-size: 1.08rem; margin: 0; }
.section-header--light .section-title { color: var(--white); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: .78rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #ff4a4a; }

.lead { font-size: 1.12rem; color: var(--black); }
.text-accent { color: var(--red-pure); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 50px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: .92rem; letter-spacing: .03em;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: 10px 20px; font-size: .82rem; }

.btn--primary { background: var(--red); color: var(--white); box-shadow: 0 8px 22px rgba(224, 27, 27, .28); }
.btn--primary:hover { background: var(--red-dark); color: var(--white); box-shadow: 0 12px 28px rgba(224, 27, 27, .36); }

.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: var(--charcoal); color: var(--white); }

.btn--ghost { border-color: rgba(255, 255, 255, .6); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.btn--light { background: var(--white); color: var(--red); }
.btn--light:hover { background: var(--black); color: var(--white); }

.btn--outline-light { border-color: var(--white); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--red); }

/* 5. ENCABEZADO ---------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { position: relative; display: block; width: 160px; flex-shrink: 0; }
.brand-logo { width: 160px; height: auto; transition: opacity .3s var(--ease); }
.site-header.is-scrolled .brand, .site-header.is-scrolled .brand-logo { width: 140px; }
.brand-logo--dark { position: absolute; inset: 0; opacity: 0; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; gap: 28px; }
.nav-link {
  position: relative; padding: 6px 0;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: rgba(255, 255, 255, .88);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--white); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

/* Estado al hacer scroll: fondo blanco */
.site-header.is-scrolled { background: rgba(255, 255, 255, .97); box-shadow: var(--shadow-sm); --header-h: 66px; height: 66px; }
.site-header.is-scrolled .brand-logo--light { opacity: 0; }
.site-header.is-scrolled .brand-logo--dark { opacity: 1; }
.site-header.is-scrolled .nav-link { color: var(--charcoal); }
.site-header.is-scrolled .nav-link:hover, .site-header.is-scrolled .nav-link.is-active { color: var(--red); }

/* Botón hamburguesa (visible solo en móvil, ver responsive.css) */
.nav-toggle {
  display: none; width: 46px; height: 46px; padding: 11px; border: 0; background: transparent;
  flex-direction: column; justify-content: space-between; z-index: 120;
}
.nav-toggle-bar { display: block; height: 2px; width: 100%; background: var(--white); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease), background-color .3s; }
.site-header.is-scrolled .nav-toggle-bar { background: var(--black); }

/* 6. HERO ---------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; color: var(--white); overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + 40px) 0 100px;
  background: var(--black);
}
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-bg img { animation: heroZoom 18s var(--ease) both; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(20, 18, 18, .92) 0%, rgba(20, 18, 18, .72) 45%, rgba(20, 18, 18, .25) 100%);
}
.hero-content { max-width: var(--container); }
.hero-title { color: var(--white); font-size: clamp(2.2rem, 4.8vw, 3.7rem); font-weight: 800; letter-spacing: -.02em; max-width: 880px; margin-bottom: 24px; }
.hero-text { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, .82); max-width: 600px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 64px; }

.hero-highlights { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 28px; max-width: 760px; }
.hero-highlights li { flex: 1 1 200px; padding-right: 24px; }
.hero-highlights li + li { border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 24px; }
.hero-highlights strong { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--white); }
.hero-highlights span { font-size: .9rem; color: rgba(255, 255, 255, .65); }

.scroll-down {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 20px;
}
.scroll-down span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--white); border-radius: 2px; animation: scrollDot 1.8s infinite; }

/* 7. NOSOTROS ------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
.about-media { position: relative; }
.about-media img { width: 100%; aspect-ratio: 9 / 11; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-media::before {
  content: ""; position: absolute; top: -22px; left: -22px; width: 60%; height: 60%;
  border: 3px solid var(--red); border-radius: var(--radius); z-index: -1;
}
.about-badge {
  position: absolute; right: -28px; bottom: 40px; display: flex; align-items: center; gap: 14px;
  background: var(--black); color: var(--white); padding: 20px 26px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.about-badge-big { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--red-pure); }
.about-badge-small { font-size: .82rem; line-height: 1.35; color: rgba(255, 255, 255, .85); }

.check-list { display: grid; gap: 12px; margin: 28px 0 36px; }
.check-list li { position: relative; padding-left: 34px; color: var(--black); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.about-signature { display: flex; flex-direction: column; padding-left: 18px; border-left: 3px solid var(--red); }
.signature-name { font-family: var(--font-head); font-weight: 700; color: var(--black); font-size: 1.1rem; }
.signature-role { color: var(--gray); font-size: .9rem; }

/* 8. SERVICIOS ----------------------------------------------------------- */
.services { background: var(--bg-soft); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  position: relative; display: flex; flex-direction: column; background: var(--white);
  padding: 38px 32px 32px; border-radius: var(--radius); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  overflow: hidden;
}
.service-card::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::after { transform: scaleX(1); }
.service-icon { width: 56px; height: 56px; padding: 10px; margin-bottom: 22px; background: #fdecec; border-radius: 14px; transition: transform .35s var(--ease); }
.service-card:hover .service-icon { transform: rotate(-6deg) scale(1.06); }
.service-card p { color: var(--gray); flex-grow: 1; }
.service-link { font-family: var(--font-head); font-weight: 700; font-size: .86rem; }
.service-link span { display: inline-block; transition: transform .25s var(--ease); }
.service-link:hover span { transform: translateX(5px); }

/* Tarjeta destacada (topografía): ocupa la fila completa */
.service-card--featured {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 32px;
  background: var(--black); color: rgba(255, 255, 255, .78); border-color: var(--black);
}
.service-card--featured::after { transform: scaleX(1); }
.service-card--featured .service-icon { width: 84px; height: 84px; padding: 14px; margin: 0; flex: 0 0 auto; background: #fff; }
.service-card--featured h3 { color: var(--white); font-size: clamp(1.25rem, 2vw, 1.55rem); }
.service-card--featured p { color: rgba(255, 255, 255, .72); }
.featured-body { flex: 1 1 auto; }
.featured-body p:not(.featured-label) { margin-bottom: 14px; }
.featured-label { font-family: var(--font-head); font-weight: 700; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: #ff5a5a !important; margin-bottom: 8px; }
.featured-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.featured-chips li { font-family: var(--font-head); font-weight: 700; font-size: .78rem; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; color: var(--white); }
.featured-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; flex: 0 0 auto; }
.featured-actions .service-link { color: #ff6a6a; }

/* 8b. TOPOGRAFÍA --------------------------------------------------------- */
.topo { overflow: hidden; }
.topo-intro { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; margin-bottom: 104px; }
.topo-text .check-list { margin: 24px 0 32px; }
.topo-media { position: relative; margin: 0; }
.topo-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.topo-media::before {
  content: ""; position: absolute; right: -22px; bottom: -22px; width: 60%; height: 60%;
  border: 3px solid var(--red); border-radius: var(--radius); z-index: -1;
}
.topo-media figcaption {
  position: absolute; left: 18px; top: 18px; background: rgba(31, 29, 29, .88); color: var(--white);
  font-size: .82rem; padding: 8px 14px; border-radius: var(--radius-sm);
}
/* Foto pequeña superpuesta (GPS GNSS) */
.topo-inset {
  position: absolute; left: -36px; bottom: -36px; width: 40%;
  border: 6px solid var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
  background: var(--white);
}
.topo-media .topo-inset img { display: block; border-radius: 0; box-shadow: none; }
.topo-inset span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; text-align: center;
  background: var(--red); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: .74rem; letter-spacing: .06em;
}
/* Ortofoto real con dron */
.topo-aerial {
  position: relative; display: grid; grid-template-columns: .8fr 1fr; gap: 56px; align-items: center;
  background: var(--black); color: rgba(255, 255, 255, .78); padding: 48px; margin-bottom: 72px;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.topo-aerial::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 5px; background: var(--red); }
.topo-ortho {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; border-radius: var(--radius-sm);
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .08), transparent 70%);
}
.topo-ortho img { width: 100%; max-height: 620px; object-fit: contain; transition: transform .5s var(--ease); }
.topo-ortho:hover img { transform: scale(1.03); }
.topo-aerial h3 { color: var(--white); font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.topo-aerial .case-stats dt { font-size: clamp(1.1rem, 2.2vw, 1.8rem); white-space: nowrap; }
.topo-detail {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 8px; text-align: left; cursor: zoom-in;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .72); font: inherit; font-size: .88rem; transition: border-color .3s var(--ease);
}
.topo-detail:hover { border-color: var(--red); }
.topo-detail img { flex: 0 0 120px; width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.topo-detail strong { display: block; color: var(--white); font-family: var(--font-head); font-size: .9rem; }

.topo-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.topo-card {
  position: relative; background: var(--bg-soft); padding: 36px 30px 30px; border-radius: var(--radius);
  border-top: 4px solid var(--red); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.topo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.topo-card .service-icon { background: var(--white); }
.topo-card-label { font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.topo-card > p:not(.topo-card-label) { color: var(--gray); }
.topo-card ul { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.topo-card li { position: relative; padding-left: 18px; font-size: .93rem; color: var(--black); }
.topo-card li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* 9. PROCESO ------------------------------------------------------------- */
.process { background: var(--black); color: rgba(255, 255, 255, .75); position: relative; overflow: hidden; }
.process::before {
  content: "AA"; position: absolute; right: -40px; bottom: -120px; font-family: var(--font-head); font-weight: 800;
  font-size: 26rem; line-height: 1; color: rgba(255, 255, 255, .03); pointer-events: none;
}
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; position: relative; }
.process-step { position: relative; padding: 32px 26px; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.process-step:hover { border-color: var(--red); background: rgba(255, 255, 255, .03); }
.process-number { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--red); line-height: 1; margin-bottom: 18px; }
.process-step h3 { color: var(--white); }
.process-step p { margin: 0; font-size: .95rem; }

/* 9b. FISCALIZACIÓN ------------------------------------------------------ */
.fiscal { background: var(--bg-soft); }
.fiscal-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; margin-bottom: 80px; }
.fiscal-text .check-list { margin: 24px 0 32px; }

.fiscal-case {
  position: relative; background: var(--black); color: rgba(255, 255, 255, .78);
  padding: 44px 40px 36px; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.fiscal-case::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 5px; background: var(--red); }
.fiscal-case h3 { color: var(--white); font-size: 1.4rem; }
.case-label { font-family: var(--font-head); font-weight: 700; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: #ff5a5a; margin-bottom: 10px; }
.case-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 28px 0 18px; background: rgba(255, 255, 255, .12); border-radius: var(--radius-sm); overflow: hidden; }
.case-stats div { background: var(--black); padding: 18px 20px; }
.case-stats dt { font-family: var(--font-head); font-weight: 800; font-size: 2.3rem; line-height: 1; color: var(--white); }
.case-stats div:nth-child(2) dt, .case-stats div:nth-child(4) dt { color: #ff4040; }
.case-stats dd { margin: 6px 0 0; font-size: .86rem; }
.case-note { margin: 0; font-size: .8rem; color: rgba(255, 255, 255, .5); }

.fiscal-subtitle { text-align: center; font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 800; margin-bottom: 8px; }
.fiscal-subtext { text-align: center; color: var(--gray); max-width: 640px; margin: 0 auto 40px; }

.fichas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ficha-card {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.ficha-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.ficha-photo { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--black); overflow: hidden; }
.ficha-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .6s var(--ease); }
.ficha-card:hover .ficha-photo img, .ficha-photo:focus-visible img { transform: scale(1.06); }
.ficha-code {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 4px;
  background: var(--red); color: var(--white); font-family: var(--font-head); font-weight: 800; font-size: .8rem; letter-spacing: .04em;
}
.ficha-photo::after {
  content: "+"; position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--black); font-size: 1.3rem;
  opacity: 0; transition: opacity .3s var(--ease);
}
.ficha-card:hover .ficha-photo::after, .ficha-photo:focus-visible::after { opacity: 1; }
.ficha-body { padding: 18px 20px 20px; font-size: .9rem; line-height: 1.55; }
.ficha-body p { margin: 0 0 8px; color: var(--charcoal); }
.ficha-body p:last-child { margin-bottom: 0; }
.ficha-body strong { color: var(--black); }
.ficha-el { font-family: var(--font-head); font-weight: 700; color: var(--black) !important; font-size: .95rem; }
.ficha-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px !important; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.tag--struct { background: #fde3e3; color: #a10f0f; }
.tag--aesth { background: #ecebea; color: #4a4646; }
.tag--high { background: var(--red); color: var(--white); }
.tag--mid { background: #fff1d6; color: #7a5200; }
.tag--low { background: #e3f2e7; color: #1d6b36; }

/* 10. PROYECTOS ---------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter-btn {
  padding: 10px 22px; border-radius: 50px; border: 1px solid var(--line); background: var(--white);
  font-family: var(--font-head); font-weight: 600; font-size: .86rem; color: var(--charcoal);
  transition: all .25s var(--ease);
}
.filter-btn:hover { border-color: var(--red); color: var(--red); }
.filter-btn.is-active { background: var(--black); border-color: var(--black); color: var(--white); }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--black); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.project-card.is-hidden { display: none; }
.project-card.is-entering { animation: cardIn .45s var(--ease) both; }
.project-open { display: block; width: 100%; padding: 0; border: 0; background: none; }
.project-open img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease), opacity .4s var(--ease); }
.project-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 24px 22px; pointer-events: none;
  background: linear-gradient(transparent, rgba(15, 14, 14, .78) 45%, rgba(15, 14, 14, .92));
  transform: translateY(14px); opacity: .92; transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.project-card figcaption h3 { color: var(--white); margin: 4px 0 0; font-size: 1.1rem; }
.project-cat { font-family: var(--font-head); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #ff5a5a; }
.project-open::after {
  content: "+"; position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; color: var(--white); background: var(--red);
  transform: scale(.6); opacity: 0; transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.project-card:hover .project-open img, .project-open:focus-visible img { transform: scale(1.07); opacity: .85; }
.project-card:hover figcaption { transform: translateY(0); opacity: 1; }
.project-card:hover .project-open::after, .project-open:focus-visible::after { transform: scale(1); opacity: 1; }
.projects-empty { text-align: center; color: var(--gray); }

/* 12. CTA ---------------------------------------------------------------- */
.cta-band { background: var(--red); color: var(--white); padding: 80px 0; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 22px);
}
.cta-inner { position: relative; text-align: center; }
.cta-inner h2 { color: var(--white); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
.cta-inner p { font-size: 1.1rem; color: rgba(255, 255, 255, .9); margin-bottom: 30px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* 13. CONTACTO ----------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-list { display: grid; gap: 20px; margin: 30px 0; }
.contact-list li { padding-left: 18px; border-left: 3px solid var(--red); }
.contact-label { display: block; font-family: var(--font-head); font-weight: 700; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gray); margin-bottom: 2px; }
.contact-list a { color: var(--black); font-weight: 600; word-break: break-word; }
.contact-list a:hover { color: var(--red); }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--bg-soft); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px; border-top: 4px solid var(--red); }
.form-title { font-size: 1.4rem; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-weight: 600; font-size: .9rem; color: var(--black); margin-bottom: 6px; }
.form-field label span { color: var(--red); }
.form-field .optional { color: var(--gray); font-weight: 400; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid #d6d2d0; border-radius: var(--radius-sm);
  background: #fcfcfb; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--red); background: var(--white); box-shadow: 0 0 0 4px rgba(224, 27, 27, .12);
}
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--red); background: #fff6f6; }
.field-error { min-height: 1.2em; margin: 4px 0 0; font-size: .82rem; color: var(--red-dark); }
.form-note { font-size: .84rem; color: var(--gray); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-actions .btn { flex: 1 1 200px; }
.form-status { margin: 16px 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.is-ok { color: #1d7a3a; }
.form-status.is-error { color: var(--red-dark); }

/* 14. PIE DE PÁGINA ------------------------------------------------------ */
.site-footer { background: #151414; color: rgba(255, 255, 255, .62); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 48px; padding-top: 80px; padding-bottom: 56px; }
.footer-brand img { width: 200px; margin-bottom: 18px; }
.footer-title { font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255, 255, 255, .72); word-break: break-word; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.footer-bottom p { margin: 0; font-size: .85rem; }
.visit-counter { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; white-space: nowrap; }
.visit-counter[hidden] { display: none; }
.visit-counter svg { color: var(--red-pure); flex-shrink: 0; }
.visit-counter strong { color: var(--white); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.back-top-link { color: rgba(255, 255, 255, .72); font-size: .85rem; }
.back-top-link:hover { color: var(--red-pure); }

/* 15. ELEMENTOS FLOTANTES Y LIGHTBOX ------------------------------------ */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: var(--white); box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
  transition: transform .25s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); color: var(--white); }

.back-to-top {
  position: fixed; right: 30px; bottom: 92px; z-index: 90; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--black); color: var(--white); font-size: 1.1rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease), background-color .2s;
}
.back-to-top.is-visible { opacity: 1; transform: none; }
.back-to-top:hover { background: var(--red); }

.lightbox {
  position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 10, .94); padding: 60px 70px; animation: fadeIn .3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: 1100px; width: 100%; text-align: center; }
.lightbox-img { margin: 0 auto; max-height: 78vh; width: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-caption { color: var(--white); font-family: var(--font-head); font-weight: 600; margin-top: 16px; }
.lightbox-close, .lightbox-nav { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: var(--white); border-radius: 50%; transition: background-color .2s; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--red); }
.lightbox-close { top: 18px; right: 18px; width: 48px; height: 48px; font-size: 1.9rem; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
body.no-scroll { overflow: hidden; }

/* 16. ANIMACIONES -------------------------------------------------------- */
/* Las animaciones de aparición solo se activan si JavaScript está disponible (.js) */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes scrollDot { 0% { opacity: 1; transform: translateY(0); } 80% { opacity: 0; transform: translateY(16px); } 100% { opacity: 0; } }
@keyframes cardIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

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