/* =============================================================
   CMAS INGENIEROS — styles.css
   Archetype: Industrial Dark Premium (Mouse-Reactive Gradient)
   ============================================================= */

/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  /* Brand */
  --green:        #009640;
  --green-dark:   #063120;
  --green-light:  #7CB453;
  --dark:         #1a261f;

  /* Backgrounds — verde-carbón cálido, aclarado (menos negro, más amigable) */
  --bg:           #1d2a22;
  --bg-2:         #23312a;
  --bg-3:         #2c3a32;
  --bg-card:      rgba(255,255,255,0.05);
  --bg-card-h:    rgba(255,255,255,0.09);

  /* Text */
  --text:         #FFFFFF;
  --text-soft:    rgba(255,255,255,0.70);
  --text-mute:    rgba(255,255,255,0.38);

  /* Accent */
  --accent:       #009640;
  --accent-glow:  rgba(0,150,64,0.28);
  --accent-glow2: rgba(0,150,64,0.12);

  /* UI */
  --line:         rgba(255,255,255,0.10);
  --line-green:   rgba(0,150,64,0.28);
  --radius:       12px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  /* Typography */
  --display:      'Space Grotesk', sans-serif;
  --sans:         'Inter', sans-serif;

  /* Easings */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:      cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --nav-h:        96px;
  --section-pad:  clamp(80px, 10vw, 140px);
  --container:    min(1320px, 100% - 3rem);
  --gutter:       clamp(1rem, 4vw, 2rem);

  /* Mouse position (set by JS) */
  --mx: 30%;
  --my: 50%;
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.025em; }
ul { list-style: none; }

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. UTILITIES
   ============================================================= */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  padding: .6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  z-index: 9999;
  border-radius: var(--radius);
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.container {
  width: var(--container);
  margin-inline: auto;
}

.text-green { color: var(--green); }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.2rem;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--green);
  flex-shrink: 0;
}
.section-eyebrow.light { color: var(--green-light); }
.section-eyebrow.light::before { background: var(--green-light); }

.section-header {
  text-align: center;
  max-width: 660px;
  margin-inline: auto;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 520px;
  margin-inline: auto;
  line-height: 1.7;
}

/* =============================================================
   4. BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: -.01em;
  border-radius: var(--radius);
  padding: .7rem 1.5rem;
  transition:
    background 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn-lg {
  font-size: 1rem;
  padding: .9rem 2rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-primary:hover {
  background: #00b34f;
  border-color: #00b34f;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,150,64,.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--line);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

/* =============================================================
   5. NAVIGATION
   ============================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  height: var(--nav-h);
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(5, 28, 18, 0.96);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  box-shadow:
    0 1px 0 rgba(0,150,64,0.25),
    0 4px 24px rgba(0,0,0,0.35);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  width: var(--container);
  margin-inline: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: auto;
  padding: .5rem .9rem;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.nav-logo-img {
  height: 64px;
  width: auto;
  display: block;
  transition: opacity 0.25s var(--ease-out);
  /* Si el logo se ve oscuro contra el fondo verde, usa este filtro: */
  /* filter: brightness(0) invert(1); */
}
.nav-logo:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}
.nav-logo:hover .nav-logo-img {
  opacity: 0.92;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-cta { font-size: .85rem; padding: .55rem 1.25rem; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(12,12,12,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
}
.nav-mobile-link {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: -.03em;
  text-transform: uppercase;
  transition: color 0.2s, transform 0.2s;
}
.nav-mobile-link:hover {
  color: var(--green);
  transform: translateX(8px);
}
.nav-mobile-cta { margin-top: 1rem; }

/* =============================================================
   6. HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  background-color: #17231b;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(6,49,32,0.70) 0%,
    rgba(23,35,27,0.52) 50%,
    rgba(29,42,34,0.78) 100%
  );
}

.hero-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle 900px at var(--mx, 30%) var(--my, 50%),
      rgba(0,150,64,0.18) 0%, transparent 55%),
    radial-gradient(circle 600px at 75% 25%,
      rgba(6,49,32,0.35) 0%, transparent 50%),
    radial-gradient(circle 500px at 20% 80%,
      rgba(0,150,64,0.08) 0%, transparent 50%);
  filter: blur(60px);
  will-change: transform;
  animation: meshDrift 18s ease-in-out infinite;
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem var(--gutter);
  max-width: 960px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50px;
  padding: .4rem 1rem;
  margin-bottom: 2rem;
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.5vw, 7rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* GSAP line-reveal containers */
.hero-line-wrap {
  display: block;
  overflow: hidden;
  line-height: 1.08;
}
.hero-line {
  display: block;
}
.hero-line-wrap--accent .hero-line {
  color: var(--green);
  text-shadow: 0 0 80px rgba(0,150,64,.45);
}

/* Fallback — if GSAP never loads, hero content is visible */
.hero-title .hero-line { opacity: 1; transform: none; }

.hero-title-accent {
  color: var(--green);
  text-shadow: 0 0 80px rgba(0,150,64,.45);
  display: block;
}

.hero-sub {
  font-size: clamp(.95rem, 1.6vw, 1.15rem);
  color: var(--text-soft);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .1rem;
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: .3rem;
}
.stat-plus {
  font-size: .6em;
  color: var(--green);
}
.hero-stat-label {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--line);
}

/* =============================================================
   7. CLIENTS
   ============================================================= */
.clients {
  padding-block: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.clients-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}
.marquee-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}
.marquee:hover .marquee-inner {
  animation-play-state: paused;
}

.logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 210px;
  padding: 1rem 1.6rem;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  opacity: 0.96;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.logo-item:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,150,64,0.28);
}
/* Real <img> logos: a color, centrados en el chip blanco. */
.logo-item img {
  height: auto;
  width: auto;
  max-height: 62px;
  max-width: 100%;
  object-fit: contain;
}

/* Placeholder logo text */
.logo-ph {
  font-family: var(--display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  white-space: nowrap;
  transition: color 0.3s;
}
.logo-item:hover .logo-ph { color: rgba(255,255,255,0.6); }

/* =============================================================
   8. SERVICES
   ============================================================= */
.services {
  padding-block: var(--section-pad);
  background: var(--bg-2);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    border-color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    background 0.4s var(--ease-out);
  cursor: default;
}
/* Green accent bar slides in from left on hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--green-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
  z-index: 1;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  border-color: rgba(0,150,64,0.35);
  transform: translateY(-5px);
  background: rgba(255,255,255,0.08);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(0,150,64,0.1),
    0 0 60px rgba(0,150,64,0.08);
}

/* Service number badge */
.service-num {
  display: block;
  font-family: var(--display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--green);
  opacity: 0.7;
  margin-bottom: .8rem;
}

/* Service image slider */
.service-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}
.service-slider {
  position: relative;
  width: 100%;
  height: 100%;
}
.service-slide {
  position: absolute;
  inset: 0;
  background: var(--slide-img, linear-gradient(135deg, #063120 0%, #0d2e18 100%));
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}
.service-slide.active { opacity: 1; }
.service-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
}

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .4rem;
  z-index: 2;
}
.slider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.slider-dot.active {
  background: var(--green);
  transform: scale(1.4);
}

/* Service body */
.service-body {
  padding: 1.4rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.service-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,150,64,0.12);
  border: 1px solid rgba(0,150,64,0.2);
  border-radius: 10px;
  color: var(--green);
  margin-bottom: 1rem;
  transition: background 0.3s, border-color 0.3s;
}
.service-card:hover .service-icon {
  background: rgba(0,150,64,0.2);
  border-color: rgba(0,150,64,0.4);
}
.service-name {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .6rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.service-desc {
  font-size: .875rem;
  color: var(--text-soft);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.2rem;
}
.service-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--green);
  transition: gap 0.2s var(--ease-out), color 0.2s;
  margin-top: auto;
}
.service-cta:hover {
  gap: .7rem;
  color: var(--green-light);
}

/* =============================================================
   9. PROJECTS
   ============================================================= */
.projects {
  padding-block: var(--section-pad);
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.project-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3);
}
/* Alturas variadas para que el grid no sea monótono */
.project-item:nth-child(1) { aspect-ratio: 4/3; }
.project-item:nth-child(2) { aspect-ratio: 3/4; }
.project-item:nth-child(3) { aspect-ratio: 4/3; }
.project-item:nth-child(4) { aspect-ratio: 3/4; }
.project-item:nth-child(5) { aspect-ratio: 4/3; }
.project-item:nth-child(6) { aspect-ratio: 3/4; }

.project-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--project-img, linear-gradient(135deg, #0a2018 0%, #063120 100%));
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out);
}
.project-item:hover::before { transform: scale(1.06); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.project-item:hover .project-overlay { opacity: 1; }

.project-cat {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: .4rem;
}
.project-name {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: .8rem;
}
.project-link {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.project-link:hover { color: var(--green-light); }

.projects-cta {
  text-align: center;
}

/* =============================================================
   10. PROMISE
   ============================================================= */
.promise {
  position: relative;
  padding-block: var(--section-pad);
  overflow: hidden;
  background: #17231b;
}

.promise-bg {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(0,150,64,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 50%, rgba(6,49,32,0.3) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}

.promise .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.promise-title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 7.5vw, 8rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -.04em;
  color: var(--text);
  margin-bottom: clamp(48px, 6vw, 80px);
  text-wrap: balance;
}
.promise-accent {
  color: var(--green);
  text-shadow: 0 0 120px rgba(0,150,64,.35);
}

.promise-intro {
  max-width: 680px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.promise-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin-inline: auto;
}
.promise-pillar {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: left;
  transition: border-color 0.3s, background 0.3s;
}
.promise-pillar:hover {
  border-color: var(--line-green);
  background: rgba(0,150,64,0.05);
}
.pillar-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,150,64,0.12);
  border-radius: 12px;
  color: var(--green);
  margin-bottom: 1.2rem;
}
.pillar-title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .6rem;
  letter-spacing: -.02em;
}
.pillar-desc {
  font-size: .875rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* =============================================================
   11. CONTACT
   ============================================================= */
.contact {
  padding-block: var(--section-pad);
  background: var(--bg-2);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-bottom: 3rem;
}

.contact-title {
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.2rem;
}
.contact-sub {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition:
    border-color 0.35s var(--ease-out),
    background 0.35s var(--ease-out),
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}
.contact-card:hover {
  transform: translateX(6px);
  border-color: var(--line-green);
  background: rgba(0,150,64,0.05);
}
.contact-card-wa {
  border-color: rgba(37,211,102,0.2);
}
.contact-card-wa:hover {
  border-color: rgba(37,211,102,0.5);
  background: rgba(37,211,102,0.06);
  box-shadow: 0 0 40px rgba(37,211,102,0.08);
}
.contact-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,150,64,0.12);
  border-radius: 12px;
  color: var(--green);
}
.contact-card-wa .contact-card-icon {
  background: rgba(37,211,102,0.12);
  color: #25D366;
}
.contact-card-content {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
  min-width: 0;
}
.contact-card-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.contact-card-value {
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-card-sub {
  font-size: .75rem;
  color: var(--text-mute);
}
.contact-card-arrow {
  font-size: 1.2rem;
  color: var(--text-mute);
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.contact-card:hover .contact-card-arrow {
  color: var(--green);
  transform: translateX(4px);
}

.contact-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.contact-meta-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-mute);
}
.contact-meta-item svg { color: var(--green); }

/* =============================================================
   12. FOOTER
   ============================================================= */
.footer {
  padding-block: 3rem 2rem;
  background: #17231b;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.footer-logo-img {
  height: 42px;
  width: auto;
  display: block;
  transition: opacity 0.25s var(--ease-out);
}
.footer-logo:hover .footer-logo-img { opacity: 0.85; }

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-link {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-mute);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--text); }
.footer-link-wa:hover { color: #25D366; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: .75rem;
  color: var(--text-mute);
}
.footer-tagline {
  font-size: .75rem;
  font-style: italic;
  color: var(--text-mute);
}

/* =============================================================
   13. FLOATING WHATSAPP
   ============================================================= */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #25D366;
  color: #fff;
  border-radius: 50px;
  padding: .75rem 1.2rem .75rem .9rem;
  box-shadow: 0 8px 32px rgba(37,211,102,.35);
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    box-shadow 0.3s;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 700;
}
.wa-float.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.wa-float:hover {
  box-shadow: 0 12px 48px rgba(37,211,102,.5);
  transform: translateY(-2px) scale(1.02);
}
.wa-float-label { white-space: nowrap; }

/* =============================================================
   14. CUSTOM CURSOR
   ============================================================= */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px;
  background: #fff;
  border-radius: 50%;
}
.cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  transition:
    width .35s var(--ease-out),
    height .35s var(--ease-out),
    margin .35s var(--ease-out),
    border-color .2s;
}
.cursor.is-hover .cursor-ring {
  width: 46px;
  height: 46px;
  margin: -23px;
  border-color: var(--green);
}
.has-cursor,
.has-cursor a,
.has-cursor button { cursor: none; }

/* =============================================================
   15. CONTACTO + FORMULARIO (layout combinado)
   ============================================================= */

/* Anchor invisible para el id="formulario" dentro de la sección */
.section-anchor {
  display: block;
  position: relative;
  top: calc(-1 * var(--nav-h) - 1rem);
  pointer-events: none;
}

.cf-section {
  padding-block: var(--section-pad);
  background: var(--bg-2);
  position: relative;
}

/* Grid: info izquierda | formulario derecha */
.cf-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Columna izquierda */
.cf-info {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.cf-info-sub {
  font-size: .97rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 2rem;
}
.cf-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.cf-meta {
  flex-direction: column;
  gap: .75rem;
}

/* Columna derecha: el form-wrapper llena la columna */
.cf-form-col .form-wrapper {
  max-width: none;
  margin-inline: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3rem);
}

.quote-form { display: flex; flex-direction: column; gap: 1.5rem; }

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.form-label {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-soft);
}
.form-label span { color: var(--green); }

.form-input {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: .8rem 1.1rem;
  outline: none;
  width: 100%;
  transition:
    border-color 0.25s var(--ease-out),
    background  0.25s var(--ease-out),
    box-shadow  0.25s var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--text-mute); }
.form-input:hover { border-color: rgba(255,255,255,0.22); }
.form-input:focus {
  border-color: var(--green);
  background: rgba(0,150,64,0.06);
  box-shadow: 0 0 0 3px rgba(0,150,64,0.18);
}
.form-input.is-invalid {
  border-color: #e05b5b;
  box-shadow: 0 0 0 3px rgba(224,91,91,0.15);
}

/* Textarea */
.form-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.65;
}

/* Select wrapper */
.form-select-wrap {
  position: relative;
}
.form-select {
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-select option { background: #2c3a32; color: var(--text); }
.form-select-arrow {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  pointer-events: none;
  transition: color 0.2s;
}
.form-select-wrap:focus-within .form-select-arrow { color: var(--green); }

/* Validation error text */
.form-error {
  font-size: .78rem;
  color: #e05b5b;
  min-height: 1em;
}

/* Honeypot: absolutely hidden */
.form-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Google reCAPTCHA */
.captcha-wrap {
  min-height: 78px;
  margin-top: .25rem;
}
.captcha-error {
  display: block;
  margin-top: .45rem;
  font-size: .78rem;
  color: #e05b5b;
}
.captcha-error[hidden] { display: none !important; }

/* Form footer row */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

.form-privacy {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-mute);
}
.form-privacy svg { flex-shrink: 0; color: var(--green); opacity: 0.7; }

.form-submit { min-width: 200px; justify-content: center; }
.form-submit-loading { display: none; align-items: center; gap: .5rem; }
.form-submit.is-loading .form-submit-text { display: none; }
.form-submit.is-loading .form-submit-loading { display: flex; }
.form-submit:disabled { opacity: 0.7; pointer-events: none; }

/* Spinner animation */
@keyframes spin { to { transform: rotate(360deg); } }
.form-spinner { animation: spin 0.8s linear infinite; transform-origin: center; }

/* El atributo hidden DEBE ganar sobre display:flex (si no, los mensajes
   de éxito/error se ven siempre desde que carga la página). */
.form-success[hidden],
.form-send-error[hidden] { display: none !important; }

/* Success state */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1rem;
  gap: .75rem;
}
.form-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0,150,64,0.12);
  border: 1.5px solid rgba(0,150,64,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.form-success-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.form-success-msg {
  font-size: .95rem;
  color: var(--text-soft);
  max-width: 380px;
  line-height: 1.65;
}

/* Send error */
.form-send-error {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  color: #e05b5b;
  background: rgba(224,91,91,0.08);
  border: 1px solid rgba(224,91,91,0.22);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-top: .5rem;
}
.form-send-error a { color: var(--green-light); text-decoration: underline; }
