:root{
  --bg:#fff;
  --fg:#000;
  --fade:120ms;
  --preloader-fade:650ms;

  --h1:clamp(56px, 6.5vw, 96px);
  --h2:clamp(32px, 2.2vw, 38px);
  --h3:clamp(18px, 1.6vw, 24px);
  --p:clamp(18px, 1.6vw, 24px);

  --container:min(980px, calc(100vw - 48px));

  --speed-1:30s;
  --speed-2:24s;
  --speed-3:27s;
}

/* ================= BASE / RESET ================= */
*{ box-sizing:border-box; }

html,body{
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

body.is-loading{
  overflow:hidden;
}

#app{
  opacity:1;
  transition:opacity 400ms ease;
}

body.is-loading #app{
  opacity:0;
}

/* ================= PRELOADER ================= */
#preloader{
  position:fixed;
  inset:0;
  background:var(--bg);
  z-index:9999;
  display:grid;
  place-items:center;
  opacity:1;
  visibility:visible;
  transition:opacity var(--preloader-fade) ease, visibility 0s linear var(--preloader-fade);
}

#preloader.fade-out{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

#stage{
  width:100vw;
  height:100vh;
  display:grid;
  place-items:center;
}

#matrix{
  display:grid;
  user-select:none;
  touch-action:manipulation;
}

.cell{
  display:grid;
  place-items:center;
  line-height:1;
  opacity:0;
  transform:scale(0.98);
  transition:opacity var(--fade) linear, transform var(--fade) linear;
  will-change:opacity, transform;
}

.cell.on{
  opacity:1;
  transform:scale(1);
}

/* ================= NAV / MOBILE MENU ================= */
.site-nav{
  position:fixed;
  top:16px;
  right:18px;
  z-index:30;
}

.navbar{
  display:flex;
  gap:55px;
  align-items:center;
}

.nav-link{
  font-weight:700;
  font-size:18px;
  color:inherit;
  text-decoration:none;
}

.nav-link:hover{
  text-decoration:underline;
  text-underline-offset:4px;
  text-decoration-thickness:2px;
}

.nav-link[aria-current="page"]{
  text-decoration:underline;
  text-underline-offset:4px;
  text-decoration-thickness:2px;
}

.hamburger{
  display:none;
  border:0;
  background:transparent;
  color:#000;
  font-family:inherit;
  font-weight:700;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0;
  appearance:none;
  -webkit-appearance:none;
  -webkit-tap-highlight-color:transparent;
}

.hamburger span{
  color:#000;
}

.mobile-menu{
  position:fixed;
  inset:0;
  background:#fff;
  z-index:60;
  display:none;
}

.mobile-menu.is-open{
  display:block;
}

.mobile-menu__close{
  position:fixed;
  top:16px;
  right:18px;
  border:0;
  background:transparent;
  font-family:inherit;
  font-weight:700;
  font-size:40px;
  line-height:1;
  cursor:pointer;
}

.mobile-menu__nav{
  height:100vh;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:48px;
}

.mobile-link{
  font-family:inherit;
  font-size:20px;
  font-weight:700;
  text-decoration:none;
  color:inherit;
}

.mobile-link[aria-current="page"]{
  text-decoration:underline;
  text-underline-offset:6px;
  text-decoration-thickness:2px;
}

/* ================= PARTNERS COLUMN ================= */
.partners{
  position:fixed;
  top:0;
  left:0;
  width:200px;
  height:100vh;
  padding:80px 20px;
  display:flex;
  justify-content:center;
  z-index:5;
}

.partners-inner{
  display:flex;
  flex-direction:column;
  gap:28px;
  align-items:center;
}

.partners img{
  max-width:160px;
  width:100%;
  height:auto;
  opacity:.85;
}

.partners img:hover{
  opacity:1;
}

/* ================= GALLERY ================= */
#gallery-stage{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
  background:var(--bg);
}

.float-img{
  position:fixed;
  left:0;
  top:0;
  width:min(320px, 38vw);
  height:auto;
  border:1px solid #000;
  user-select:none;
  -webkit-user-drag:none;
  cursor:pointer;
  will-change:transform;
}

.float-img:nth-child(2){ width:min(290px, 34vw); }
.float-img:nth-child(3){ width:min(360px, 42vw); }
.float-img:nth-child(4){ width:min(300px, 36vw); }

/* ================= LIGHTBOX ================= */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(255,255,255,0.96);
  display:none;
  z-index:50;
  place-items:center;
  padding:24px;
}

.lightbox.is-open{
  display:grid;
}

.lightbox-img{
  max-width:min(1200px, 92vw);
  max-height:90vh;
  border:1px solid #000;
}

.lightbox-close{
  position:fixed;
  top:16px;
  left:18px;
  border:0;
  background:transparent;
  font-family:inherit;
  font-size:28px;
  font-weight:700;
  cursor:pointer;
  line-height:1;
}

/* ================= PDF PAGE ================= */
.pdf-page{
  height:100vh;
  padding-top:72px;
}

.pdf-frame{
  width:100%;
  height:calc(100vh - 72px);
  border:0;
  display:block;
}

.pdf-actions{
  display:none;
  padding:12px 18px;
}

.pdf-open{
  font-weight:700;
  font-size:18px;
  color:inherit;
  text-decoration:underline;
  text-underline-offset:4px;
}

/* ================= WAITLIST ================= */
.waitlist-form{
  position:relative;
  width:100%;
  max-width:480px;
  margin-top:6px;
}

#waitlist-input{
  width:100%;
  font-family:inherit;
  font-size:var(--p);
  background:transparent;
  border:none;
  border-bottom:1px solid var(--fg);
  padding:6px 32px 6px 0;
  outline:none;
}

#waitlist-input::placeholder{
  color:#333;
  opacity:.55;
}

#waitlist-submit{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  background:none;
  border:none;
  font-family:inherit;
  font-size:var(--p);
  font-weight:400;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transition:opacity 120ms linear, font-weight 120ms linear, transform 120ms linear;
}

#waitlist-input:not(:placeholder-shown) + #waitlist-submit{
  opacity:1;
  pointer-events:auto;
}

#waitlist-submit:hover{
  font-weight:700;
  transform:translateY(-50%) scale(1.08);
}

#waitlist-message{
  margin-top:8px;
  font-size:calc(var(--p) - 5px);
  font-weight:700;
  font-style:italic;
}

/* ================= OPEN CALL ================= */
.hero{
  padding-top:1px;
}

.open-call-static{
  width:100%;
  overflow:hidden;
  margin:0;
  user-select:none;
  pointer-events:none;
}

.open-call__line{
  font-family:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:var(--h1);
  font-weight:700;
  letter-spacing:0.01em;
  white-space:nowrap;
  line-height:0.79;
  margin:0;
}

.open-call-static{
  --shift:1.05ch;
}

.open-call__line--1{ transform:translateX(0); }
.open-call__line--2{ transform:translateX(var(--shift)); }
.open-call__line--3{ transform:translateX(calc(var(--shift) * 2)); }

.repeat{
  display:inline-block;
  padding-right:0.5ch;
}

/* ================= OPTIONAL MARQUEE ================= */
.open-call{
  width:100%;
  overflow:hidden;
  user-select:none;
  pointer-events:none;
}

.line{
  position:relative;
  width:100%;
  overflow:hidden;
  line-height:0.79;
}

.track{
  display:flex;
  width:max-content;
  animation:scroll linear infinite;
}

.line--1 .track{ animation-duration:var(--speed-1); }
.line--2 .track{ animation-duration:var(--speed-2); }
.line--3 .track{ animation-duration:var(--speed-3); }

@keyframes scroll{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}

.word{
  font-size:var(--h1);
  font-weight:700;
  white-space:nowrap;
  padding-right:.5ch;
}

/* ================= CONTENT ================= */
.wrap{
  width:min(980px, calc(100vw - 48px - 220px));
  margin:0 auto 0 220px;
  padding:32px 0 80px;
}

h2{
  font-size:var(--h2);
  font-weight:700;
  margin:0 0 8px 0;
}

.subline{
  font-size:var(--h2);
  font-weight:700;
  margin:0 0 20px 0;
}

p{
  font-size:var(--p);
  line-height:1.35;
  max-width:64ch;
  margin:0 0 16px 0;
}

.section-label{
  font-size:var(--h3);
  margin-top:32px;
  margin-bottom:6px;
  letter-spacing:.08em;
  opacity:.55;
}

.section-label + *{
  margin-top:0;
}

ul{
  list-style:none;
  padding:0;
  margin:0 0 16px 0;
}

li{
  font-size:var(--p);
  line-height:1.35;
  padding-left:1.25ch;
  position:relative;
  margin:0 0 6px 0;
}

li::before{
  content:"-";
  position:absolute;
  left:0;
}

.highlight{
  background:#000;
  color:#fff;
  padding:0.005em 0.025em;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}

.cta{
  display:inline-block;
  margin-top:15px;
  font-size:var(--h2);
  font-weight:600;
  color:inherit;
  text-decoration:none;
}

.cta:hover{
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-underline-offset:4px;
}

.location-link{
  color:inherit;
  text-decoration:none;
}

.location-link:hover{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:4px;
}

/* ================= SLIDES ================= */
.slide{
  min-height:100vh;
}

.slide--intro{
  display:flex;
  align-items:center;
}

.slide--agenda{
  display:flex;
  align-items:center;
}

html{
  scroll-behavior:smooth;
}

@media (min-width: 768px){
  html, body{
    scroll-snap-type:y mandatory;
  }

  .slide{
    scroll-snap-align:start;
  }
}

/* ================= AGENDA ================= */
.agenda-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:24px;
  font-size:var(--h3);
  font-weight:600;
}

.agenda{
  border-top:1px solid #000;
}

.agenda .row{
  display:grid;
  grid-template-columns:140px 260px 1fr 220px;
  gap:24px;
  padding:18px 0;
  border-bottom:1px solid #000;
  font-size:var(--p);
  line-height:1.35;
}

.agenda .time{
  font-weight:600;
}

.agenda .title{
  font-weight:600;
}

.agenda .desc,
.agenda .who{
  opacity:.9;
  font-size:calc(var(--p) * 0.85);
}

.agenda .who{
  text-align:left;
  line-height:1.5;
}

/* ================= ACCESSIBILITY ================= */
@media (prefers-reduced-motion: reduce){
  .track{
    animation:none;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px){
  .partners{
    display:none;
  }

  .wrap{
    width:var(--container);
    margin-left:auto;
  }

  .agenda .row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .agenda .time{
    font-weight:700;
  }
}

@media (max-width: 768px){
  .site-nav .navbar{
    display:none;
  }

  .hamburger{
    display:inline-block;
  }

  .pdf-actions{
    display:block;
  }

  .pdf-frame{
    display:none;
  }
}

@media (max-width: 640px){
  .wrap{
    padding:24px 0 60px;
    margin-left:auto;
  }

  p,
  li{
    max-width:100%;
  }
}

/* Ajuste específico para Diablito */
.partners img.partner-diablito{
  max-width: 140px; /* ~20px menos que los demás */
}

/* Mobile: logos abajo como footer */
@media (max-width: 900px){
  .partners{
    position: static;
    width: 100%;
    height: auto;
    padding: 32px 24px 48px;
    display: block;
  }

  .partners-inner{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px 32px;
  }

  .partners img{
    max-width: 110px;
    width: auto;
    height: auto;
  }

  .partners img.partner-diablito{
    max-width: 90px;
  }
}
