/* BSides Kerala 2027: the home page's own sections (countdown, welcome, Jack
   Daniel, tracks, photo gallery, community partners, venue). Loaded after css/site.css, which
   supplies the menu, type, colours, buttons, past-editions list and footer.
   The hero at the top of the page is styled separately in css/hero.css. */

/* ---------- loader: a black screen with a spinning yellow ring, shown while the
   home page loads. A script in the page head adds "loading" to <html>, so the
   loader only ever appears when JavaScript is running to take it away again.
   It goes when the page has finished loading, or after four seconds. ---------- */
.loader{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:var(--ink);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .3s,visibility .3s}
.loading .loader{opacity:1;visibility:visible}
.loading body{overflow:hidden}
.loader-ring{width:64px;height:64px;border:6px solid rgba(255,255,255,.16);border-top-color:var(--sun);border-radius:50%;animation:loader-spin .8s linear infinite}
.loader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@keyframes loader-spin{to{transform:rotate(360deg)}}
/* reduced motion: the ring turns slowly instead of spinning */
@media(prefers-reduced-motion:reduce){.loader{transition:none}.loader-ring{animation-duration:4s}}

.sect h2 + .editions{margin-top:1.5rem}

/* ---------- countdown: a slim yellow band under the hero ---------- */
/* The digits sit in black cells, one per digit, like a CTF scoreboard. */
.count{padding:clamp(1.5rem,3vw,2.25rem) var(--gutter)}
.count .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.25rem 3rem}
.count h2{font-size:clamp(1.5rem,2.6vw,2.1rem)}
.count-what p{margin-top:.15rem;font-weight:600}
.count-clock{display:flex;flex-wrap:wrap;gap:.75rem clamp(.9rem,2.2vw,1.75rem);font-weight:800}
.count-clock div{display:flex;flex-direction:column;align-items:center;gap:.3rem}
.count-clock b{display:flex;gap:4px;font-size:clamp(2rem,5vw,3.5rem);line-height:1;font-variant-numeric:tabular-nums}
.count-clock b span{min-width:.82em;padding:.2em .08em .06em;text-align:center;background:var(--ink);color:var(--sun);border-radius:var(--r)}
.count-clock div > span{font-size:1rem;font-weight:700;line-height:1}
.count-what p{line-height:1.3;text-wrap:balance}
/* phones: all four groups on one row, with the digits as large as the screen allows.
   Nine cells of .82em, five 3px gaps inside the groups and three 3vw gaps between them
   have to fit between the page gutters; the font size is worked out from that. */
@media(max-width:600px){
  .count{padding-top:1.75rem;padding-bottom:1.75rem}
  .count .wrap{display:block}
  /* heading and date line each run to two lines that span the width */
  .count h2{font-size:calc((100vw - 2 * var(--gutter)) / 6);line-height:1}
  .count-what p{font-size:calc((100vw - 2 * var(--gutter)) / 11.2);font-weight:700;line-height:1.2;margin-top:.5rem}
  .count-clock{display:grid;grid-template-columns:repeat(4,auto);justify-content:space-between;gap:0;margin-top:1.25rem}
  .count-clock b{gap:3px;font-size:calc((100vw - 2 * var(--gutter) - 15px - 9vw) / 7.38)}
  .count-clock div > span{font-size:clamp(.95rem,4vw,1.2rem);margin-top:.1rem}
}
/* ---------- welcome: one large statement under the countdown ---------- */
.welcome h2{font-size:clamp(2.2rem,5vw,3.75rem);line-height:1.02}
.welcome .lede{margin-top:1.25rem;font-size:clamp(1.3rem,2.2vw,1.75rem);line-height:1.35}
.note{margin-top:1.5rem;color:var(--muted)}

/* ---------- Jack Daniel: a full-width black band. The portrait has a black
   backdrop of its own, so it sits on the band without a frame. ---------- */
.dark{background:var(--ink);color:#fff;--text:#fff;--muted:rgba(255,255,255,.82);--link:var(--sun);--focus:var(--sun)}
.portrait{display:grid;grid-template-columns:minmax(0,400px) minmax(0,1fr);gap:2rem clamp(2rem,5vw,4.5rem);align-items:center}
.portrait img{width:100%;border-radius:var(--r)}
.portrait h2{font-size:clamp(1.8rem,3.2vw,2.6rem);margin-bottom:1.1rem}
.portrait .prose p{color:var(--muted)}
@media(max-width:820px){.portrait{grid-template-columns:minmax(0,1fr)}.portrait img{max-width:400px}}

/* ---------- tracks: white cards with a black outline and a hard black shadow,
   the same treatment as the community partner tiles further down. The cards
   are not links, so they do not move under the pointer. ---------- */
.tracks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.75rem;margin-top:2rem;padding-right:5px;list-style:none}
.tracks{counter-reset:track}
.tracks li{position:relative;counter-increment:track;background:#fff;border:2px solid var(--ink);box-shadow:5px 5px 0 var(--ink);padding-bottom:1.1rem}
/* a small yellow number card pinned over the top right corner of each card.
   The numbers come from a CSS counter, so they follow the order of the list. */
.tracks li::before{content:counter(track);position:absolute;top:-.8rem;right:-.8rem;z-index:1;display:grid;place-items:center;width:2.6rem;height:2.6rem;padding-top:.12em;background:var(--sun);color:var(--ink);border:2px solid var(--ink);box-shadow:3px 3px 0 var(--ink);font-size:1.4rem;font-weight:800;line-height:1}
.tracks img{width:100%;aspect-ratio:3/2;object-fit:cover;border-bottom:2px solid var(--ink)}
.tracks h3{font-size:1.35rem;margin:.9rem 1.1rem 0}
.tracks p{margin:.25rem 1.1rem 0;color:var(--muted);line-height:1.45}
@media(max-width:900px){.tracks{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.tracks{grid-template-columns:minmax(0,1fr)}}

/* ---------- photo gallery: the one black section, so the photos carry it ---------- */
.gallery-sect{background:var(--ink);color:#fff;--muted:rgba(255,255,255,.8);--focus:var(--sun);padding-left:0;padding-right:0;overflow:hidden}
.gallery-sect > .wrap{padding:0 var(--gutter);max-width:calc(var(--max) + 2 * var(--gutter))}
.gallery-year{margin-top:2rem}
.gallery-year h3{font-size:1.25rem;margin-bottom:.3rem}
.gallery-marquee{position:relative;padding:12px 0;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;cursor:grab;user-select:none}
.gallery-marquee::-webkit-scrollbar{display:none}
.gallery-marquee.dragging{cursor:grabbing}
.gallery-track{display:flex;width:max-content}
.gallery-group{display:flex;gap:1rem;padding-right:1rem}
.gallery-item{flex:none;width:clamp(260px,30vw,400px);aspect-ratio:16/10;overflow:hidden;border-radius:var(--r);background:#17131C}
.gallery-item img{width:100%;height:100%;object-fit:cover;pointer-events:none}

/* ---------- past sponsors and community partners: two logo walls between the
   gallery and the venue, the first on white and the second on grey. Both use
   the same layout. The heading sits above and the logos fill the width below
   it in a grid of equal white tiles, each with a black outline and a hard
   black shadow. The white tile keeps every logo readable whatever its shape or
   its own background. Add a logo by adding another <li> to the list; use a
   <span> in place of the link when there is no website to point to. ---------- */
.partners p{margin-top:.4rem;font-weight:600}.partners ul{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1.5rem;margin-top:2rem;padding-right:5px;list-style:none}
.partners li > *{display:flex;align-items:center;justify-content:center;aspect-ratio:2/1;padding:.9rem 1.1rem;background:#fff;border:2px solid var(--ink);box-shadow:5px 5px 0 var(--ink)}
.partners a:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
.partners img{width:100%;height:100%;object-fit:contain}
/* the tile presses into its shadow under the pointer */
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  .partners a{transition:transform .12s,box-shadow .12s}
  .partners a:hover{transform:translate(3px,3px);box-shadow:2px 2px 0 var(--ink)}
}
@media(max-width:560px){.partners ul{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem}}

/* ---------- venue ---------- */
/* Two equal halves in one block, after the venue
   block on the 2025 page: the map on the left, and on the right the hotel's
   name and logo over a darkened photo of its ceiling. The block has the same
   black outline and hard shadow as the cards above it. */
/* wider than the 1320px page column, but still short of the window edges */
.venue-sect > .wrap{max-width:1600px;padding-right:5px}
.venue{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:2px solid var(--ink);box-shadow:5px 5px 0 var(--ink)}
.venue iframe{height:100%;min-height:440px;background:var(--wash)}
.venue-info{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:clamp(1.75rem,4.5vw,4rem);color:#fff;--link:var(--sun);--focus:var(--sun);
  background:linear-gradient(rgba(5,2,8,.74),rgba(5,2,8,.74)),url(../img/venue-info-bg.jpg) center/cover}
.venue-info h2{font-size:clamp(1.6rem,2.8vw,2.3rem);line-height:1.12;max-width:20ch;text-wrap:balance}
.venue-info p{margin-top:.6rem;color:rgba(255,255,255,.85)}
.venue-info img{width:min(100%,260px);height:auto;margin-top:1.5rem;background:#fff}
.venue-info img + p{margin-top:1.5rem;font-weight:600}
.venue-info a{color:var(--sun)}
@media(max-width:820px){.venue{grid-template-columns:minmax(0,1fr)}.venue iframe{min-height:300px}}

/* ---------- where BSides came from: three matching cards, each sitting on the
   same offset yellow block as the organizing team cards on the About page ---------- */
.origin-cards{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.75rem;margin-top:1.75rem;padding:0 8px 8px 0}
.origin-cards li{background:#fff;border:1px solid var(--ink);padding:1.6rem 1.7rem 1.75rem;box-shadow:8px 8px 0 var(--sun)}
.origin-cards h3{font-size:clamp(1.4rem,1.9vw,1.65rem);line-height:1.12}
.origin-cards p{margin-top:.7rem;color:var(--muted)}
@media(max-width:900px){.origin-cards{grid-template-columns:minmax(0,1fr)}}
