/*
 * Marca de RC Eventos (suite Riesgo Cero): tipografías, colores y tema.
 * Lo carga includes/marca.php (rc_marca_head) en todas las puertas de la app.
 *
 * Se sirve como fichero estático (con ?v=fecha en la dirección), así el
 * móvil lo guarda y no lo vuelve a descargar en cada página.
 */
/* ═══════════════════════════════════════════════════════════════
   RC EVENTOS · LA MARCA
   De la casa Riesgo Cero: lima sobre casi negro de noche y papel
   de registro de día. Poppins en los títulos, Geist en todo lo demás.
═══════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/poppins-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/poppins-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/poppins-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/poppins-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* ── Tema claro: papel de registro ─────────────────────────────── */
:root {
  --lima: #c9f24f;            /* la marca: como relleno, nunca como texto en claro */
  --lima-tinta: #141a05;      /* texto sobre lima */

  --bg-base: #f5f5f0;         /* hueso */
  --bg-elevated: #ffffff;
  --bg-sunken: #ecebe4;
  --bg-glass: rgba(255, 255, 255, 0.84);
  --bg-glass-strong: rgba(249, 249, 245, 0.94);
  --text-primary: #14160f;    /* tinta */
  --text-secondary: #464b3f;
  --text-muted: #686d60;
  --border-color: rgba(20, 22, 15, 0.10);
  --border-color-strong: rgba(20, 22, 15, 0.18);

  --success: #15803d;  --success-suave: rgba(21, 128, 61, 0.10);
  --warning: #b45309;  --warning-suave: rgba(180, 83, 9, 0.10);
  --danger:  #b42318;  --danger-suave:  rgba(180, 35, 24, 0.09);
  --info:    #1d5fd6;  --info-suave:    rgba(29, 95, 214, 0.09);

  --shadow-sm: 0 1px 2px rgba(20, 22, 15, 0.05);
  --shadow-md: 0 1px 2px rgba(20, 22, 15, 0.04), 0 8px 20px -12px rgba(20, 22, 15, 0.20);
  --shadow-lg: 0 2px 6px rgba(20, 22, 15, 0.05), 0 18px 36px -18px rgba(20, 22, 15, 0.26);
  --shadow-xl: 0 4px 12px rgba(20, 22, 15, 0.06), 0 28px 56px -24px rgba(20, 22, 15, 0.32);
  --shadow-card: 0 1px 2px rgba(20, 22, 15, 0.04), 0 6px 18px -12px rgba(20, 22, 15, 0.16);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --header-height: 64px;
  --bottom-nav-height: 68px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* Movimiento: entradas que frenan al llegar; salidas más rápidas */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* entradas y salidas */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* lo que se mueve dentro de la pantalla */
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 220ms var(--ease-out);
  --transition-slow: 320ms var(--ease-out);
  --transition-bounce: 320ms var(--ease-out);

  --font-sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-sans);

  color-scheme: light;
}

/* ── Tema oscuro: casi negro con lima ──────────────────────────── */
[data-theme="dark"] {
  --bg-base: #0c0d0b;
  --bg-elevated: #151713;
  --bg-sunken: #1c1f1a;
  --bg-glass: rgba(21, 23, 19, 0.82);
  --bg-glass-strong: rgba(12, 13, 11, 0.90);
  --text-primary: #f1f2ec;
  --text-secondary: #b7bbae;
  --text-muted: #8b9083;
  --border-color: rgba(241, 242, 236, 0.08);
  --border-color-strong: rgba(241, 242, 236, 0.15);

  --success: #5ee08f;  --success-suave: rgba(94, 224, 143, 0.12);
  --warning: #fbbf4c;  --warning-suave: rgba(251, 191, 76, 0.12);
  --danger:  #ff8a75;  --danger-suave:  rgba(255, 138, 117, 0.12);
  --info:    #86b6ff;  --info-suave:    rgba(134, 182, 255, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px -12px rgba(0, 0, 0, 0.60);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.40), 0 18px 40px -18px rgba(0, 0, 0, 0.70);
  --shadow-xl: 0 4px 12px rgba(0, 0, 0, 0.45), 0 28px 56px -24px rgba(0, 0, 0, 0.75);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.30), 0 10px 28px -18px rgba(0, 0, 0, 0.70);

  color-scheme: dark;
}

/* Bootstrap habla el mismo idioma que el resto. Con «html» delante gana a
   Bootstrap aunque su hoja se cargue después. */
html:root, html[data-theme] {
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: 15px;
  --bs-body-bg: var(--bg-base);
  --bs-body-color: var(--text-primary);
  --bs-emphasis-color: var(--text-primary);
  --bs-secondary-color: var(--text-secondary);
  --bs-tertiary-color: var(--text-muted);
  --bs-secondary-bg: var(--bg-sunken);
  --bs-tertiary-bg: var(--bg-sunken);
  --bs-border-color: var(--border-color-strong);
  --bs-border-color-translucent: var(--border-color);
  --bs-heading-color: var(--text-primary);
  --bs-border-radius: var(--radius-md);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-border-radius-sm: var(--radius-sm);
}

/* Lo que el navegador pinta por su cuenta también es de la casa */
::selection { background: var(--lima); color: var(--lima-tinta); }
input, textarea, [contenteditable] { caret-color: var(--acento); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-color-strong); border-radius: 10px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-track { background: transparent; }
table, .num, .tabular { font-variant-numeric: tabular-nums; }

/* «html a» y no «a»: Bootstrap se carga después y, si no, los enlaces salen azules */
html a { color: var(--acento); text-underline-offset: 3px; }
html a:hover { color: var(--acento-oscuro); }

/* Iconos: un solo trazo, color del texto */
svg.ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}
svg.ico.ico-sm { width: 15px; height: 15px; }
svg.ico.ico-lg { width: 22px; height: 22px; }
svg.ico.ico-xl { width: 28px; height: 28px; stroke-width: 1.5; }

/* ═══════════════════════════════════════════════════════════════
   TIPOGRAFÍA
═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.5em;
  text-wrap: balance;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
h5, h6 { font-size: 0.95rem; }

/* Antes era texto con degradado; ahora el acento, sin trucos */
.text-gradient { color: var(--acento); }

/* Palabra destacada al estilo de la suite: fosforito de día, lima de noche */
.marcado {
  font-style: normal;
  background: linear-gradient(transparent 0.26em, var(--lima) 0.26em, var(--lima) 0.9em, transparent 0.9em);
  color: inherit;
  padding: 0 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
[data-theme="dark"] .marcado { background: none; color: var(--lima); padding: 0; }

/* ── Acento general ───────────────────────────────────────────── */
:root {
  --acento:        #446f0c;
  --acento-oscuro: #2f5207;
  --acento-suave:  rgba(68, 111, 12, 0.09);
  --acento-medio:  rgba(68, 111, 12, 0.16);
  --acento-glow:   rgba(68, 111, 12, 0.35);
  --acento-degradado: #446f0c;
  --acento-tinta:  #ffffff;
}
[data-theme="dark"] {
  --acento:        #c9f24f;
  --acento-oscuro: #dcff85;
  --acento-suave:  rgba(201, 242, 79, 0.09);
  --acento-medio:  rgba(201, 242, 79, 0.16);
  --acento-glow:   rgba(201, 242, 79, 0.30);
  --acento-degradado: #c9f24f;
  --acento-tinta:  #141a05;
}
