/**
 * ROUND 53 - Sistema de diseno (modo oscuro)
 * Tokens de DESIGN.md (raiz del repo): verde lima como unico acento, display muy pesado, cartas de 24 px.
 * Leer DESIGN.md antes de cualquier cambio visual.
 *
 * Uso: class="r53-theme" en body. DESIGN.md es claro, salvo sus bandas oscuras (`hero-band-dark`,
 * `card-feature-dark`, `footer`): aqui toda la pagina usa esa polaridad. No define superficies oscuras, asi
 * que `--r53-surface` y `--r53-surface-hover` son tonos derivados de su tinta `#0e0f0c`.
 * Las reglas de accesibilidad son mas estrictas que las de DESIGN.md: foco visible, entradas de 16 px,
 * controles de 48 px y movimiento reducido.
 * Wise Sans es propietaria: DESIGN.md indica Inter 900 como sustituto.
 */

.r53-theme {
  /* Paleta */
  --r53-black: #0e0f0c;
  --r53-white: #ffffff;
  --r53-primary: #9fe870;
  --r53-primary-hover: #cdffad;
  --r53-primary-pressed: #c5edab;
  --r53-text-on-accent: #0e0f0c;
  /* Roles */
  --r53-bg: #0e0f0c;
  --r53-surface: #1a1c17;
  --r53-surface-hover: #262922;
  --r53-heading: #ffffff;
  --r53-text: #e8ebe6;
  --r53-text-muted: #b4b8b1;
  --r53-link: #9fe870;
  --r53-border: #454745;
  --r53-border-control: #868685;
  --r53-focus: #cdffad;
  --r53-success: #2ead4b;
  --r53-error: #ff9a9e;
  --r53-input-bg: #0e0f0c;
  --r53-input-text: #ffffff;
  --r53-input-placeholder: #b4b8b1;
  --r53-disabled-bg: #262922;
  --r53-disabled-text: #b4b8b1;
  /* Tipografia */
  --r53-font-body: Inter, system-ui, -apple-system, sans-serif;
  --r53-font-display: "Wise Sans", Inter, system-ui, sans-serif;
  --r53-text-xs: 0.75rem;
  --r53-text-sm: 0.875rem;
  --r53-text-md: 1rem;
  --r53-text-lg: 1.25rem;
  --r53-text-xl: 1.5rem;
  --r53-title-size: clamp(3rem, 1rem + 8vw, 7.875rem);
  --r53-heading-size: clamp(2.25rem, 1.5rem + 2.5vw, 4rem);
  --r53-weight-regular: 400;
  --r53-weight-semibold: 600;
  --r53-weight-display: 900;
  --r53-leading-body: 1.5;
  --r53-leading-heading: 1.02;
  /* Espacios */
  --r53-space-1: 0.25rem;
  --r53-space-2: 0.5rem;
  --r53-space-3: 0.75rem;
  --r53-space-4: 1rem;
  --r53-space-6: 1.5rem;
  --r53-space-8: 2rem;
  --r53-space-12: 3rem;
  --r53-space-16: 4rem;
  /* Formas */
  --r53-radius-input: 0.75rem;
  --r53-radius-card: 1.5rem;
  --r53-radius-button: 1.5rem;
  --r53-radius-pill: 9999px;
  --r53-control-height: 3rem;
  --r53-duration-fast: 150ms;
  --r53-duration-normal: 200ms;
  --r53-ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: dark;
  background: var(--r53-bg);
  color: var(--r53-text);
  font-family: var(--r53-font-body);
  font-size: var(--r53-text-md);
  line-height: var(--r53-leading-body);
  overflow-wrap: break-word;
}
.r53-theme, .r53-theme *, .r53-theme *::before, .r53-theme *::after { box-sizing: border-box; }
.r53-theme .r53-title { font-family: var(--r53-font-display); font-weight: var(--r53-weight-display); font-size: var(--r53-title-size); line-height: var(--r53-leading-heading); color: var(--r53-heading); }
.r53-theme .r53-link { color: var(--r53-link); text-decoration: underline; text-underline-offset: 0.2em; }
.r53-theme .r53-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--r53-space-2);
  min-height: var(--r53-control-height); min-width: var(--r53-control-height); max-width: 100%;
  padding: var(--r53-space-3) var(--r53-space-6); border: 1px solid transparent;
  border-radius: var(--r53-radius-button); background: var(--r53-primary); color: var(--r53-text-on-accent);
  font: var(--r53-weight-semibold) var(--r53-text-md)/1.5 var(--r53-font-body);
  text-align: center; text-decoration: none; white-space: normal; cursor: pointer;
  transition: background-color var(--r53-duration-fast) var(--r53-ease), color var(--r53-duration-fast) var(--r53-ease);
}
.r53-theme .r53-button:hover { background: var(--r53-primary-hover); }
.r53-theme .r53-button:active { background: var(--r53-primary-pressed); }
.r53-theme .r53-button--secondary { background: var(--r53-surface-hover); color: var(--r53-heading); }
.r53-theme .r53-button--secondary:is(:hover, :active) { background: var(--r53-border); }
.r53-theme .r53-button--full { width: 100%; }
.r53-theme .r53-button:disabled { background: var(--r53-disabled-bg); color: var(--r53-disabled-text); cursor: not-allowed; }
.r53-theme :focus-visible { outline: 3px solid var(--r53-focus); outline-offset: 3px; }
.r53-theme :is(.r53-input, .r53-select, .r53-textarea) { width: 100%; min-height: var(--r53-control-height); padding: var(--r53-space-3) var(--r53-space-4); border: 1px solid var(--r53-border-control); border-radius: var(--r53-radius-input); background: var(--r53-input-bg); color: var(--r53-input-text); font: inherit; font-size: max(1rem, 16px); }
.r53-theme .r53-input::placeholder, .r53-theme .r53-textarea::placeholder { color: var(--r53-input-placeholder); opacity: 1; }
.r53-theme .r53-textarea { min-height: 8rem; resize: vertical; }
.r53-theme :is(.r53-input, .r53-select, .r53-textarea)[aria-invalid="true"] { border: 2px solid var(--r53-error); }
@media (prefers-reduced-motion: reduce) {
  .r53-theme { --r53-duration-fast: 0ms; --r53-duration-normal: 0ms; }
  .r53-theme *, .r53-theme *::before, .r53-theme *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
