/* ==========================================================================
   BatMonitor · landing estática
   Tokens tomados del tema oscuro de la app (Theme.kt):
   background 080808 · surface 151515 · surfaceHigh 202020 · border 2C2C2E
   muted 8E8E93 · neutral D8D8DC · charge (acento) 2EE6A6 · discharge FFB547
   danger FF453A
   ========================================================================== */

:root {
  --bg: #080808;
  --surface: #151515;
  --surface-high: #202020;
  --border: #2c2c2e;
  --muted: #8e8e93;
  --neutral: #d8d8dc;
  --text: #ffffff;
  --accent: #2ee6a6;
  --accent-ink: #06130e;
  --amber: #ffb547;
  --danger: #ff453a;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shell: 1160px;
  --gutter: clamp(20px, 5vw, 40px);

  --ease: cubic-bezier(.2, .7, .3, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-figures: "SF Mono", ui-monospace, "Roboto Mono", Menlo, monospace;
}

/* ---------- Reset mínimo ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; }
h1 { font-size: clamp(2.9rem, 9vw, 5.1rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
h3 { font-size: 1.09rem; letter-spacing: -0.02em; line-height: 1.3; }

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

code {
  font-family: var(--font-figures);
  font-size: 0.86em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(46, 230, 166, 0.1);
  color: var(--accent);
  overflow-wrap: anywhere;
}

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

::selection { background: rgba(46, 230, 166, 0.3); color: #fff; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Iconos ---------- */

.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon--sm { width: 16px; height: 16px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 34px -16px rgba(46, 230, 166, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn--primary:hover { background: #52f0b9; transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0) scale(0.99); }

.btn--large { padding: 17px 30px; font-size: 1.06rem; }
.btn--small { padding: 10px 17px; font-size: 0.92rem; }
.btn--block { display: flex; width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--neutral);
  font-size: 0.94rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 1px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand__name { font-size: 1.03rem; }

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 0.93rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: 8px;
}
.site-nav a { transition: color 0.18s var(--ease); }
.site-nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 9vw, 104px) 0 clamp(56px, 8vw, 92px);
  text-align: center;
  overflow: hidden;
}

/* Halo verde suave tras el logo. */
.hero__glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 780px;
  z-index: -2;
  background:
    radial-gradient(48% 46% at 50% 38%, rgba(46, 230, 166, 0.16), transparent 72%),
    radial-gradient(30% 30% at 78% 12%, rgba(46, 230, 166, 0.07), transparent 70%),
    radial-gradient(34% 34% at 18% 18%, rgba(255, 181, 71, 0.05), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

/* Retícula muy tenue, se desvanece hacia abajo. */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(62% 52% at 50% 32%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(62% 52% at 50% 32%, #000 10%, transparent 78%);
  pointer-events: none;
}

.hero__inner { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border: 1px solid rgba(46, 230, 166, 0.22);
  border-radius: 999px;
  background: rgba(46, 230, 166, 0.06);
  color: var(--accent);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 230, 166, 0.16);
}

.hero__mark {
  width: clamp(104px, 19vw, 158px);
  height: auto;
  margin: clamp(26px, 4vw, 40px) auto 6px;
  display: block;
  filter: drop-shadow(0 18px 44px rgba(46, 230, 166, 0.22));
  animation: hover 7s ease-in-out infinite;
}

@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero h1 {
  margin-top: 4px;
  color: var(--text);
}

/* Degradado en el titular solo si el navegador sabe recortar el fondo al texto;
   así nunca queda un h1 transparente. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: linear-gradient(180deg, #ffffff 30%, #cfd3d8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero__sub {
  max-width: 33ch;
  margin: 16px auto 0;
  color: var(--neutral);
  font-size: clamp(1.02rem, 2.4vw, 1.24rem);
  line-height: 1.5;
  text-wrap: balance;
}
.hero__sub strong { color: var(--text); font-weight: 650; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(46, 230, 166, 0.3);
  border-radius: 999px;
  background: rgba(46, 230, 166, 0.09);
  color: var(--accent);
  font-family: var(--font-figures);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hero__meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 5vw, 54px);
  margin-top: clamp(38px, 6vw, 58px);
  padding-top: clamp(26px, 4vw, 34px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.hero__facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hero__facts strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.hero__facts span {
  color: var(--muted);
  font-size: 0.77rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Secciones ---------- */

.section { padding: clamp(64px, 9vw, 110px) 0; }

.section--alt {
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(46, 230, 166, 0.05), transparent 70%),
    var(--surface);
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(34px, 5vw, 54px);
}

.kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section__lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.08rem);
  text-wrap: pretty;
}

/* ---------- Galería ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 26px);
}

.shot { margin: 0; }

.phone {
  position: relative;
  padding: 7px;
  border-radius: 2.15rem;
  background: linear-gradient(160deg, #2a2a2c, #131313 55%, #232325);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 26px 60px -30px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.phone img {
  width: 100%;
  aspect-ratio: 1344 / 2992;
  object-fit: cover;
  border-radius: 1.6rem;
  background: var(--bg);
}
.phone::after {
  /* Reflejo del cristal. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.1), transparent 38%);
  opacity: 0.5;
  pointer-events: none;
}
.phone--light { background: linear-gradient(160deg, #4a4a4e, #2a2a2c 55%, #3c3c40); }

.shot:hover .phone {
  transform: translateY(-5px);
  box-shadow:
    0 34px 70px -32px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(46, 230, 166, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.shot figcaption {
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.shot figcaption small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 450;
  letter-spacing: 0;
  margin-top: 2px;
}

/* ---------- Funciones ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.feature {
  padding: clamp(22px, 3vw, 28px);
  border-radius: var(--radius-lg);
  background: var(--surface-high);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    background-color 0.25s var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  background: #242424;
  border-color: rgba(46, 230, 166, 0.28);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin-bottom: 18px;
  background: rgba(46, 230, 166, 0.12);
  border: 1px solid rgba(46, 230, 166, 0.22);
  color: var(--accent);
}
.feature__icon svg { width: 24px; height: 24px; }

.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; text-wrap: pretty; }

/* ---------- Actualizaciones ---------- */

.updates {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 24px);
  align-items: start;
}

.updates__card,
.updates__side {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--surface);
  padding: clamp(24px, 3.4vw, 34px);
}

.updates__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.updates__version { font-size: 0.98rem; color: var(--neutral); }
.updates__version strong { color: var(--text); font-weight: 700; }
.updates__code {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--font-figures);
  font-size: 0.82rem;
}

.updates__title {
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.changelog { color: var(--neutral); font-size: 1rem; }
.changelog p { text-wrap: pretty; }
.changelog ul { display: grid; gap: 10px; }
.changelog li {
  position: relative;
  padding-left: 22px;
  text-wrap: pretty;
}
.changelog li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 230, 166, 0.12);
}

.updates__note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
}

.updates__side h3 { margin-bottom: 10px; }
.updates__side p { color: var(--muted); font-size: 0.93rem; margin-bottom: 20px; }
.updates__side .text-link { margin-top: 16px; font-size: 0.88rem; }

/* ---------- Cierre ---------- */

.closing {
  padding: clamp(58px, 8vw, 96px) 0 clamp(70px, 9vw, 108px);
  text-align: center;
  background:
    radial-gradient(50% 70% at 50% 100%, rgba(46, 230, 166, 0.13), transparent 72%),
    var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.closing h2 { text-wrap: balance; }
.closing p { margin-top: 14px; color: var(--muted); font-size: 1.04rem; }
.closing .hero__cta { margin-top: 28px; }

/* ---------- Pie ---------- */

.site-footer {
  padding: clamp(40px, 5vw, 56px) 0 34px;
  background: var(--surface);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer__brand .brand__mark { width: 38px; height: 38px; }
.site-footer__tag { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-high);
  color: var(--neutral);
  font-size: 0.9rem;
  font-weight: 550;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}
.site-footer__links a:hover {
  color: var(--text);
  border-color: rgba(46, 230, 166, 0.4);
  background: #262626;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.79rem;
}

.site-footer__brandlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.site-footer__brandlink:hover {
  text-decoration: underline;
}

.site-footer__brandlink img {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
}

.site-footer__legal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1;
}

.site-footer__brandlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.site-footer__brandlink img {
  vertical-align: middle;
}

/* ---------- Aparición al hacer scroll ---------- */

/* Solo se ocultan si hay JS (documentElement lleva la clase `js`), de modo que
   abrir el HTML sin JavaScript o con el fichero bloqueado deja todo visible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .updates { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .site-nav { display: none; }
  .site-header__inner { height: 62px; }
}

/* Galería en carrusel horizontal: 5 teléfonos no caben con holgura. */
@media (max-width: 860px) {
  .gallery {
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    -webkit-overflow-scrolling: touch;
  }
  .shot {
    flex: 0 0 min(58vw, 232px);
    scroll-snap-align: center;
  }
  .shot figcaption { font-size: 0.88rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__facts { gap: 22px 30px; }
  .hero__facts strong { font-size: 1.3rem; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { width: 100%; }
  .hero__meta { font-size: 0.8rem; }
  .site-footer__legal { font-size: 0.75rem; }
}

/* Pantallas muy estrechas: la cabecera debe caber sin cortar el botón. */
@media (max-width: 400px) {
  .site-header__inner { gap: 10px; }
  .site-header .btn { padding: 9px 14px; font-size: 0.86rem; }
  .site-header .btn .icon { display: none; }
  .brand__name { font-size: 0.96rem; }
  .brand__mark { width: 26px; height: 26px; }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal],
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__mark { animation: none; }
  .shot:hover .phone,
  .feature:hover,
  .btn--primary:hover { transform: none; }
}
