/* Estilos compartidos para herramientas standalone (dado, sorteo, marcador) */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0E0E10;
  --ink-soft: #16161A;
  --ink-line: #26262C;
  --gold: #F5B700;
  --cyan: #3FA9D6;
  --magenta: #E91E63;
  --paper: #FFFFFF;
  --dim: #A0A0A8;
  --green: #25D366;

  /* Sistema de spacing (escala 4-8-16-24-40-64) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 40px;
  --sp-6: 64px;

  /* Curvas de animación */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.6, 0.04, 0.98, 0.34);
}

/* Reset BRUTAL: bordes sharp en todo. Solo elementos circulares conservan radius */
*, *::before, *::after { border-radius: 0; }

/* Excepciones explícitas: solo lo que SEMÁNTICAMENTE es circular */
.help-btn,
button[aria-label*="circular"],
.fab-circle,
.player-row .pulse-dot {
  border-radius: 50%;
}

/* El logo NO es circular — debe quedar sin radius para no cortarlo */
.tool-brand .brand-logo,
.tool-footer .footer-logo {
  border-radius: 0;
}

/* SVG icons consistentes (Feather/Lucide style) */
svg { vertical-align: middle; }

html {
  scroll-behavior: smooth;
  /* El sitio es dark-only por diseño: avisa al navegador para que
     scrollbars, autofill, controles nativos y form widgets se rendericen
     en variante oscura. */
  color-scheme: dark;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Mejor wrap tipográfico: pretty evita huérfanos en bloques largos */
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* Grano sutil (400px para que no se note la repetición en pantallas grandes) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
  mix-blend-mode: overlay;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.display { font-family: 'Anton', sans-serif; letter-spacing: 0.01em; line-height: 0.9; text-transform: uppercase; }
.mono { font-family: 'Space Mono', monospace; }

/* Header de herramienta */
.tool-header {
  position: relative;
  z-index: 10;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .tool-header { padding: 0.65rem 1rem; }
}

.tool-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  transition: color 0.2s ease;
  opacity: 0.85;
}
.tool-back:hover { color: var(--gold); opacity: 1; }

.tool-back svg { width: 18px; height: 18px; }

/* Grupo de links a la izquierda del header */
.tool-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.tool-link {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-link:hover { color: var(--gold); }
.tool-link svg { width: 12px; height: 12px; }

@media (max-width: 600px) {
  .tool-nav { gap: 0.85rem; }
  .tool-link { font-size: 10px; letter-spacing: 0.1em; }
  .tool-back { font-size: 13px; }
}

.tool-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
  transition: opacity 0.2s ease;
}
.tool-brand:hover { opacity: 0.85; }

.tool-brand {
  position: relative;
}
.tool-brand .brand-logo {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
/* Halo dorado difuminado detrás del logo */
.tool-brand::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 110px;
  height: 110px;
  background: rgba(245, 183, 0, 0.18);
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.3s ease;
}
.tool-brand:hover::after {
  background: rgba(245, 183, 0, 0.32);
}

.tool-brand .text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: right;
}
.tool-brand .name {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--paper);
  display: block;
}
.tool-brand .sub {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 3px;
  display: block;
}

@media (max-width: 600px) {
  .tool-brand .text { display: none; }
  .tool-brand .brand-logo { width: 112px; height: 112px; }
}

/* Contenedor principal */
.tool-main {
  position: relative;
  z-index: 10;
  max-width: 760px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}

.tool-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.tool-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}
.tool-eyebrow.gold { color: var(--gold); }
.tool-eyebrow.cyan { color: var(--cyan); }
.tool-eyebrow.magenta { color: var(--magenta); }

.tool-title {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.tool-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2.5rem;
  max-width: 540px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 0 var(--magenta);
}

.btn-magenta {
  background: var(--magenta);
  color: var(--paper);
}
.btn-magenta:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 0 var(--gold);
}

/* Ghost: acción terciaria, mínima atención visual. Hover sutil. */
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  font-weight: 500;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.4);
  color: var(--paper);
  transform: none;
  box-shadow: none;
}

/* Outline: acción secundaria fuerte (alternativa al primary). Mismo peso visual. */
.btn-outline {
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
  font-weight: 700;
}
.btn-outline:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 0 var(--cyan);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Inputs (incluyendo type="search" porque marcador y temporizador lo usan).
   font-size 16px MÍNIMO para evitar zoom automático de iOS al enfocar. */
input[type="text"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="tel"] {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  color: var(--paper);
  padding: 0.55rem 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; /* iOS no hace zoom si es >= 16px */
  transition: border-color 0.2s ease;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--magenta);
}

/* Quitar X de cancelar de inputs type=search en webkit (cosmético) */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  display: none;
}

/* Placeholder color consistente */
input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  opacity: 1;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Footer mini */
.tool-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3rem 1.5rem 3rem;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  border-top: 1px solid var(--ink-line);
  margin-top: 3rem;
}
.tool-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.tool-footer .footer-logo {
  width: 144px;
  height: 144px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
@media (max-width: 600px) {
  .tool-footer .footer-logo { width: 128px; height: 128px; }
}
.tool-footer a:hover .footer-logo { opacity: 1; }
.tool-footer a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}
.tool-footer a:hover { color: var(--paper); }
.tool-footer .footer-tag {
  display: block;
}
.tool-footer .footer-legal {
  display: flex;
  gap: 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 0.5rem;
}
.tool-footer .footer-legal a { color: var(--dim); }
.tool-footer .footer-legal a:hover { color: var(--paper); }

/* Animaciones reducidas */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Floaters decorativos */
.floater {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  opacity: 0.4;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--r, 0deg)); }
}
.floater { animation: bob 5s ease-in-out infinite; }

/* Pill */
.pill {
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* === Bloques SEO al final de cada herramienta ===
   Sobrios, monocromáticos, no compiten con el widget de la herramienta.
   Sirven para que Google indexe contenido y la gente conozca el club. */
.seo-section {
  max-width: 720px;
  margin: 4rem auto 2rem;
  padding: 0 1.25rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
}
.seo-section h2 {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.005em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--paper);
  text-wrap: balance;
}
.seo-section h2:first-child { margin-top: 0; }
.seo-section p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.seo-section a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.seo-section a:hover {
  text-decoration-thickness: 2px;
}
.seo-section ol,
.seo-section ul {
  margin: 0.5rem 0 1.5rem 1.25rem;
  font-size: 0.95rem;
}
.seo-section li {
  margin-bottom: 0.5rem;
}
.seo-section ol li::marker {
  font-family: 'Space Mono', monospace;
  color: var(--gold);
  font-weight: 700;
}

/* FAQ items con <details>/<summary> */
.seo-faq {
  border-top: 1px solid var(--ink-line);
  margin-top: 0.5rem;
}
.seo-faq details {
  border-bottom: 1px solid var(--ink-line);
  padding: 0.85rem 0;
}
.seo-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--paper);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  padding-right: 0.25rem;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after {
  content: "+";
  font-family: 'Anton', sans-serif;
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.seo-faq details[open] summary::after {
  content: "−";
}
.seo-faq details > p {
  margin-top: 0.6rem;
  margin-bottom: 0;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

/* Bloque "Conoce al club" — distintivo, al cierre de cada herramienta */
.club-card {
  margin-top: 3rem;
  padding: 1.75rem 1.5rem;
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(245,183,0,0.04), transparent);
  position: relative;
}
.club-card::before {
  content: "🎲";
  position: absolute;
  top: -16px;
  left: 1.25rem;
  background: var(--ink);
  padding: 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
}
.club-card h2 {
  margin-top: 0 !important;
  margin-bottom: 0.85rem !important;
}
.club-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.club-card ul {
  list-style: none !important;
  margin: 0.5rem 0 1rem 0 !important;
  padding: 0;
}
.club-card ul li {
  margin-bottom: 0.6rem;
  padding-left: 0;
}
.club-card .club-tagline {
  display: block;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ink-line);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}
