/* GoKapiGo — portada moderna: barra de cristal, hero con el logo sobre un orbe naranja e iconos flotando,
   cinta infinita de iconos, ventajas en "bento", catálogo en tarjetas tipo tienda y pie.
   Un solo mundo oscuro tomado del logo: negro cálido, naranja Kapi, crema y café capibara. */
:root {
  --bg: #0f0c09;          /* negro cálido */
  --bg-2: #15110c;
  --surface: #1a1510;     /* tarjetas */
  --surface-2: #221b14;
  --line: #2e261d;        /* bordes */
  --orange: #fb7b00;      /* naranja Kapi */
  --orange-2: #ffb347;
  --orange-ink: #1a0d00;  /* texto sobre naranja */
  --cream: #f2eee6;       /* crema del logo */
  --muted: #b3a796;       /* texto secundario */
  --fur: #c98a4e;         /* café capibara */
  --green: #7ac74f;

  --f-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --f-body: "Rubik", "Segoe UI", system-ui, sans-serif;

  --r: 20px;
  --wrap: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 400 1rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
}

/* ---------- Barra superior (cristal) ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
}
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand span { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: .03em; }
.brand b { color: var(--orange); font-weight: 400; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.glow {
  position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 45% at 75% 40%, color-mix(in srgb, var(--orange) 26%, transparent), transparent 70%),
    radial-gradient(35% 35% at 10% 10%, color-mix(in srgb, var(--fur) 18%, transparent), transparent 70%);
}
.hero::after {   /* rejilla sutil que se desvanece */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center; gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(36px, 7vw, 96px) clamp(36px, 6vw, 80px);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cream);
  padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  border: 1px solid var(--line);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.06; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); letter-spacing: -.01em; }
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--orange), var(--orange-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.15rem); max-width: 50ch; margin: 20px 0 30px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-weight: 600;
  padding: 14px 22px; border-radius: 14px; transition: transform .15s, background .2s, box-shadow .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), #ff9a2e); color: var(--orange-ink);
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--orange) 80%, transparent);
}
.btn-ghost { color: var(--cream); background: var(--surface); border: 1px solid var(--line); }
.btn:hover { transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px var(--orange); }
.btn-ghost:hover { background: var(--surface-2); }

.stats { display: flex; gap: clamp(18px, 4vw, 40px); margin: 34px 0 0; }
.stats div { display: grid; }
.stats dt { font-family: var(--f-display); font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1; color: var(--cream); }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

/* logo: SIEMPRE cuadrado (aspect-ratio + object-fit) para que nunca se estire */
.hero-art { position: relative; width: 100%; max-width: 460px; margin-inline: auto; aspect-ratio: 1; }
.orb {
  position: absolute; inset: 10%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a2e, var(--orange) 45%, #a84f00 100%);
  filter: blur(36px); opacity: .45; animation: pulse 6s ease-in-out infinite;
}
.logo { position: relative; width: 100%; height: 100%; object-fit: contain; animation: bob 6s ease-in-out infinite; }
.float {
  position: absolute; width: 19%; aspect-ratio: 1; height: auto; border-radius: 24%;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06);
  animation: drift 7s ease-in-out infinite;
}
/* los iconos van arriba y a los lados del capibara, nunca sobre las letras del logo (tercio de abajo) */
.f1 { top: 4%; left: 0; rotate: -10deg; animation-delay: -1s; }
.f2 { top: 0; right: 2%; rotate: 8deg; animation-delay: -3s; }
.f3 { top: 36%; left: -6%; width: 16%; rotate: 7deg; animation-delay: -5s; }
.f4 { top: 32%; right: -6%; width: 16%; rotate: -6deg; animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes pulse { 50% { opacity: .62; transform: scale(1.05); } }
@keyframes drift { 50% { translate: 0 -12px; } }

/* ---------- Cinta infinita de iconos ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); padding-block: 16px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; gap: 16px; width: max-content; animation: slide 40s linear infinite; }
.track img { width: 56px; height: 56px; border-radius: 26%; opacity: .9; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Encabezados de sección ---------- */
.section-head { text-align: center; margin-bottom: clamp(28px, 4vw, 44px); display: grid; gap: 12px; justify-items: center; }
.kicker { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-head p:not(.kicker) { color: var(--muted); margin: 0; max-width: 56ch; }

/* ---------- Por qué (bento) ---------- */
.why .wrap { padding-block: clamp(56px, 8vw, 104px) 0; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feat {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 10px; align-content: start;
}
.feat.big {
  grid-column: span 2; grid-row: span 2; align-content: end; min-height: 260px;
  background: radial-gradient(80% 70% at 85% 10%, color-mix(in srgb, var(--orange) 22%, transparent), transparent 70%), linear-gradient(160deg, var(--surface-2), var(--surface));
}
.feat.big h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.feat.wide { grid-column: span 2; }
.feat h3 { font-size: 1.2rem; }
.feat p { margin: 0; color: var(--muted); }
.ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange);
}
.ico svg { width: 22px; height: 22px; }

/* ---------- Catálogo ---------- */
.games .wrap { padding-block: clamp(56px, 8vw, 104px) 0; }
#apps .wrap { padding-bottom: clamp(56px, 8vw, 104px); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;
  column-gap: 16px; row-gap: 4px; align-items: start;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(0,0,0,.9); }
.icon {
  grid-column: 1; grid-row: 1 / span 2; width: 76px; aspect-ratio: 1; border-radius: 24%; overflow: hidden;
  background: var(--bg); box-shadow: 0 8px 20px -10px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06);
}
.icon img { width: 100%; height: 100%; object-fit: cover; }
.tag { grid-column: 2; grid-row: 1; align-self: end; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fur); padding-top: 26px; }
.card h3 { grid-column: 2; grid-row: 2; font-size: 1.22rem; align-self: start; }
.card p { grid-column: 1 / -1; grid-row: 3; margin: 10px 0 14px; color: var(--muted); font-size: .93rem; }
.play {
  grid-column: 1 / -1; grid-row: 4;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--cream); color: var(--bg); text-decoration: none; font-weight: 600;
  padding: 11px 12px; border-radius: 12px; font-size: .93rem; transition: background .2s, color .2s;
}
.play:hover { background: var(--orange); color: var(--orange-ink); }
.play svg { width: 16px; height: 16px; }

/* Estado en Play (lo pone herramientas/generar_sitio.py a diario según catalog.json) */
.ribbon {
  position: absolute; top: 16px; right: 16px; z-index: 1; pointer-events: none;
  font: 600 .64rem/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 6px 10px; border-radius: 999px;
}
.ribbon.on { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); }
.ribbon.soon { background: color-mix(in srgb, var(--cream) 10%, transparent); color: var(--cream); border: 1px solid var(--line); }
.play.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.play.soon:hover { background: transparent; color: var(--muted); }

/* ---------- Política ---------- */
.legal .wrap { padding-block: clamp(32px, 5vw, 64px); }
.legal article { max-width: 72ch; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 8px; }
.legal .updated { color: var(--muted); margin: 0 0 32px; font-size: .95rem; }
.legal h2 { font-size: 1.3rem; margin: 36px 0 10px; color: var(--orange); }
.legal p, .legal li { color: #ddd5c8; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 6px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.legal .table-scroll { overflow-x: auto; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--cream); font-weight: 600; }
.contact-box {
  margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.contact-box code { font-family: var(--f-body); font-size: 1.05rem; color: var(--cream); user-select: all; }
.copy {
  font: 600 .9rem var(--f-body); background: transparent; color: var(--orange);
  border: 2px solid var(--orange); padding: 8px 14px; border-radius: 10px; cursor: pointer;
}

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  padding-block: 28px; color: var(--muted); font-size: .9rem;
}
.footer .brand img { width: 32px; height: 32px; border-radius: 10px; }
.footer .brand span { font-size: 1rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--cream); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat.big { grid-row: auto; min-height: 0; }
}
@media (max-width: 780px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-top: 24px; }
  .hero-art { order: -1; max-width: 300px; }
  .lede { margin-inline: auto; }
  .cta-row, .stats { justify-content: center; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .feat.big, .feat.wide { grid-column: auto; }
  .cta-row .btn { flex: 1 1 100%; }
  .nav a { padding: 8px 10px; }
  .topbar .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Política de privacidad en 7 idiomas (generada por herramientas/generar_sitio.py) */
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.langs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .9rem; }
.langs a:hover { color: var(--cream); border-color: var(--fur); }
.langs a.on { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); font-weight: 600; }
.legal .meta { color: var(--muted); margin: 0 0 24px; font-size: .95rem; }
.legal h3 { font-size: 1.05rem; margin: 22px 0 6px; color: var(--cream); }
.legal .summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 22px 14px; margin: 8px 0 12px; }
.legal .summary h2 { margin-top: 18px; }

