/* ═══════════════════════════════════════════════════════════════
   OSJV — Orquesta Sinfónica Juvenil de La Vega
   style.css
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg0:       #090a0d;
  --bg1:       #0f1014;
  --bg2:       #13151a;
  --bgs:       #0b0c10;

  --bd:        rgba(255, 255, 255, 0.06);
  --bda:       rgba(100, 140, 200, 0.35);

  --t1:        #f0f0f4;
  --t2:        #b8bac8;
  --t3:        #6a6d7a;

  --ac:        #3484bc;
  --acl:       #34add2;
  --acd:       rgba(52, 132, 188, 0.15);
  --acg:       rgba(52, 132, 188, 0.08);

  --hh:        110px;  /* header height  */
  --sw:        230px;  /* sidebar width  */

  --fd: 'Cormorant Garamond', serif;
  --fu: 'Syne', sans-serif;
  --fb: 'DM Sans', sans-serif;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg0);
  color: var(--t1);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.6;
}
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--t3); border-radius: 2px; }

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
#hd {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--hh);
  background: linear-gradient(
    to bottom,
    rgba(9,10,13,0.97) 0%,
    rgba(9,10,13,0.0)  100%
  );
  border-bottom: none;
  display: flex;
  align-items: stretch;
  transition: height .45s cubic-bezier(.4,0,.2,1);
}

/* Scrolled: same gradient, just smaller height via --hh */
html.scrolled #hd {
  background: linear-gradient(
    to bottom,
    rgba(9,10,13,0.97) 0%,
    rgba(9,10,13,0.0)  100%
  );
}

/* Logo area — exact sidebar width so columns align */
.hd-logo {
  display: flex;
  align-items: center;
  padding: 0 20px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .18s, padding .3s, height .3s;
  flex-shrink: 0;
}
.hd-logo:hover { opacity: .75; }

/* Single logoH — scales to fit header */
.hd-logo-img {
  height: 95px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* Social + hamburger */
.hd-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 22px;
}

.social-btn {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--bd);
  color: var(--t2);
  text-decoration: none;
  transition: all .22s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.social-btn:hover {
  border-color: var(--ac);
  color: var(--acl);
  background: var(--acd);
  transform: translateY(-1px);
}
.social-btn svg { width: 28px; height: 28px; }

#hbg {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--bd);
  border-radius: 7px;
  cursor: pointer;
  color: var(--t1);
  flex-shrink: 0;
}
#hbg svg { width: 16px; height: 16px; }

/* ══════════════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════════════ */
#lay {
  display: flex;
  height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sw);
  height: 100%;
  flex-shrink: 0;
  background: var(--bgs);
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  padding-top: var(--hh);
}

.sb-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .04;
}

nav { flex: 1; overflow-y: auto; padding: 14px 0; position: relative; z-index: 1; }

/* Header shrink on scroll — class applied to <html> so --hh updates everywhere */
html { transition: --hh .45s ease; }   /* custom prop transition (Chrome 117+) */

.hd-logo-img {
  transition: height .45s cubic-bezier(.4,0,.2,1),
              width  .45s cubic-bezier(.4,0,.2,1);
}
.social-btn, #hbg {
  transition: width .45s cubic-bezier(.4,0,.2,1),
              height .45s cubic-bezier(.4,0,.2,1),
              all .22s ease;
}

html.scrolled {
  --hh: 92px;
}
html.scrolled .hd-logo-img     { height: 70px; }
html.scrolled .social-btn      { width: 34px; height: 34px; }
html.scrolled #hbg             { width: 28px; height: 28px; }
@media(max-width:768px){
  html.scrolled .hd-logo-img   { width: 110px; height: auto; }
}

.nav-label {
  font-family: var(--fu);
  font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--t3);
  padding: 14px 20px 5px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  color: var(--t2);
  font-family: var(--fu);
  font-size: 12.5px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase;
  border-left: 2px solid transparent;
  transition: all .18s ease;
  user-select: none;
  text-decoration: none;
}
.nav-item:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, .022);
  border-left-color: rgba(100, 140, 200, .28);
}
.nav-item.active {
  color: var(--acl);
  background: var(--acd);
  border-left-color: var(--ac);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: 9px; padding: 1px 5px;
  border-radius: 9px;
  background: var(--ac); color: #fff; font-weight: 600;
}

.sb-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--bd);
  position: relative; z-index: 1;
  font-size: 10px; color: var(--t3);
  line-height: 1.5; font-family: var(--fb);
}

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════════════════════════════ */
#mn {
  flex: 1; min-width: 0;
  height: 100%;
  overflow-y: auto;
  position: relative;
  padding-top: var(--hh);
  transition: padding-top .45s cubic-bezier(.4,0,.2,1);
}

/* Page entrance animation */
.page-enter {
  animation: pageIn .44s ease forwards;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── Section inner wrapper ── */
.si {
  padding: 52px 56px;
  max-width: 960px;
}

/* ── Section header ── */
.sh {
  margin-bottom: 44px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--bd);
}
.stag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--fu);
  font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ac);
  margin-bottom: 10px;
}
.stag::before { content: ''; width: 18px; height: 1px; background: var(--ac); }

.sti {
  font-family: var(--fd);
  font-size: clamp(30px, 3.5vw, 50px);
  font-weight: 300; line-height: 1.1;
  color: var(--t1);
}
.sti em { font-style: italic; color: var(--acl); }

.sdesc {
  margin-top: 10px;
  font-size: 13.5px; color: var(--t2);
  max-width: 520px;
}

/* ══════════════════════════════════════════════════════════════
   HERO (index / nosotros)
══════════════════════════════════════════════════════════════ */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - var(--hh));
  display: flex; flex-direction: column;
}

.hero-visual {
  position: relative;
  height: 60vh; min-height: 320px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0d1520 0%, #0a0e15 45%, #07090f 100%);
}
.hero-lines {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
}
.hero-lines::before {
  content: '';
  position: absolute; top: -50%; left: -10%;
  width: 120%; height: 200%;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 55px,
    rgba(52, 132, 188, .022) 55px,
    rgba(52, 132, 188, .022) 56px
  );
}
.hero-ovl {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, transparent 45%, var(--bg0) 100%);
}
.hero-svg-wrap {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.hero-svg { width: 100%; height: 100%; opacity: .22; }

.hero-copy {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 0 56px 44px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fu);
  font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--acl); margin-bottom: 14px;
}
.hero-tag::before { content: ''; width: 24px; height: 1px; background: var(--ac); }

.hero-title {
  font-family: var(--fd);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 300; line-height: 1.08;
  letter-spacing: -.01em; color: var(--t1);
}
.hero-title em { font-style: italic; color: var(--acl); }

.hero-body {
  padding: 44px 56px 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  max-width: 960px;
}
.hero-body p { font-size: 14.5px; color: var(--t2); line-height: 1.82; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
}

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 15px;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 13px; padding: 22px;
  transition: all .22s ease;
  cursor: pointer;
}
.card:hover {
  border-color: var(--bda);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}
.card-icon {
  width: 38px; height: 38px;
  background: var(--acd);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: var(--acl);
  font-size: 18px;
}
.card-icon svg { width: 18px; height: 18px; }
.card-title { font-family: var(--fu); font-size: 13.5px; font-weight: 600; color: var(--t1); margin-bottom: 5px; }
.card-desc  { font-size: 12.5px; color: var(--t2); line-height: 1.65; }

/* Stat card */
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 11px; padding: 18px;
  text-align: center;
  transition: border-color .22s;
}
.stat-card:hover { border-color: var(--bda); }
.stat-num { font-family: var(--fd); font-size: 34px; font-weight: 300; color: var(--acl); line-height: 1; }
.stat-lbl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--t3); margin-top: 5px; font-family: var(--fu); }

/* ══════════════════════════════════════════════════════════════
   MEMBERS GRID
══════════════════════════════════════════════════════════════ */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.member-card {
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 11px; padding: 18px 14px;
  text-align: center; transition: all .22s;
}
.member-card:hover { border-color: var(--bda); transform: translateY(-2px); }
.member-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--acd), rgba(52, 132, 188, .28));
  border: 1px solid var(--bda);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 11px;
  font-family: var(--fd); font-size: 20px; font-weight: 300; color: var(--acl);
}
.member-name { font-family: var(--fu); font-size: 11.5px; font-weight: 600; color: var(--t1); }
.member-role { font-size: 10px; color: var(--t3); margin-top: 2px; text-transform: uppercase; letter-spacing: .07em; }

/* ══════════════════════════════════════════════════════════════
   EVENTS LIST
══════════════════════════════════════════════════════════════ */
.events-list { display: flex; flex-direction: column; gap: 11px; }
.event-item {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 11px; padding: 18px 22px;
  transition: all .22s;
}
.event-item:hover { border-color: var(--bda); background: rgba(52, 132, 188, .035); }
.event-date { text-align: center; flex-shrink: 0; width: 46px; }
.event-day  { font-family: var(--fd); font-size: 30px; font-weight: 300; color: var(--acl); line-height: 1; }
.event-mon  { font-family: var(--fu); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--t3); margin-top: 2px; }
.event-info { flex: 1; }
.event-title{ font-family: var(--fu); font-size: 14px; font-weight: 600; color: var(--t1); margin-bottom: 3px; }
.event-detail { font-size: 12.5px; color: var(--t2); }
.event-tag  {
  display: inline-block; margin-top: 7px;
  font-size: 9.5px; padding: 2px 9px;
  border-radius: 18px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--acd); color: var(--acl);
  border: 1px solid rgba(52, 132, 188, .2);
}

/* ══════════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}
.gallery-item {
  aspect-ratio: 4/3;
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 9px; overflow: hidden;
  position: relative; cursor: pointer;
  transition: all .22s;
}
.gallery-item:hover { transform: scale(1.018); border-color: var(--bda); }
.gallery-item.wide  { grid-column: span 2; aspect-ratio: 16/9; }
.gallery-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 7px; color: var(--t3);
}
.gallery-placeholder svg { width: 24px; height: 24px; opacity: .35; }
.gallery-placeholder span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .5; }

/* ══════════════════════════════════════════════════════════════
   SPONSORS
══════════════════════════════════════════════════════════════ */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.sponsor-card {
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 11px; padding: 18px 16px;
  text-align: center; transition: all .22s;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
}
.sponsor-card:hover { border-color: var(--bda); transform: translateY(-2px); }
.sponsor-name { font-family: var(--fu); font-size: 13px; font-weight: 600; color: var(--t2); line-height: 1.3; }

/* Tier sizes — card dimensions and logo size */
.sponsors-grid.tier-small  { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.sponsors-grid.tier-medium { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sponsors-grid.tier-large  { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.tier-small  .sponsor-card { min-height: 90px;  padding: 14px 12px; }
.tier-medium .sponsor-card { min-height: 130px; padding: 20px 18px; }
.tier-large  .sponsor-card { min-height: 180px; padding: 28px 24px; }

.tier-small  .sponsor-logo { max-height: 52px;  max-width: 110px;  }
.tier-medium .sponsor-logo { max-height: 88px;  max-width: 170px;  }
.tier-large  .sponsor-logo { max-height: 130px; max-width: 250px;  }

.sponsor-logo { width: 100%; object-fit: contain; display: block; }

/* ══════════════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-block {
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: 13px; padding: 26px;
  transition: border-color .22s;
}
.contact-block:hover { border-color: var(--bda); }
.contact-label{ font-family: var(--fu); font-size: 9.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--ac); margin-bottom: 7px; }
.contact-value{ font-family: var(--fd); font-size: 19px; font-weight: 300; color: var(--t1); }
.contact-sub  { font-size: 12.5px; color: var(--t2); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════════
   TRANSITION CANVAS + SIDEBAR OVERLAY
══════════════════════════════════════════════════════════════ */
#tc  { position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: 0; }
#sbo { display: none; position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }

/* ══════════════════════════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════════════════════════ */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .48s ease, transform .48s ease; }
.rv.vs { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sw: 250px; }

  #hbg { display: flex; }

  #sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform .42s cubic-bezier(.4,0,.2,1);
    padding-top: var(--hh);
    transition: transform .42s cubic-bezier(.4,0,.2,1),
                padding-top .45s cubic-bezier(.4,0,.2,1);
  }
  #sidebar.open { transform: translateX(0); }
  #sbo.open { display: block; }

  /* Mobile header */
  .hd-logo {
    flex: 1;
    border-right: none;
    padding: 0 14px;
  }
  .hd-logo-img {
    width: 196px;
    height: auto;
  }
  .hd-right {
    flex: 0 0 auto;
    padding: 0 10px;
    gap: 7px;
  }
  .hd-right .social-btn { width: 40px; height: 40px; }
  .hd-right .social-btn svg { width: 20px; height: 20px; }

  .hero-copy  { padding: 0 22px 32px; }
  .hero-body  { padding: 28px 22px 36px; grid-template-columns: 1fr; gap: 22px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }

  .si { padding: 28px 22px 48px; }
  #mn { overflow-x: hidden; padding-bottom: 24px; }

  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item.wide { grid-column: span 2; }

  .contact-grid { grid-template-columns: 1fr; }
}

