/* ============================================================
   AulaAgenda — Hoja de estilos
   Tipografía: Sora (display) + Inter (texto)
   Paleta: índigo profundo + ámbar académico
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent: #f59e0b;
  --accent-dark: #b45309;
  --bg: #faf9f7;
  --bg-alt: #f4f2fc;
  --surface: #ffffff;
  --ink: #1e1b4b;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #e7e5ef;
  --danger: #dc2626;
  --success: #059669;
  --t-exam: #e11d48;
  --t-assignment: #d97706;
  --t-presentation: #7c3aed;
  --t-other: #0284c7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(30,27,75,.06), 0 2px 8px rgba(30,27,75,.06);
  --shadow-md: 0 4px 12px rgba(30,27,75,.08), 0 12px 32px rgba(30,27,75,.10);
  --shadow-lg: 0 8px 24px rgba(30,27,75,.12), 0 24px 64px rgba(30,27,75,.16);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; color: var(--ink); }
ul { list-style: none; }

.hidden { display: none !important; }

:focus-visible { outline: 3px solid rgba(99,102,241,.55); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease, color .3s ease, border-color .3s ease, opacity .3s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

.btn-primary { background: linear-gradient(135deg, var(--primary), #6366f1); color: #fff; box-shadow: 0 6px 18px rgba(79,70,229,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(79,70,229,.45); }

.btn-accent { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1e1b4b; box-shadow: 0 6px 18px rgba(245,158,11,.4); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(245,158,11,.5); }

.btn-ghost { border: 1.5px solid var(--border); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); transform: translateY(-2px); }

.btn-danger { background: #fef2f2; color: var(--danger); border: 1.5px solid #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; min-width: 36px; border-radius: 9px; font-size: 15px;
  transition: background .25s ease, transform .25s ease;
}
.icon-btn:hover { background: var(--bg-alt); transform: translateY(-1px); }
.icon-btn.danger:hover { background: #fef2f2; }

/* ---------- Navegación landing ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; color: #fff;
  transition: background .35s ease, box-shadow .35s ease, color .35s ease;
}
.site-nav.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--ink); box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: inherit; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo b { color: var(--accent); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-link { color: inherit; opacity: .85; font-weight: 500; font-size: 15px; transition: opacity .25s ease; }
.nav-link:hover { opacity: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav-toggle span { width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
  padding: 170px 0 110px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .35;
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.blob-1 { width: 480px; height: 480px; background: #6366f1; top: -160px; right: -120px; }
.blob-2 { width: 380px; height: 380px; background: #f59e0b; bottom: -180px; left: -120px; opacity: .25; }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.hero h1 { font-size: clamp(40px, 5.2vw, 68px); font-weight: 800; color: #fff; margin: 22px 0 20px; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; color: #fbbf24; }
.hero-sub { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.82); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px; font-size: 13.5px; color: rgba(255,255,255,.7); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

.hero-visual { position: relative; }
.mock {
  background: var(--surface); border-radius: 20px; padding: 20px;
  box-shadow: var(--shadow-lg); color: var(--ink); max-width: 440px; margin-left: auto;
  animation: floaty 7s ease-in-out infinite;
}
.mock-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-family: var(--font-display); font-weight: 700; }
.mock-top .mock-dots { display: flex; gap: 6px; }
.mock-top .mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-top .mock-dots i:first-child { background: #fca5a5; }
.mock-week, .mock-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.mock-week span { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 6px; }
.mock-day {
  position: relative; aspect-ratio: 1; border-radius: 9px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.mock-day.dim { opacity: .35; }
.mock-day.mock-on::after { content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--t-exam); }
.mock-day.mock-today { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,.45); }
.mock-day.mock-mark { outline: 2px solid #fbbf24; outline-offset: -2px; }
.mock-chips { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-secondary);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
}
.chip b { margin-left: auto; color: var(--ink); }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip-exam .chip-dot { background: var(--t-exam); }
.chip-work .chip-dot { background: var(--t-assignment); }

.mock-mail {
  position: absolute; left: -14px; bottom: -26px; z-index: 2;
  display: flex; align-items: center; gap: 12px; max-width: 330px;
  background: var(--surface); color: var(--ink); border-radius: 14px; padding: 13px 16px;
  box-shadow: var(--shadow-lg); animation: floaty 7s ease-in-out 1.2s infinite;
}
.mock-mail .mail-ico {
  width: 40px; height: 40px; flex: none; border-radius: 11px; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}
.mock-mail b { display: block; font-size: 13.5px; }
.mock-mail span { font-size: 12.5px; color: var(--text-muted); }

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Encabezados de sección ---------- */
.kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); background: rgba(79,70,229,.09); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Características ---------- */
.features { background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(79,70,229,.35); }
.feature-ico {
  width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 23px; margin-bottom: 18px; background: rgba(79,70,229,.1);
}
.feature-card h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 9px; }
.feature-card p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.65; }

/* ---------- Cómo funciona ---------- */
.how { background: var(--bg-alt); position: relative; overflow: hidden; }
.how::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .35;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.how-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step {
  background: var(--surface); border-radius: var(--radius); padding: 34px 30px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step:nth-child(2) { margin-top: 34px; }
.step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--primary);
  background: rgba(79,70,229,.1); width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.step h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.65; }
.step-arrow { position: absolute; right: -30px; top: 50%; font-size: 24px; color: var(--primary-light); transform: translateY(-50%); }
.step:nth-child(3) .step-arrow { display: none; }

/* ---------- Franja CTA ---------- */
.cta-band {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: linear-gradient(150deg, #1e1b4b, #3730a3);
  padding: 96px 0;
}
.cta-band .blob-1 { top: auto; bottom: -220px; right: 30%; opacity: .35; }
.cta-band h2 { color: #fff; font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 620px; margin: 0 auto 34px; font-size: 17px; line-height: 1.7; }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: box-shadow .3s ease; }
.faq-item.open { box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  text-align: left; padding: 20px 24px; font-weight: 600; font-size: 16px; color: var(--ink);
}
.faq-q .faq-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; font-size: 15px; transition: transform .3s ease; }
.faq-item.open .faq-ico { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 24px 22px; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 56px 0 30px; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer p { font-size: 14px; max-width: 380px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; color: rgba(255,255,255,.7); font-size: 14.5px; padding: 5px 0; transition: color .25s ease; }
.footer-col a:hover { color: #fbbf24; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.55); }

/* ---------- Dashboard ---------- */
.dash-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.dash-inner { display: flex; align-items: center; gap: 22px; height: 70px; }
.dash-inner .logo { color: var(--ink); font-size: 18px; }
.tabs { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--text-secondary);
  transition: background .25s ease, color .25s ease; white-space: nowrap; min-height: 40px;
}
.tab:hover { background: var(--bg-alt); color: var(--ink); }
.tab.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.user-area { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary), #818cf8); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}

.dash-main { padding: 104px 0 80px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 18px;
}
.stat-ico { width: 48px; height: 48px; flex: none; border-radius: 13px; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.stat-ico.i1 { background: rgba(225,29,72,.1); }
.stat-ico.i2 { background: rgba(2,132,199,.1); }
.stat-ico.i3 { background: rgba(245,158,11,.14); }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 28px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.list-head h2 { font-size: 21px; font-weight: 700; }

/* Calendario */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.cal-toolbar h2 { font-size: 22px; font-weight: 700; }
.cal-nav { display: flex; gap: 8px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow span { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; padding-bottom: 8px; }
.cal-day {
  position: relative; min-height: 66px; border-radius: 12px; background: var(--bg);
  border: 1.5px solid transparent; padding: 8px 10px; text-align: left;
  font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.cal-day:hover { background: var(--bg-alt); transform: translateY(-2px); }
.cal-day.dim { opacity: .4; }
.cal-day.today { border-color: #f59e0b; }
.cal-day.selected { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.4); }
.cal-dots { position: absolute; bottom: 8px; left: 10px; display: flex; gap: 4px; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal-day.selected .cal-dots i { outline: 1.5px solid rgba(255,255,255,.7); outline-offset: -1px; }

.day-panel { margin-top: 24px; border-top: 1px dashed var(--border); padding-top: 22px; }
.day-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.day-panel-head h3 { font-size: 17px; font-weight: 700; }
.day-events { display: flex; flex-direction: column; gap: 10px; }
.mini-event {
  display: flex; align-items: center; gap: 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 14.5px;
}
.mini-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mini-event b { color: var(--ink); }
.mini-event .mini-sub { color: var(--text-muted); font-size: 13px; }
.mini-time { margin-left: auto; font-weight: 700; color: var(--ink); font-size: 13.5px; white-space: nowrap; }
.day-hint { color: var(--text-muted); font-size: 14px; padding: 8px 0; }

/* Tarjetas de eventos */
.events-list { display: flex; flex-direction: column; gap: 14px; }
.event-card {
  display: flex; align-items: center; gap: 18px; background: var(--bg);
  border: 1px solid var(--border); border-left: 5px solid var(--t-other);
  border-radius: 14px; padding: 18px 20px; transition: transform .3s ease, box-shadow .3s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.event-card.t-exam { border-left-color: var(--t-exam); }
.event-card.t-assignment { border-left-color: var(--t-assignment); }
.event-card.t-presentation { border-left-color: var(--t-presentation); }
.event-card.t-other { border-left-color: var(--t-other); }
.event-card.past { opacity: .55; }
.event-info { flex: 1; min-width: 0; }
.event-topline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.event-title { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: var(--ink); }
.type-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; color: #fff; }
.type-badge.t-exam { background: var(--t-exam); }
.type-badge.t-assignment { background: var(--t-assignment); }
.type-badge.t-presentation { background: var(--t-presentation); }
.type-badge.t-other { background: var(--t-other); }
.subject-tag { font-size: 12.5px; font-weight: 600; color: var(--primary); background: rgba(79,70,229,.09); padding: 3px 10px; border-radius: 999px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--text-secondary); }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.countdown {
  font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: rgba(245,158,11,.14); color: var(--accent-dark); white-space: nowrap;
}
.countdown.soon { background: rgba(225,29,72,.1); color: var(--t-exam); }
.countdown.done { background: var(--bg-alt); color: var(--text-muted); }
.event-actions { display: flex; gap: 6px; }

/* Apuntes */
.notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.note-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.note-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.note-img { width: 100%; height: 170px; object-fit: cover; background: var(--bg-alt); }
.note-img-ph {
  height: 170px; display: flex; align-items: center; justify-content: center; font-size: 42px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}
.note-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.note-body h3 { font-size: 17px; font-weight: 700; }
.note-content {
  color: var(--text-secondary); font-size: 14px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.note-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-date { font-size: 12.5px; color: var(--text-muted); }
.note-actions { display: flex; gap: 4px; }

.empty-state { text-align: center; padding: 56px 24px; color: var(--text-muted); }
.empty-state .empty-ico { font-size: 46px; margin-bottom: 14px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--ink); }
.empty-state p { font-size: 14.5px; max-width: 420px; margin: 0 auto 20px; line-height: 1.6; }

/* ---------- Modales ---------- */
.modal {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  background: rgba(30,27,75,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 24px; overflow-y: auto;
}
.modal-card {
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; padding: 30px 32px; position: relative;
  animation: modalIn .35s cubic-bezier(.2,.9,.3,1.2);
  margin: auto;
}
.modal-card.wide { max-width: 640px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-alt); font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, transform .25s ease;
}
.modal-close:hover { background: var(--border); transform: rotate(90deg); }
.modal-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; padding-right: 40px; }
.modal-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; }

.auth-tabs { display: flex; background: var(--bg-alt); border-radius: 12px; padding: 5px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 10px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--text-secondary); transition: background .25s ease, color .25s ease, box-shadow .25s ease; min-height: 44px; }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 14px;
  background: var(--surface); font-size: 14.5px; transition: border-color .25s ease, box-shadow .25s ease;
  min-height: 44px; width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.12);
}
.field .hint { font-size: 12px; color: var(--text-muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.form-error { display: none; background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 16px; }
.form-error.show { display: block; }

.file-preview { max-height: 180px; border-radius: 10px; object-fit: cover; display: none; }
.file-preview.show { display: block; }
input[type="file"] { padding: 9px 0 !important; border: none !important; min-height: auto !important; }
input[type="file"]::file-selector-button {
  margin-right: 12px; border: none; background: var(--bg-alt); color: var(--ink);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer;
}

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; border-radius: 12px; padding: 13px 18px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); max-width: 340px;
  border-left: 4px solid var(--success); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2);
}
.toast.err { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Animaciones scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.hero-copy > * { animation: heroIn .8s cubic-bezier(.2,.9,.3,1) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .25s; }
.hero-copy > *:nth-child(4) { animation-delay: .35s; }
.hero-copy > *:nth-child(5) { animation-delay: .45s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 70px; }
  .hero { padding: 150px 0 90px; }
  .mock { margin: 0 auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .step:nth-child(2) { margin-top: 0; }
  .step-arrow { display: none; }
}
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 90px; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); color: var(--ink); padding: 18px 24px 22px; gap: 6px;
    box-shadow: var(--shadow-md); display: none;
  }
  .site-nav.scrolled .nav-links, .site-nav .nav-links { color: var(--ink); }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 6px; opacity: 1; }
  .nav-cta { flex-direction: column; align-items: stretch; margin-top: 8px; }
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 52px; padding: 6px 7px; font-size: 12px; }
  .cal-dow, .cal-grid { gap: 5px; }
  .event-card { flex-direction: column; align-items: stretch; }
  .event-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .modal { padding: 14px; }
  .modal-card { padding: 24px 20px; }
  .user-chip .user-name { display: none; }
  .mock-mail { left: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}