/* =========================================================
   Events — listing grid + event detail + lightbox
   Reuses tokens from site.css (--cobalt, --ink, --serif, …)
   ========================================================= */

/* hero accent (matches careers-hero treatment) */
.events-hero{
  background:
    radial-gradient(900px 500px at 80% 20%, rgba(74,134,194,.18), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(233,164,88,.10), transparent 60%),
    var(--bg);
}

/* ---- filter chips (shared visual language with careers) ---- */
.events-filters{display:flex; flex-wrap:wrap; gap:8px}
.events-filters .chip{
  appearance:none; background:#fff; border:1px solid var(--border);
  color:var(--text-muted); font-weight:500; font-size:.85rem;
  padding:8px 14px; border-radius:999px; cursor:pointer;
  transition:border-color .2s, color .2s, background .2s;
  font-family:inherit;
}
.events-filters .chip:hover{border-color:var(--cobalt); color:var(--cobalt)}
.events-filters .chip.active{background:var(--cobalt); color:#fff; border-color:var(--cobalt)}

/* ---- card grid ---- */
.events-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:26px; margin-top:40px;
}
@media (max-width:1000px){.events-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:660px){.events-grid{grid-template-columns:1fr}}

.event-card{
  display:flex; flex-direction:column;
  background:#fff; border:1px solid var(--border); border-radius:18px;
  overflow:hidden; text-decoration:none; color:inherit;
  transition:transform .25s, box-shadow .25s, border-color .25s;
}
.event-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-lg);
  border-color:var(--cobalt);
}
.event-thumb{
  position:relative; aspect-ratio:16/10; overflow:hidden; background:var(--bg-alt);
}
.event-thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .5s ease;
}
.event-card:hover .event-thumb img{transform:scale(1.04)}
.event-thumb .event-badge{position:absolute; top:14px; left:14px}

/* status badge */
.event-badge{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--mono); font-size:.66rem; letter-spacing:.12em;
  text-transform:uppercase; font-weight:600;
  padding:5px 11px; border-radius:999px;
  background:rgba(15,23,42,.55); color:#fff; backdrop-filter:blur(4px);
}
.event-badge.upcoming{background:var(--cobalt); color:#fff}
.event-badge.past{background:rgba(15,23,42,.55); color:#fff}
.event-badge .dot{width:6px; height:6px; border-radius:50%; background:currentColor}

.event-card-body{
  display:flex; flex-direction:column; gap:10px; flex:1;
  padding:24px 24px 26px;
}
.event-card-meta{
  display:flex; flex-wrap:wrap; gap:6px 16px;
  font-family:var(--mono); font-size:.72rem; letter-spacing:.04em;
  color:var(--text-soft); text-transform:uppercase;
}
.event-card-meta span{display:inline-flex; align-items:center; gap:6px}
.event-card-meta svg{width:14px; height:14px; stroke:var(--cobalt); stroke-width:1.7; fill:none; flex-shrink:0}
.event-card h3{
  font-family:var(--serif); font-size:1.3rem; line-height:1.2;
  color:var(--ink); margin:2px 0 0;
}
.event-card p{color:var(--text-muted); font-size:.94rem; line-height:1.6; flex:1}
.event-card .event-card-cta{
  display:inline-flex; align-items:center; gap:6px; margin-top:4px;
  font-family:var(--mono); font-size:.74rem; letter-spacing:.06em;
  text-transform:uppercase; color:var(--cobalt); font-weight:600;
}
.event-card .event-card-cta svg{width:14px; height:14px; transition:transform .25s}
.event-card:hover .event-card-cta svg{transform:translateX(4px)}

/* loading / empty (mirror careers) */
.events-loading{min-height:240px; display:flex; align-items:center; justify-content:center}
.events-empty{
  text-align:center; padding:80px 20px;
  border:1px dashed var(--border-strong); border-radius:16px; margin-top:36px;
  color:var(--text-muted);
}
.events-empty p{margin-bottom:18px}
.events-loading[hidden], .events-grid[hidden], .events-empty[hidden]{display:none !important}

/* =========================================================
   Event detail page
   ========================================================= */
.event-detail-hero{padding-bottom:56px}
.event-detail-hero .crumbs{
  font-family:var(--mono); font-size:.78rem; letter-spacing:.1em;
  text-transform:uppercase; color:var(--text-soft); margin-bottom:18px;
}
.event-detail-hero .crumbs a{color:var(--cobalt); text-decoration:none}
.event-detail-hero .crumbs a:hover{text-decoration:underline}
.event-detail-hero h1{font-size:clamp(2.2rem,4.6vw,3.6rem); margin-top:14px}
.event-detail-hero .lede{margin-top:18px}

.event-facts{
  display:flex; flex-wrap:wrap; gap:10px 12px; margin-top:26px;
}
.event-fact{
  display:inline-flex; align-items:center; gap:8px;
  background:#fff; border:1px solid var(--border); border-radius:999px;
  padding:9px 16px; font-size:.86rem; color:var(--text);
}
.event-fact svg{width:16px; height:16px; stroke:var(--cobalt); stroke-width:1.7; fill:none; flex-shrink:0}

/* body layout */
.event-detail-body{max-width:920px; margin:0 auto}
.event-section{margin-bottom:56px}
.event-section:last-child{margin-bottom:0}
.event-section > h2{
  font-family:var(--serif); font-size:1.6rem; color:var(--ink);
  margin-bottom:18px; letter-spacing:-.01em;
}
.event-prose p{color:var(--text-muted); line-height:1.8; font-size:1.05rem; margin-bottom:18px}
.event-prose p:last-child{margin-bottom:0}
.event-prose strong{color:var(--text)}
.event-prose code{
  font-family:var(--mono); font-size:.86em; background:var(--bg-alt);
  padding:2px 6px; border-radius:6px; color:var(--cobalt);
}

/* highlight chips */
.event-highlights{list-style:none; padding:0; margin:0; display:grid; gap:12px}
.event-highlights li{
  position:relative; padding-left:30px; color:var(--text-muted); line-height:1.6;
}
.event-highlights li::before{
  content:""; position:absolute; left:8px; top:9px;
  width:8px; height:8px; border-radius:2px; background:var(--cobalt); transform:rotate(45deg);
}

/* videos */
.event-videos{display:grid; gap:28px}
.event-video .video-label{
  font-family:var(--mono); font-size:.78rem; font-weight:600; color:var(--text-soft);
  text-transform:uppercase; letter-spacing:.08em; margin-bottom:12px;
}
.video-frame{
  position:relative; width:100%; aspect-ratio:16/9; border-radius:14px;
  overflow:hidden; background:#0a0a0a; display:block; text-decoration:none;
  box-shadow:var(--shadow-md);
}
.video-frame img{width:100%; height:100%; object-fit:cover; display:block}
.video-frame .video-play{
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:12px;
  background:rgba(11,18,32,.34); color:#fff; font-weight:600; font-size:.98rem;
  transition:background .2s;
}
.video-frame:hover .video-play{background:rgba(11,18,32,.5)}
.video-frame .video-play svg{width:60px; height:60px; filter:drop-shadow(0 4px 16px rgba(0,0,0,.4))}

/* gallery */
.event-gallery-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:18px;
}
@media (max-width:820px){.event-gallery-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.event-gallery-grid{grid-template-columns:1fr}}

.gallery-figure{margin:0; cursor:zoom-in; display:flex; flex-direction:column}
.gallery-media{
  position:relative; aspect-ratio:4/3; border-radius:14px; overflow:hidden;
  background:var(--bg-alt); border:1px solid var(--border);
}
.gallery-media img{width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s ease}
.gallery-figure:hover .gallery-media img{transform:scale(1.05)}
.gallery-media::after{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:0;
  background:linear-gradient(180deg, rgba(11,18,32,0) 55%, rgba(11,18,32,.28) 100%);
  transition:opacity .25s;
}
.gallery-figure:hover .gallery-media::after{opacity:1}
.gallery-zoom{
  position:absolute; bottom:12px; right:12px; width:34px; height:34px; border-radius:50%;
  background:rgba(255,255,255,.92); color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  opacity:0; transform:translateY(6px); transition:opacity .25s, transform .25s;
}
.gallery-figure:hover .gallery-zoom{opacity:1; transform:none}
.gallery-zoom svg{width:16px; height:16px; stroke:currentColor; stroke-width:2; fill:none}
.gallery-figure figcaption{padding:12px 4px 0}
.gallery-figure figcaption .cap-title{font-weight:600; color:var(--ink); font-size:.95rem; line-height:1.4}
.gallery-figure figcaption .cap-desc{color:var(--text-soft); font-size:.86rem; line-height:1.55; margin-top:4px}

/* detail CTAs */
.event-cta-row{display:flex; flex-wrap:wrap; gap:14px; margin-top:8px}

/* upcoming register card */
.event-register{
  background:#fff; border:1px solid var(--border); border-radius:18px;
  padding:34px 32px; box-shadow:var(--shadow-md); text-align:center;
  max-width:560px; margin:0 auto;
}
.event-register h3{font-family:var(--serif); font-size:1.45rem; color:var(--ink); margin-bottom:10px}
.event-register p{color:var(--text-muted); line-height:1.6; margin-bottom:24px}
.event-register .event-cta-row{justify-content:center}

/* not found */
.event-missing{text-align:center; padding:120px 20px; max-width:600px; margin:0 auto}
.event-missing h2{font-family:var(--serif); font-size:2rem; margin-bottom:14px}
.event-missing p{color:var(--text-muted); margin-bottom:24px}

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox{
  position:fixed; inset:0; z-index:2000; display:none;
  align-items:center; justify-content:center;
  background:rgba(8,12,20,.92); backdrop-filter:blur(6px);
  padding:40px 24px;
}
.lightbox.show{display:flex}
.lightbox-figure{
  margin:0; max-width:1100px; width:100%;
  display:flex; flex-direction:column; align-items:center; gap:18px;
}
.lightbox-img-wrap{
  position:relative; width:100%; display:flex; align-items:center; justify-content:center;
}
.lightbox img{
  max-width:100%; max-height:72vh; border-radius:12px; display:block;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7);
}
.lightbox figcaption{text-align:center; max-width:680px; color:#fff}
.lightbox figcaption .cap-title{font-family:var(--serif); font-size:1.25rem; margin-bottom:6px}
.lightbox figcaption .cap-desc{color:rgba(255,255,255,.72); font-size:.95rem; line-height:1.6}
.lightbox-count{
  font-family:var(--mono); font-size:.74rem; letter-spacing:.1em; color:rgba(255,255,255,.5);
  text-transform:uppercase; margin-top:4px;
}
.lb-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(255,255,255,.12); color:#fff;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s;
}
.lb-btn:hover{background:rgba(255,255,255,.24)}
.lb-btn svg{width:24px; height:24px; stroke:currentColor; stroke-width:2; fill:none}
.lb-prev{left:-4px}
.lb-next{right:-4px}
@media (max-width:720px){.lb-prev{left:0}.lb-next{right:0}.lb-btn{width:40px;height:40px}}
.lb-close{
  position:fixed; top:22px; right:24px; width:44px; height:44px; border-radius:50%;
  border:none; cursor:pointer; background:rgba(255,255,255,.12); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:1.6rem; line-height:1;
  transition:background .2s;
}
.lb-close:hover{background:rgba(255,255,255,.24)}
.lightbox[hidden]{display:none !important}

/* ============== FULL-EVENT ALBUM CAROUSEL ============== */
.event-album-section{margin-top:8px}
.album-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:16px; flex-wrap:wrap; margin-bottom:18px;
}
.album-head h2{margin:0}
.album-total{
  font:500 12px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase;
  color:var(--text-soft);
}
.album-carousel{outline:none}
.album-carousel:focus-visible{outline:none}

.album-viewport{
  position:relative; aspect-ratio:16/10; border-radius:18px; overflow:hidden;
  background:radial-gradient(120% 120% at 50% 0%, #16233b 0%, var(--ink) 70%);
  box-shadow:var(--shadow-lg);
}
.album-track{
  display:flex; height:100%;
  transition:transform .55s cubic-bezier(.4,0,.2,1);
  will-change:transform;
}
.album-slide{
  flex:0 0 100%; height:100%; margin:0;
  display:flex; align-items:center; justify-content:center;
  cursor:zoom-in;
}
.album-slide img{
  max-width:100%; max-height:100%; width:auto; height:auto;
  object-fit:contain; display:block; -webkit-user-select:none; user-select:none;
}
.album-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:46px; height:46px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(11,18,32,.5); color:#fff; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center; z-index:2;
  transition:background .2s, transform .2s, opacity .2s;
}
.album-arrow:hover{background:rgba(11,18,32,.82); transform:translateY(-50%) scale(1.06)}
.album-arrow svg{width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round}
.album-prev{left:14px}
.album-next{right:14px}
.album-counter{
  position:absolute; right:14px; bottom:14px; z-index:2;
  font:500 12px/1 var(--mono); letter-spacing:.06em; color:#fff;
  background:rgba(11,18,32,.5); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  padding:7px 11px; border-radius:999px;
}
.album-counter .album-cur{color:var(--cobalt-glow)}

.album-strip{
  display:flex; gap:8px; margin-top:12px; padding:4px 2px 8px;
  overflow-x:auto; scroll-snap-type:x proximity;
  scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent;
}
.album-strip::-webkit-scrollbar{height:8px}
.album-strip::-webkit-scrollbar-thumb{background:var(--border-strong); border-radius:8px}
.album-thumb{
  flex:0 0 auto; width:96px; height:64px; padding:0; cursor:pointer;
  border:2px solid transparent; border-radius:9px; overflow:hidden;
  background:var(--bg-alt); opacity:.55; scroll-snap-align:center;
  transition:opacity .2s, border-color .2s, transform .2s;
}
.album-thumb img{width:100%; height:100%; object-fit:cover; display:block}
.album-thumb:hover{opacity:.85}
.album-thumb.active{opacity:1; border-color:var(--cobalt)}

@media (max-width:640px){
  .album-viewport{aspect-ratio:4/3}
  .album-arrow{width:40px; height:40px}
  .album-thumb{width:78px; height:54px}
}
@media (prefers-reduced-motion:reduce){
  .album-track{transition:none}
}
