/* ==============================
   Tokens (tema claro)
============================== */
:root{
  --bg: #f7f8fa;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0b0f19;
  --ring: #dfe3ea;
  --radius: 18px;

  /* Glow */
  --glow-blue-1: rgba(58, 116, 255, .50);
  --glow-blue-2: rgba(58, 116, 255, .35);
  --glow-orange-1: rgba(255, 158, 26, .55);
  --glow-orange-2: rgba(255, 158, 26, .38);
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{
  font-family: system-ui, -apple-system, Segoe UI, Inter, Roboto, Ubuntu, Arial, sans-serif;
  color:var(--text);
  background: var(--bg);
}

/* ==============================
   Layout
============================== */
.page{
  min-height: 100svh;
  display: grid;
  grid-template-rows: 64px 1fr 64px;
}

/* Header */
.site-header{
  display:flex; align-items:center; justify-content:center;
  padding:0 16px;
}
.brand img{ height:40px; width:auto; display:block; }

/* Centro del viewport */
.center{
  display:grid; place-items:center;
  padding: clamp(16px, 4vw, 40px);
}

/* Bloque central tipo “card” minimal */
.hero-block{
  width:min(960px, 92vw);
  background: var(--card);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(20px, 5vw, 48px);
  box-shadow:
    0 8px 20px rgba(12, 18, 28, .04),
    0 1px 0 rgba(12, 18, 28, .04) inset;
  display:grid;
  gap: clamp(16px, 3.2vw, 28px);
  place-items:center;
  padding-bottom: clamp(28px, 6vw, 64px);
}

/* Títulos */
.hero-title{
  text-align:center;
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-title span{ color:#3aff54; }
.hero-subtitle{
  text-align:center;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
}

/* Botones en fila */
.intro-actions{
  gap: 24px;
  margin-top: clamp(20px, 4.5vw, 56px);
}

/* Accesibilidad: texto solo para SR */
.sr-only{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ==============================
   Sprites — Secciones
============================== */
.keycap-btn{
  width: clamp(84px, 12vw, 120px);
  aspect-ratio: 428 / 438;
  display:inline-block;
  background-image: url("/assets/code-boton.png");
  background-repeat:no-repeat;
  background-size:300% 100%;         /* 3 frames */
  background-position:0% 0%;
  border-radius: 16px;
  outline: none;
  transition: transform .06s ease, filter .15s ease;
  filter: drop-shadow(0 8px 16px rgba(17, 24, 39, .08));
}
.keycap-btn:hover{ background-position: 52% 0%; }
.keycap-btn:active{ background-position: 101% 0%; transform: translateY(1px) scale(.996); }
.keycap-btn:focus-visible{
  background-position: 50% 0%;
  box-shadow: 0 0 0 4px rgba(58,116,255,.18), 0 0 0 6px rgba(58,116,255,.35);
}
.keycap-btn.tip::after{
  background: #3a74ff;
  color: #fff;
  box-shadow:
    0 10px 24px rgba(0,0,0,.18),
    0 0 14px rgba(58,116,255,.45);
}
.keycap-toaste.tip::after{
  background: #ff9e1a;
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(0,0,0,.18),
    0 0 14px rgba(255,158,26,.45);
}
/* Sprites — Toast */
.keycap-toaste{
  width: clamp(84px, 12vw, 120px);
  aspect-ratio: 428 / 438;
  display:inline-block;
  background-image: url("/assets/toaste-boton.png");
  background-repeat:no-repeat;
  background-size:300% 100%;
  background-position:0% 0%;
  border-radius: 16px;
  outline: none;
  transition: transform .06s ease, filter .15s ease;
  filter: drop-shadow(0 8px 16px rgba(17, 24, 39, .08));
}
.keycap-toaste:hover{ background-position: 52% 0%; }
.keycap-toaste:active{ background-position: 102% 0%; transform: translateY(1px) scale(.996); }
.keycap-toaste:focus-visible{
  background-position: 50% 0%;
  box-shadow: 0 0 0 4px rgba(255,158,26,.18), 0 0 0 6px rgba(255,158,26,.35);
}

/* Glows en hover/focus (azul / naranja) */
.keycap-btn:hover, .keycap-btn:focus-visible{
  filter:
    drop-shadow(0 8px 16px rgba(17,24,39,.10))
    drop-shadow(0 0 10px var(--glow-blue-1))
    drop-shadow(0 0 22px var(--glow-blue-2));
}
.keycap-toaste:hover, .keycap-toaste:focus-visible{
  filter:
    drop-shadow(0 8px 16px rgba(17,24,39,.10))
    drop-shadow(0 0 10px var(--glow-orange-1))
    drop-shadow(0 0 22px var(--glow-orange-2));
}

/* ==============================
   Tooltip pill
============================== */
.tip{ position:relative }
.tip::after{
  content:"📍 " attr(data-tip);
  position:absolute; left:50%; bottom: calc(100% + 14px);
  transform: translate(-50%, -8px) scale(.96);
  background:#D9FF4B; color:#0b0f19;
  font-weight:700; font-size:13px; line-height:1;
  padding:8px 14px; border-radius:999px;
  box-shadow: 0 8px 18px rgba(17,24,39,.16);
  white-space:nowrap; opacity:0; pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
  bottom: calc(100% + 6px) !important;
  transform: translate(-50%, -4px) scale(.98);
}
.tip::before{ display: none !important; }
.tip:hover::after, .tip:focus-visible::after{ opacity:1; transform: translate(-50%, -2px) scale(1);}
.tip:hover::before, .tip:focus-visible::before{ opacity:1; bottom: calc(100% + 8px); }

/* ==============================
   Footer
============================== */
.site-footer{
  display:flex; align-items:center; justify-content:center;
  border-top: 1px solid var(--ring);
  color: var(--muted);
  font-size: 14px;
}
.site-footer strong{ color: var(--text); }

/* ==============================
   Responsive fino
============================== */
@media (max-width: 560px){
  .page{ grid-template-rows: 56px 1fr 56px; }
  .brand img{ height:34px; }
  .intro-actions{ gap:18px; }
}
