/* ======================================================================
   TEMAS (USAN html[data-theme="..."])
   ====================================================================== */

/* Valores base (fallback) */
html{
  --brand:#fcb900;
  --brand-dark:#d99a00;

  --bg:#ffffff;
  --bg-soft:#f8f9fa;
  --text:#111111;
  --muted:#6b6b6b;

  --card:#ffffff;
  --stroke:#e5e5e5;
}

/* Tema 1: CLÁSICO (blanco + naranja) */
html[data-theme="classic"]{
  --bg:#ffffff;
  --bg-soft:#f8f9fa;
  --text:#111111;
  --muted:#6b6b6b;
  --card:#ffffff;
  --stroke:#e5e5e5;
  --brand:#fcb900;
  --brand-dark:#d99a00;
}

/* Tema 2: OSCURO (azul marino) */
html[data-theme="dark"]{
  --bg:#020617;
  --bg-soft:#020617;
  --text:#e5e5e5;
  --muted:#9ca3af;
  --card:#0b1120;
  --stroke:#1f2937;
  --brand:#fcb900;
  --brand-dark:#f59e0b;
}

/* Tema 3: PREMIUM BLACK (negro + dorado) */
html[data-theme="ink"]{
  --bg:#050508;
  --bg-soft:#050508;
  --text:#f9fafb;
  --muted:#9ca3af;
  --card:#0f172a;
  --stroke:#262626;
  --brand:#fbbf24;
  --brand-dark:#d97706;
}

/* Tema 4: SUAVE (claro cálido) */
html[data-theme="soft"]{
  --bg:#fdf7ec;
  --bg-soft:#faeed8;
  --text:#171717;
  --muted:#6b6b6b;
  --card:#ffffff;
  --stroke:#e5e5e5;
  --brand:#fcb900;
  --brand-dark:#d99a00;
}

/* ======================================================================
   RESETEO
   ====================================================================== */

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height:1.6;
  color:var(--text);
  background:linear-gradient(180deg, var(--bg), var(--bg-soft) 60%);
}

img{
  max-width:100%;
  height:auto;
  display:block;
}

.container{
  max-width:1080px;
  margin:0 auto;
  padding:1.25rem;
}

/* ======================================================================
   ESTADOS DE CARGA (centrales, respetando header parcial)
   ====================================================================== */

/* Por defecto (cuando la página termina de pintar datos/partials),
   queremos ver todo normal. */
.site-header,
main,
.site-footer{
  opacity:1;
  transform:translateY(0);
  transition:opacity .22s ease-out, transform .22s ease-out;
}

/* Mientras estamos cargando (body tiene class="is-loading"),
   ocultamos suavemente header + main + footer. */
body.is-loading .site-header,
body.is-loading main,
body.is-loading .site-footer{
  opacity:0;
  transform:translateY(8px);
}

/* Cuando main.js marca como lista la página (is-ready),
   aparece todo con transición fluida. */
body.is-ready .site-header,
body.is-ready main,
body.is-ready .site-footer{
  opacity:1;
  transform:translateY(0);
}

/* ======================================================================
   HEADER & NAV
   ====================================================================== */

.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:sticky;
  top:0;
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--stroke);
  z-index:50;
}

/* Fondo del header por tema */
html[data-theme="classic"] .site-header{
  background:rgba(255,255,255,0.92);
}
html[data-theme="soft"] .site-header{
  background:rgba(253,247,236,0.96);
}
html[data-theme="dark"] .site-header,
html[data-theme="ink"] .site-header{
  background:rgba(15,23,42,0.95);
}

.brand{
  font-weight:800;
  letter-spacing:.08em;
  text-decoration:none;
  color:var(--text);
  font-size:1.1rem;
}

.nav{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.35rem;
}

.nav a{
  margin:0 .25rem;
  text-decoration:none;
  color:var(--muted);
  font-size:.9rem;
  padding:.25rem .5rem;
  border-radius:6px;
}

.nav a:hover{
  color:var(--text);
  background:rgba(0,0,0,0.04);
}

html[data-theme="dark"] .nav a:hover,
html[data-theme="ink"] .nav a:hover{
  background:rgba(255,255,255,0.06);
}

.nav a.active{
  color:var(--brand);
  font-weight:600;
}

/* Selector de tema */

.theme-select{
  display:none;              /* 🔴 ahora oculto por defecto */
  border-radius:999px;
  border:1px solid var(--stroke);
  padding:.35rem .75rem;
  font-size:.8rem;
  background:var(--card);
  color:var(--muted);
}

html[data-theme="dark"] .theme-select,
html[data-theme="ink"] .theme-select{
  background:#020617;
  color:var(--muted);
  border-color:#1f2937;
}


/* ======================================================================
   BOTONES
   ====================================================================== */

.btn{
  display:inline-block;
  border:1px solid var(--stroke);
  border-radius:50rem;
  padding:.6rem 1rem;
  text-decoration:none;
  font-size:.9rem;
  cursor:pointer;
  background:transparent;
  color:var(--text);
  transition:all .15s ease;
}

.btn:hover{
  background:rgba(0,0,0,0.04);
}

html[data-theme="dark"] .btn:hover,
html[data-theme="ink"] .btn:hover{
  background:rgba(255,255,255,0.06);
}

.btn-primary{
  background:var(--brand);
  color:#111111;
  border-color:transparent;
  font-weight:700;
}

.btn-primary:hover{
  background:var(--brand-dark);
}

.btn-ghost{
  background:transparent;
  color:var(--text);
  border-color:transparent;
}

/* ======================================================================
   HERO
   ====================================================================== */

.hero{
  padding:5rem 1.25rem 3rem;
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:2rem;
}

.hero-text{}

.hero-media{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.hero-media img{
  max-width:300px;
  border-radius:999px;
  border:3px solid var(--brand);
  box-shadow:0 20px 60px rgba(0,0,0,.25);
}

@media(max-width:800px){
  .hero{
    grid-template-columns:1fr;
  }
  .hero-media{
    justify-content:flex-start;
  }
}

.pretitle{
  color:var(--brand);
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:.75rem;
}

.title{
  font-size:clamp(2.1rem,4vw,3.4rem);
  line-height:1.1;
  margin:.25rem 0 .5rem;
}

.subtitle{
  color:var(--muted);
  font-size:1.05rem;
  max-width:640px;
}

.hero-bullets{
  margin:1rem 0 1.5rem;
  padding-left:1.25rem;
  color:var(--muted);
}

/* ======================================================================
   SECCIONES
   ====================================================================== */

.section{
  padding:3rem 1.25rem;
  border-top:1px solid var(--stroke);
  background:var(--bg);
}

.section.alt{
  background:var(--bg-soft);
}

.section-title{
  font-size:1.8rem;
  margin:.25rem 0 1rem;
}

.section-kicker{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.16em;
  color:var(--muted);
}

/* ======================================================================
   GRID & CARDS
   ====================================================================== */

.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:1rem;
}

.card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:1rem;
  padding:1.25rem;
}

.highlights .card,
.project-grid .card,
.cards .card{
  grid-column:span 12;
}

@media(min-width:720px){
  .highlights .card{grid-column:span 4;}
  .cards .card{grid-column:span 4;}
  .project-grid .card{grid-column:span 4;}
}

.card h3{
  margin:0 0 .25rem;
  font-weight:700;
}

.card p{
  margin:.25rem 0;
  color:var(--muted);
}

/* ======================================================================
   EVENTOS
   ====================================================================== */

.event-cover{
  margin:-1.25rem -1.25rem 1rem -1.25rem;
  overflow:hidden;
  border-radius:1rem 1rem 0 0;
}

.event-cover img{
  width:100%;
  height:auto;
}

/* ======================================================================
   OTROS
   ====================================================================== */

.links{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-bottom:1rem;
}

.site-footer{
  border-top:1px solid var(--stroke);
  padding:2rem 1.25rem;
  color:var(--muted);
  text-align:center;
  background:var(--bg);
}
