/* =========================================================
   El Cerrajero del Barrio — Propuesta de rediseño
   Estética de urgencia y confianza: azul noche (seriedad, 24h)
   + ámbar de aviso (acción, urgencia). Sans-serif geométrica,
   sin animaciones juguetonas, radios moderados (ni pill festivo
   ni esquina viva de carta impresa).
   ========================================================= */

:root {
  /* Marca */
  --navy-950: #0a0f1c;
  --navy-900: #0f1729;
  --navy-800: #16213a;
  --navy-700: #1f2d4a;
  --navy-500: #3a4b6e;
  --steel-300: #a7b1c4;

  --amber: #ff7a1a;
  --amber-dark: #dd5e00;
  --amber-light: #ffe4cc;

  /* Neutros */
  --ink: #12172a;
  --ink-soft: #57607a;
  --line: #e1e5ee;
  --bg: #f7f8fb;
  --bg-soft: #eef1f7;
  --white: #ffffff;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 16px rgba(10, 15, 28, .07);
  --shadow: 0 16px 38px rgba(10, 15, 28, .14);
  --shadow-lg: 0 26px 60px rgba(10, 15, 28, .24);

  --maxw: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber-dark);
  background: var(--amber-light);
  padding: 7px 15px; border-radius: var(--radius-pill);
}

.section { padding: clamp(60px, 8vw, 110px) 0; }
.section-head { max-width: 640px; margin-bottom: 50px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 16px 0 12px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .96rem;
  padding: 14px 26px; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent; transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber); color: #fff; box-shadow: 0 10px 22px rgba(255,122,26,.35); }
.btn-primary:hover { background: var(--amber-dark); box-shadow: 0 14px 28px rgba(255,122,26,.45); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.6); }
.btn svg { width: 19px; height: 19px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0; transition: padding .35s var(--ease), background .35s, box-shadow .35s;
}
.header.scrolled { background: rgba(10,15,28,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 11px 0; }

/* Header sobre el hero (foto oscura): siempre en tono claro sobre fondo oscuro */
.header--hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 150px; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,9,18,.75), rgba(6,9,18,0));
  z-index: 0; transition: opacity .35s;
}
.header--hero.scrolled::before { opacity: 0; }
/* La barra de marca + hamburguesa siempre por encima del panel desplegable,
   si no el botón que abre/cierra el menú queda tapado (gotcha #2). */
.header .nav { position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; color: #fff; }
.brand img { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; box-shadow: var(--shadow-sm); }
.brand span b { color: var(--amber); }

.nav { display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 600; font-size: .92rem; color: rgba(255,255,255,.86); position: relative; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.burger { display: none; position: relative; background: none; border: 0; width: 26px; height: 26px; cursor: pointer; color: #fff; }
.burger svg { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; transition: opacity .2s; }
.burger .icon-close { opacity: 0; }
.header.menu-open .burger .icon-menu { opacity: 0; }
.header.menu-open .burger .icon-close { opacity: 1; }

/* El panel exterior anima max-height SIN padding propio: el padding no se
   comprime por debajo de max-height y dejaría una barra visible tapando la
   cabecera incluso "cerrado" (gotcha #1). El padding real vive en
   .mobile-menu-inner. z-index por debajo de .header .nav (5). */
.mobile-menu {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; z-index: 2;
  background: var(--navy-950); box-shadow: var(--shadow-lg);
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease);
}
.mobile-menu.open { max-height: 100vh; overflow-y: auto; }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 2px; padding: 92px 24px 26px; }
.mm-link { padding: 14px 6px; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 600; color: rgba(255,255,255,.88); font-size: .98rem; }
.mm-cta { justify-content: center; margin-top: 14px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .burger { display: block; }
  .mobile-menu { display: flex; }
}
@media (max-width: 560px) {
  .nav-cta .btn-primary span.full { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  padding: 150px 0 70px;
  background:
    linear-gradient(115deg, rgba(6,9,18,.94) 0%, rgba(10,15,28,.86) 38%, rgba(15,23,41,.55) 68%, rgba(15,23,41,.3) 100%),
    url('img/foto-01.jpg');
  background-size: cover;
  background-position: center 45%;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 660px; }
.hero .eyebrow { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.6vw, 3.8rem); margin: 20px 0 16px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { font-size: 1.14rem; color: rgba(255,255,255,.86); max-width: 46ch; margin-bottom: 30px; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 32px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 14px; }
.trust-pill {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 12px 18px; display: flex; flex-direction: column;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.trust-pill b { font-family: var(--font-display); font-size: 1.3rem; color: var(--amber); line-height: 1; }
.trust-pill span { font-size: .78rem; color: rgba(255,255,255,.75); margin-top: 4px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Servicios ---------- */
.zones { background: var(--bg-soft); }
.serv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.serv {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 24px 24px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.serv:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.serv-ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--navy-700); margin-bottom: 16px;
}
.serv-ico svg { width: 24px; height: 24px; }
.serv h3 { font-size: 1.12rem; margin-bottom: 8px; }
.serv p { color: var(--ink-soft); font-size: .93rem; }
.serv .tag {
  position: absolute; top: 20px; right: 20px; font-family: var(--font-display); font-weight: 700;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy-700);
  background: var(--bg-soft); padding: 4px 10px; border-radius: var(--radius-pill);
}
.serv .tag.urgent { color: var(--amber-dark); background: var(--amber-light); }

/* ---------- Por qué nosotros (texto + foto) ---------- */
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text .section-head { margin-bottom: 26px; }
.about-text > p { color: var(--ink-soft); margin-bottom: 26px; font-size: 1.02rem; }
.trait-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.trait { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.trait .num { font-family: var(--font-display); font-size: 1.05rem; color: var(--amber-dark); font-weight: 800; flex-shrink: 0; width: 26px; }
.trait h4 { font-size: 1rem; margin-bottom: 4px; }
.trait p { color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .about-photo { aspect-ratio: 16/9; } }

/* ---------- Stats ---------- */
.stats { background: linear-gradient(135deg, var(--navy-900), var(--navy-950)); border-radius: var(--radius-lg); padding: clamp(34px, 6vw, 56px); position: relative; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; position: relative; }
.stat { border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 4.4vw, 3rem); line-height: 1; color: var(--amber); }
.stat .lbl { margin-top: 8px; font-size: .9rem; color: rgba(255,255,255,.72); }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; } .stat { border-right: 0; } .stat:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.12); } }

/* ---------- Clientes (cards) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: #fff; border-radius: var(--radius-lg); padding: 30px 26px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy-900); color: var(--amber); margin-bottom: 18px;
}
.card-ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Zona de servicio (chips) ---------- */
.occ-list { display: flex; flex-wrap: wrap; gap: 12px; }
.occ-chip {
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  padding: 11px 22px; display: inline-flex; align-items: center; gap: 8px;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.occ-chip:hover { transform: translateY(-3px); border-color: var(--amber); background: var(--amber-light); }

/* ---------- Galería ---------- */
.gallery-teaser { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.gallery-teaser figure, .gallery figure { border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 1/1; box-shadow: var(--shadow-sm); }
.gallery-teaser img, .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-teaser figure:hover img, .gallery figure:hover img { transform: scale(1.07); }
@media (max-width: 980px) { .gallery-teaser { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery-teaser { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6,9,18,.94); display: none; place-items: center; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; background: #fff; border: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: stretch; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; }
.contact-card > p { color: var(--ink-soft); margin-bottom: 24px; }
.contact-line { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-line:first-of-type { border-top: 0; }
.contact-line .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--bg-soft); display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; }
.contact-line small { display: block; color: var(--ink-soft); font-size: .8rem; }
.contact-line b { font-family: var(--font-display); font-size: 1.02rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.map-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); min-height: 400px; border: 6px solid #fff; }
.map-card iframe { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
.cta-final { background: var(--navy-950); text-align: center; }
.cta-box { color: #fff; }
.cta-box .eyebrow { background: rgba(255,255,255,.1); color: var(--amber); }
.cta-box h2 { color: #fff; font-size: clamp(1.9rem, 3.8vw, 2.7rem); margin: 16px 0 14px; }
.cta-box p { color: rgba(255,255,255,.72); max-width: 480px; margin: 0 auto 28px; font-size: 1.04rem; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-950); color: rgba(255,255,255,.68); padding: 52px 0 26px; border-top: 1px solid rgba(255,255,255,.06); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 38px; }
.footer .brand { margin-bottom: 14px; }
.footer p { font-size: .92rem; opacity: .75; max-width: 34ch; }
.footer h5 { color: #fff; font-family: var(--font-display); font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 15px; font-weight: 700; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a { font-size: .92rem; opacity: .82; transition: opacity .2s, color .2s; }
.footer ul a:hover { opacity: 1; color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .84rem; opacity: .65; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Llamar flotante ---------- */
.call-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--amber); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(255,122,26,.45);
  transition: transform .3s var(--ease); animation: pulse 2.6s infinite;
}
.call-float:hover { transform: scale(1.08); }
.call-float svg { width: 27px; height: 27px; }
@keyframes pulse {
  0% { box-shadow: 0 12px 28px rgba(255,122,26,.45), 0 0 0 0 rgba(255,122,26,.45); }
  70% { box-shadow: 0 12px 28px rgba(255,122,26,.45), 0 0 0 16px rgba(255,122,26,0); }
  100% { box-shadow: 0 12px 28px rgba(255,122,26,.45), 0 0 0 0 rgba(255,122,26,0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { min-height: auto; padding-top: 128px; padding-bottom: 54px; }
  .stats-grid { text-align: left; }
}
