/* =====================================================================
   SRETECH — Soluciones Energía Renovable
   Sitio inspirado en la página de Palantir Gotham (estructura y efectos).
   Tema único (oscuro), pintado explícitamente.
   ===================================================================== */

:root {
  color-scheme: dark;

  /* Paleta */
  --ink: #0b0d10;          /* fondo principal (negro con sesgo azul) */
  --panel: #1e2124;        /* paneles / footer / menú (gris Gotham) */
  --light: #d8d8d8;        /* texto base */
  --white: #f6f6f6;        /* títulos */
  --grey: #b4b4b4;         /* texto secundario */
  --grey-muted: #7f868f;   /* etiquetas apagadas */
  --line: rgba(216, 216, 216, 0.18);
  --sun: #d5e021;          /* ÚNICO acento: el lima del logo */
  --olive: #55631a;        /* el mismo lima, oscurecido, para texto sobre fondo claro */

  /* Los dos únicos fondos: oscuro y claro */
  --bone: #eaece7;         /* claro, con un leve sesgo verde hacia el acento */
  --bone-ink: #14171a;     /* texto sobre el fondo claro */
  --panel-dark: #15181c;   /* tarjetas sobre fondo oscuro */

  /* Placeholders morados */
  --ph-a: #2f1259;
  --ph-b: #4a1e8c;
  --ph-text: #d9cdf2;

  /* Intro */
  --intro-bg: var(--bone);
  --intro-letter: #b9b9b9;

  /* Tipografía */
  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Layout */
  --gutter: clamp(20px, 4vw, 60px);
  --header-h: 68px;
  --header-top: 14px;
  --max: 1170px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--light);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }

:focus-visible { outline: 1px solid var(--sun); outline-offset: 3px; }

/* Etiquetas técnicas (mono, mayúsculas) */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
}
.label--sun { color: var(--sun); }
.label--muted { color: var(--grey-muted); }

/* ---------------------------------------------------------------------
   Keyframes (equivalentes a los de Gotham)
   --------------------------------------------------------------------- */
@keyframes gothamFlicker {
  0% { opacity: 1 } 14% { opacity: 1 } 15% { opacity: 0 } 29% { opacity: 0 }
  30% { opacity: 1 } 44% { opacity: 1 } 45% { opacity: 0 } 59% { opacity: 0 }
  60% { opacity: 1 } 74% { opacity: 1 } 75% { opacity: 0 } 89% { opacity: 0 }
  90% { opacity: 1 } 100% { opacity: 1 }
}
@keyframes flickerTemp {
  0% { opacity: 1 } 2% { opacity: 1 } 3% { opacity: .1 } 5% { opacity: .1 } 6% { opacity: 1 }
  8% { opacity: 1 } 9% { opacity: .1 } 11% { opacity: .1 } 12% { opacity: 1 }
  15% { opacity: .1 } 17% { opacity: .1 } 18% { opacity: 1 } 100% { opacity: 1 }
}
@keyframes popUp { to { clip-path: inset(0); transform: translateY(0); } }
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: translateY(0) } }
@keyframes heroReveal { 0% { clip-path: inset(0 0 100% 0) } to { clip-path: inset(0 0 0 0) } }
@keyframes arrowBounce { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(16px) } }
@keyframes glitch {
  0%, 10%, 20%, 40%, 50%, 60%, 80%, 90%, 100% { transform: translate3d(0,0,0) }
  30% { transform: translate3d(-50px,0,0) }
  70% { transform: translate3d(100px,0,0) }
}
@keyframes shimmer { 0% { background-position: -200px 0 } to { background-position: calc(200px + 100%) 0 } }
@keyframes wipeSweep {
  0%   { transform: translateX(-110%) rotate(28deg) }
  100% { transform: translateX(110%) rotate(28deg) }
}
@keyframes markFlash { 0% { opacity: 0 } 35% { opacity: 1 } 65% { opacity: 1 } 100% { opacity: 0 } }
@keyframes coverFade { to { opacity: 0 } }
@keyframes scan { 0% { transform: translateY(-100%) } 100% { transform: translateY(100vh) } }
@keyframes slideUp { 0% { transform: translateY(100%) } to { transform: translateY(0) } }

/* ---------------------------------------------------------------------
   Placeholder morado (imagen / video pendiente)
   --------------------------------------------------------------------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  overflow: hidden;
  color: var(--ph-text);
  text-align: center;
  background: linear-gradient(135deg, var(--ph-a) 0%, var(--ph-b) 55%, #6d28d9 100%);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 2px, transparent 2px 24px);
}
.ph::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 18%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.10), transparent);
  animation: scan 6s linear infinite;
  pointer-events: none;
}
.ph__frame {
  position: absolute;
  inset: 16px;
  opacity: .55;
  background:
    linear-gradient(#fff,#fff) top left/18px 1px no-repeat,
    linear-gradient(#fff,#fff) top left/1px 18px no-repeat,
    linear-gradient(#fff,#fff) top right/18px 1px no-repeat,
    linear-gradient(#fff,#fff) top right/1px 18px no-repeat,
    linear-gradient(#fff,#fff) bottom left/18px 1px no-repeat,
    linear-gradient(#fff,#fff) bottom left/1px 18px no-repeat,
    linear-gradient(#fff,#fff) bottom right/18px 1px no-repeat,
    linear-gradient(#fff,#fff) bottom right/1px 18px no-repeat;
}
.ph__tag {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px 22px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(20, 8, 50, .45);
  backdrop-filter: blur(4px);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  max-width: 88%;
}
.ph__id { font-size: 22px; letter-spacing: .12em; color: #fff; }
.ph__name { font-size: 12px; }
.ph__spec { font-size: 10px; opacity: .75; }
.ph--sm .ph__tag { padding: 10px 12px; gap: 3px; }
.ph--sm .ph__id { font-size: 14px; }
.ph--sm .ph__name { font-size: 9px; }
.ph--sm .ph__spec { font-size: 8px; }
.ph--sm .ph__frame { inset: 8px; }
.ph--hero .ph__tag { position: absolute; right: 7%; top: 44%; transform: translateY(-50%); }
@media (max-width: 900px) { .ph--hero .ph__tag { right: auto; left: 50%; top: 34%; transform: translate(-50%, -50%); } }

/* ---------------------------------------------------------------------
   Wipe de carga (transición de página de Gotham)
   --------------------------------------------------------------------- */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 925;
  pointer-events: none;
  overflow: hidden;
}
.wipe__cover {
  position: absolute;
  inset: 0;
  background: var(--intro-bg);
  z-index: 915;
}
.wipe__shape {
  position: absolute;
  top: -50vh;
  left: -50vw;
  width: 200vw;
  height: 200vh;
  min-height: 55.5rem;
  background: #767676;
  transform: translateX(-110%) rotate(28deg);
  transform-origin: 50% -150%;
  z-index: 925;
}
.wipe__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(220px, 50vw);
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 950;
}
.is-loaded .wipe__cover { animation: coverFade .5s var(--ease) .55s forwards; }
.is-loaded .wipe__shape { animation: wipeSweep 1.35s var(--ease) forwards; }
.is-loaded .wipe__mark  { animation: markFlash 1.35s var(--ease) forwards; }
.is-ready  .wipe { display: none; }

/* ---------------------------------------------------------------------
   Hero intro: “ESTÁS ENTRANDO A” + palabra gigante sobre el video
   (100vh, se va con el scroll como en Gotham)
   --------------------------------------------------------------------- */
.hero-intro-track { position: relative; height: 230vh; }
.hero-intro {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: clip;
  display: grid;
  grid-template-rows: 1fr auto auto;
  grid-template-columns: minmax(0, 1fr);
  padding: calc(var(--header-h) + var(--header-top) + 20px) 40px 36px;
}
.hero-intro__meta {
  grid-row: 2;
  min-width: 0;
  justify-self: end;
  display: flex;
  margin: 0 5% 14px 0;
  color: var(--grey);
}
.hero-intro__meta span {
  display: block;
  max-width: 150px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.5;
}
.hero-intro__meta span:first-child { border-left: 0; }
.hero-intro__word {
  grid-row: 3;
  position: relative;
  min-width: 0;
  margin: 0;
  font-weight: 600;
  line-height: .8;
  letter-spacing: -.045em;
  text-align: center;
  color: var(--light);
}

/* Logotipo: se pulveriza al bajar */
.hero-word {
  display: block;
  /* el ancho útil es la ventana menos el margen del hero; el JS lo afina */
  font-size: calc((100vw - 80px) / 4.79);
  white-space: nowrap;
}
.hero-word .letter { display: inline-block; opacity: 0; }
.hero-word .letter > i { display: inline-block; font-style: normal; }
.is-loaded .hero-word .letter {
  animation: gothamFlicker .55s steps(1, end) forwards;
  animation-delay: calc(1.05s + var(--i) * .11s);
}

/* Frase que ocupa su lugar, con el mismo parpadeo */
.hero-tagline {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc((100vw - 80px) / 18.4);
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--white);
  pointer-events: none;
}
.hero-tagline .letter { display: inline-block; opacity: 0; }
.hero-tagline .sp { display: inline-block; width: .3em; }


/* ---------------------------------------------------------------------
   Header (sticky, mix-blend difference) + subnav
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: var(--header-top);
  z-index: 600;
  /* Flotante: separado de los bordes, con esquinas redondeadas; no ocupa espacio en el flujo */
  margin: var(--header-top) var(--gutter) calc(-1 * (var(--header-h) + var(--header-top)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 12px 0 20px;
  border-radius: 18px;
  color: var(--white);
  background: rgba(11, 13, 16, .52);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(216, 216, 216, .18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
html.is-scrolled .site-header {
  background: rgba(11, 13, 16, .74);
  border-color: rgba(216, 216, 216, .26);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.brand { display: block; line-height: 0; }
.brand img {
  height: 46px;
  width: auto;
  /* El logo original es azul oscuro sobre transparente: se invierte para el fondo negro
     manteniendo aproximadamente los tonos del cuadro degradado. */
  filter: invert(1) hue-rotate(180deg) saturate(1.15);
}
.site-header__actions { display: flex; align-items: center; gap: 12px; }
.site-nav { display: flex; align-items: center; gap: 28px; margin: 0 auto 0 44px; }
.site-nav a {
  position: relative;
  font-size: 14px;
  letter-spacing: .01em;
  color: var(--light);
  text-decoration: none;
  opacity: .82;
  transition: opacity .2s, color .2s;
}
.site-nav a::before {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .3s var(--ease-out-quint);
}
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::before { transform: scaleX(1); transform-origin: left center; }
.site-nav a.is-current { color: var(--sun); opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--sun);
  background: var(--sun);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease-in-out, border-color .25s ease-in-out;
}
.btn:hover, .btn:focus-visible { background: #e4ef3d; border-color: #e4ef3d; color: var(--ink); }
.btn .glyph { display: inline-block; transition: transform .25s ease-in-out; }
.btn:hover .glyph { transform: translateX(5px); }
.btn--cta { height: auto; min-width: 215px; padding: .9em 1.4em; font-size: 16px; }
.btn--alt { background: var(--panel); border-color: rgba(216, 216, 216, .38); color: var(--white); }
.btn--alt:hover, .btn--alt:focus-visible { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--fixed { display: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(216, 216, 216, .38);
  background: var(--panel);
  color: var(--white);
  cursor: pointer;
  transition: background-color .25s ease-in-out, color .25s ease-in-out, border-color .25s ease-in-out;
}
.icon-btn:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .x { display: none; }
.menu-open .icon-btn--menu .burger { display: none; }
.menu-open .icon-btn--menu .x { display: block; }

/* Link con subrayado que crece (button__8zp54) */
.u-link { position: relative; text-decoration: none; }
.u-link::before {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .3s var(--ease-out-quint);
}
.u-link:hover::before { transform: scaleX(1); transform-origin: left center; }

/* ---------------------------------------------------------------------
   Botón flotante de WhatsApp (un solo color, sin el verde de la marca)
   --------------------------------------------------------------------- */
.wa {
  position: fixed;
  right: var(--gutter);
  bottom: 22px;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--sun);
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), gap .3s var(--ease), box-shadow .3s var(--ease);
}
.wa svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.wa__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transition: max-width .35s var(--ease), opacity .25s var(--ease);
}
.wa:hover, .wa:focus-visible {
  gap: 10px;
  background: var(--panel-dark);
  color: var(--white);
  border-color: rgba(216, 216, 216, .3);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
}
.wa:hover .wa__label, .wa:focus-visible .wa__label { max-width: 120px; opacity: 1; }

/* ---------------------------------------------------------------------
   Menú a pantalla completa
   --------------------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 590;
  overflow: auto;
  padding: calc(var(--header-h) + var(--header-top) + 40px) var(--gutter) 60px;
  background: var(--panel);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
}
.menu-open .menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu__grid {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 1.1fr 1fr .9fr;
  gap: 48px;
  max-width: 1600px;
}
.menu h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grey-muted);
}
.menu h2 a { color: var(--light); text-decoration: none; }
.menu__nav a { display: block; padding: 6px 0; font-size: 22px; letter-spacing: -.01em; text-decoration: none; color: var(--white); }
.menu__nav a.sub { padding-left: 22px; font-size: 17px; color: var(--grey); }
.menu__nav a.sub::before { content: "↳ "; color: var(--sun); }
.menu__nav a:hover { color: var(--sun); }
.menu-open .menu__nav a { animation: fadeInUp .6s var(--ease) both; animation-delay: calc(.08s + var(--i, 0) * .04s); }
.news-card { display: grid; gap: 12px; margin-bottom: 32px; text-decoration: none; color: inherit; }
.news-card .ph { aspect-ratio: 3 / 2; min-height: 0; }
.news-card h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.news-card p { font-size: 14px; color: var(--grey); }
.news-card .more { color: var(--sun); font-size: 13px; }
.news-card .more::before { content: "↳ "; }
.menu__text { font-size: 16px; color: var(--grey); line-height: 1.45; }
.menu__text + .more { display: inline-block; margin-top: 18px; color: var(--sun); font-size: 14px; text-decoration: none; }
.menu__text + .more::before { content: "↳ "; }
.menu__quick a { display: block; padding: 5px 0; font-size: 15px; color: var(--light); text-decoration: none; }
.menu__quick a:hover { color: var(--sun); }

/* ---------------------------------------------------------------------
   Hero: video fijo + 4 slides + menú de letras A–D
   --------------------------------------------------------------------- */
.hero-video-frame {
  position: fixed;
  inset: 0;
  z-index: 1;
  transition: opacity .6s var(--ease);
}
.hero-video-frame .ph { min-height: 100%; }
.hero-video-frame video { width: 100%; height: 100%; object-fit: cover; }

.hero {
  position: relative;
  z-index: 5;
  background: rgba(0, 0, 0, .6);
}
.slide {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: calc(var(--header-h) + var(--header-top) + 20px) var(--gutter) 40px;
}
.slide__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.slide__labels { display: flex; flex-wrap: wrap; gap: 28px; color: var(--light); }
.slide__labels .brace { color: var(--sun); }
.slide__labels a { text-decoration: none; }
.slide__bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
}
.slide__title {
  max-width: 12ch;
  font-size: clamp(42px, 8.4vw, 120px);
  line-height: 1.02;
  letter-spacing: -.04em;
  color: var(--white);
}
.slide__title .line { display: block; overflow: hidden; }
.slide__title .line > span {
  display: block;
  transform: translateY(110%);
  transition: transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * .09s);
}
.slide.is-active .slide__title .line > span { transform: translateY(0); }
.slide__sub {
  max-width: 24ch;
  font-size: 20px;
  line-height: 1.2;
  color: var(--grey);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s;
}
.slide.is-active .slide__sub { opacity: 1; transform: none; }
.slide__scroll {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--grey-muted);
}
.slide__scroll svg { width: 14px; height: 14px; animation: arrowBounce 2.2s ease-in-out infinite; }

.letter-menu {
  position: fixed;
  left: 20px;
  top: 50%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translate(-100%, -50%);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  font-size: 20px;
}
.hero-active .letter-menu { opacity: 1; transform: translate(0, -50%); }
.letter-link {
  position: relative;
  display: block;
  width: 24px;
  text-align: center;
  color: var(--light);
  text-decoration: none;
  opacity: .25;
  line-height: 1.4;
  transition: opacity .3s;
}
.letter-link::before, .letter-link::after {
  position: absolute;
  top: 0;
  opacity: 0;
  color: var(--sun);
}
.letter-link::before { content: "["; right: 100%; }
.letter-link::after  { content: "]"; left: 100%; }
.letter-link:hover { opacity: .5; }
.letter-link.is-active { opacity: 1; animation: gothamFlicker .3s; }
.letter-link.is-active::before { opacity: 1; animation: gothamFlicker .4s; }
.letter-link.is-active::after  { opacity: 1; animation: gothamFlicker .45s; }

.hero__side {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 100;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  white-space: nowrap;
  color: var(--grey-muted);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.hero-active .hero__side { opacity: 1; }

/* ---------------------------------------------------------------------
   Todo lo que va después del hero cubre el video fijo
   --------------------------------------------------------------------- */
.after-hero {
  position: relative;
  z-index: 6;
  background: var(--ink);
}

/* ---------------------------------------------------------------------
   Explora: video a sangre con clip-path geométrico (4 etapas)
   --------------------------------------------------------------------- */
.explore { position: relative; height: 260vh; }
.explore__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
}
.explore__sticky::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(11, 13, 16, .94), rgba(11, 13, 16, 0));
}
.shape {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s var(--ease); /* el clip-path lo anima el JS con el scroll */
}
.shape .ph { min-height: 100%; }
.shape video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shape--slide { clip-path: inset(46% 22% 46% 21%); }
.shape--diag  { clip-path: polygon(66% 0, 66% 0, 35% 100%, 35% 100%); }
.explore[data-stage="0"] .shape--slide { opacity: 1; clip-path: inset(10% 22% 38% 21%); }
.explore[data-stage="1"] .shape--diag  { opacity: 1; clip-path: polygon(55% 0, 77% 0, 45% 100%, 25% 100%); }

.explore__card {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--gutter) + 10px);
  z-index: 3;
  max-width: 560px;
  display: grid;
  gap: 22px;
}
.explore__title {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: clamp(30px, 3.2vw, 42px);
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--white);
  text-decoration: none;
}
.explore__title .arrow { display: inline-block; color: var(--sun); transition: transform .3s var(--ease); }
.explore__title:hover .arrow { animation: glitch .7s steps(2, end); }
.explore__card p { font-size: 20px; line-height: 1.25; color: var(--grey); max-width: 44ch; }
.explore__stage {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + 76px);
  z-index: 3;
  display: grid;
  gap: 10px;
  justify-items: end;
  color: var(--grey-muted);
}
.explore__bar { width: 160px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.explore__bar i { position: absolute; left: 0; top: 0; height: 100%; width: 50%; background: var(--sun); transition: transform .8s var(--ease); }
.explore[data-stage="1"] .explore__bar i { transform: translateX(100%); }
.explore__stage .n::before { content: "0"; }

/* ---------------------------------------------------------------------
   Secciones 0.1 / 0.2 / 0.3 (tabSection)
   --------------------------------------------------------------------- */
.tabs { padding-top: 0; }
.tab {
  /* Paleta por sección (cada .tab--* la redefine) */
  --sec-bg: var(--ink);
  --sec-fg: var(--white);
  --sec-body: var(--grey);
  --sec-muted: var(--grey-muted);
  --sec-accent: var(--sun);
  --sec-sun: var(--sun);
  --sec-line: rgba(216, 216, 216, .18);
  --sec-panel: var(--panel);
  --sec-panel-border: rgba(0, 0, 0, .9);
  display: grid;
  grid-template-columns: minmax(auto, 50ch) 1fr;
  gap: 40px;
  align-items: start;
  padding: 70px var(--gutter) 130px;
  background: var(--sec-bg);
  color: var(--sec-fg);
}
.tab--dark { --sec-panel: var(--panel-dark); --sec-panel-border: rgba(216, 216, 216, .14); }
.tab--light {
  --sec-bg: var(--bone);
  --sec-fg: var(--bone-ink);
  --sec-body: #4a5157;
  --sec-muted: #7c848c;
  --sec-accent: var(--olive);
  --sec-sun: var(--sun);
  --sec-line: rgba(20, 23, 26, .2);
  --sec-panel: #fbfbf9;
  --sec-panel-border: rgba(20, 23, 26, .14);
}
.tab__header {
  position: sticky;
  top: -1px;
  padding-top: 106px;
}
.tab__indexes {
  position: relative;
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  overflow: hidden;
}
.idx {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--sec-muted);
  transition: color .4s;
}
.idx > span { display: inline-block; padding-inline: 5px; background: var(--sec-bg); }
.idx:last-child { text-align: right; }
.idx.is-active { flex-grow: 1; color: var(--sec-accent); }
.idx.is-active > span::before { content: "["; }
.idx.is-active > span::after  { content: "]"; }
.tab__divider {
  position: absolute;
  left: 4px; right: 4px;
  top: calc(50% - 1px);
  z-index: 1;
  height: 1px;
  background: var(--sec-line);
  transform: translateX(-100%);
  transition: transform 1.1s var(--ease);
}
.tab.is-active .tab__divider { transform: translateX(0); }
.tab__heading {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.07;
  letter-spacing: -.03em;
  color: var(--sec-fg);
}
.tab__body { display: grid; gap: 0; }
.tab__desc {
  max-width: 720px;
  padding-top: 170px;
  margin-bottom: 70px;
  font-size: 24px;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--sec-body);
}
.tab__desc p + p { margin-top: 40px; }
.tab__toggle { display: flex; gap: 22px; margin-bottom: 18px; }
.tab__toggle button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sec-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .25s;
}
.tab__toggle button::before { content: "[ "; opacity: 0; transition: opacity .25s; }
.tab__toggle button::after  { content: " ]"; opacity: 0; transition: opacity .25s; }
.tab__toggle button:hover { color: var(--sec-fg); }
.tab__toggle button.is-active { color: var(--sec-accent); }
.tab__toggle button.is-active::before, .tab__toggle button.is-active::after { opacity: 1; }
.tab__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--sec-panel-border);
  border-radius: 10px;
  background: var(--sec-panel);
}
.tab__media .ph { position: absolute; inset: 0; min-height: 0; }
.tab__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tab__details {
  position: absolute;
  inset: 0;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 18px 40px;
  margin: 0;
  padding: 40px;
  list-style: none;
  background: var(--sec-panel);
  font-size: 16px;
  color: var(--sec-fg);
}
.tab__details li { padding-left: 22px; text-indent: -22px; }
.tab__details li::before { content: "↳ "; color: var(--sec-accent); }
.tab__details strong { display: block; font-weight: 500; color: var(--sec-fg); text-indent: 0; padding-left: 0; }
.tab[data-view="details"] .tab__details { display: grid; }
.tab[data-view="details"] .ph,
.tab[data-view="details"] .tab__media > img { visibility: hidden; }


/* ---------------------------------------------------------------------
   Animaciones del proceso solar (columna izquierda de cada solución)
   --------------------------------------------------------------------- */
@keyframes sunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes sunSpin { to { transform: rotate(360deg); } }
@keyframes dashFlow { to { stroke-dashoffset: -32; } }
@keyframes lightOn { 0%, 18% { opacity: .12; } 38%, 82% { opacity: 1; } 100% { opacity: .12; } }
@keyframes meterFill { 0% { transform: scaleX(.06); } 55% { transform: scaleX(.92); } 75% { transform: scaleX(.86); } 100% { transform: scaleX(.06); } }

.sol-anim { margin: 44px 0 0; max-width: 440px; }
.sol-anim svg { display: block; width: 100%; height: auto; overflow: visible; }
.sol-anim .ln { fill: none; stroke: var(--sec-body); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.sol-anim .ln--dim { stroke: var(--sec-line); }
.sol-anim .sun { fill: var(--sec-sun); }
.tab--light .sol-anim .sun { stroke: var(--olive); stroke-width: 1; }
.tab--light .sol-anim .light { fill: var(--olive); }
.sol-anim .sun-core { transform-box: fill-box; transform-origin: center; animation: sunPulse 3.2s ease-in-out infinite; }
.sol-anim .sun-rays { stroke: var(--sec-sun); stroke-width: 1.4; animation: sunSpin 48s linear infinite; }
.sol-anim .beam { stroke: var(--sec-accent); stroke-width: 1.2; stroke-dasharray: 3 9; opacity: .75; animation: dashFlow 1.5s linear infinite; }
.sol-anim .flow { stroke: var(--sec-accent); stroke-width: 1.7; stroke-dasharray: 7 9; animation: dashFlow 1s linear infinite; }
.sol-anim .panel { fill: color-mix(in srgb, var(--sec-fg) 16%, transparent); stroke: var(--sec-fg); stroke-width: 1; }
.sol-anim .light { fill: var(--sec-accent); opacity: .12; animation: lightOn 5.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .22s); }
.sol-anim .meter-fill { fill: var(--sec-accent); transform-box: fill-box; transform-origin: left center; animation: meterFill 5s ease-in-out infinite; }
.sol-anim text { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; fill: var(--sec-muted); }
.tab:not(.is-active) .sol-anim * { animation-play-state: paused; }

/* ---------------------------------------------------------------------
   Cita
   --------------------------------------------------------------------- */
.quote {
  padding: 120px max(var(--gutter), calc((100% - var(--max)) / 2)) 140px;
  background: var(--sun);
  color: var(--ink);
}
.quote blockquote {
  margin: 0 0 40px;
  max-width: 24ch;
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--ink);
}
.quote__author { display: grid; gap: 4px; font-size: 16px; }
.quote__author strong { font-weight: 500; color: var(--ink); }
.quote__author span { color: rgba(11, 13, 16, .62); }
.quote__label { margin-top: 60px; text-align: right; }
.quote .label--sun { color: var(--ink); }

/* ---------------------------------------------------------------------
   CTA final
   --------------------------------------------------------------------- */
.cta {
  padding: 130px max(var(--gutter), calc((100% - var(--max)) / 2)) 160px;
  background: var(--ink);
  color: var(--white);
  border-top: 1px solid var(--line);
}
.cta > * + * { margin-top: 54px; }
.cta h3 { font-size: clamp(42px, 6vw, 72px); line-height: 1.05; letter-spacing: -.03em; color: var(--white); }
.cta p { max-width: 48ch; font-size: 22px; line-height: 1.3; color: var(--grey); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.footer {
  padding: 80px var(--gutter) 40px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
}
.footer__brand img { height: 56px; width: auto; filter: invert(1) hue-rotate(180deg) saturate(1.15); }
.footer__brand p { margin-top: 18px; max-width: 30ch; font-size: 14px; color: var(--grey); }
.footer__brand h4 { margin-top: 30px; }
.footer__contact { display: grid; gap: 7px; font-style: normal; font-size: 15px; line-height: 1.35; }
.footer__contact span { color: var(--grey); }
.footer__contact a { color: var(--light); text-decoration: none; width: fit-content; transition: color .2s; }
.footer__contact a:hover { color: var(--sun); }
.footer h4 {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grey-muted);
}
.footer__col a { display: block; padding: 4px 0; font-size: 15px; color: var(--light); text-decoration: none; opacity: .85; transition: opacity .2s, color .2s; }
.footer__col a:hover { opacity: 1; color: var(--sun); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 40px;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--grey-muted);
}
.footer__bottom ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.footer__bottom a { text-decoration: none; color: var(--grey); }
.footer__bottom a:hover { color: var(--sun); }
.footer__locales { display: flex; gap: 14px; }
.footer__locales a.is-active { color: var(--sun); }

/* ---------------------------------------------------------------------
   Reveal genérico (fadeInUp al entrar en pantalla)
   --------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * .1s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .menu__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; --header-top: 10px; }
  .hero-intro-track { height: 210vh; }
  .hero-intro { padding: calc(var(--header-h) + var(--header-top) + 16px) var(--gutter) 88px; }
  .hero-intro__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 0; justify-self: start; margin: 0 0 18px; }
  .hero-intro__meta span { max-width: none; padding: 0 12px 0 0; border-left: 0; }
  .hero-word { font-size: calc((100vw - 2 * var(--gutter)) / 4.79); }
  .hero-tagline { font-size: 8.6vw; white-space: normal; line-height: 1.02; }
  .hero-intro__word { overflow: visible; }
  .hero-tagline .sp { width: .28em; }
  .btn--header { display: none; }
  .site-nav { display: none; }
  .btn--fixed {
    display: inline-flex;
    position: fixed;
    left: var(--gutter);
    bottom: 20px;
    z-index: 600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  }
  .brand img { height: 36px; }
  .slide { padding-top: calc(var(--header-h) + var(--header-top) + 16px); }
  .slide__bottom { grid-template-columns: 1fr; gap: 22px; }
  .slide__title { max-width: none; }
  .slide__scroll { display: none; }
  .letter-menu { left: 8px; font-size: 16px; }
  .hero__side { display: none; }
  .explore { height: 210vh; }
  .explore__card { right: var(--gutter); bottom: 90px; max-width: none; }
  .explore__stage { top: calc(var(--header-h) + var(--header-top) + 18px); bottom: auto; }
  .tab { grid-template-columns: 1fr; gap: 24px; padding: 40px var(--gutter) 90px; }
  .tab__header { position: static; padding-top: 60px; }
  .sol-anim { margin-top: 28px; max-width: 360px; }
  .tab__desc { padding-top: 0; margin-bottom: 40px; font-size: 20px; }
  .tab__details { grid-template-columns: 1fr; padding: 22px; font-size: 14px; gap: 10px; }
  .menu { padding-top: calc(var(--header-h) + var(--header-top) + 24px); }
  .menu__grid { grid-template-columns: 1fr; gap: 36px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; }
  .footer { padding-bottom: 96px; }
  .wa { height: 54px; padding: 0 15px; bottom: 20px; }
  .wa:hover { gap: 0; }
  .wa:hover .wa__label { max-width: 0; opacity: 0; }
  .quote { padding: 80px var(--gutter) 100px; }
  .cta { padding: 90px var(--gutter) 120px; }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .ph__tag { padding: 12px 14px; }
  .ph__id { font-size: 16px; }
  .ph__name { font-size: 10px; }
  .ph__spec { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .hero-word .letter { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .slide__title .line > span { transform: none; }
  .slide__sub { opacity: 1; transform: none; }
}
