/* HUZ Construcciones — estilos del sitio
   Paleta tomada del logo y del catálogo (azul marino + naranja). */
:root {
  --navy: #152340;
  --navy-deep: #0d1730;
  --orange: #e8702f;
  --orange-dark: #c95a1d;
  --steel: #eef0f3;
  --concrete: #d6dbe2;
  --ink: #1c2436;
  --muted: #56607a;
  --white: #ffffff;

  --wide: 118;           /* ancho expandido de Archivo para títulos */
  --max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--orange); color: var(--white); padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Tipografía ---------- */
h1, h2, h3 {
  font-variation-settings: "wdth" var(--wide);
  line-height: 1.08;
  margin: 0;
  color: var(--navy);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 750; }

/* Barra naranja bajo los títulos, igual que la del logo */
.section-title::after {
  content: ""; display: block;
  width: 72px; height: 6px; margin-top: .9rem;
  background: var(--orange); border-radius: 3px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .95rem 1.6rem;
  font: inherit; font-weight: 700; font-size: 1rem;
  font-variation-settings: "wdth" 110;
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--concrete);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); }
.brand svg { width: 44px; height: 50px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name strong { font-size: 1.5rem; font-weight: 500; letter-spacing: .02em; }
.brand-name span { font-size: .62rem; letter-spacing: .32em; color: var(--muted); margin-top: .3rem; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:not(.btn):hover { color: var(--orange-dark); }
.nav .btn { padding: .65rem 1.15rem; }
.lang {
  display: inline-flex; border: 1px solid var(--concrete); border-radius: var(--radius); overflow: hidden;
  font-size: .85rem; font-weight: 700;
}
.lang a, .lang span { padding: .35rem .6rem; }
.lang span { background: var(--navy); color: var(--white); }
.lang a:hover { background: var(--steel); color: var(--navy); }

.menu-toggle {
  display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--navy);
}
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 76px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--concrete);
    padding: .5rem var(--gutter) 1.25rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--steel); }
  .nav .btn { margin-top: 1rem; }
  .nav .lang { align-self: flex-start; margin-top: 1rem; }
}

/* ---------- Portada ---------- */
/* El elemento distintivo: el corte diagonal del catálogo */
.hero {
  position: relative; min-height: min(86vh, 760px);
  display: flex; align-items: stretch; overflow: hidden;
  background: var(--navy-deep);
}
.hero-photo {
  position: absolute; inset: 0 0 0 30%;
  background: url("../img/portada-nave-industrial.jpg") center / cover no-repeat;
}
.hero-panel {
  position: relative; z-index: 1;
  width: 64%;
  background: var(--navy);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  display: flex; align-items: center;
}
.hero-content {
  padding: 4rem var(--gutter) 4rem max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  max-width: 44rem; width: 88%;
}
.hero h1 { color: var(--white); }
.hero-sub { color: #c9d1e0; font-size: 1.2rem; margin: 1.4rem 0 2.2rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-place { margin: 0 0 1.4rem; color: var(--orange); font-weight: 700; font-size: 1rem; }
.hero-corner {
  position: absolute; right: 0; bottom: 0; z-index: 1;
  width: clamp(120px, 20vw, 260px); aspect-ratio: 1.6;
  background: var(--orange);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-corner { animation: corner-in .9s cubic-bezier(.2,.7,.2,1) .15s both; }
  @keyframes corner-in { from { transform: translate(40%, 40%); } to { transform: none; } }
}

@media (max-width: 900px) {
  .hero { flex-direction: column; min-height: 0; }
  .hero-photo { position: relative; inset: auto; height: 46vw; min-height: 220px; order: -1; }
  .hero-panel { width: 100%; clip-path: polygon(0 36px, 100% 0, 100% 100%, 0 100%); margin-top: -36px; }
  .hero-content { width: 100%; padding: 3.5rem var(--gutter) 4.5rem; }
  .hero-corner { width: 110px; }
}

/* ---------- Datos ---------- */
.facts { border-bottom: 1px solid var(--concrete); }
.facts ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.facts li { padding: 1.8rem 1.25rem 1.8rem 0; }
.facts li + li { padding-left: 1.5rem; border-left: 1px solid var(--concrete); }
.facts strong {
  display: block; font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1.1;
  font-variation-settings: "wdth" var(--wide);
}
.facts span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--concrete); }
}

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-head { margin-bottom: 2.75rem; }
.section-head .lead { margin: 1.2rem 0 0; }

/* Nosotros */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about-text p { margin: 0 0 1.1rem; max-width: 62ch; }
.about-aside {
  background: var(--steel); padding: 2rem; border-left: 6px solid var(--orange);
}
.about-aside h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.about-aside p { margin: 0 0 1.5rem; color: var(--muted); }
.about-aside p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* Servicios */
.services { background: var(--steel); }
.service {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center; padding: 3rem 0; border-top: 1px solid var(--concrete);
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service:nth-of-type(even) .service-text { order: 2; }
.service h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-bottom: 1.1rem; }
.service ul { margin: 0; padding: 0; list-style: none; }
.service li { position: relative; padding: .45rem 0 .45rem 1.4rem; }
.service li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: .6rem; height: .6rem; background: var(--orange);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.service-note { margin: 1.1rem 0 0; font-size: .95rem; color: var(--muted); }
.service-photos { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: .6rem; aspect-ratio: 1.45; }
.service-photos .ph { overflow: hidden; border-radius: var(--radius); background: var(--concrete); }
.service-photos .ph:first-child { grid-row: span 2; }
.service-photos img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; }
  .service:nth-of-type(even) .service-text { order: 0; }
}

/* Por qué HUZ */
.why { background: var(--navy); color: #d4dae6; position: relative; overflow: hidden; }
.why::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: clamp(90px, 14vw, 180px); aspect-ratio: 1.6; background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.why h2 { color: var(--white); }
.why-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem);
}
.why-list li { padding: 1.35rem 0; border-top: 1px solid rgba(255,255,255,.14); }
.why-list strong { display: block; color: var(--white); font-size: 1.12rem; margin-bottom: .3rem; font-variation-settings: "wdth" 108; }
@media (max-width: 760px) { .why-list { grid-template-columns: 1fr; } }

/* Clientes */
.clients-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--navy);
}
.clients-grid li {
  padding: 1.15rem .5rem; border-bottom: 1px solid var(--concrete);
  font-weight: 650; font-size: 1.08rem; color: var(--navy);
  font-variation-settings: "wdth" 108;
}
@media (max-width: 700px) { .clients-grid { grid-template-columns: 1fr 1fr; } .clients-grid li { font-size: .98rem; } }

/* Contacto */
.contact { background: var(--steel); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-list li { padding: .9rem 0; border-top: 1px solid var(--concrete); }
.contact-list span { display: block; font-size: .9rem; color: var(--muted); }
.contact-list a { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--navy); }
.contact-list a:hover { color: var(--orange-dark); }

.form { background: var(--white); padding: clamp(1.5rem, 4vw, 2.5rem); border-top: 6px solid var(--orange); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.field label { font-weight: 650; font-size: .95rem; margin-bottom: .35rem; color: var(--navy); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: .8rem .9rem; border: 1px solid #b9c1cd; border-radius: var(--radius); background: var(--white);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.field textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; }
.form-status { margin: 1rem 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #1d7a45; }
.form-status.error { color: #b3261e; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-deep); color: #9fa9bd; padding: 2.5rem 0; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; align-items: center; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--white); }
.footer-inner a { color: #d4dae6; }

/* Ajustes finales */
@media (min-width: 861px) { .service:nth-of-type(even) { grid-template-columns: 1.1fr .9fr; } }
.service:last-of-type { padding-bottom: 0; }
.clients-grid li { padding: 1.15rem 1rem 1.15rem 0; }
.field select { height: 3.2rem; }
.nav .lang a, .nav .lang span { padding: .35rem .7rem; border-bottom: 0; display: inline-flex; align-items: center; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.15rem .8rem .95rem;
  background: #1f9d55; color: #fff; text-decoration: none;
  font-weight: 700; font-size: .98rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(13, 23, 48, .28);
}
.wa-float svg { width: 24px; height: 24px; }
.wa-float:hover { background: #178247; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: .9rem; } }

/* Acercamiento de fotos al pasar el mouse (solo en equipos con mouse) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-photos img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .service-photos .ph:hover img { transform: scale(1.08); }
}

/* Título de portada más compacto con la fuente Archivo ya cargada */
.hero h1 { font-size: clamp(2rem, 3.4vw, 3rem); font-variation-settings: "wdth" 106; line-height: 1.1; }
