:root {
  --bg: #101318;
  --bg-alt: #13171e;
  --surface: #171c24;
  --surface-2: #1c222b;
  --line: #24354d;
  --line-strong: #2f5a99;
  --blue: #2f80ff;
  --blue-soft: #5aa9ff;
  --text: #e7ecf3;
  --muted: #94a3b8;
  --radius: 16px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Montserrat", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 19, 24, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: auto; height: 34px; }
.wordmark { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.wordmark b { color: var(--blue); font-weight: 800; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav .nav-cta { color: var(--text); border: 1px solid var(--line-strong); margin-left: 6px; }
.nav .nav-cta:hover { background: var(--line); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #4a92ff; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(47,128,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,128,255,.10) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 75% at 70% 40%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--blue-soft); margin-bottom: 18px;
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--blue); vertical-align: middle; margin-right: 12px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; margin-bottom: 22px; }
.accent { color: var(--blue); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 340px; }
.hero-art img { position: relative; width: min(100%, 360px); filter: drop-shadow(0 24px 48px rgba(47,128,255,.28)); }
.rings { position: absolute; inset: 0; margin: auto; width: min(100%, 440px); aspect-ratio: 1; }
.rings::before, .rings::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); opacity: .55;
}
.rings::after { inset: 13%; border-color: var(--line); opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 700px; margin-bottom: 52px; }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin-top: 16px; }

/* Servicios */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.ico { width: 34px; height: 34px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }

/* App */
.app {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 24px; padding: 44px;
  background-image: linear-gradient(135deg, rgba(47,128,255,.08), transparent 45%);
}
.app-title { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-badge {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px;
  background: var(--bg); border: 1px solid var(--line-strong); flex: none;
}
.app-badge svg { width: 30px; height: 30px; fill: none; stroke: var(--blue-soft); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app h3 { font-size: 1.9rem; font-weight: 800; }
.app-kind { color: var(--muted); font-size: .98rem; }
.status {
  display: inline-flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--blue-soft);
  border: 1px solid var(--line-strong); background: rgba(47,128,255,.08); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(47,128,255,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(47,128,255,0); } 100% { box-shadow: 0 0 0 0 rgba(47,128,255,0); } }
.app-copy > p { color: var(--muted); }
.app-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 28px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.app-cols h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.app-cols li { position: relative; padding-left: 22px; color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
.app-cols li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 6px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg) scale(.9);
}

.store-links { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: flex; flex-direction: column; line-height: 1.25; text-decoration: none;
  padding: 10px 20px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); min-width: 156px;
  transition: border-color .2s, transform .2s;
}
.store small { font-size: .7rem; color: var(--muted); }
.store strong { font-family: var(--font-head); font-size: 1rem; }
a.store:not(.is-off):hover { border-color: var(--blue); transform: translateY(-2px); }
.store.is-off { opacity: .55; cursor: not-allowed; position: relative; }
.store.is-off::after {
  content: "Próximamente"; position: absolute; top: -9px; right: 10px; font-size: .62rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); color: var(--blue-soft);
  border: 1px solid var(--line-strong); padding: 1px 8px; border-radius: 999px;
}

.more { text-align: center; color: var(--muted); margin-top: 32px; }

/* Móvil ilustrado */
.phone-wrap { display: grid; place-items: center; }
.phone {
  width: 250px; border-radius: 38px; padding: 10px; background: #0b0e12; border: 1px solid var(--line-strong);
  box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 60px rgba(47,128,255,.16);
}
.phone-notch { width: 84px; height: 20px; background: #0b0e12; border-radius: 0 0 14px 14px; margin: 0 auto -20px; position: relative; z-index: 2; }
.phone-screen { background: var(--bg); border-radius: 30px; padding: 34px 16px 14px; min-height: 440px; display: flex; flex-direction: column; gap: 10px; }
.ph-small { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ph-hello { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; margin-top: -6px; }
.ph-card {
  position: relative; border-radius: 18px; padding: 16px; color: #fff; overflow: hidden;
  background: linear-gradient(140deg, #2f80ff, #1747a8);
}
.ph-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.ph-level { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.ph-points { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; margin: 6px 0 12px; }
.ph-points small { font-size: .7rem; font-weight: 500; margin-left: 6px; opacity: .8; }
.ph-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); }
.ph-bar i { display: block; height: 100%; width: 72%; border-radius: 3px; background: #fff; }
.ph-row {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font-size: .75rem;
}
.ph-row span:nth-child(2) { flex: 1; }
.ph-row b { color: var(--blue-soft); font-weight: 600; }
.ph-dot { width: 22px; height: 22px; border-radius: 7px; background: rgba(47,128,255,.2); border: 1px solid var(--line-strong); flex: none; }
.ph-dot.alt { background: rgba(90,169,255,.12); }
.ph-nav { display: flex; justify-content: space-around; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.ph-nav i { width: 18px; height: 18px; border-radius: 6px; background: var(--line); }
.ph-nav i.on { background: var(--blue); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.contact-actions[hidden], .contact-soon[hidden] { display: none; }
.contact-soon { color: var(--muted); margin-bottom: 20px; }
.domains { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.domains li { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 16px; background: var(--bg); }
.domains strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--blue-soft); }
.domains small { color: var(--muted); font-size: .8rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: .9rem; }
.site-footer .brand img { height: 28px; }
.site-footer .wordmark { font-size: 1.15rem; }

/* Revelado al scroll (solo si hay JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2) { transition-delay: .08s; }
.js .cards .reveal:nth-child(3) { transition-delay: .16s; }
.js .cards .reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .app { grid-template-columns: 1fr; padding: 32px 26px; }
  .phone-wrap { order: -1; }
  .phone { width: 230px; }
  .phone-screen { min-height: 400px; }
}

@media (max-width: 800px) {
  .hero { padding: 44px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; min-height: 240px; }
  .hero-art img { width: min(60%, 240px); }
  .rings { width: min(70%, 300px); }
  .section { padding: 68px 0; }
  .contact { grid-template-columns: 1fr; gap: 28px; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 18px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .app-cols { grid-template-columns: 1fr; gap: 20px; }
  .app { border-radius: 20px; padding: 26px 20px; }
  .store { flex: 1 1 100%; }
  .domains { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}
