/* ============================================================
   HORFAVEN 2008 SL — Hoja de estilos
   Paleta: azul petróleo/marino + ámbar seguridad + neutros
   Mobile-first · sin frameworks
   ============================================================ */

/* ---------- 1. Variables ---------- */
:root {
  /* Marca */
  --navy-950: #08131f;
  --navy-900: #0d1b2a;
  --navy-800: #13283d;
  --navy-700: #1b3a57;
  --petrol-600: #1f5a73;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-600: #d97706;
  --amber-700: #b45309;

  /* Neutros */
  --ink: #0f1c2b;
  --ink-soft: #33465a;
  --muted: #586a7d;          /* AA sobre blanco y sobre --bg-alt */
  --line: #dce3ea;
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --on-dark: #e8eef4;
  --on-dark-muted: #a9b9c9;  /* AA sobre --navy-900 */

  /* Estado */
  --ok: #15803d;
  --err: #b91c1c;

  /* Tipografía */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Inter", system-ui, sans-serif;

  /* Layout */
  --max: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 68px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .06), 0 2px 8px rgba(13, 27, 42, .05);
  --shadow-md: 0 10px 30px -10px rgba(13, 27, 42, .25);
  --shadow-lg: 0 24px 50px -18px rgba(13, 27, 42, .35);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: 260ms var(--ease);
  --focus: 0 0 0 3px var(--bg), 0 0 0 6px var(--amber-500);
}

/* ---------- 2. Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 64px; /* espacio para la barra CTA móvil */
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul[class], ol[class] { list-style: none; padding: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--navy-900);
}

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--amber-500); color: var(--navy-900);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
  text-decoration: none; transition: top var(--t);
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Utilidades ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 860px; }

.section { padding-block: 72px; }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber-700);
  margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head--light h2 { color: #fff; }
.section-head--light .eyebrow { color: var(--amber-400); }

.accent { color: var(--amber-400); }

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: .98rem; text-decoration: none; line-height: 1.2;
  transition: transform var(--t), background-color var(--t), box-shadow var(--t), color var(--t), border-color var(--t);
}
.btn svg { transition: transform var(--t); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--amber-500); color: var(--navy-900); box-shadow: 0 8px 22px -8px rgba(245, 158, 11, .7); }
.btn-primary:hover { background: var(--amber-400); }

.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { border-color: var(--amber-400); color: var(--amber-400); }
.btn-ghost:hover svg { transform: none; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

.link-arrow { font-weight: 600; color: var(--amber-400); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 5. Barra de progreso ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120;
  background: linear-gradient(90deg, var(--amber-600), var(--amber-400));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- 6. Cabecera / navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 27, 42, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: box-shadow var(--t), background-color var(--t);
}
.site-header.is-scrolled { background: rgba(8, 19, 31, .97); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55); }

.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-logo { width: 40px; height: auto; border-radius: 6px; background: #fff; padding: 2px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; letter-spacing: .01em; }
.brand-name span { color: var(--amber-400); font-weight: 600; }

/* Hamburguesa animada */
.nav-toggle {
  position: relative; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle-bar { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil: visible sin JS (en columna), colapsable con JS */
.nav-menu {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--navy-950);
  padding: 8px 20px 20px;
  display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-lg);
}
.js .nav-menu {
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity var(--t), transform var(--t), visibility 0s linear 260ms;
}
.js .nav-open .nav-menu {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity var(--t), transform var(--t);
}
.no-js .nav-toggle { display: none; }
.no-js .nav-menu { position: static; flex-direction: row; flex-wrap: wrap; box-shadow: none; }

.nav-menu a {
  display: block; padding: 12px 6px; color: var(--on-dark);
  text-decoration: none; font-weight: 600; font-size: .98rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: color var(--t);
}
.nav-menu a:hover, .nav-menu a.is-active { color: var(--amber-400); }
.nav-menu .nav-cta {
  margin-top: 10px; text-align: center; border: 0; border-radius: 999px;
  background: var(--amber-500); color: var(--navy-900);
}
.nav-menu .nav-cta:hover { background: var(--amber-400); color: var(--navy-900); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% -10%, var(--petrol-600) 0%, transparent 60%),
              linear-gradient(160deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: var(--on-dark);
  padding-block: 64px 56px;
}
/* Textura tipo plano/blueprint */
.hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 197, 230, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 197, 230, .07) 1px, transparent 1px),
    linear-gradient(rgba(148, 197, 230, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 197, 230, .035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.hero-bg::after {
  /* círculo de cota decorativo */
  content: ""; position: absolute; right: -120px; top: 40px; width: 420px; height: 420px;
  border: 1px dashed rgba(251, 191, 36, .22); border-radius: 50%;
}

.hero-inner { display: grid; gap: 48px; }
.hero .eyebrow { color: var(--amber-400); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 7vw, 3.9rem);
  font-weight: 800; letter-spacing: -.03em;
  margin-bottom: 22px; max-width: 16ch;
}
.hero-lead { font-size: clamp(1.02rem, 2.4vw, 1.18rem); color: var(--on-dark); max-width: 62ch; margin-bottom: 14px; }
.hero-lead strong { color: #fff; }
.hero-sub { color: var(--on-dark-muted); max-width: 60ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); overflow: hidden;
}
.stat { background: rgba(13, 27, 42, .85); padding: 22px 18px; }
.stat-num {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 2.6rem); color: #fff; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-prefix { font-size: .5em; font-weight: 600; color: var(--amber-400); vertical-align: middle; }
.stat-label { display: block; margin-top: 6px; font-size: .88rem; color: var(--on-dark-muted); }

/* ---------- 8. Servicios ---------- */
.services-grid { display: grid; gap: 20px; }

.service-card {
  position: relative; padding: 28px 24px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.service-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--amber-500); border-radius: var(--radius) var(--radius) 0 0;
  transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service-card > p { color: var(--muted); margin-bottom: 16px; }

.service-icon {
  width: 54px; height: 54px; margin-bottom: 18px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--navy-900); color: var(--amber-400);
  transition: background-color var(--t), color var(--t), transform var(--t);
}
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-card:hover .service-icon { background: var(--amber-500); color: var(--navy-900); transform: rotate(-4deg); }

.service-list li { position: relative; padding-left: 24px; margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }
.service-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px;
  border-left: 2px solid var(--amber-600); border-bottom: 2px solid var(--amber-600);
  transform: rotate(-45deg);
}

.service-card--cta {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-950)); border-color: transparent; color: var(--on-dark);
}
.service-card--cta h3 { color: #fff; margin: 0; }
.service-card--cta p { color: var(--on-dark-muted); margin: 0; }

/* ---------- 9. Nosotros ---------- */
.about-grid { display: grid; gap: 44px; align-items: start; }
.about-copy h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); margin-bottom: 16px; }
.about-copy > p { color: var(--ink-soft); margin-bottom: 18px; }

.check-list { margin-bottom: 30px; }
.check-list li { position: relative; padding: 6px 0 6px 34px; font-weight: 500; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23fbbf24' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }
.brand-facts { width: 100%; border-collapse: collapse; font-size: .93rem; }
.brand-facts caption {
  text-align: left; padding: 14px 18px; font-family: var(--font-display); font-weight: 700;
  color: #fff; background: var(--navy-900);
}
.brand-facts th, .brand-facts td { padding: 10px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.brand-facts th { width: 38%; color: var(--muted); font-weight: 600; }
.brand-facts tr:nth-child(even) { background: var(--bg-alt); }
.brand-facts a { color: var(--navy-700); text-underline-offset: 2px; }

.about-media { display: grid; gap: 18px; }
.about-figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--bg); }
.about-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-figure--small img { aspect-ratio: 886 / 576; object-fit: contain; background: #fff; }
.about-figure figcaption { padding: 12px 16px; font-size: .88rem; color: var(--muted); border-top: 3px solid var(--amber-500); }

/* ---------- 10. Por qué HORFAVEN ---------- */
.why { background: var(--navy-900); color: var(--on-dark); position: relative; overflow: hidden; }
.why::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(-45deg, rgba(245, 158, 11, .06) 0 14px, transparent 14px 28px);
  -webkit-mask-image: linear-gradient(90deg, transparent 60%, #000);
          mask-image: linear-gradient(90deg, transparent 60%, #000);
}
.why .container { position: relative; }
.why-grid { display: grid; gap: 1px; background: rgba(255, 255, 255, .1); border-radius: var(--radius); overflow: hidden; }
.why-item { background: var(--navy-900); padding: 28px 24px; transition: background-color var(--t); }
.why-item:hover { background: var(--navy-800); }
.why-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--amber-400); margin-bottom: 10px; }
.why-item h3 { color: #fff; font-size: 1.12rem; margin-bottom: 8px; }
.why-item p { color: var(--on-dark-muted); font-size: .95rem; }

/* ---------- 11. Proceso / timeline ---------- */
.timeline { position: relative; display: grid; gap: 26px; counter-reset: step; }
.timeline::before {
  content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--amber-500), var(--navy-700));
}
.timeline-step { position: relative; padding-left: 66px; }
.timeline-dot {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; color: var(--navy-900);
  background: var(--amber-500); box-shadow: 0 0 0 6px var(--bg);
  transition: transform var(--t);
}
.timeline-step:hover .timeline-dot { transform: scale(1.1); }
.timeline-step h3 { font-size: 1.1rem; margin-bottom: 4px; padding-top: 9px; }
.timeline-step p { color: var(--muted); font-size: .95rem; }

/* ---------- 12. Trabajos (galería) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-btn {
  min-height: 42px; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-soft); font-weight: 600; font-size: .92rem;
  transition: background-color var(--t), color var(--t), border-color var(--t);
}
.filter-btn:hover { border-color: var(--navy-700); color: var(--navy-900); }
.filter-btn.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.works-grid { display: grid; gap: 20px; }
.work { transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.work.is-hidden { display: none; }
.work figure {
  height: 100%; display: flex; flex-direction: column;
  background: var(--bg); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.work figure:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.work-link { position: relative; display: block; overflow: hidden; cursor: zoom-in; }
.work-link img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; transition: transform 600ms var(--ease); }
.work-link::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13, 27, 42, .55)) ,
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='white' stroke-width='2'/%3E%3Cpath d='M16 16l5 5M11 8v6M8 11h6' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 14px bottom 14px / 26px no-repeat;
  opacity: 0; transition: opacity var(--t);
}
.work-link:hover img, .work-link:focus-visible img { transform: scale(1.06); }
.work-link:hover::after, .work-link:focus-visible::after { opacity: 1; }
.work figcaption { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 3px; }
.work figcaption strong { font-family: var(--font-display); color: var(--navy-900); font-size: 1.05rem; }
.work figcaption span:last-child { color: var(--muted); font-size: .9rem; }
.work-tag {
  align-self: flex-start; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #fef3c7; color: #7c4a03;
}

/* ---------- 13. Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 60px 16px;
  background: rgba(5, 12, 20, .92);
  opacity: 0; transition: opacity var(--t);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-figure { max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox-figure img {
  max-height: calc(100vh - 170px); width: auto; border-radius: var(--radius-sm);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
.lightbox-figure figcaption { margin-top: 14px; color: var(--on-dark); text-align: center; font-size: .98rem; }
.lightbox-close, .lightbox-nav {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.9rem; line-height: 1;
  display: grid; place-items: center; transition: background-color var(--t);
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--amber-500); color: var(--navy-900); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
body.lightbox-lock { overflow: hidden; }

/* ---------- 14. FAQ (acordeón con <details>) ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color var(--t), box-shadow var(--t);
}
.faq-item[open] { border-color: var(--amber-500); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 60px 20px 22px; border-radius: var(--radius);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.03rem; font-weight: 700; display: inline; }
.faq-item summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 26px; height: 26px; margin-top: -13px;
  border-radius: 50%; background: var(--bg-alt)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%230d1b2a' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform var(--t), background-color var(--t);
}
.faq-item[open] summary::after { transform: rotate(45deg); background-color: var(--amber-500); }
.faq-item summary:hover h3 { color: var(--navy-700); }
.faq-body { padding: 0 22px 22px; color: var(--ink-soft); }
.faq-body a { color: var(--navy-700); font-weight: 600; text-underline-offset: 2px; }
.faq-item.is-animating .faq-body { animation: faqIn 320ms var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 15. CTA final ---------- */
.final-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--amber-500), var(--amber-400));
  color: var(--navy-900); padding-block: 56px;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(-45deg, rgba(13, 27, 42, .07) 0 18px, transparent 18px 36px);
}
.final-cta-inner { position: relative; display: grid; gap: 26px; align-items: center; }
.final-cta h2 { font-size: clamp(1.6rem, 4.4vw, 2.4rem); margin-bottom: 10px; }
.final-cta p { color: var(--navy-800); font-weight: 500; max-width: 60ch; }
.final-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.final-cta .btn-primary { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-md); }
.final-cta .btn-primary:hover { background: var(--navy-700); }
.final-cta .btn-ghost { border-color: var(--navy-900); color: var(--navy-900); background: transparent; }
.final-cta .btn-ghost:hover { background: var(--navy-900); color: #fff; }

/* ---------- 16. Contacto y formulario ---------- */
.contact-grid { display: grid; gap: 40px; }
.contact-info h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); margin-bottom: 14px; }
.contact-info > p { color: var(--muted); margin-bottom: 24px; }
.contact-details { font-style: normal; display: grid; gap: 12px; }
.detail {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 18px; background: var(--bg); border-radius: var(--radius-sm);
  border-left: 3px solid var(--amber-500); box-shadow: var(--shadow-sm);
}
.detail-label { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.detail-value { font-weight: 600; color: var(--navy-900); text-decoration: none; }
a.detail-value:hover { color: var(--amber-700); text-decoration: underline; }

.form-card { background: var(--bg); padding: 26px 22px; border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.form-row { display: grid; gap: 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.req { color: var(--err); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  border: 1.5px solid #c5d0db; border-radius: var(--radius-sm); background: #fff;
  transition: border-color var(--t), box-shadow var(--t);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(245, 158, 11, .45);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--err); }
.field.is-valid input, .field.is-valid textarea { border-color: var(--ok); }
.field-error { min-height: 0; font-size: .84rem; color: var(--err); margin-top: 4px; }
.field-error:empty { display: none; }

.form-note { margin-top: 12px; font-size: .8rem; color: var(--muted); }
.form-status { margin-top: 14px; padding: 0; border-radius: var(--radius-sm); font-weight: 600; font-size: .94rem; }
.form-status.ok, .form-status.err { padding: 12px 14px; }
.form-status.ok { background: #dcfce7; color: #14532d; }
.form-status.err { background: #fee2e2; color: #7f1d1d; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(13, 27, 42, .3); border-top-color: var(--navy-900);
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 17. Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-muted); padding-top: 56px; font-size: .94rem; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 36px; }
.footer-brand p { margin-top: 14px; max-width: 46ch; }
.footer-title { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer-nav li { margin-bottom: 8px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--amber-400); text-decoration: underline; }
.footer-contact p { margin-bottom: 10px; }
.footer-bottom {
  display: flex; flex-direction: column; gap: 6px;
  padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .84rem;
}

/* ---------- 18. Elementos flotantes ---------- */
.back-to-top {
  position: fixed; right: 16px; bottom: 80px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy-900); color: var(--amber-400); box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, .12);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--t), transform var(--t), visibility 0s linear 260ms, background-color var(--t);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t), transform var(--t), background-color var(--t); }
.back-to-top:hover { background: var(--amber-500); color: var(--navy-900); }

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(8, 19, 31, .96); border-top: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.mobile-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  border-radius: 999px; font-weight: 700; text-decoration: none;
  color: #fff; border: 1.5px solid rgba(255, 255, 255, .3);
}
.mobile-cta-btn--primary { background: var(--amber-500); border-color: var(--amber-500); color: var(--navy-900); }

/* ---------- 19. Reveal on scroll (solo con JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .services-grid .reveal:nth-child(2), .js .why-grid .reveal:nth-child(2), .js .timeline .reveal:nth-child(2) { transition-delay: 80ms; }
.js .services-grid .reveal:nth-child(3), .js .why-grid .reveal:nth-child(3), .js .timeline .reveal:nth-child(3) { transition-delay: 160ms; }
.js .services-grid .reveal:nth-child(4), .js .why-grid .reveal:nth-child(4), .js .timeline .reveal:nth-child(4) { transition-delay: 240ms; }
.js .services-grid .reveal:nth-child(5), .js .timeline .reveal:nth-child(5) { transition-delay: 320ms; }
.js .services-grid .reveal:nth-child(6) { transition-delay: 400ms; }

/* Animación de entrada del hero */
.hero-copy > * { animation: heroIn 800ms var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 80ms; }
.hero-copy > :nth-child(3) { animation-delay: 160ms; }
.hero-copy > :nth-child(4) { animation-delay: 240ms; }
.hero-copy > :nth-child(5) { animation-delay: 320ms; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 20. Breakpoints ---------- */
@media (min-width: 600px) {
  .services-grid, .works-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; flex-wrap: wrap; }
  .form-card { padding: 34px 32px; }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  body { padding-bottom: 0; }
  .section { padding-block: 104px; }

  .nav-toggle, .mobile-cta { display: none; }
  .nav-menu, .js .nav-menu {
    position: static; flex-direction: row; align-items: center; gap: 4px;
    padding: 0; background: none; border: 0; box-shadow: none;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .nav-menu a { position: relative; padding: 8px 12px; border: 0; font-size: .94rem; }
  .nav-menu a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
    background: var(--amber-400); transform: scaleX(0); transition: transform var(--t);
  }
  .nav-menu a:hover::after, .nav-menu a.is-active::after { transform: scaleX(1); }
  .nav-menu .nav-cta { margin: 0 0 0 10px; padding: 10px 20px; }

  .hero { padding-block: 104px 88px; }
  .hero-inner { grid-template-columns: 1.35fr 1fr; align-items: end; gap: 56px; }
  .stats { align-self: center; }

  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1.15fr 1fr; gap: 64px; }
  .about-media { position: sticky; top: calc(var(--header-h) + 24px); }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
  .final-cta-inner { grid-template-columns: 1.5fr auto; }

  /* Timeline horizontal */
  .timeline { grid-template-columns: repeat(5, 1fr); gap: 20px; }
  .timeline::before { left: 22px; right: 22px; top: 21px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--amber-500), var(--navy-700)); }
  .timeline-step { padding-left: 0; padding-top: 64px; }
  .timeline-step h3 { padding-top: 0; }

  .back-to-top { bottom: 24px; right: 24px; }
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
}

/* ---------- 21. Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important; /* necesario para anular animaciones de terceros/inline */
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 22. Impresión ---------- */
@media print {
  .site-header, .mobile-cta, .back-to-top, .scroll-progress, .lightbox, .filters, .form-card { display: none; }
  body { padding: 0; }
  .hero { background: none; color: #000; }
  .hero h1, .hero-lead, .hero-lead strong { color: #000; }
  .faq-body { display: block; }
}

/* ---------- 23. Respaldo sin JavaScript ---------- */
.no-js .nav { height: auto; min-height: var(--header-h); flex-wrap: wrap; padding-block: 10px; }
.no-js .nav-menu { padding: 0; background: none; border: 0; }
.no-js .nav-menu a { padding: 6px 8px; border: 0; }

/* ============================================================
   FASE 2 — Landing de suministro de hormigón + WhatsApp
   ============================================================ */
:root {
  --wa-500: #1fa855;   /* FAB: icono blanco ≥ 3:1 */
  --wa-600: #168a45;
  --wa-700: #0f7a3c;   /* botones con texto blanco ≥ 4.5:1 */
}

/* --- Nav con 7 enlaces: compactar en escritorio estrecho --- */
@media (min-width: 900px) and (max-width: 1099px) {
  .nav-menu a { padding: 8px 8px; font-size: .88rem; }
  .nav-menu a:not(.nav-cta)::after { left: 8px; right: 8px; }
  .nav-menu .nav-cta { margin-left: 6px; padding: 10px 14px; }
  .brand-name { font-size: 1rem; }
}

/* --- Home: enlace discreto del hero y enlace de tarjeta --- */
.hero-copy > :nth-child(6) { animation-delay: 400ms; }
.hero-link { margin-top: 18px; font-size: .95rem; }
.hero-link a { color: var(--on-dark-muted); text-decoration: none; border-bottom: 1px dashed rgba(251, 191, 36, .5); padding-bottom: 2px; transition: color var(--t), border-color var(--t); }
.hero-link a strong { color: var(--amber-400); font-weight: 600; }
.hero-link a:hover { color: #fff; border-bottom-color: var(--amber-400); }

.service-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-weight: 700; font-size: .95rem; color: var(--amber-700);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.service-link span { transition: transform var(--t); }
.service-link:hover { color: var(--navy-900); }
.service-link:hover span { transform: translateX(3px); }

/* --- Botón WhatsApp (texto) --- */
.btn-chat { background: var(--wa-700); color: #fff; box-shadow: 0 8px 22px -10px rgba(15, 122, 60, .8); }
.btn-chat:hover { background: var(--wa-600); }
.btn-chat:hover svg { transform: none; }
.btn-chat--lg { min-height: 54px; padding-inline: 28px; font-size: 1.02rem; }
.form-wa { margin-top: 10px; }

/* --- Hero landing --- */
.hero--landing { padding-top: 28px; }
.hero--landing h1 { font-size: clamp(1.9rem, 5.6vw, 3.2rem); max-width: 20ch; }
.hero--landing .hero-lead strong { color: var(--amber-400); }
.hero--landing .hero-lead > strong:first-child { color: #fff; }
.hero--landing .stat-num { font-size: clamp(1.5rem, 5vw, 2.2rem); }

.breadcrumb { margin-bottom: 28px; font-size: .86rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark-muted); }
.breadcrumb li + li::before { content: "/"; color: rgba(255, 255, 255, .35); }
.breadcrumb a { color: var(--on-dark-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber-400); text-decoration: underline; }
.breadcrumb a[aria-current="page"] { color: #fff; font-weight: 600; }

/* --- Pasos breves --- */
.steps-mini { counter-reset: mini; display: grid; gap: 12px; margin-top: 8px; }
.steps-mini li {
  counter-increment: mini; position: relative; padding: 14px 16px 14px 58px;
  background: var(--bg-alt); border-radius: var(--radius-sm); color: var(--ink-soft);
}
.steps-mini li::before {
  content: counter(mini); position: absolute; left: 14px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--amber-500); color: var(--navy-900); font-family: var(--font-display); font-weight: 800; font-size: .9rem;
}
.steps-mini strong { color: var(--navy-900); }

/* --- Tabla de tipos de hormigón --- */
.spec-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .94rem; }
.spec-table caption {
  text-align: left; padding: 14px 18px; font-family: var(--font-display); font-weight: 700;
  color: #fff; background: var(--navy-900);
}
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.spec-table thead th {
  font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  background: var(--bg-alt); border-top: 0;
}
.spec-table tbody th { font-weight: 600; color: var(--navy-900); width: 22%; }
.spec-table tbody tr { transition: background-color var(--t); }
.spec-table tbody tr:hover { background: #fffbeb; }
.spec-code {
  display: block; width: max-content; margin-bottom: 4px; padding: 2px 10px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: .86rem;
  background: var(--navy-900); color: var(--amber-400);
}
.table-note { margin-top: 14px; font-size: .86rem; color: var(--muted); }

/* --- Factores de precio --- */
.factor-grid { display: grid; gap: 16px; }
.factor {
  position: relative; padding: 22px 22px 22px 22px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.factor:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--amber-500); }
.factor-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--amber-600); margin-bottom: 6px; }
.factor h3 { font-size: 1.08rem; margin-bottom: 6px; }
.factor p { color: var(--muted); font-size: .95rem; }

.inline-cta {
  display: grid; gap: 16px; align-items: center; margin-top: 28px; padding: 22px 24px;
  border-radius: var(--radius); background: var(--navy-900); color: var(--on-dark);
}
.inline-cta strong { color: var(--amber-400); }

/* --- Banda WhatsApp oficina técnica --- */
.wa-band { background: linear-gradient(120deg, #e9f9ef, #f3fbf6); border-block: 1px solid #cdebd8; padding-block: 48px; }
.wa-band-inner { display: grid; gap: 20px; align-items: center; }
.wa-band-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa-500); color: #fff; box-shadow: 0 10px 24px -10px rgba(31, 168, 85, .8);
}
.wa-band h2 { font-size: clamp(1.35rem, 3.4vw, 1.85rem); margin-bottom: 8px; }
.wa-band p { color: var(--ink-soft); max-width: 62ch; }

/* --- Sección calidad (reutiliza .why) --- */
.section-head .why-lead { color: var(--on-dark); font-size: 1.1rem; max-width: 62ch; }

/* --- Municipios (chips) --- */
.town-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.town-grid a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg);
  color: var(--ink-soft); font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: background-color var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.town-grid a::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber-500); flex: none;
}
.town-grid a:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; transform: translateY(-2px); }

/* --- Formulario: ayudas y opcionales --- */
.field-hint { margin-top: 4px; font-size: .82rem; color: var(--muted); }
.field-optional { font-weight: 500; color: var(--muted); font-size: .85rem; }
.field select { appearance: auto; }

/* --- FAB WhatsApp + pila con back-to-top --- */
.float-cta {
  position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 92;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa-500); color: #fff;
  box-shadow: 0 12px 28px -8px rgba(15, 122, 60, .65), 0 0 0 1px rgba(255, 255, 255, .25) inset;
  transition: opacity var(--t), transform var(--t), visibility 0s linear 260ms, background-color var(--t), box-shadow var(--t);
}
.float-cta:hover { background: var(--wa-600); transform: scale(1.06); }
.js .float-cta { opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9); }
.js .float-cta.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t), transform var(--t), background-color var(--t), box-shadow var(--t); }
.js .float-cta.is-visible:hover { transform: scale(1.06); }

/* back-to-top encima del FAB, centrado en la misma columna */
.back-to-top { right: 21px; bottom: calc(144px + env(safe-area-inset-bottom)); }

@media (min-width: 600px) {
  .factor-grid { grid-template-columns: repeat(2, 1fr); }
  .inline-cta { grid-template-columns: 1fr auto; }
}

@media (min-width: 900px) {
  .factor-grid { grid-template-columns: repeat(3, 1fr); }
  .wa-band-inner { grid-template-columns: auto 1fr auto; gap: 28px; }
  .float-cta { right: 24px; bottom: 24px; }
  .back-to-top { right: 29px; bottom: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .float-cta:hover, .js .float-cta.is-visible:hover, .factor:hover, .town-grid a:hover { transform: none; }
}

@media print {
  .float-cta, .wa-band, .breadcrumb { display: none; }
  .spec-table { min-width: 0; }
}

/* Reveal escalonado para los nuevos grids */
.js .factor-grid .reveal:nth-child(2) { transition-delay: 80ms; }
.js .factor-grid .reveal:nth-child(3) { transition-delay: 160ms; }
.js .factor-grid .reveal:nth-child(4) { transition-delay: 240ms; }
.js .factor-grid .reveal:nth-child(5) { transition-delay: 320ms; }
.js .factor-grid .reveal:nth-child(6) { transition-delay: 400ms; }
