:root {
  --navy: #0e2a47;
  --orange: #f08a2c;
  --gray: #888888;
  --text: #555555;
  --ink: #102033;
  --paper: #ffffff;
  --soft: #f6f8fa;
  --line: #dde4ea;
  --shadow: 0 18px 50px rgba(14, 42, 71, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 12px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(221, 228, 234, 0.75);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 200px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a {
  opacity: 0.82;
  transition: color 180ms ease, opacity 180ms ease;
}

.nav-links a:hover {
  color: var(--orange);
  opacity: 1;
}

.header-cta {
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 999px;
  color: var(--paper);
  text-align: center;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.header-cta:hover,
.btn:hover,
.floating-whatsapp:hover {
  transform: translateY(-2px);
}

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 156px clamp(20px, 6vw, 88px) 72px;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(14, 42, 71, 0.95), rgba(14, 42, 71, 0.76) 48%, rgba(14, 42, 71, 0.28)),
    url("assets/proyectos/proyecto-01.jpg") center / cover;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  line-height: 1.05;
}

.hero h1 {
  color: var(--paper);
  max-width: 760px;
  font-size: clamp(2.3rem, 5.2vw, 4.8rem);
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-contact {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.hero-contact a {
  color: var(--paper);
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn-primary {
  color: var(--paper);
  background: var(--orange);
}

.btn-primary:hover {
  background: #d97722;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: transparent;
  border-radius: 999px;
  color: var(--paper);
  background: #22c55e;
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.25);
}

.whatsapp-button::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5A8.48 8.48 0 0 1 21 11v.5Z' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.whatsapp-button:hover {
  background: #16a34a;
}

.btn-secondary {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  border-color: var(--paper);
  background: rgba(255, 255, 255, 0.16);
}

.trust-strip {
  width: min(1120px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: -38px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.trust-item {
  min-height: 118px;
  padding: 26px;
  background: var(--paper);
}

.trust-item strong {
  display: block;
  color: var(--navy);
  font-size: 1.05rem;
}

.trust-item span {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
}

.section {
  padding: 96px clamp(20px, 6vw, 88px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading.centered {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2,
.contact-copy h2,
.why-content h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.section-heading p:not(.eyebrow),
.contact-copy p,
.why-content p {
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.heading-rule {
  display: block;
  width: 70px;
  height: 4px;
  margin: 24px auto 0;
  border-radius: 999px;
  background: var(--orange);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card {
  position: relative;
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 42, 71, 0.76), rgba(14, 42, 71, 0.92)),
    var(--service-image, none) center / cover;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(240, 138, 44, 0.45);
  box-shadow: var(--shadow);
}

.service-mark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 26px;
  border-radius: 6px;
  color: var(--paper);
  background: var(--orange);
  font-weight: 800;
}

.service-card h3 {
  position: relative;
  z-index: 1;
  color: var(--paper);
  font-size: 1.25rem;
}

.service-card p {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.service-solar {
  --service-image: url("assets/proyectos/proyecto-17.jpg");
}

.service-ev {
  --service-image: url("assets/ev-charger.png");
}

.service-electric {
  --service-image: url("https://images.unsplash.com/photo-1621905252507-b35492cc74b4?auto=format&fit=crop&w=900&q=80");
}

.service-clean {
  --service-image: url("assets/proyectos/proyecto-20.jpg");
}

.process-section {
  background: var(--paper);
}

.process-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1180px;
  margin: 70px auto 0;
}

.process-grid::before {
  content: "";
  position: absolute;
  top: 35px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--line));
}

.process-step {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.process-number {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin-bottom: 28px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--orange);
  box-shadow: 0 18px 34px rgba(240, 138, 44, 0.26);
  font-size: 1.7rem;
  font-weight: 800;
}

.process-step h3 {
  color: var(--navy);
  font-size: 1.25rem;
}

.process-step p {
  max-width: 360px;
  margin: 16px 0 0;
  font-size: 1rem;
}

.gallery-section {
  background: var(--soft);
}

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

.gallery-item {
  position: relative;
  height: 280px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--paper);
  background: var(--navy);
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(14, 42, 71, 0.12);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, opacity 220ms ease;
}

.gallery-item:hover img {
  transform: scale(1.045);
  opacity: 0.94;
}

.why-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  padding: 96px clamp(20px, 6vw, 88px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--navy);
}

.why-section h2 {
  color: var(--paper);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.why-item {
  min-height: 94px;
  display: flex;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.why-item::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--orange);
}

.contact-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.contact-copy {
  position: sticky;
  top: 110px;
}

.contact-note {
  margin-top: 26px;
  padding: 18px;
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  color: var(--navy);
  background: var(--soft);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 800;
}

.full-field,
.form-status {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 13px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(240, 138, 44, 0.16);
}

.contact-form textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--navy);
  font-weight: 700;
}

.credentials-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 76px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.credentials-intro {
  max-width: 600px;
}

.credentials-intro h2 {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
}

.credentials-intro p:not(.eyebrow) {
  margin: 18px 0 0;
  font-size: 1.02rem;
}

.credentials-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.credential-logo,
.credential-card {
  min-height: 190px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(14, 42, 71, 0.08);
}

.credential-logo {
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.credential-logo img {
  width: min(150px, 100%);
  height: auto;
}

.credential-logo strong {
  max-width: 220px;
  margin-top: 18px;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.35;
}

.credential-card {
  padding: 24px;
}

.credential-card span {
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.credential-card h3 {
  margin-top: 14px;
  font-size: 1.5rem;
}

.credential-card p {
  margin: 12px 0 0;
  font-size: 0.96rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.site-footer img {
  width: 150px;
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
}

.footer-contact {
  display: grid;
  gap: 8px;
  text-align: right;
}

.footer-contact a {
  color: var(--orange);
  font-weight: 800;
}

.footer-contact a[href^="tel"],
.footer-contact a[href^="mailto"] {
  color: var(--navy);
}

.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 999px;
  color: var(--paper);
  background: #24c063;
  box-shadow: 0 14px 34px rgba(36, 192, 99, 0.34);
  font-weight: 800;
  transition: transform 180ms ease, filter 180ms ease;
}

.floating-whatsapp:hover {
  filter: brightness(0.96);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 18, 30, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox figure {
  width: min(1020px, 100%);
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  transform: translateY(12px) scale(0.98);
  transition: transform 220ms ease;
}

.lightbox.is-open figure {
  transform: translateY(0) scale(1);
}

.lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
  background: var(--navy);
}

.lightbox figcaption {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.lightbox figcaption:empty,
.lightbox figcaption.is-empty {
  display: none;
}

.lightbox figcaption strong {
  color: var(--navy);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: 86vh;
    padding-top: 140px;
    background:
      linear-gradient(180deg, rgba(14, 42, 71, 0.94), rgba(14, 42, 71, 0.74)),
      url("assets/proyectos/proyecto-01.jpg") center / cover;
  }

  .hero h1 {
    max-width: 640px;
    font-size: clamp(2.6rem, 8vw, 4.4rem);
  }

  .trust-strip,
  .services-grid,
  .gallery-grid,
  .process-grid,
  .why-section,
  .contact-section,
  .credentials-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    gap: 28px;
    margin-top: 42px;
  }

  .process-grid::before {
    display: none;
  }

  .why-section,
  .contact-section {
    gap: 34px;
  }

  .contact-copy {
    position: static;
  }

  .gallery-item {
    height: 280px;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 78px;
    padding: 10px 16px;
  }

  .brand img {
    width: 150px;
  }

  .header-cta {
    min-width: auto;
    padding: 10px 14px;
  }

  .hero {
    min-height: 90vh;
    padding: 126px 20px 58px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 13vw, 3.4rem);
  }

  .hero-actions,
  .hero-actions .btn {
    width: 100%;
  }

  .section,
  .why-section,
  .credentials-section {
    padding: 72px 20px;
  }

  .trust-strip {
    width: calc(100% - 28px);
    margin-top: -26px;
  }

  .trust-item {
    min-height: 102px;
    padding: 20px;
  }

  .service-card {
    min-height: auto;
  }

  .why-list,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    padding: 36px 20px 92px;
  }

  .footer-contact {
    text-align: left;
  }

  .floating-whatsapp {
    right: 14px;
    bottom: 14px;
  }
}
