/* ═══════════════════════════════════════════════
   Cristian — Electricidad, iluminación y pintura
   Paleta, tipografía y estilos base
   ═══════════════════════════════════════════════ */

:root {
  color-scheme: only light;

  /* Colores */
  --navy: #0D1440;
  --carbon: #1D2540;
  --blue-mid: #2A3659;
  --lavender: #6F77A6;
  --lavender-soft: #E9E7F2;
  --cream: #F2DFBB;
  --cream-soft: #F8EED9;
  --white: #FFFFFF;
  --warm: #FAF8F4;
  --warm-2: #F4F0E8;

  /* Texto */
  --text: #1D2540;
  --text-soft: #515A73;

  /* Utilidades */
  --line: #E4DFD4;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(13, 20, 64, 0.10);

  /* Tipografías */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background: var(--navy);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--warm);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

/* ───────────────────────── Botones ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* CTA principal */
.btn-primary {
  background: var(--cream);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--cream-soft);
}

/* CTA alternativo: transparente con borde claro */
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  border-color: var(--cream);
  color: var(--cream);
}

/* CTA sobre fondo claro */
.btn-navy {
  background: var(--navy);
  color: var(--cream);
  font-size: 1.05rem;
  padding: 1rem 1.75rem;
}

.btn-navy:hover {
  background: var(--carbon);
}

/* ───────────────────────── Header ───────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--cream);
}

.header-wa {
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
}

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ───────────────────────── Hero ───────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  padding: 7rem 0 5rem;
  overflow: hidden;
  background-color: var(--navy); /* fallback mientras no hay foto */
}

/* Foto de fondo con un leve zoom */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('fotos/hero.png');
  background-size: cover;
  background-position: 8% center;
  transform: scale(1.28);
  transform-origin: 50% 30%;
}

@media (max-width: 880px) {
  .hero::before {
    background-position: 45% center;
  }
}

/* Overlay oscuro sobre la foto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(90deg, rgba(13, 20, 64, 0.9) 0%, rgba(13, 20, 64, 0.55) 50%, rgba(13, 20, 64, 0.88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
}

.hero-content {
  max-width: 42rem;
  margin-inline: auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0.02em;
  margin: 1rem 0 1rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 38rem;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  justify-content: center;
}

/* ───────────────────────── Secciones ───────────────────────── */

.section {
  padding: 6.5rem 0;
}

.section--warm {
  background: var(--warm);
}

.section--texture {
  background-color: var(--warm);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='200'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.65'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='200'%20height='200'%20filter='url(%23n)'%20opacity='0.18'/%3E%3C/svg%3E");
}

.section--white {
  background: var(--white);
}

.section--dark {
  background-color: var(--carbon);
  background-image:
    radial-gradient(120% 120% at 0% 0%, rgba(111, 119, 166, 0.35) 0%, rgba(29, 37, 64, 0) 65%),
    radial-gradient(150% 150% at 100% 100%, rgba(111, 119, 166, 0.38) 0%, rgba(29, 37, 64, 0) 70%);
  color: var(--white);
}

.section--cream {
  background: var(--cream);
  color: var(--navy);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
}

.section--dark .section-label,
.section--cream .section-label {
  color: var(--blue-mid);
}

.section--dark .section-label {
  color: var(--cream);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.75rem;
}

.section-head p {
  color: var(--text-soft);
  font-size: 1.08rem;
}

.section--dark .section-head p {
  color: rgba(255, 255, 255, 0.75);
}

.section--cream .section-head p {
  color: var(--carbon);
}

/* ───────────────────────── Servicios ───────────────────────── */

.services-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--lavender);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.service-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* ───────────────────────── Sobre mí ───────────────────────── */

.about-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.about-foto {
  max-width: 240px;
  margin-inline: auto;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--cream);
  box-shadow: var(--shadow);
}

.about-foto .about-foto-img {
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 0;
  object-position: 50% 6%;
  transform: scale(1.18);
}

@media (min-width: 880px) {
  .about-foto {
    max-width: 300px;
  }
}

.about-text p {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag {
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
}

/* ───────────────────────── Cómo trabajo ───────────────────────── */

.steps {
  display: grid;
  gap: 1rem;
}

.step {
  background: var(--blue-mid);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 1rem;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.step p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
}

/* ───────────────────────── Galería ───────────────────────── */

.gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.foto--wide {
  grid-column: 1 / -1;
}

.gallery-carousel {
  overflow: hidden;
  margin-top: 3.25rem;
}

.gallery-track {
  display: flex;
  width: max-content;
  animation: gallery-scroll 40s linear infinite;
}

.gallery-carousel:hover .gallery-track {
  animation-play-state: paused;
}

.gallery-track .foto {
  flex: 0 0 auto;
  width: min(76vw, 320px);
  margin-right: 1.25rem;
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.foto-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--lavender-soft);
}

img.foto-img {
  width: 100%;
  object-fit: cover;
}

.foto-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foto-img--portrait {
  aspect-ratio: 4 / 5;
}

.foto-pill-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 3;
  background: var(--cream);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
}

.foto-pill-tag--right {
  left: auto;
  right: 0.6rem;
}

.foto-pill-title {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 3;
  background: rgba(13, 20, 64, 0.78);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
}

.foto-caption {
  margin-top: 0.65rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.foto-caption-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
}

/* Antes y después */
.before-after {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.before-after .foto-img {
  border-radius: 0;
}

.foto-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  background: var(--navy);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

/* ─────────── Placeholder de fotos (reemplazar por <img>) ─────────── */

.foto-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  border: 1px dashed rgba(111, 119, 166, 0.55);
  background-color: var(--lavender-soft);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(111, 119, 166, 0.10) 0,
    rgba(111, 119, 166, 0.10) 1px,
    transparent 1px,
    transparent 11px
  );
}

.foto-placeholder-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--lavender);
  max-width: 15rem;
}

.foto-placeholder--dark {
  border-color: rgba(242, 223, 187, 0.35);
  background-color: rgba(255, 255, 255, 0.05);
  background-image: repeating-linear-gradient(
    45deg,
    rgba(242, 223, 187, 0.08) 0,
    rgba(242, 223, 187, 0.08) 1px,
    transparent 1px,
    transparent 11px
  );
}

.foto-placeholder--dark .foto-placeholder-text {
  color: rgba(242, 223, 187, 0.85);
}

.foto-placeholder--portrait {
  aspect-ratio: 4 / 5;
}

/* ───────────────────────── Contacto ───────────────────────── */

.section--navy {
  background-color: var(--navy);
  background-image: radial-gradient(120% 120% at 100% 0%, rgba(111, 119, 166, 0.4) 0%, rgba(13, 20, 64, 0) 65%);
  color: var(--white);
}

.contact-inner {
  display: grid;
  gap: 2.5rem;
}

.contact-inner .section-head {
  margin-bottom: 0;
}

.contact-inner .section-label {
  color: var(--cream);
}

.contact-inner h2 {
  color: var(--white);
}

.contact-inner .section-head p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-inner .btn-primary {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  padding: 1rem 1.75rem;
}

.contact-info-grid {
  display: grid;
  gap: 0.75rem 2rem;
}

.contact-dato {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-icon {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--cream);
}

.contact-dato .val {
  font-weight: 300;
  color: var(--white);
  font-size: 1.05rem;
  word-break: break-word;
}

a.val:hover {
  text-decoration: underline;
  color: var(--cream);
}

@media (min-width: 880px) {
  .contact-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .contact-info-grid {
    justify-self: end;
  }
}

/* ───────────────────────── Footer ───────────────────────── */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.55);
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom {
  font-size: 0.9rem;
  text-align: center;
}

/* ────────────────────── WhatsApp flotante ────────────────────── */

.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(13, 20, 64, 0.28);
  transition: transform 0.15s ease;
}

.wa-float:hover {
  transform: translateY(-2px);
}

.wa-float svg {
  width: 1.65rem;
  height: 1.65rem;
}

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 639px) {
  .services-grid {
    gap: 1.5rem;
  }

  .steps {
    gap: 1.5rem;
  }
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .before-after {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 880px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-inner {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 7rem 0 6rem;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .brand {
    order: 1;
    justify-self: start;
  }

  .site-nav {
    order: 2;
    margin-left: 0;
  }

  .header-wa {
    order: 3;
    justify-self: end;
  }
}

/* Navegación móvil */
@media (max-width: 879px) {
  .header-wa {
    display: none;
  }

  .about-text {
    order: 1;
  }

  .about-foto {
    order: 2;
    margin-top: 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 24px rgba(13, 20, 64, 0.25);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.02rem;
  }

  .site-nav a:last-child {
    border-bottom: none;
  }
}
