@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600&display=swap');

:root{
  --night: #0b0b16;
  --night-2: #131226;
  --panel: #17162c;
  --violet-deep: #4c1d95;
  --violet: #7c3aed;
  --violet-soft: #a78bfa;
  --violet-pale: #cabdfb;
  --ink: #f4f2fb;
  --ink-dim: #b9b4d1;
  --line: rgba(244,242,251,0.12);
  --white-glow: #efeaff;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--night);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.admin-locked{
  overflow: hidden;
}
h1,h2,h3, .display{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a{ color: inherit; }

/* ---------- Nav ---------- */
header.nav{
  position: sticky;
  top: 0;
  z-index: 20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 6vw;
  background: rgba(11,11,22,0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}
.hero-logo{
  position: relative;
  z-index: 1;
  display: block;
  width: 384px;
  height: 384px;
  object-fit: contain;
  margin: 0 auto 28px;
  max-width: 100%;
}

.login-logo{
  display: block;
  width: 336px;
  height: 336px;
  object-fit: contain;
  margin: 0 auto 20px;
  max-width: 100%;
}

.brand{
  text-decoration: none;
  display:flex;
  align-items:center;
  gap: 10px;
}
.brand-logo{
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}
.home-brand{ cursor: pointer; }
.home-brand:hover .mark,
.home-brand:hover .sub{ color: var(--white-glow); }
.brand .mark{
  font-family:'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.brand .sub{
  font-size: 0.78rem;
  color: var(--ink-dim);
}
nav.tabs{
  display:flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}
nav.tabs button{
  border: none;
  background: transparent;
  color: var(--ink-dim);
  font-family: 'Work Sans', sans-serif;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
nav.tabs button.active{
  background: var(--violet);
  color: white;
}
nav.tabs button:not(.active):hover{
  color: var(--ink);
}

/* ---------- Hero / Aurora ---------- */
.hero{
  position: relative;
  padding: 9vh 6vw 8vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.aurora-field{
  position:absolute;
  inset: -20% -10% 0 -10%;
  z-index:0;
  filter: blur(60px) saturate(120%);
  opacity: 0.65;
}
.aurora-band{
  position:absolute;
  width: 140%;
  height: 60%;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.b1{ background: radial-gradient(ellipse at 30% 40%, var(--violet) 0%, transparent 60%); top: -10%; left: -20%; animation: drift1 22s ease-in-out infinite; }
.b2{ background: radial-gradient(ellipse at 60% 50%, var(--violet-pale) 0%, transparent 65%); top: 10%; left: -10%; animation: drift2 28s ease-in-out infinite; }
.b3{ background: radial-gradient(ellipse at 40% 60%, var(--violet-deep) 0%, transparent 60%); top: 0%; left: 10%; animation: drift3 26s ease-in-out infinite; }

@keyframes drift1{ 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(4%, 6%) scale(1.08);} }
@keyframes drift2{ 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-5%, -4%) scale(1.05);} }
@keyframes drift3{ 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(3%, -6%) scale(1.1);} }

@media (prefers-reduced-motion: reduce){
  .b1,.b2,.b3{ animation: none; }
}

.hero-inner{ position:relative; z-index:1; max-width: 900px; }
.eyebrow-line{
  display:flex; align-items:center; gap:10px;
  color: var(--violet-pale);
  font-size: 0.85rem;
  margin-bottom: 22px;
}
.eyebrow-line .rule{ width: 32px; height:1px; background: var(--violet-pale); }

.hero h1{
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.98;
  background: linear-gradient(100deg, var(--white-glow) 10%, var(--violet-soft) 55%, var(--violet-pale) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede{
  margin-top: 26px;
  max-width: 58ch;
  font-size: 1.15rem;
  color: var(--ink-dim);
}
.hero .ctas{
  margin-top: 38px;
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn{
  display:inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: 'Work Sans', sans-serif;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--violet); color: white; }
.btn-primary:hover{ background: #8b4bf0; }
.btn-ghost{ background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover{ border-color: var(--violet-pale); }

/* ---------- Sections generic ---------- */
section.view{
  display:none;
  padding: 8vh 6vw;
  max-width: 1080px;
  margin: 0 auto;
}
section.view.active{ display:block; }

.section-head{ margin-bottom: 48px; max-width: 60ch; }
.section-head h2{ font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section-head p{ color: var(--ink-dim); margin-top: 14px; }

.team-section{
  padding-top: 8vh;
}
.video-section{
  padding-top: 8vh;
}
.video-wrap{
  max-width: 900px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.video-wrap video{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}
.manifiesto{
  max-width: 68ch;
  margin: -12px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--ink-dim);
  font-size: 1rem;
}
.manifiesto p{ margin: 0; }
.manifiesto strong{ color: var(--white-glow); font-weight: 600; }
.team-triangle{
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.team-card{
  background: linear-gradient(180deg, rgba(23,22,44,0.96), rgba(13,12,24,0.96));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px 22px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}
.team-photo{
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 2px dashed rgba(202,189,251,0.7);
  background:
    radial-gradient(circle at 30% 30%, rgba(202,189,251,0.16), transparent 55%),
    rgba(255,255,255,0.02);
  position: relative;
}
.team-photo::after{
  content: 'Foto';
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--ink-dim);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.team-photo.has-photo{
  background-size: cover;
  background-position: center;
  border-style: solid;
  border-color: var(--violet-soft);
}
.team-photo.has-photo::after{
  content: none;
}
.team-name{
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--ink);
}
.team-role{
  margin-top: 8px;
  color: var(--violet-pale);
  font-size: 0.9rem;
  font-weight: 600;
}

.role-presidente{ grid-column: 5 / span 4; }
.role-vicepresidente{ grid-column: 1 / span 4; }
.role-secretario{ grid-column: 5 / span 4; }
.role-tesorero{ grid-column: 9 / span 4; }
.role-vocal1{ grid-column: 1 / span 3; }
.role-vocal2{ grid-column: 4 / span 3; }
.role-vocal3{ grid-column: 7 / span 3; }
.role-vocal4{ grid-column: 10 / span 3; }

.team-profesores-wrap{
  margin-top: 34px;
}
.team-profesores-title{
  margin: 0 0 14px;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--white-glow);
}
.team-profesores-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.team-card-profesor{
  border-color: rgba(167,139,250,0.42);
}

@media (max-width: 920px){
  .team-triangle{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-presidente,
  .role-vicepresidente,
  .role-secretario,
  .role-tesorero,
  .role-vocal1,
  .role-vocal2,
  .role-vocal3,
  .role-vocal4{ grid-column: auto; }
  .team-profesores-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .team-triangle{ grid-template-columns: 1fr; }
}

/* Propuestas (acordeón) */
.propuestas{
  display:flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 20px;
  border-radius: 14px;
  overflow: hidden;
}
details.propuesta{
  background: var(--night);
}
details.propuesta summary{
  list-style: none;
  cursor: pointer;
  padding: 24px 26px;
  display:flex;
  align-items:center;
  gap: 16px;
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
}
details.propuesta summary::-webkit-details-marker{ display:none; }
details.propuesta summary .chev{
  margin-left: auto;
  width: 22px; height:22px;
  border: 1px solid var(--violet-soft);
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--violet-soft);
  transition: transform .2s ease;
  flex-shrink:0;
}
details.propuesta[open] summary .chev{ transform: rotate(45deg); }
.propuesta-body{
  padding: 0 26px 30px 26px;
  color: var(--ink-dim);
  font-size: 0.95rem;
}
.propuesta-body h4{
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.88rem;
  margin: 18px 0 8px;
}
.propuesta-body h4:first-child{ margin-top: 0; }
.propuesta-body ul{ margin: 0; padding-left: 20px; }
.propuesta-body li{ margin-bottom: 4px; }
.propuesta-body .objetivo{
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(124,58,237,0.12);
  border-left: 2px solid var(--violet-soft);
  color: var(--white-glow);
  font-size: 0.9rem;
}

/* ---------- Forms ---------- */
form.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px;
  max-width: 620px;
}
.form-embed-wrap{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  max-width: 660px;
  overflow: hidden;
}
.form-embed-wrap iframe{
  display:block;
  border-radius: 10px;
  background: var(--white-glow);
}
.field{ margin-bottom: 22px; }
.field label{
  display:block;
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea{
  width: 100%;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-size: 0.96rem;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: 2px solid var(--violet-soft);
  outline-offset: 1px;
}
.field textarea{ min-height: 110px; resize: vertical; }
.row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px){ .row2{ grid-template-columns: 1fr; } }

.feedback{
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  display:none;
}
.feedback.ok{ display:block; background: rgba(124,58,237,0.18); border: 1px solid var(--violet-soft); color: var(--white-glow); }
.feedback.err{ display:block; background: rgba(220,80,80,0.12); border: 1px solid #e08a8a; color: #f3caca; }

/* ---------- Footer ---------- */
footer{
  padding: 40px 6vw 60px;
  border-top: 1px solid var(--line);
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap: 12px;
  color: var(--ink-dim);
  font-size: 0.82rem;
}
footer > *:last-child{
  justify-self: end;
}
.footer-credit{
  justify-self: center;
  text-align: center;
  color: var(--ink-dim);
}

@media (max-width: 700px){
  footer{
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }
  footer > *:last-child{
    justify-self: center;
  }
  .footer-credit{ order: 2; }
  footer > a.link{ order: 3; }
  footer > span:first-child{ order: 1; }
}
footer a.link{
  color: var(--ink-dim);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer a.link:hover{ color: var(--violet-pale); }

.nav a.link{
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.nav a.link:hover{
  border-color: var(--violet-pale);
  color: var(--white-glow);
}

.admin-wrap{
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 8vh 6vw 10vh;
}
.admin-login-panel{
  position: fixed;
  inset: 0;
  z-index: 40;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  background: rgba(11,11,22,0.88);
  backdrop-filter: blur(12px);
}
.admin-login-panel.is-hidden{
  display: none !important;
}
.admin-login-shell{
  width: min(520px, 100%);
}
.admin-login-form{
  max-width: 100%;
}
.admin-content{
  display:flex;
  flex-direction: column;
  gap: 18px;
}
.admin-content[hidden]{
  display: none !important;
}
.admin-content.is-visible{
  display: flex;
}
.admin-form[hidden]{
  display: none !important;
}
.admin-form.is-visible{
  display: block;
}
.admin-title{
  margin-top: 36px;
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
}
.admin-list{
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.admin-item{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--ink);
}
.admin-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.admin-item .meta{
  margin-top: 8px;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.admin-message{
  margin-top: 12px;
  color: var(--white-glow);
  white-space: pre-wrap;
}
.admin-form{
  margin-top: 16px;
  max-width: 720px;
}
.admin-delete-btn{
  border: 1px solid rgba(220, 80, 80, 0.55);
  background: rgba(220, 80, 80, 0.12);
  color: #f3caca;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}
.admin-delete-btn:hover{
  background: rgba(220, 80, 80, 0.18);
}
.admin-content .section-head{
  margin-bottom: 12px;
}
.admin-content .admin-title{
  margin-top: 18px;
}
.admin-content .admin-list{
  margin-top: 0;
}
.admin-content .btn#admin-refresh{
  align-self: flex-start;
}
.admin-empty{
  margin: 0;
  padding: 18px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--ink-dim);
}

/* ---------- Admin panel (admin.html) ---------- */


/* ---------- Comisión: módulos por cargo ---------- */
.rol-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.rol-modulo{
  background: linear-gradient(180deg, rgba(23,22,44,0.96), rgba(13,12,24,0.96));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.rol-vocales, .rol-preceptores{ grid-column: 1 / -1; }
.rol-head{ display:flex; align-items:center; gap: 12px; }
.rol-head h3{ font-family:'Fraunces', serif; font-size: 1.3rem; margin:0; color: var(--white-glow); }
.rol-emoji{
  width: 42px; height: 42px; flex-shrink: 0;
  display:flex; align-items:center; justify-content:center;
  border-radius: 12px;
  background: rgba(124,58,237,0.2);
  border: 1px solid var(--violet-soft);
  font-size: 1.2rem;
}
.rol-personas{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.rol-persona{ display:flex; align-items:center; gap: 12px; }
.rol-avatar{
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--violet-soft);
  background-size: cover; background-position: center;
}
.rol-nombre{ font-family:'Fraunces', serif; font-size: 1.05rem; color: var(--ink); }
.rol-curso{ color: var(--violet-pale); font-size: 0.85rem; font-weight: 600; margin-top: 2px; }
.rol-modulo h4{
  margin: 4px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-soft);
}
.rol-modulo p{ margin: 0; color: var(--ink-dim); font-size: 0.96rem; }
.rol-vacante{ border-style: dashed; border-color: rgba(167,139,250,0.5); }
.rol-vacio{
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--line);
  color: var(--ink-dim);
  font-size: 0.92rem;
}
.rol-cta{ align-self: flex-start; margin-top: 4px; }

@media (max-width: 760px){
  .rol-grid{ grid-template-columns: 1fr; }
}

/* ---------- Tabs en pantallas chicas ---------- */
@media (max-width: 700px){
  nav.tabs{ width: 100%; overflow-x: auto; }
  nav.tabs button{ white-space: nowrap; flex-shrink: 0; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-family: 'Work Sans', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  transition: transform .2s ease, background .2s ease;
}
.wa-float:hover{ background: #1ebe5a; transform: translateY(-2px); }
.wa-float:focus-visible{ outline: 3px solid var(--white-glow); outline-offset: 3px; }
.wa-float svg{ flex-shrink: 0; }
@media (max-width: 480px){
  .wa-float{ right: 12px; bottom: 12px; padding: 10px 16px 10px 12px; font-size: 0.8rem; }
}
