/*
Theme Name:  Retroverso
Theme URI:   https://www.retroverso.es
Author:      Asociación Cultural Retroverso
Author URI:  https://www.retroverso.es
Description: Tema oficial de la Asociación Cultural Retroverso. Diseño editorial oscuro con identidad de videojuego.
Version:     1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.1
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: retroverso
Tags:        dark, custom-colors, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

/* ============================================================
   RESET
   ============================================================ */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   CUSTOM PROPERTIES — IDENTIDAD VISUAL RETROVERSO
   ============================================================ */

:root {

  /* Paleta base */
  --color-bg:          #0d1117;
  --color-bg-2:        #111820;
  --color-surface:     #161e28;
  --color-surface-2:   #1a2433;
  --color-border:      #1e2a38;
  --color-border-2:    #253040;

  /* Texto */
  --color-text:        #e8e0d0;
  --color-text-2:      #b8b0a4;
  --color-text-muted:  #6e7a8a;
  --color-text-subtle: #3a4858;

  /* Acento — fósforo ámbar-verde */
  --color-accent:      #b8cc52;
  --color-accent-dim:  #7a8a32;
  --color-accent-dark: #3d4419;
  --color-accent-glow: rgba(184, 204, 82, 0.15);

  /* Estados */
  --color-error:       #e05a5a;
  --color-success:     #52cc8a;
  --color-warning:     #ccaa52;

  /* Tipografía */
  --font-display:  'DM Serif Display', Georgia, serif;
  --font-mono:     'Space Mono', 'Courier New', monospace;
  --font-body:     'DM Sans', system-ui, sans-serif;

  /* Escala tipográfica — fluid */
  --text-xs:   clamp(0.64rem,  0.6rem  + 0.2vw,  0.72rem);
  --text-sm:   clamp(0.78rem,  0.74rem + 0.2vw,  0.875rem);
  --text-base: clamp(0.95rem,  0.9rem  + 0.25vw, 1rem);
  --text-md:   clamp(1.1rem,   1rem    + 0.5vw,  1.25rem);
  --text-lg:   clamp(1.25rem,  1.1rem  + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.25rem + 1.25vw, 2rem);
  --text-2xl:  clamp(1.875rem, 1.5rem  + 1.875vw, 2.75rem);
  --text-3xl:  clamp(2.5rem,   2rem    + 2.5vw,  4rem);
  --text-4xl:  clamp(3rem,     2.5rem  + 3vw,    5.5rem);

  /* Espaciado */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1280px;
  --container-2xl:  1440px;
  --gutter:         clamp(1.25rem, 4vw, 2.5rem);

  /* Cabecera */
  --header-height:  4rem;

  /* Bordes */
  --radius-sm:  2px;
  --radius-md:  4px;
  --radius-lg:  8px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 0 24px var(--color-accent-glow);

  /* Transiciones */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Z-index */
  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-modal:   200;
  --z-header:  300;
  --z-toast:   400;
}

/* ============================================================
   BASE — BODY Y TIPOGRAFÍA GLOBAL
   ============================================================ */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
}

/* Scanlines — efecto de atmósfera, sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  z-index: var(--z-overlay);
}

/* ============================================================
   CONTENEDOR
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-md);
}

.container--wide {
  max-width: var(--container-2xl);
}

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text-2);
}

p + p {
  margin-top: var(--space-4);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

em {
  font-style: italic;
  color: var(--color-accent);
}

small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Etiquetas en mayúsculas — estilo Retroverso */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.label--muted {
  color: var(--color-text-muted);
}

/* ============================================================
   ENLACES
   ============================================================ */

a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* ============================================================
   UTILIDADES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-accent  { color: var(--color-accent); }
.text-muted   { color: var(--color-text-muted); }
.text-mono    { font-family: var(--font-mono); }
.text-display { font-family: var(--font-display); }

.border-top    { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }
