/* ============================================
   EduDesk - Tema «Ateneo» (Bachillerato y EBAU, 16-18 años)
   ============================================
   Biblioteca tranquila para concentrarse: papel cálido con renglones,
   titulares con serifa (Fraunces), texto en Source Sans 3, verde botella,
   burdeos y un toque dorado. Movimiento mínimo: solo la borla del birrete.
   Contrastes medidos (WCAG AA): texto 15,7:1 · secundario 8,7:1 ·
   botón blanco sobre #1F6F5C 6,0:1 · enlace 7,2:1; en modo noche ≥ 5,7:1.
   ============================================ */

[data-cole-theme="ateneo"] {
    --cole-bg-body: #F4F0E8;
    --cole-bg-desktop: #EDE7DA;
    --cole-bg-surface: #FFFDF8;
    --cole-bg-surface-hover: #F3EEE3;
    --cole-bg-elevated: #FFFDF8;
    --cole-bg-taskbar: rgba(255, 253, 248, 0.94);
    --cole-bg-window: #FFFDF8;
    --cole-bg-window-header: #EFE9DC;
    --cole-bg-input: #FFFFFF;
    --cole-bg-sidebar: #F8F4EC;
    --cole-text-primary: #14213D;
    --cole-text-secondary: #3F4A63;
    --cole-text-muted: #5B6479;
    --cole-text-link: #1A5C80;
    --cole-primary: #1F6F5C;
    --cole-primary-light: #4FA58C;
    --cole-primary-dark: #17574A;
    --cole-secondary: #8C2F39;
    --cole-accent: #C9A227;
    --cole-border: #DED7C8;
    --cole-border-strong: #C9C0AD;
    --cole-border-focus: #1F6F5C;
    --cole-radius-sm: 4px;
    --cole-radius-md: 6px;
    --cole-radius-lg: 12px;
    --cole-radius-xl: 16px;
    --cole-shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06);
    --cole-shadow-md: 0 4px 14px rgba(20, 33, 61, 0.08);
    --cole-shadow-lg: 0 10px 28px rgba(20, 33, 61, 0.10);
    --cole-shadow-window: 0 18px 44px rgba(20, 33, 61, 0.16), 0 1px 0 rgba(20, 33, 61, 0.05);
    --edu-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}
[data-cole-theme="ateneo"]:not([data-dyslexia="true"]) {
    --cole-font-family: 'Source Sans 3', 'Poppins', system-ui, sans-serif;
}

/* --- Modo noche: sala de lectura --- */
[data-cole-theme="ateneo"][data-theme="dark"] {
    --cole-bg-body: #0E1526;
    --cole-bg-desktop: #0E1526;
    --cole-bg-surface: #172038;
    --cole-bg-surface-hover: #1F2A46;
    --cole-bg-elevated: #172038;
    --cole-bg-taskbar: rgba(23, 32, 56, 0.94);
    --cole-bg-window: #172038;
    --cole-bg-window-header: #1F2A46;
    --cole-bg-input: #0E1526;
    --cole-bg-sidebar: #131B30;
    --cole-text-primary: #EEE8DA;
    --cole-text-secondary: #C2BBA8;
    --cole-text-muted: #A39D8C;
    --cole-text-link: #8CC7E8;
    --cole-border: rgba(238, 232, 218, 0.14);
    --cole-border-strong: rgba(238, 232, 218, 0.26);
}
[data-cole-theme="ateneo"][data-contrast="high"] { --cole-text-primary: #000; --cole-text-secondary: #222; }
[data-cole-theme="ateneo"][data-theme="dark"][data-contrast="high"] { --cole-text-primary: #FFF; --cole-text-secondary: #EEE; }

[data-cole-theme="ateneo"] body { font-family: var(--cole-font-family); }
[data-cole-theme="ateneo"]:not([data-dyslexia="true"]) h1,
[data-cole-theme="ateneo"]:not([data-dyslexia="true"]) h2,
[data-cole-theme="ateneo"]:not([data-dyslexia="true"]) h3,
[data-cole-theme="ateneo"]:not([data-dyslexia="true"]) .cole-window__title {
    font-family: var(--edu-font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* --- Fondo: papel con renglones y doble margen --- */
[data-cole-theme="ateneo"] .cole-desktop-wallpaper:not([data-wallpaper]),
[data-cole-theme="ateneo"] .cole-desktop-wallpaper[data-wallpaper="default"] {
    opacity: 1 !important;
    background:
        linear-gradient(90deg, transparent 0 72px, rgba(140, 47, 57, 0.22) 72px 73px, transparent 73px 76px, rgba(140, 47, 57, 0.22) 76px 77px, transparent 77px),
        repeating-linear-gradient(to bottom, transparent 0 31px, rgba(20, 33, 61, 0.06) 31px 32px),
        radial-gradient(1200px 700px at 70% 20%, #FBF8F1 0%, transparent 70%),
        #EDE7DA !important;
}
[data-cole-theme="ateneo"][data-theme="dark"] .cole-desktop-wallpaper:not([data-wallpaper]),
[data-cole-theme="ateneo"][data-theme="dark"] .cole-desktop-wallpaper[data-wallpaper="default"] {
    background:
        repeating-linear-gradient(to bottom, transparent 0 31px, rgba(238, 232, 218, 0.04) 31px 32px),
        radial-gradient(1000px 600px at 75% 10%, #1B2747 0%, transparent 70%),
        #0E1526 !important;
}

/* --- Iconos: sobrios, con elevación suave --- */
[data-cole-theme="ateneo"] .cole-desktop-icon__graphic {
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 6px 14px rgba(20, 33, 61, 0.16);
    transition: transform 200ms ease, box-shadow 200ms ease;
}
[data-cole-theme="ateneo"] .cole-desktop-icon:hover { background: rgba(20, 33, 61, 0.05); }
[data-cole-theme="ateneo"] .cole-desktop-icon:hover .cole-desktop-icon__graphic {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(20, 33, 61, 0.20);
}
[data-cole-theme="ateneo"] .cole-desktop-icon__label {
    font-weight: 600;
    color: var(--cole-text-primary);
    background: rgba(255, 253, 248, 0.85);
    border-radius: 4px;
    padding: 0 6px;
}
[data-cole-theme="ateneo"][data-theme="dark"] .cole-desktop-icon__label { background: rgba(23, 32, 56, 0.85); }

/* --- Barra de tareas: hoja con filete dorado --- */
[data-cole-theme="ateneo"] .cole-taskbar { border-top: 1px solid var(--cole-border-strong); }
[data-cole-theme="ateneo"] .cole-taskbar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 2px;
    height: 1px;
    background: rgba(201, 162, 39, 0.55);
}
[data-cole-theme="ateneo"] .cole-taskbar__logo { color: var(--cole-text-primary); font-family: var(--edu-font-display); }

/* --- Ventanas --- */
[data-cole-theme="ateneo"] .cole-window { border: 1px solid var(--cole-border-strong); border-radius: 10px; }
[data-cole-theme="ateneo"] .cole-window__header { border-bottom: 1px solid var(--cole-border); }

/* --- Botones, tarjetas y campos --- */
[data-cole-theme="ateneo"] .cole-btn { border-radius: 6px; font-weight: 600; }
[data-cole-theme="ateneo"] .cole-btn-primary { background: #1F6F5C; color: #FFFFFF; }
[data-cole-theme="ateneo"] .cole-btn-primary:hover { background: #17574A; color: #FFFFFF; transform: none; }
[data-cole-theme="ateneo"][data-theme="dark"] .cole-btn-primary { background: #24735F; }
[data-cole-theme="ateneo"] .cole-card { border: 1px solid var(--cole-border); border-radius: 10px; }
[data-cole-theme="ateneo"] .cole-input:focus,
[data-cole-theme="ateneo"] .cole-select:focus { border-color: #1F6F5C; box-shadow: 0 0 0 3px rgba(31, 111, 92, 0.18); }

/* --- Logo animado: la borla del birrete se balancea --- */
.edu-logo--ateneo .edu-logo__tassel { transform-box: view-box; transform-origin: 16px 13px; }
/* En modo noche el marino se perdía sobre la barra oscura: filo dorado */
[data-theme="dark"] .edu-logo--ateneo .edu-logo__fondo { stroke: #C9A227; stroke-width: 1.5; }
@media (prefers-reduced-motion: no-preference) {
    .edu-logo--ateneo .edu-logo__tassel { animation: edu-ateneo-borla 4.5s ease-in-out infinite; }
    .cole-taskbar__logo:hover .edu-logo--ateneo .edu-logo__tassel { animation-duration: 1.4s; }
}
@keyframes edu-ateneo-borla {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-7deg); }
    75% { transform: rotate(5deg); }
}

/* --- Menos movimiento --- */
@media (prefers-reduced-motion: reduce) {
    .edu-logo--ateneo,
    .edu-logo--ateneo * { animation: none !important; }
    [data-cole-theme="ateneo"] .cole-desktop-icon__graphic { transition: none; }
}
