/* Portada del dominio. Misma paleta y mismo aire que los juegos. */

:root {
  --paper: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f2f0ed;
  --ink: #14141a;
  --muted: #71717a;
  --line: #e5e2dd;
  --line-strong: #d3cfc8;

  --indigo: #4f46e5;
  --rose: #e11d48;
  --emerald: #059669;
  --amber: #d97706;
  --violet: #7c3aed;
  --cyan: #0891b2;
  --pink: #db2777;

  --shadow-sm: 0 1px 2px rgba(20, 20, 26, .05);
  --shadow-md: 0 4px 16px -6px rgba(20, 20, 26, .14), 0 1px 3px rgba(20, 20, 26, .05);

  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f11;
    --surface: #17171a;
    --surface-2: #1f1f23;
    --ink: #f2f1ef;
    --muted: #9b9ba4;
    --line: #27272c;
    --line-strong: #34343b;

    --indigo: #818cf8;
    --rose: #fb7185;
    --emerald: #34d399;
    --amber: #fbbf24;
    --violet: #a78bfa;
    --cyan: #22d3ee;
    --pink: #f472b6;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 16px -6px rgba(0, 0, 0, .6);
  }
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -12%, color-mix(in oklab, var(--indigo) 9%, transparent), transparent 60%),
    radial-gradient(52rem 36rem at 108% 106%, color-mix(in oklab, var(--rose) 8%, transparent), transparent 60%);
}

.wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: max(48px, env(safe-area-inset-top)) 22px calc(40px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.head { text-align: center; margin-bottom: 34px; }
.title { margin: 0 0 8px; font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; }
.lead { margin: 0 auto; max-width: 38ch; color: var(--muted); font-size: 1rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  color: inherit;
  text-decoration: none;
  transition: transform var(--ease) 240ms, border-color var(--ease) 240ms, box-shadow var(--ease) 240ms;
}
a.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
a.card:active { transform: translateY(-1px); }

.card.is-soon { opacity: .55; cursor: default; }

.card-art {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.card-art svg { width: 38px; height: 38px; }
.card-art .g { stroke: var(--line-strong); stroke-width: 5; stroke-linecap: round; fill: none; }
.card-art .a { stroke: var(--accent); stroke-width: 9; stroke-linecap: round; fill: none; }
.card-art .b { stroke: var(--rose); stroke-width: 9; fill: none; }
/* Iconos de bloques (el tetris): mismos colores, pero rellenos. */
.card-art .fg { fill: var(--line-strong); opacity: .35; stroke: none; }
.card-art .f { fill: var(--accent); stroke: none; }
.card-art .fb { fill: var(--rose); stroke: none; }

.card-body { min-width: 0; }
.card-name { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: -.015em; margin-bottom: 3px; }
.card-text { margin: 0; font-size: .88rem; color: var(--muted); }

.badge {
  display: inline-block;
  margin-top: 9px;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--accent);
}

.foot { margin-top: auto; padding-top: 40px; display: flex; justify-content: center; }
.langs { display: flex; gap: 7px; }

.lang {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-full);
  padding: 6px 13px;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--ease) 240ms;
}
.lang:hover { border-color: var(--line-strong); }
.lang[aria-pressed="true"] { border-color: var(--indigo); background: var(--surface); background: color-mix(in oklab, var(--indigo) 12%, var(--surface)); }
.lang-flag { font-size: 1.05rem; line-height: 1; }

@media (max-width: 460px) {
  .lang-label { display: none; }
  .lang-flag { font-size: 1.3rem; }
}

.lang.is-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.lang.is-primary:hover { border-color: var(--ink); }

.install-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(100% - 24px, 460px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -20px rgba(10, 10, 14, .4), var(--shadow-md);
  animation: rise 320ms var(--ease) both;
}
.install-bar[hidden] { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.install-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-2);
  background: color-mix(in oklab, var(--indigo) 12%, transparent);
  color: var(--indigo);
}
.install-ico svg { width: 20px; height: 20px; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.install-text strong { font-size: .92rem; font-weight: 600; }
.install-text span { font-size: .78rem; color: var(--muted); }
.install-actions { display: flex; gap: 6px; flex: none; }

@media (max-width: 480px) {
  .install-bar { flex-wrap: wrap; }
  .install-actions { width: 100%; }
  .install-actions .lang { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
