/**
 * Beta Energy — Base & Reset Styles
 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--be-header);
}

body {
  font-family: var(--be-fuente);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--be-tinta);
  background: var(--be-blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--be-transicion);
}

ul, ol {
  list-style: none;
}

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

/* =========================================
   TYPE SCALE
   ========================================= */
h1, h2, h3, h4 {
  color: var(--be-verde-profundo);
  text-wrap: balance;           /* no one-word last lines in titles */
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.25;
}

h4 {
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.3;
}

p {
  max-width: 68ch;
}

/* Overline label */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--be-verde-profundo);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  border-radius: var(--be-radio-full);
  background: var(--be-lima);
  flex-shrink: 0;
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
  max-width: var(--be-ancho);
  margin: 0 auto;
  padding: 0 var(--be-margen);
}

section {
  padding: var(--be-seccion) 0;
  position: relative;
}

.section-head {
  max-width: 720px;
  margin: 0 0 48px;
}

.section-head h2 {
  margin-bottom: 16px;
}

/* =========================================
   DARK SECTIONS
   White titles, lime accents, body text at 80% white.
   ========================================= */
.hero,
.product-hero,
.accessory,
.site-footer {
  color: var(--be-sobre-oscuro);
}

:is(.hero, .product-hero, .accessory, .site-footer) :is(h1, h2, h3, h4) {
  color: var(--be-blanco);
}

:is(.hero, .product-hero, .accessory) .eyebrow {
  color: var(--be-lima);
}

/* =========================================
   ACCESSIBILITY
   ========================================= */
/* Lime fails contrast as an outline on white, so light surfaces use deep green */
:focus-visible {
  outline: 3px solid var(--be-verde-profundo);
  outline-offset: 2px;
}

:is(.hero, .product-hero, .accessory, .site-footer) :focus-visible {
  outline-color: var(--be-lima);
}

/* Motion: one staggered entrance on load, then reveals as blocks scroll into view.
   Keyframes use `translate` so they never fight `transform`s. */
@keyframes riseIn {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.hero-inner, .product-hero-grid > div:first-child) > *,
  .product-photo-card,
  .hero-stats-wrap {
    animation: riseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 90ms);
  }

  :is(.hero-inner, .product-hero-grid > div:first-child) > :nth-child(2) { --i: 1; }
  :is(.hero-inner, .product-hero-grid > div:first-child) > :nth-child(3) { --i: 2; }
  :is(.hero-inner, .product-hero-grid > div:first-child) > :nth-child(4) { --i: 3; }
  .product-photo-card { --i: 3; }
  .hero-stats-wrap { --i: 5; }

  /* Progressive enhancement: browsers without scroll timelines just show the content */
  @supports (animation-timeline: view()) {
    .unit-card,
    .service-card,
    .step-card,
    .variant-card,
    .spec-box,
    .intro-image-wrap,
    .faq-item {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
}
