/* =========================================================
   Electricidad y Climatización Lledó
   Estilo: minimalista, oscuro, elegante
   ========================================================= */
:root {
  --ink: #0c0d0f;
  --ink-2: #141619;
  --paper: #f4f1ea;
  --text: #e9e6df;
  --muted: #8b8a86;
  --line: rgba(255, 255, 255, .1);
  --gold: #d9b26f;
  --cool: #8fb8d8;
  --wa: #25d366;
  --serif: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; /* letra de títulos (Outfit) */
  --gold-deep: #a8823f;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* Fondo de humo: fijo detrás de todo el contenido */
#humo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
main, .footer { position: relative; z-index: 1; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Portada ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  padding: 120px 0 100px;
  /* Para usar una foto de fondo:
     background: linear-gradient(rgba(12,13,15,.75), rgba(12,13,15,.9)), url("../img/portada.jpg") center/cover; */
}
.hero__glow {
  position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(217, 178, 111, .16) 0%, rgba(143, 184, 216, .06) 40%, transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero__inner { position: relative; text-align: center; }
.hero__kicker {
  font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 28px;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(5rem, 19vw, 15rem);
  line-height: .85; letter-spacing: .06em;
  background: linear-gradient(180deg, #fff 30%, #a9a59c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__logo { margin: 0 auto; width: min(720px, 92vw); line-height: 0; }
.hero__logo svg { width: 100%; height: auto; display: block; }

.hero__cta { margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero__free { font-size: .95rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero__free em { font-style: normal; color: var(--text); }
.hero__zone { font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.wa-btn {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 16px 34px 16px 18px; border-radius: 999px;
  background: var(--wa); color: #06260f;
  box-shadow: 0 10px 40px rgba(37, 211, 102, .25);
  transition: transform .2s, box-shadow .2s;
}
.wa-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(37, 211, 102, .35); }
.wa-btn svg { width: 46px; height: 46px; padding: 10px; border-radius: 50%; background: rgba(255,255,255,.25); fill: #06260f; flex-shrink: 0; }
.wa-btn__text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.wa-btn__text small { font-size: .8rem; font-weight: 500; opacity: .8; }
.wa-btn__text strong { font-size: 1.6rem; font-weight: 600; letter-spacing: .02em; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  width: 1px; height: 56px; background: var(--line); overflow: hidden;
}
.hero__scroll span {
  position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--gold);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine { to { top: 100%; } }

/* ---------- Servicios ---------- */
.services { background: transparent; color: var(--text); padding: 110px 0 130px; }
.services__head { margin-bottom: 64px; }
.services__head h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: 1.02; letter-spacing: -.035em;
}
.services__head h2 em { font-style: normal; font-weight: 300; color: var(--gold-deep); }
.services__head h2::after {
  content: ""; display: block; width: 72px; height: 2px; margin-top: 28px;
  background: linear-gradient(90deg, var(--gold-deep), transparent);
}

.services__intro {
  display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center;
  padding: 44px 0; margin-bottom: 80px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.services__since { display: flex; flex-direction: column; line-height: 1; padding-right: 56px; border-right: 1px solid var(--line); }
.services__since small {
  font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.services__since span {
  font-family: var(--serif); font-weight: 700; font-size: clamp(3.4rem, 7vw, 5.4rem); letter-spacing: -.03em;
  /* azul → naranja, como el rayo del logo */
  background: linear-gradient(120deg, #5AB0F2 0%, #3D8BEA 45%, #F7A23A 62%, #F0902A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em; align-self: flex-start; width: fit-content;
}
.services__intro p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem); line-height: 1.45; color: var(--text); max-width: 660px;
}

/* Sectores: industrial / doméstico */
.services__intro { margin-bottom: 0; }
.services__sectors {
  display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: start;
  padding: 44px 0; margin-bottom: 80px; border-bottom: 1px solid var(--line);
}
.services__sectors-label {
  display: flex; flex-direction: row; align-items: center; gap: 16px;
  padding-right: 56px; border-right: 1px solid var(--line);
}
/* barra vertical entre Industrial y Residencial */
.services__sectors-label .sep {
  display: block; width: 2px; height: 1.6rem; border-radius: 2px;
  background: linear-gradient(180deg, #5AB0F2, #F0902A);
}
.services__sectors-label span {
  font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; color: var(--text);
}
.services__sectors-label span + span { color: var(--gold); }
.services__sectors-text p { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.6; color: #bdbab3; max-width: 660px; margin-bottom: 0; }
.services__sectors-text strong { color: #fff; font-weight: 500; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  font-size: .9rem; font-weight: 400; color: #e9e6df;
  padding: .5em 1.05em; border: 1px solid rgba(217, 178, 111, .35); border-radius: 999px;
  background: rgba(217, 178, 111, .06);
}

/* Recuadros de servicios con icono */
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc {
  position: relative; padding: 28px 26px 26px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(47, 128, 224, .10), rgba(240, 144, 42, .04));
  border: 1px solid rgba(47, 128, 224, .25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .3s, background .3s;
}
.svc:hover { border-color: rgba(240, 144, 42, .55); background: linear-gradient(160deg, rgba(47, 128, 224, .16), rgba(240, 144, 42, .08)); }
.svc .ic {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(47, 128, 224, .14); border: 1px solid rgba(240, 144, 42, .5);
}
.svc svg {
  width: 30px; height: 30px;
  fill: none; stroke: url(#gradIcono); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.svc h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.3; color: #fff; }
.svc p { margin-top: 6px; font-size: .92rem; color: var(--muted); }
/* todo el recuadro abre WhatsApp */
.svc__link::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.svc__link:focus-visible { outline: none; }
.svc__link:focus-visible::after { outline: 2px solid #F0902A; outline-offset: 2px; }

.services__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.services__col h3 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  display: flex; align-items: center; gap: 14px; margin-bottom: 26px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--elec { background: var(--gold); }
.dot--clima { background: var(--cool); }
.services__col ul { list-style: none; margin: 0; padding: 0; }
.services__col li {
  font-size: 1.15rem; font-weight: 400; padding: 18px 0;
  border-top: 1px solid var(--line); color: #cfccc5;
  display: flex; justify-content: space-between; align-items: center;
  transition: padding-left .25s, color .25s;
}
.services__col li::after { content: "→"; color: #55534f; transition: transform .25s, color .25s; }
.services__col li:hover { padding-left: 8px; color: #fff; }
.services__col li:hover::after { transform: translateX(4px); color: var(--gold); }

/* ---------- Trabajos (fotos) ---------- */
.work { padding: 10px 0 40px; }
.work__title { font-family: var(--serif); font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.9rem, 4vw, 2.8rem); color: #fff; margin-bottom: 30px; }
.work__title::after { content: ""; display: block; width: 64px; height: 3px; border-radius: 3px; margin-top: 16px; background: linear-gradient(90deg, #5AB0F2, #F0902A); }
/* un solo recuadro: las fotos se van pasando (js/main.js) */
.work__show {
  position: relative; height: min(680px, 82vh); overflow: hidden; touch-action: pan-y;
  border: 1px solid rgba(47, 128, 224, .25); border-radius: 18px; background: #111;
}
.work__item {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0;
  overflow: hidden; cursor: zoom-in; background: #111; font: inherit; color: inherit;
  opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s;
}
.work__item.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .9s ease; }
.work__item img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
/* movimiento lento de la foto: una se acerca, otra se aleja y otra sube */
.work__item img:not(.work__bg) { transform: scale(1); transition: transform 0s linear 1s; }
.work__item:nth-child(3n + 2) img:not(.work__bg) { transform: scale(1.09); }
.work__item:nth-child(3n) img:not(.work__bg) { transform: scale(1.09) translateY(2.5%); }
.en-vista .work__item.is-active img:not(.work__bg) { transition: transform 7s linear; }
.en-vista .work__item.is-active:nth-child(3n + 1) img:not(.work__bg) { transform: scale(1.09); }
.en-vista .work__item.is-active:nth-child(3n + 2) img:not(.work__bg) { transform: scale(1); }
.en-vista .work__item.is-active:nth-child(3n) img:not(.work__bg) { transform: scale(1.09) translateY(-2.5%); }
/* la misma foto, desenfocada, rellena los lados */
.work__item img.work__bg { position: absolute; inset: 0; z-index: 0; object-fit: cover; filter: blur(28px) brightness(.45); transform: scale(1.15); }
.work__item:focus-visible { outline: 2px solid #F0902A; outline-offset: -4px; }
.work__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  font-size: 1.8rem; line-height: 1; color: #fff;
  background: rgba(12, 13, 15, .55); border: 1px solid rgba(255, 255, 255, .2); transition: background .25s;
}
.work__nav:hover { background: rgba(240, 144, 42, .45); }
.work__nav--prev { left: 16px; }
.work__nav--next { right: 16px; }
.work__dots { display: flex; justify-content: center; gap: 2px; margin-top: 14px; }
.work__count { font-size: .95rem; font-weight: 400; letter-spacing: .08em; color: var(--muted); }
.work__dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.work__dot::before { content: ""; width: 8px; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .28); transition: width .3s, background .3s; }
.work__dot.is-active::before { width: 22px; background: linear-gradient(90deg, #5AB0F2, #F0902A); }
.work__tag {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-size: .85rem; font-weight: 500; color: #fff; padding: .45em .95em; border-radius: 999px;
  background: rgba(12, 13, 15, .6); border: 1px solid rgba(240, 144, 42, .55); backdrop-filter: blur(6px);
}

/* Visor en grande */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 8, .94); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lb-open { overflow: hidden; }
.lb-open .wa-float { display: none; }
.lightbox__img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #fff;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(240, 144, 42, .3); }

/* ---------- Cierre ---------- */
.closing { padding: 140px 0; text-align: center; }
.closing h2 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -.035em; font-size: clamp(3rem, 8vw, 6rem); line-height: 1.05;
  display: inline-block; padding-bottom: .06em;
  /* azul → naranja, como el rayo del logo */
  background: linear-gradient(120deg, #5AB0F2 0%, #3D8BEA 40%, #F7A23A 65%, #F0902A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.closing p { color: var(--muted); font-size: 1.1rem; margin: 22px auto 40px; max-width: 460px; }
.btn-line {
  display: inline-block; padding: 1em 2.2em; border: 1px solid var(--gold); color: var(--gold);
  border-radius: 999px; font-weight: 400; letter-spacing: .04em; transition: background .25s, color .25s;
}
.btn-line:hover { background: var(--gold); color: var(--ink); }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .85rem; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--text); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 78px; z-index: 60; /* 78px: queda encima de la etiqueta de Netlify (64px) */
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  transition: transform .2s, opacity .3s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float.is-hidden { opacity: 0; pointer-events: none; }

/* ---------- Aparición ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Móvil ---------- */
@media (max-width: 960px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  /* en móvil las fotos también se pasan con el dedo */
  .work__show { height: auto; aspect-ratio: 3 / 4; max-height: 82vh; }
  .work__nav { width: 42px; height: 42px; font-size: 1.5rem; }
  .work__nav--prev { left: 10px; }
  .work__nav--next { right: 10px; }
  .lightbox__nav { display: none; }
}
@media (max-width: 760px) {
  .svc-grid { grid-template-columns: 1fr; gap: 10px; }
  .svc { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; padding: 18px 20px; }
  .svc .ic { width: 48px; height: 48px; border-radius: 13px; margin: 0; grid-row: span 2; }
  .svc svg { width: 25px; height: 25px; }
  .svc h3 { font-size: 1.08rem; }
  .svc p { margin-top: 2px; font-size: .85rem; }
  .hero { padding: 110px 0 90px; }
  .hero__kicker { letter-spacing: .22em; font-size: .72rem; }
  .hero__cta { margin-top: 48px; }
  .wa-btn { padding: 12px 26px 12px 12px; gap: 14px; }
  .wa-btn__text strong { font-size: 1.35rem; }
  .services { padding: 90px 0; }
  .services__grid { grid-template-columns: 1fr; gap: 56px; }
  .services__intro { grid-template-columns: 1fr; gap: 22px; padding: 32px 0; margin-bottom: 0; }
  .services__since { padding-right: 0; border-right: 0; }
  .services__sectors { grid-template-columns: 1fr; gap: 18px; padding: 32px 0; margin-bottom: 56px; }
  .services__sectors-label { gap: 14px; padding-right: 0; border-right: 0; }
  .tags li { font-size: .85rem; }
  .services__intro p { font-size: 1.35rem; }
  .services__head { margin-bottom: 40px; }
  .closing { padding: 100px 0; }
  .footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .work__item img:not(.work__bg) { transform: none !important; }
}
