:root {
  --navy: #2C4C61;
  --navy-deep: #1b3242;
  --ink: #0f1d27;
  --blue: #3D92CC;
  --mint: #B7E1D8;
  --g5: #5C6E7B;
  --g4: #82939F;
  --g3: #C0C8CE;
  --g2: #DFE4E7;
  --g1: #F0F2F3;
  --white: #fff;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--g1); color: var(--navy);
  font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 15% 0%, #2C4C61 0%, #1b3242 45%, #0f1d27 100%); }
.topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(16px, 4vw, 48px); }
.logo img { height: 34px; display: block; }
.hero-text { position: relative; z-index: 2; padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 48px) clamp(28px, 5vh, 48px); max-width: 1100px; }
.hero-photo { position: relative; margin: 0; cursor: zoom-in; }
.hero-photo img { display: block; width: 100%; height: auto; animation: heroIn 1.2s ease-out both; }
.hero-photo::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 22%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #0f1d27 0%, rgba(15,29,39,0) 100%); }
@keyframes heroIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(40px, 7.4vw, 92px); line-height: .98; letter-spacing: -.035em; }
.subtitle { margin: 12px 0 0; font-size: clamp(20px, 2.8vw, 32px); font-weight: 500; letter-spacing: -.01em; color: rgba(255,255,255,.92); }
.counts { margin: 22px 0 0; font-size: 14px; color: rgba(255,255,255,.8); display: flex; gap: 8px; flex-wrap: wrap; }
.counts span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 5px 11px; border-radius: 99px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 10px 16px; font-weight: 600; font-size: 14px; border: 0; text-decoration: none; transition: background .2s, transform .2s; }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.26); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #2f80b8; }
.btn-line { background: #fff; color: var(--navy); border: 1px solid var(--g3); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Day nav ---------- */
.daynav { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--g2); }
.daynav-bar { display: flex; align-items: center; gap: 10px; padding-right: clamp(16px, 4vw, 48px); }
.daynav-inner { flex: 1; min-width: 0; display: flex; gap: 6px; padding: 12px clamp(16px, 4vw, 48px); overflow-x: auto; scrollbar-width: none; }
.daynav-inner::-webkit-scrollbar { display: none; }
.daynav a { flex: none; text-decoration: none; color: var(--g5); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 99px; transition: background .2s, color .2s; white-space: nowrap; }
.daynav a small { font-weight: 500; color: var(--g4); margin-left: 4px; }
.daynav a:hover { background: var(--g1); color: var(--navy); }
.daynav a.active { background: var(--navy); color: #fff; }
.daynav a.active small { color: var(--mint); }

/* ---------- Sections ---------- */
main { padding: 8px clamp(10px, 3vw, 40px) 40px; max-width: 1680px; margin: 0 auto; }
.day { padding-top: 44px; }
.day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 6px 6px; }
.day-head h2 { margin: 0; font-weight: 800; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; color: #222; line-height: 1; }
.day-head .date { margin: 8px 0 0; color: var(--g5); font-weight: 500; }
.day-head .day-actions { display: flex; gap: 8px; }
.group { margin-top: 26px; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 0 6px 12px; }
.group-head h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--navy); }
.group-head .n { font-size: 12px; font-weight: 600; color: var(--g4); background: #fff; border: 1px solid var(--g2); border-radius: 99px; padding: 1px 9px; }
.group-head .rule { flex: 1; height: 1px; background: var(--g2); }

/* ---------- Justified grid ---------- */
.grid { position: relative; }
.row { display: flex; gap: 6px; margin-bottom: 6px; }
.tile { position: relative; flex: none; contain: layout paint; border-radius: 6px; overflow: hidden; background: var(--g2); cursor: zoom-in; padding: 0; border: 0;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s; outline-offset: 3px; }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile img { opacity: 0; transition: opacity .4s; }
.tile img.loaded { opacity: 1; }
.tile video { opacity: 0; transition: opacity .25s; }
.tile.playing video { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  body:not(.is-scrolling) .tile:hover { transform: scale(1.07); z-index: 5; box-shadow: 0 18px 40px rgba(15,29,39,.35); border-radius: 8px; }
}
.tile:focus-visible { outline: 3px solid var(--blue); }
.badge { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; background: rgba(15,29,39,.72); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 8px 4px 6px; border-radius: 99px; pointer-events: none; }
.badge svg { width: 12px; height: 12px; fill: #fff; stroke: none; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.75); text-align: center; padding: 56px 20px 48px; font-size: 15px; }
.footer-logo { height: 30px; margin-bottom: 18px; }
.footer p { margin: 6px auto; max-width: 560px; }
.footer .small { font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #080f15; display: none; color: #fff; }
.lightbox.open { display: block; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px;
  background: linear-gradient(180deg, rgba(8,15,21,.85), rgba(8,15,21,0)); }
.lb-meta { display: flex; flex-direction: column; font-size: 14px; }
.lb-meta #lb-title { font-weight: 700; }
.lb-meta #lb-count { color: rgba(255,255,255,.6); font-size: 13px; }
.lb-actions { display: flex; gap: 6px; }
.lb-btn { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.16); padding: 9px 13px; border-radius: 8px;
  text-decoration: none; font-size: 14px; font-weight: 600; transition: background .2s; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-close { padding: 9px; }
.lb-stage { position: absolute; inset: 64px 72px 24px; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.5); user-select: none; -webkit-user-drag: none; }
.lb-stage img { cursor: zoom-in; transition: transform .25s ease; }
.lb-stage.zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; inset: 0; }
.lb-stage.zoomed img { max-width: none; max-height: none; cursor: zoom-out; border-radius: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; transition: background .2s; }
.lb-nav:hover { background: rgba(255,255,255,.2); }
.lb-nav svg { width: 24px; height: 24px; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-spinner { position: absolute; width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Share sheet + toast ---------- */
.sharesheet { position: fixed; inset: 0; z-index: 200; background: rgba(8,15,21,.55); display: none; align-items: center; justify-content: center; padding: 16px; }
.sharesheet.open { display: flex; animation: fade .15s; }
.ss-card { background: #fff; color: var(--navy); border-radius: 14px; padding: 22px; width: 100%; max-width: 420px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.ss-title { margin: 0 0 14px; font-weight: 800; font-size: 18px; color: #222; }
.ss-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ss-grid a { text-align: center; text-decoration: none; color: var(--navy); font-weight: 600; font-size: 13px; padding: 12px 4px; border: 1px solid var(--g2); border-radius: 10px; cursor: pointer; }
.ss-grid a:hover { border-color: var(--blue); color: var(--blue); }
.ss-copy { display: flex; gap: 8px; margin-top: 14px; }
.ss-copy input { flex: 1; min-width: 0; border: 1px solid var(--g3); border-radius: 8px; padding: 10px; font: inherit; font-size: 13px; color: var(--g5); }
.ss-copy button { background: var(--blue); color: #fff; border: 0; border-radius: 8px; padding: 0 14px; font-weight: 600; }
.ss-cancel { margin-top: 12px; width: 100%; background: var(--g1); border: 0; border-radius: 8px; padding: 10px; font-weight: 600; color: var(--g5); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 300; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 700px) {
  .topbar { padding: 14px 16px; }
  .logo img { height: 28px; }
  .btn-ghost { padding: 8px 12px; font-size: 13px; }
  .row { gap: 3px; margin-bottom: 3px; }
  .tile { border-radius: 3px; }
  .lb-stage { inset: 60px 0 0; }
  .lb-nav { display: none; }
  .lb-btn span { display: none; }
  .lb-btn { padding: 9px; }
  .day-head .day-actions .btn { padding: 8px 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .hero-photo img { animation: none; } .tile { transition: none; } }

/* ---------- Next-mastermind invitations ---------- */
.next-cta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 26px; padding: 12px 12px 12px 18px; border-radius: 12px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); transition: background .2s, border-color .2s; }
.next-cta:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); }
.next-label { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mint); }
.next-where { font-size: 15px; font-weight: 600; }
.next-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 700; padding: 9px 14px; border-radius: 8px; }
.next-cta:hover .next-btn { background: #2f80b8; }
.daynav .nav-apply { flex: none; text-decoration: none; background: var(--blue); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 99px; white-space: nowrap; transition: background .2s; }
.daynav .nav-apply:hover { background: #2f80b8; color: #fff; }
.join { padding: 24px clamp(10px, 3vw, 40px) 64px; max-width: 1680px; margin: 0 auto; }
.join-card { background: radial-gradient(120% 140% at 0% 0%, #2C4C61 0%, #1b3242 55%, #0f1d27 100%); color: #fff; border-radius: 18px; padding: clamp(28px, 5vw, 56px); text-align: center; }
.join-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mint); }
.join-card h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.05; }
.join-text { margin: 14px auto 24px; max-width: 620px; font-size: 17px; color: rgba(255,255,255,.82); }
.join-btn { font-size: 16px; padding: 13px 22px; }
.footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: var(--mint); }
@media (max-width: 700px) {
  .next-cta { display: flex; }
  .next-btn { width: 100%; justify-content: center; }
  .daynav .nav-apply { padding: 7px 11px; font-size: 12px; }
  .daynav-inner { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

body.is-scrolling .grid { pointer-events: none; }
