/* ============================================================
   Helios web: estilos
   Estética: noche → amanecer → día → atardecer → noche,
   tipografías Fraunces / Space Grotesk / JetBrains Mono,
   basado en el design system de Cloudless Club.
   ============================================================ */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* día (secciones claras) */
  --canvas: 250 249 244;
  --surface: 255 255 255;
  --surface-2: 244 241 234;
  --text-primary: 26 26 24;
  --text-secondary: 94 91 84;
  --border: 224 218 206;

  /* solar */
  --amber: 245 158 11;
  --amber-2: 255 194 75;
  --sunset: 214 98 84;
  --dawn: 120 96 178;
  --night: 11 16 48;

  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.05), 0 10px 30px rgb(93 64 12 / 0.08);
  --shadow-pop: 0 10px 40px rgb(0 0 0 / 0.18);
  --radius: 12px;
  --radius-card: 20px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: rgb(var(--night));
  color: rgb(var(--text-primary));
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: rgb(var(--amber) / 0.25); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
.mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100; padding: 10px 14px;
  background: rgb(var(--night)); color: #fff; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Cielo ── */
#sky {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ── Navegación ── */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgb(var(--night) / 0.35);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.nav-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 1.05rem; }
.nav-logo { color: rgb(var(--amber-2)); filter: drop-shadow(0 0 8px rgb(var(--amber) / 0.6)); }
.nav-links { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav-links a { color: rgb(255 255 255 / 0.78); font-size: 0.92rem; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-btn {
  color: rgb(255 255 255 / 0.85); padding: 6px 10px; border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 8px; transition: all 0.2s;
}
.lang-btn:hover { background: rgb(255 255 255 / 0.12); color: #fff; }

/* ── Botones ── */
.btn {
  display: inline-block; border-radius: 999px; font-weight: 600;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, rgb(var(--amber-2)), rgb(var(--amber)));
  color: #2b1a00; box-shadow: 0 4px 16px rgb(var(--amber) / 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgb(var(--amber) / 0.5); }
.btn-ghost {
  border: 1px solid rgb(255 255 255 / 0.35); color: #fff;
  background: rgb(255 255 255 / 0.06);
}
.btn-ghost:hover { background: rgb(255 255 255 / 0.14); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-small { padding: 8px 16px; font-size: 0.86rem; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(40px, 8vh, 120px) clamp(16px, 4vw, 48px) 60px;
  color: #fff;
}
.hero-inner { max-width: 860px; margin: 0 auto; width: 100%; }
.eyebrow {
  color: rgb(var(--amber-2));
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  background: linear-gradient(100deg, rgb(var(--amber-2)), rgb(var(--sunset)) 70%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgb(var(--amber) / 0.35));
}
.hero-sub {
  margin-top: 22px; max-width: 62ch;
  color: rgb(255 255 255 / 0.85);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(255 255 255 / 0.07);
  color: rgb(255 255 255 / 0.9);
  font-size: 0.75rem;
}

/* ── Hero live ── */
.glass {
  background: rgb(255 255 255 / 0.07);
  border: 1px solid rgb(255 255 255 / 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
}
.hero-live { margin-top: 40px; padding: 20px 22px 22px; }
.hero-live-head {
  display: flex; justify-content: space-between; align-items: center;
  color: rgb(255 255 255 / 0.75); margin-bottom: 6px;
}
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; margin-right: 8px;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
#heroChart { width: 100%; height: 190px; display: block; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 14px;
}
.hero-stat { text-align: center; }
.hero-stat-label { color: rgb(255 255 255 / 0.6); display: block; margin-bottom: 4px; font-size: 0.7rem; }
.hero-stat-value {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600; color: rgb(var(--amber-2));
}

/* ── Ticker ── */
.ticker {
  border-block: 1px solid rgb(0 0 0 / 0.08);
  background: rgb(var(--surface));
  overflow: hidden;
  padding: 10px 0;
}
.ticker-track {
  display: flex; width: max-content;
  animation: marquee 38s linear infinite;
}
.ticker-track span {
  font-family: var(--font-mono); font-size: 0.82rem; color: rgb(var(--text-secondary));
  padding: 0 26px; white-space: nowrap;
}
.ticker-track span b { color: rgb(var(--amber)); font-weight: 600; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Secciones día ── */
.section {
  padding: clamp(64px, 10vh, 120px) clamp(16px, 4vw, 48px);
  background: rgb(var(--canvas));
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.section-sub { margin-top: 14px; color: rgb(var(--text-secondary)); font-size: 1.05rem; }
.section .eyebrow { color: rgb(var(--amber)); }

/* ── Features ── */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.feature-card {
  background: rgb(var(--surface)); border: 1px solid rgb(var(--border));
  border-radius: var(--radius-card); padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgb(93 64 12 / 0.12); }
.feature-icon { font-size: 1.5rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature-card p { color: rgb(var(--text-secondary)); font-size: 0.95rem; }

/* ── Cómo funciona ── */
.how-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-bottom: 28px;
}
.how-step {
  background: rgb(var(--surface)); border: 1px solid rgb(var(--border));
  border-radius: var(--radius-card); padding: 26px;
  box-shadow: var(--shadow-card);
}
.how-num {
  color: rgb(var(--amber)); font-size: 0.8rem; letter-spacing: 0.12em;
  display: block; margin-bottom: 10px;
}
.how-step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.how-step p { color: rgb(var(--text-secondary)); font-size: 0.94rem; }
.thanks-card {
  background: linear-gradient(135deg, rgb(var(--dawn) / 0.10), rgb(var(--amber) / 0.10));
  border: 1px solid rgb(var(--amber) / 0.25);
  padding: 26px 28px;
  color: rgb(var(--text-primary));
}
.thanks-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.thanks-card p { color: rgb(var(--text-secondary)); font-size: 0.95rem; max-width: 70ch; }
.thanks-link { display: inline-block; margin-top: 12px; color: rgb(var(--amber)); }

/* ── Teatro sticky ── */
.theater { position: relative; background: transparent; }
.theater-sticky {
  position: sticky; top: 0;
  height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px clamp(16px, 4vw, 48px) 40px;
  overflow: hidden;
}
.theater-spacer { height: 150vh; }
.theater-stage { max-width: 980px; width: 100%; text-align: center; color: #fff; }
.theater-eyebrow { margin-bottom: 8px; }
.theater-title {
  font-family: var(--font-display); font-weight: 620;
  font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.015em;
}
.theater-sub { color: rgb(255 255 255 / 0.7); margin-top: 8px; }
.theater-widgets {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 36px; text-align: left;
}
.widget { padding: 18px 20px; }
.widget-head {
  display: flex; justify-content: space-between; align-items: center;
  color: rgb(255 255 255 / 0.65); font-size: 0.72rem; margin-bottom: 8px;
}
.widget canvas { width: 100%; display: block; }
.battery-widget { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px; }
.battery-ring { position: relative; }
.ring-bg { fill: none; stroke: rgb(255 255 255 / 0.12); stroke-width: 8; }
.ring-fg {
  fill: none; stroke: rgb(var(--amber-2)); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 314.16; stroke-dashoffset: 62.8;
  transition: stroke-dashoffset 1.2s var(--ease-out);
}
.battery-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: rgb(var(--amber-2));
}
.battery-center small { font-size: 0.9rem; color: rgb(255 255 255 / 0.6); margin-left: 2px; }
.battery-status { color: rgb(255 255 255 / 0.7); font-size: 0.75rem; }
.flow-diagram { width: 100%; height: auto; color: rgb(255 255 255 / 0.8); }
.flow-label { font-size: 9px; fill: rgb(255 255 255 / 0.45); letter-spacing: 0.08em; }
#flowPv, #flowBat, #flowG { fill: none; stroke: rgb(255 255 255 / 0.25); stroke-width: 2; stroke-dasharray: 3 6; }
.flow-particle {
  animation: flowMove 2.6s linear infinite;
}
@keyframes flowMove { to { offset-distance: 100%; } }
.flow-values {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  color: rgb(var(--amber-2)); font-size: 0.8rem; margin-top: 6px; text-align: center;
}
.history-widget { grid-column: 1 / -1; }

/* ── Slider ── */
.slider { max-width: 900px; margin: 0 auto; }
.slider-viewport { overflow: hidden; border-radius: var(--radius-card); box-shadow: var(--shadow-pop); }
.slider-track {
  display: flex; transition: transform 0.5s var(--ease-out);
}
.slide { flex: 0 0 100%; min-width: 100%; }
.slide img { width: 100%; height: auto; cursor: zoom-in; }
.slide figcaption {
  text-align: center; padding: 10px; color: rgb(var(--text-secondary)); font-size: 0.75rem;
  background: rgb(var(--surface));
}
.slider-controls {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 16px;
}
.slider-arrow {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgb(var(--border)); background: rgb(var(--surface));
  font-size: 1rem; transition: all 0.2s; box-shadow: var(--shadow-card);
}
.slider-arrow:hover { background: rgb(var(--amber) / 0.12); border-color: rgb(var(--amber) / 0.5); }
.slider-dots { display: flex; gap: 8px; }
.slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--border)); transition: all 0.3s; }
.slider-dot.active { background: rgb(var(--amber)); width: 22px; border-radius: 4px; }

/* ── FAQ ── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid rgb(var(--border)); background: rgb(var(--surface));
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-mono); color: rgb(var(--amber)); font-size: 1.2rem; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { padding: 0 20px 18px; color: rgb(var(--text-secondary)); font-size: 0.95rem; }

/* ── CTA final ── */
.cta-final { text-align: center; background: rgb(var(--canvas)); }
.cta-title {
  font-family: var(--font-display); font-weight: 620;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin-bottom: 30px;
}
.cta-title em {
  font-style: italic;
  background: linear-gradient(100deg, rgb(var(--amber)), rgb(var(--sunset)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cta-final .hero-cta { justify-content: center; }
.cta-final .btn-ghost { border-color: rgb(0 0 0 / 0.2); color: rgb(var(--text-primary)); background: transparent; }
.cta-final .btn-ghost:hover { background: rgb(var(--amber) / 0.08); }

/* ── Footer ── */
.footer {
  position: relative;
  padding: clamp(70px, 12vh, 130px) clamp(16px, 4vw, 48px) 60px;
  color: #fff;
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-end;
  margin-bottom: 50px;
}
.footer-tagline {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.08;
}
.footer-principles { display: flex; gap: 10px; flex-wrap: wrap; }
.principle {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.25); background: rgb(255 255 255 / 0.07);
  font-size: 0.74rem; color: rgb(255 255 255 / 0.9);
}
.footer-links {
  display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 30px;
}
.footer-links a { color: rgb(255 255 255 / 0.8); transition: color 0.2s; }
.footer-links a:hover { color: rgb(var(--amber-2)); }
.footer-license { color: rgb(255 255 255 / 0.5); font-size: 0.72rem; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgb(0 0 0 / 0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox img { max-width: min(1100px, 96vw); max-height: 90vh; border-radius: 12px; box-shadow: var(--shadow-pop); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; font-size: 2rem;
  color: #fff; width: 44px; height: 44px; border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
}
.lightbox-close:hover { background: rgb(255 255 255 / 0.22); }

/* ── Animaciones de entrada ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hero-stats { grid-template-columns: 1fr; }
  .theater-widgets { grid-template-columns: 1fr; }
  .history-widget { grid-column: auto; }
  .theater-sticky { height: auto; min-height: 100svh; }
  .hero { min-height: auto; padding-top: 90px; }
  #heroChart { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .live-dot { animation: none; }
  .flow-particle { animation: none; }
  html { scroll-behavior: auto; }
}
