/* ============================================================================
   Discípulo+ — Tokens de diseño
   ----------------------------------------------------------------------------
   Valores extraídos de la aplicación real, sin inventar nada:
     · src/Discipulo.Presentation/Resources/Styles/Tokens.xaml  (tipografía,
       espaciado, radios, bordes, tamaños)
     · src/Discipulo.Presentation/Themes/LightTheme.xaml         (color claro)
     · src/Discipulo.Presentation/Themes/DarkTheme.xaml          (color oscuro)
   El sitio es una extensión del sistema visual de la app, no un tema nuevo.
   ========================================================================== */

:root {
  /* --- Tipografía ------------------------------------------------------- */
  --font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;

  /* Tamaños base de la app. En web el cuerpo sube a 18 px por legibilidad
     (FontSizeSmall = 18 es el mínimo del sistema). */
  --text-sm: 1rem;       /* 16px · notas, pies */
  --text-body: 1.125rem; /* 18px · cuerpo mínimo garantizado */
  --text-subtitle: 1.375rem; /* 22px */
  --text-title: 1.75rem;     /* 28px */
  --text-display: 2.125rem;  /* 34px */

  --leading-tight: 1.2;
  --leading-body: 1.65;

  /* --- Espaciado (escala de 4 px) --------------------------------------- */
  --space-xs: 0.25rem;  /* 4  */
  --space-sm: 0.5rem;   /* 8  */
  --space-md: 0.75rem;  /* 12 */
  --space-lg: 1rem;     /* 16 */
  --space-xl: 1.5rem;   /* 24 */
  --space-xxl: 2rem;    /* 32 */
  --space-3xl: 3rem;    /* 48 */
  --space-4xl: 4.5rem;  /* 72 */

  --page-padding-x: 1.25rem; /* 20px · PagePadding 20,24 */
  --page-padding-y: 1.5rem;  /* 24px */
  --card-padding: 1.25rem;   /* 20px · CardPadding 20 */
  --button-padding-x: 1.375rem; /* 22px · ButtonPadding 22,12 */
  --button-padding-y: 0.75rem;  /* 12px */
  --chip-padding-x: 0.75rem;    /* 12px */
  --chip-padding-y: 0.375rem;   /* 6px  */

  /* --- Radios (Corner* de Tokens.xaml) ---------------------------------- */
  --radius-card: 24px;
  --radius-hero: 32px;
  --radius-popup: 28px;
  --radius-input: 16px;
  --radius-chip: 20px;
  --radius-button: 26px;
  --radius-full: 999px;

  /* --- Bordes y foco ---------------------------------------------------- */
  --border-thin: 1px;
  --border-focus: 3px;

  /* --- Tamaños y puntos de quiebre -------------------------------------- */
  --content-max: 720px;    /* ContentMaxWidth */
  --content-wide: 1080px;  /* expansión de ContentMaxWidthExpanded (960) para web */
  --bp-compact: 600px;     /* BreakpointCompact  */
  --bp-expanded: 900px;    /* BreakpointExpanded */
  --min-touch: 52px;       /* MinTouchTarget */

  /* --- Elevación (Shadow: opacidad, radio y desplazamiento de la app) --- */
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.18);
  --shadow-hero: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-popup: 0 10px 24px rgba(0, 0, 0, 0.35);

  /* --- Cristal (liquid glass elegante, sobrio) -------------------------- */
  --glass-blur: 18px;
  --glass-saturate: 140%;
  --glass-alpha: 0.72;
  --glass-highlight: rgba(255, 255, 255, 0.55);

  --transition: 180ms cubic-bezier(0.2, 0, 0.2, 1);
}

/* --- Tema claro: LightTheme.xaml ---------------------------------------- */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-elevated: #eef3f7;
  --card: #ffffff;
  --surface-hover: #e3ebf1;
  --surface-pressed: #d3dfe8;

  --text-primary: #14202a;
  --text-secondary: #4a5a68;
  --text-disabled: #76838f;
  --on-primary: #ffffff;

  --primary: #015f81;
  --primary-hover: #014d68;
  --primary-pressed: #013b50;
  --brand-deep: #04325b;
  --accent: #0089f7;

  --link: #015f81;
  --border: #7c8e9b;
  --border-strong: #64768a;
  --focus: #1a44c8;

  --success: #1b6e3c;
  --warning: #8a5a00;
  --danger: #b3261e;

  /* Colores por tipo de contenido (chip/tarjeta) */
  --question: #5b43c7;
  --commitment: #a24a00;
  --scripture: #00695f;
  --impression: #a3246b;

  /* GlassHeroBrush de la app (degradado del héroe) */
  --hero-from: #ffffff;
  --hero-to: #e4eff6;

  --glass-bg: rgba(255, 255, 255, var(--glass-alpha));
  --glass-border: rgba(124, 142, 155, 0.32);
  --glass-shadow: 0 8px 24px rgba(4, 50, 91, 0.1);
  --page-glow-1: rgba(0, 137, 247, 0.1);
  --page-glow-2: rgba(1, 95, 129, 0.08);
}

/* --- Tema oscuro: DarkTheme.xaml ---------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0e1a24;
    --surface: #16242f;
    --surface-elevated: #1d3040;
    --card: #16242f;
    --surface-hover: #213647;
    --surface-pressed: #2a445a;

    --text-primary: #eef3f7;
    --text-secondary: #b4c3cf;
    --text-disabled: #7f90a0;
    --on-primary: #0b1620;

    --primary: #5fb4e0;
    --primary-hover: #7cc3e8;
    --primary-pressed: #4aa3d0;
    --brand-deep: #0b2a44;
    --accent: #5fb4e0;

    --link: #5fb4e0;
    --border: #56707f;
    --border-strong: #6f8a9b;
    --focus: #ffd479;

    --success: #6fcf97;
    --warning: #f2c14e;
    --danger: #ff8f86;

    --question: #b7a6f5;
    --commitment: #f0a56b;
    --scripture: #7fd1c7;
    --impression: #f2b8d0;

    --hero-from: #223648;
    --hero-to: #16242f;

    --glass-bg: rgba(29, 48, 64, var(--glass-alpha));
    --glass-border: rgba(111, 138, 155, 0.32);
    --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --page-glow-1: rgba(95, 180, 224, 0.12);
    --page-glow-2: rgba(0, 137, 247, 0.08);
  }
}

/* Tema oscuro forzado manualmente (por si se quiere fijar) */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0e1a24;
  --surface: #16242f;
  --surface-elevated: #1d3040;
  --card: #16242f;
  --surface-hover: #213647;
  --surface-pressed: #2a445a;

  --text-primary: #eef3f7;
  --text-secondary: #b4c3cf;
  --text-disabled: #7f90a0;
  --on-primary: #0b1620;

  --primary: #5fb4e0;
  --primary-hover: #7cc3e8;
  --primary-pressed: #4aa3d0;
  --brand-deep: #0b2a44;
  --accent: #5fb4e0;

  --link: #5fb4e0;
  --border: #56707f;
  --border-strong: #6f8a9b;
  --focus: #ffd479;

  --success: #6fcf97;
  --warning: #f2c14e;
  --danger: #ff8f86;

  --question: #b7a6f5;
  --commitment: #f0a56b;
  --scripture: #7fd1c7;
  --impression: #f2b8d0;

  --hero-from: #223648;
  --hero-to: #16242f;

  --glass-bg: rgba(29, 48, 64, var(--glass-alpha));
  --glass-border: rgba(111, 138, 155, 0.32);
  --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --page-glow-1: rgba(95, 180, 224, 0.12);
  --page-glow-2: rgba(0, 137, 247, 0.08);
}
