/* ============================
   e-gym Landing — base (2026-10-19)
   Reglas de la antigua copia de eg-premium.css (assets/css/eg-premium.css, ~120 KB) que la landing
   realmente usa: tokens, tipografía base, botones, campos, modales y barras de desplazamiento.
   Se carga entre style.css y landing-v12.css, en el mismo lugar que ocupaba la copia completa.
   ============================ */

/* Fuentes propias (subconjunto latino, variables). index.php las precarga: si cambia el archivo,
   actualizar también el <link rel="preload">. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-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: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-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;
}

/* Respaldo con las métricas de cada fuente (ancho y alto medidos contra Arial): mientras cargan,
   el texto ocupa lo mismo y al cambiar de fuente no se mueve la página (CLS). */
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 400 600;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica"), local("Roboto");
  size-adjust: 101.68%;
  ascent-override: 105.24%;
  descent-override: 29.51%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Manrope Fallback";
  font-weight: 601 800;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold"), local("Roboto Bold");
  size-adjust: 99.77%;
  ascent-override: 107.24%;
  descent-override: 30.07%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Space Grotesk Fallback";
  font-weight: 400 599;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica"), local("Roboto");
  size-adjust: 107.55%;
  ascent-override: 91.12%;
  descent-override: 26.96%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Space Grotesk Fallback";
  font-weight: 600 800;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold"), local("Roboto Bold");
  size-adjust: 99.5%;
  ascent-override: 98.49%;
  descent-override: 29.15%;
  line-gap-override: 0%;
}

:root {
  --eg-bg: #010203;
  --eg-bg-soft: #030506;
  --eg-bg-alt: #030506;
  --eg-panel: #06080B;
  --eg-panel-2: #090C10;
  --eg-surface: #06080B;
  --eg-surface-2: #090C10;
  --eg-surface-3: #0D1117;
  --eg-sidebar: #010203;
  --eg-sidebar-2: #030506;
  --eg-mobile-nav: #000000;
  --eg-mobile-nav-border: rgba(255, 255, 255, 0.06);
  --eg-border: rgba(255, 255, 255, 0.06);
  --eg-border-soft: rgba(255, 255, 255, 0.04);
  --eg-border-strong: rgba(255, 255, 255, 0.10);
  --eg-text: #F8FAFC;
  --eg-text-muted: #9CA3AF;
  --eg-text-soft: #6B7280;
  --eg-accent: #14B8A6;
  --eg-accent-bright: #14B8A6;
  --eg-accent-soft: rgba(20, 184, 166, 0.10);
  --eg-accent-border: rgba(20, 184, 166, 0.22);
  --eg-accent-ink: #042F2E;
  --eg-success: #6EE7B7;
  --eg-error: #FCA5A5;
  --eg-warning: #FCD34D;
  --eg-radius: 10px;
  --eg-radius-sm: 8px;
  --eg-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  --eg-shadow-md: 0 18px 50px rgba(0, 0, 0, 0.28);
  --eg-font-sans: "Manrope", "Manrope Fallback", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --eg-font: var(--eg-font-sans);
  --eg-btn-h: 38px;
  --eg-btn-h-sm: 32px;
  --eg-btn-h-lg: 44px;
}

html.theme-dark,
html[data-theme="dark"],
html.dark {
  --egym-bg: var(--eg-bg);
  --egym-bg-alt: var(--eg-bg-soft);
  --egym-surface: var(--eg-surface);
  --egym-surface-elevated: var(--eg-surface-2);
  --egym-surface-hover: var(--eg-surface-3);
  --egym-text: #E8EDF4;
  --egym-text-heading: var(--eg-text);
  --egym-text-muted: var(--eg-text-muted);
  --egym-border: var(--eg-border);
  --egym-border-subtle: var(--eg-border-soft);
  --egym-border-hover: var(--eg-border-strong);
  --egym-primary: var(--eg-accent);
  --egym-primary-hover: #0F9F90;
  --egym-primary-muted: #0A2E2B;
  --egym-accent: var(--eg-accent);
  --egym-success: var(--eg-success);
  --egym-warning: var(--eg-warning);
  --egym-danger: var(--eg-error);
  --egym-nav-bg: #000000;
  --egym-shadow: var(--eg-shadow);
  --egym-shadow-lg: var(--eg-shadow-md);
  --egym-shadow-glow: none;
  --egym-radius: var(--eg-radius);
  --egym-radius-sm: var(--eg-radius-sm);

  --bg: var(--eg-bg);
  --bg-alt: var(--eg-bg-soft);
  --surface: var(--eg-surface);
  --surface-hover: var(--eg-surface-3);
  --text: #E8EDF4;
  --text-muted: var(--eg-text-muted);
  --text-heading: var(--eg-text);
  --border: var(--eg-border);
  --border-hover: var(--eg-border-strong);
  --primary: var(--eg-accent);
  --primary-dark: #0F9F90;
  --card-bg: var(--eg-surface);
  --nav-bg: #000000;
}

html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.theme-dark body,
html[data-theme="dark"] body,
html.dark body,
body.bg-gym-gradient,
body.bg-background-dark {
  background-color: var(--eg-bg) !important;
  color: var(--egym-text, var(--eg-text));
}

body,
input, select, textarea, button {
  font-family: var(--eg-font-sans);
  letter-spacing: -0.01em;
}

h1, h2, h3, h4,
.page-title,
.card-title,
.eg-title {
  letter-spacing: -0.025em;
  font-weight: 750;
  color: var(--eg-text);
}

.btn,
button.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-outline-primary,
.btn-outline-secondary,
.btn-ghost,
a.btn,
button.bg-primary:not(.eg-switch):not([role="switch"]),
a.bg-primary,
[data-submit-loading].bg-primary,
button[class*="bg-primary"]:not(.eg-switch):not([role="switch"]),
a[class*="bg-primary"] {
  min-height: var(--eg-btn-h);
  border-radius: var(--eg-radius-sm) !important;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
  box-shadow: none !important;
}

button.bg-primary,
a.bg-primary,
.btn-primary,
html.theme-dark .btn-primary,
html.dark .btn-primary,
.btn.btn-primary,
.btn-primary-sm {
  background: var(--eg-accent) !important;
  color: var(--eg-accent-ink) !important;
  border: 1px solid transparent !important;
}

button.bg-primary:hover,
a.bg-primary:hover,
.btn-primary:hover,
.btn-primary-sm:hover,
button.bg-primary:focus-visible,
a.bg-primary:focus-visible {
  background: var(--eg-accent-bright) !important;
  filter: none;
  opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
select,
textarea,
.form-control,
.form-select {
  background: #0A0E13 !important;
  border: 1px solid #5B6577 !important;
  color: var(--eg-text) !important;
  border-radius: var(--eg-radius-sm) !important;
  min-height: var(--eg-btn-h);
  box-shadow: none !important;
  font-size: 0.875rem;
}

input::placeholder,
textarea::placeholder {
  color: #8D98A9 !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--eg-accent) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--eg-accent-soft) !important;
}

label,
.form-label {
  color: var(--eg-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

[id$="Modal"],
[id^="modal-"],
[id*="modal"],
.fixed.inset-0.z-50 > div.fixed.inset-x-4,
.fixed.inset-0.z-50 > div.max-w-md,
.fixed.inset-0.z-50 > div.max-w-lg {
  /* panel children handled below */
}

.hero,
.hero-section,
section.hero {
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(20, 184, 166, 0.04), transparent 55%),
    linear-gradient(180deg, var(--eg-bg) 0%, var(--eg-bg-soft) 100%);
}

.landing-nav,
.nav {
  border-bottom: 1px solid var(--eg-border);
  background: rgba(2, 3, 5, 0.94);
  backdrop-filter: blur(8px);
}

.btn-primary,
.btn.btn-primary,
a.btn-primary,
.btn-primary-sm {
  background: var(--eg-accent) !important;
  color: var(--eg-accent-ink) !important;
  border: none !important;
  box-shadow: none !important;
}

.pricing-card,
.plan-card,
.feature-card {
  border-color: var(--eg-border) !important;
  background: var(--eg-panel) !important;
  box-shadow: var(--eg-shadow);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

*::-webkit-scrollbar { width: 8px; height: 8px; }

*::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

*::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 480px) {
  html, body {
      overflow-x: hidden;
      max-width: 100vw;
    }

}

.hero-ctas .btn,
.hero-ctas a.btn {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 650;
}

.pricing-card,
.plan-card {
  transition: border-color 0.15s ease;
}

.pricing-card:hover,
.plan-card:hover {
  border-color: #334155 !important;
}

@media (max-width: 430px) {
  body {
      font-size: 0.9375rem;
    }

  button,
    .btn,
    a.btn {
      min-height: 42px;
    }

}

html.dark,
html.theme-dark {
  overflow-x: clip;
}

html.dark body,
html.theme-dark body,
.flex.h-screen.overflow-hidden,
.profesor-app,
main.flex-1 {
  max-width: 100%;
}

@media (max-width: 430px) {
  a[href*="pago"],
    a[href*="plan"] {
      max-width: 100%;
    }

}

@media (prefers-reduced-motion: no-preference) {
  .eg-btn,
    button,
    .btn,
    a.btn,
    button.bg-primary,
    a.bg-primary,
    .eg-card,
    .eg-admin-card,
    .eg-prof-panel,
    .eg-plan-card,
    .eg-routine-row,
    .ej-block,
    .eg-premium-table tbody tr,
    .eg-admin-table tbody tr,
    .eg-prof-table tbody tr,
    .eg-filter-bar button,
    .eg-admin-tabs a,
    .eg-admin-tabs button,
    .tab-btn,
    nav.lg\:hidden.sticky.bottom-0 a,
    .app-bottom-nav a,
    .app-bottom-nav-item,
    aside#sidebar-profesor a,
    aside#sidebar-admin a,
    aside[id^="sidebar"] a,
    .eg-routine-meta-chip,
    .eg-ex-thumb,
    .eg-ex-thumb--sm,
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    .eg-hover-lift,
    .eg-tap-feedback {
      transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease,
        opacity 0.16s ease;
    }

}

@media (prefers-reduced-motion: reduce) {
  *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }

}

.eg-tap-feedback:active,
button:active:not(:disabled),
.btn:active:not(:disabled),
a.btn:active,
button.bg-primary:active,
a.bg-primary:active,
[data-submit-loading].bg-primary:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.eg-focus-ring:focus-visible,
button:focus-visible,
.btn:focus-visible,
a.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.55);
  outline-offset: 2px;
}

@keyframes eg-spin {
  to { transform: rotate(360deg); }
}

@keyframes eg-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes eg-thumb-in {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

@keyframes eg-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark select,
html.dark textarea,
html.theme-dark input:not([type="checkbox"]):not([type="radio"]),
html.theme-dark select,
html.theme-dark textarea {
  background-color: var(--eg-bg-soft);
  border-color: var(--eg-border);
  color: var(--eg-text);
}

html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus,
html.theme-dark input:focus,
html.theme-dark select:focus,
html.theme-dark textarea:focus {
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
  outline: none;
}

html.dark input::placeholder,
html.theme-dark input::placeholder {
  color: var(--eg-text-soft);
}

@keyframes eg-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes eg-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html.dark input:not([type="checkbox"]):not([type="radio"]):focus,
html.dark select:focus,
html.dark textarea:focus,
html.theme-dark input:not([type="checkbox"]):not([type="radio"]):focus,
html.theme-dark select:focus,
html.theme-dark textarea:focus {
  border-color: var(--eg-accent-border) !important;
  box-shadow: 0 0 0 2px var(--eg-accent-soft) !important;
}

.eg-focus-ring:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--eg-accent-border);
  outline-offset: 2px;
}
