/* ==========================================================================
   Natural Life RP · Estilos de la web
   Estética única de noche morada (como el logo). No hay tema claro.
   Orden: variables → base → barra superior → portada → secciones → bloques → móvil
   ========================================================================== */

/* ---------- Fuentes (servidas desde la propia web: carga más rápida y sin terceros) ----------
   Licencias libres (ver fuentes/LICENCIAS.txt). Solo se descargan las que la página usa. */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fuentes/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fuentes/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fuentes/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fuentes/bebas-neue-400.woff2") format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fuentes/permanent-marker-400.woff2") format("woff2"); }

/* ---------- Variables (colores y tipografías) ---------- */
:root {
  --night: #0a0712;     /* fondo */
  --night-2: #130d22;   /* tarjetas y superficies */
  --line: #2a1f45;      /* bordes */
  --violet: #a45cff;    /* acento principal */
  --violet-boton: #8f45f0; /* fondo de botones con texto blanco (contraste suficiente) */
  --violet-hover: #7a35dc;
  --lilac: #cfa8ff;     /* acento suave y textos destacados */
  --text: #efe9fa;
  --muted: #a99cc4;     /* texto secundario */
  --ok: #5fd39a;        /* estado positivo */
  --soon: #f0b35a;      /* "próximamente" */

  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --hand: "Permanent Marker", "Segoe Print", cursive;
  --mono: Consolas, "Cascadia Mono", monospace;

  --header-height: 64px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font: 17px/1.6 var(--body); }
img { max-width: 100%; }
a { color: var(--lilac); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Enlace para saltar el menú con el teclado: solo se ve al recibir el foco */
.saltar { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--violet-boton); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.saltar:focus { top: 12px; }

.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 20px; }

code { font-family: var(--mono); background: #1d1433; border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; color: var(--text); font-size: 15px; }
kbd { font: 700 13px var(--mono); background: #241a3d; border: 1px solid #3a2c60; border-bottom-width: 3px; border-radius: 6px; padding: 2px 8px; color: var(--text); }

/* ---------- Barra superior ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(10, 7, 18, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 40px; height: 40px; }
.brand b { font: 26px/1 var(--display); letter-spacing: 1px; }
.brand b span { color: var(--violet); }
.links { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
/* Alinea los enlaces a la derecha sin esconder los primeros cuando no caben (en móvil se desliza) */
.links a:first-child { margin-left: auto; }
.links::-webkit-scrollbar { display: none; }
.links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.links a:hover { color: var(--text); background: var(--night-2); }
.links a.cta { color: #fff; background: var(--violet-boton); }
.links a.cta:hover { background: var(--violet-hover); }

/* ---------- Portada ---------- */
.hero { border-bottom: 1px solid var(--line);
        background: radial-gradient(ellipse 60% 70% at 25% 45%, rgba(164, 92, 255, .30), transparent 70%),
                    linear-gradient(180deg, var(--night) 0%, #170c2e 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 40px; padding-block: 56px 64px; }
.hero-logo { width: 100%; height: auto; max-width: 420px; justify-self: center; filter: drop-shadow(0 0 36px rgba(164, 92, 255, .5)); }
.kicker { font-weight: 700; font-size: 14px; letter-spacing: 4px; text-transform: uppercase; color: var(--lilac); }
.hero h1 { font: clamp(56px, 8vw, 96px)/.92 var(--display); margin: 12px 0 0; letter-spacing: 1px; text-wrap: balance; }
.hero h1 span { color: var(--violet); }
.slogan { font: clamp(22px, 2.6vw, 30px)/1.25 var(--hand); color: var(--lilac); margin: 18px 0 0; transform: rotate(-1.5deg); transform-origin: left; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.badges li { border: 1px solid var(--line); background: var(--night-2); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.badges strong { color: var(--ok); }

/* ---------- Botones ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; padding: 13px 22px; border-radius: 10px; font: 700 16px var(--body); text-decoration: none; border: 1px solid var(--violet); cursor: pointer; }
.btn-main { background: var(--violet-boton); color: #fff; border-color: var(--violet-boton); }
.btn-main:hover { background: var(--violet-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--lilac); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; }

/* ---------- Secciones ---------- */
section { padding-block: 72px; border-bottom: 1px solid var(--line); scroll-margin-top: var(--header-height); }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--violet); }
h2 { font: clamp(40px, 5vw, 56px)/1 var(--display); margin: 8px 0 14px; letter-spacing: 1px; text-wrap: balance; }
h3 { font-size: 20px; margin: 0 0 6px; line-height: 1.3; }
.lead { color: var(--muted); max-width: 65ch; margin: 0; font-size: 18px; }

/* Quiénes somos */
.about { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.about p { max-width: 62ch; margin: 0 0 14px; }
.values { font: 26px/1.3 var(--hand); color: var(--lilac); margin-top: 22px; }
.facts { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--night-2); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }

/* Discord (sección final) */
.discord { text-align: center; background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(164, 92, 255, .28), transparent 70%); }
.discord .lead { margin-inline: auto; }
.discord .actions { justify-content: center; }

/* ---------- Bloques reutilizables ---------- */

/* Tarjeta: usada en "qué hay en la ciudad", "cómo entrar" y "tienda" */
.cards { display: grid; gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--night-2); }
.card p { margin: 0; color: var(--muted); font-size: 16px; flex: 1; }
.card-tag { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--lilac); }
.card-featured { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 10px 40px rgba(164, 92, 255, .18); }

/* ---------- Tienda (NL Store) ---------- */
.tienda { background: radial-gradient(ellipse 60% 50% at 85% 0%, rgba(152, 109, 223, .2), transparent 70%); }

/* Cabecera tipo escaparate: texto a la izquierda y tres artículos en abanico a la derecha */
.tienda-portada { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 36px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, #1a1030 0%, var(--night-2) 55%, #241044 100%); position: relative; overflow: hidden; }
.tienda-portada::before { content: ""; position: absolute; top: 18px; left: 18px; width: 34px; height: 2px; background: var(--lilac); transform: rotate(-45deg); transform-origin: left; opacity: .7; }
.tienda-portada h2 { font-size: clamp(48px, 7vw, 76px); }
.tienda-portada h2 span { color: var(--violet); text-shadow: 0 0 28px rgba(164, 92, 255, .55); }
.tienda-sellos { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.tienda-sellos li { font-size: 14px; font-weight: 600; padding: 6px 12px; border: 1px solid #3a2c60; border-radius: 8px; background: rgba(10, 7, 18, .5); }
.tienda-portada-imagenes { position: relative; height: 300px; }
.tienda-portada-imagenes img { position: absolute; top: 50%; left: 50%; width: 220px; height: 220px; border-radius: 16px; border: 1px solid #3a2c60; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); transition: transform .3s ease; }
.tienda-portada-imagenes img:nth-child(1) { transform: translate(-105%, -50%) rotate(-9deg) scale(.88); }
.tienda-portada-imagenes img:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; box-shadow: 0 0 0 1px var(--violet), 0 20px 60px rgba(164, 92, 255, .35); }
.tienda-portada-imagenes img:nth-child(3) { transform: translate(5%, -50%) rotate(9deg) scale(.88); }
.tienda-portada:hover .tienda-portada-imagenes img:nth-child(1) { transform: translate(-115%, -52%) rotate(-12deg) scale(.9); }
.tienda-portada:hover .tienda-portada-imagenes img:nth-child(3) { transform: translate(15%, -52%) rotate(12deg) scale(.9); }

/* Tarjetas de artículo: imagen oficial + texto; toda la tarjeta lleva al artículo en la tienda */
.productos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.productos-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.producto { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: 16px; background: var(--night-2); overflow: hidden; color: var(--text); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.producto img { display: block; width: 100%; height: auto; object-fit: cover; transition: transform .35s ease; }
a.producto:hover, a.producto:focus-visible { transform: translateY(-4px); border-color: var(--violet); box-shadow: 0 14px 40px rgba(164, 92, 255, .25); }
a.producto:hover img { transform: scale(1.04); }
.producto-destacado { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 10px 40px rgba(164, 92, 255, .18); }
.producto-info { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 18px 20px 20px; position: relative; background: var(--night-2); }
.producto-info h3 { margin: 0; }
.producto-info p { margin: 0; color: var(--muted); font-size: 16px; flex: 1; }
.producto-ir { margin-top: 10px; font-weight: 700; font-size: 15px; color: var(--lilac); }
.producto-ir::after { content: " →"; transition: margin-left .2s ease; }
a.producto:hover .producto-ir::after { margin-left: 4px; }
.producto-texto { justify-content: center; }
.producto-icono { font-size: 44px; padding: 22px 20px 0; }

.tienda-ver-todo { display: inline-block; margin-top: 18px; font-weight: 700; text-decoration: none; }
.tienda-ver-todo::after { content: " →"; }
.tienda-ver-todo:hover { text-decoration: underline; }

/* Rangos de apoyo: medallas con su descuento */
.rangos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.rango { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; border: 1px solid var(--line); border-top: 3px solid var(--medalla); border-radius: 0 0 14px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--medalla) 14%, var(--night-2)), var(--night-2) 70%); text-align: center; }
.rango span { font-size: 40px; line-height: 1; }
.rango h3 { margin: 6px 0 0; }
.rango b { font: 34px/1 var(--display); letter-spacing: 1px; color: var(--medalla); }
.rango-bronce { --medalla: #d08a4e; }
.rango-plata { --medalla: #c9cfdc; }
.rango-oro { --medalla: #f0c04a; }
.rango-diamante { --medalla: #7fd8ff; }

/* Información de compra */
.tienda-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 40px 0 0; padding: 24px 0 0; list-style: none; border-top: 1px solid var(--line); }
.tienda-info li { display: flex; flex-direction: column; gap: 4px; }
.tienda-info span { font-size: 26px; }
.tienda-info p { margin: 0; color: var(--muted); font-size: 15px; }

/* Pasos numerados (cómo entrar) */
.steps { counter-reset: step; }
.steps .card { counter-increment: step; border-top: 3px solid var(--violet); border-radius: 0 0 14px 14px; }
.steps .card::before { content: "Paso " counter(step); font: 22px/1 var(--display); color: var(--violet); letter-spacing: 1px; margin-bottom: 4px; }

/* Caja de conexión (IP) */
.connect { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.copy { font: 600 14px var(--body); background: transparent; color: var(--lilac); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.copy:hover { border-color: var(--lilac); }

/* Etiqueta "Próximamente" / "En pruebas" */
.pill-soon { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--soon); border: 1px solid currentColor; padding: 2px 8px; border-radius: 999px; }

/* Pestañas (guías y normas) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.tabs button { font: 600 15px var(--body); color: var(--muted); background: var(--night-2); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: #fff; background: var(--violet-boton); border-color: var(--violet-boton); }
.panel { margin-top: 20px; }

/* Lista de filas título + texto (guías y normas) */
.rows { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--night-2); }
.row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row p { margin: 0; color: var(--muted); font-size: 16px; }

/* Aviso destacado */
.note { margin-top: 16px; padding: 16px 20px; border-radius: 12px; background: rgba(164, 92, 255, .12); border: 1px solid rgba(164, 92, 255, .35); }
.note p { margin: 0; }

/* ---------- Página 404 ---------- */
.error-404 { min-height: calc(100vh - var(--header-height) - 100px); display: grid; align-items: center; padding-block: 72px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(164, 92, 255, .22), transparent 70%); }
.error-404 h1 { font: clamp(52px, 8vw, 88px)/.95 var(--display); margin: 10px 0 16px; letter-spacing: 1px; }

/* ---------- Pie ---------- */
footer { padding-block: 32px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 900px) {
  .cards-3, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
  .tienda-portada { grid-template-columns: 1fr; }
  .tienda-portada-imagenes { height: 240px; }
  .tienda-portada-imagenes img { width: 180px; height: 180px; }
  .productos, .productos-4, .rangos, .tienda-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand b { display: none; }
  .hero .wrap { grid-template-columns: 1fr; padding-block: 36px 48px; gap: 20px; }
  .hero-logo { max-width: 260px; }
  .kicker { letter-spacing: 2px; font-size: 12px; }
  .badges li { font-size: 14px; }
  .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  section { padding-block: 52px; }
  .tienda-portada { padding: 24px 18px; }
  .tienda-portada-imagenes { height: 170px; }
  .tienda-portada-imagenes img { width: 130px; height: 130px; border-radius: 12px; }
  .productos, .productos-4, .tienda-info { grid-template-columns: 1fr; }
  .rangos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* En móvil la tarjeta va en horizontal: imagen pequeña a la izquierda */
  .producto { flex-direction: row; }
  .producto img { width: 130px; flex-shrink: 0; align-self: center; margin-left: 10px; border-radius: 10px; }
  .producto-info { padding: 14px 16px; }
  .producto-icono { padding: 16px 0 0 16px; font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .producto, .producto img, .tienda-portada-imagenes img { transition: none; }
}
