/* ============================================================
   BRAINSOIL — archive.css  (archive browser + gallery/lightbox)
   ============================================================ */

/* ---------- YOUTUBE FACADE (shared) ---------- */
.yt{ position:relative; display:block; width:100%; aspect-ratio:16/9; border:1px solid var(--hairline); border-radius:5px; overflow:hidden; cursor:pointer; background:#000; }
.yt img{ width:100%; height:100%; object-fit:cover; filter:brightness(.84); transition:filter .3s ease; }
.yt:hover img{ filter:brightness(1); }
.yt .yt-play{ position:absolute; inset:0; margin:auto; width:70px; height:70px; border-radius:50%; border:1.5px solid var(--accent); background:rgba(8,7,5,.5); box-shadow:var(--glow); display:grid; place-items:center; transition:transform .3s; }
.yt:hover .yt-play{ transform:scale(1.08); }
.yt .yt-play::after{ content:''; margin-left:5px; border-style:solid; border-width:11px 0 11px 18px; border-color:transparent transparent transparent var(--accent); }
.yt iframe{ width:100%; height:100%; border:0; display:block; }

/* ---------- ARCHIVE HERO ---------- */
#arc-hero{ text-align:center; padding-top:140px; }
#arc-hero .big{ font-family:var(--display); font-weight:900; font-size:clamp(44px,9vw,92px); color:var(--white); letter-spacing:-.03em; text-shadow:var(--glow); line-height:.9; }
#arc-hero .sub{ font-family:var(--serif); font-style:italic; font-size:clamp(16px,2.6vw,22px); color:var(--accent-3); margin-top:12px; }
#arc-hero .intro{ font-family:var(--sans); font-size:14px; color:var(--mute); max-width:600px; margin:22px auto 0; }

/* ---------- VERTICAL TIMELINE OF CYCLES ---------- */
#cycles{ display:block; } /* plain block stacking — flex here triggered a %-padding resolution quirk on nested <section> children */
.cycle-block{ padding:64px var(--pad); border-bottom:1px solid var(--hairline); }
.cycle-block:first-child{ padding-top:20px; }
.cycle-block:last-child{ border-bottom:none; }
.cycle-block.upcoming{ background:radial-gradient(ellipse 70% 60% at 50% 20%, rgba(212,175,55,.06), transparent 65%); }

.cyc-head{ text-align:center; margin-bottom:26px; }
.cyc-head .ed{ font-family:var(--mono); font-size:13px; letter-spacing:.32em; color:var(--accent); text-transform:uppercase; }
.cyc-head h2{ font-family:var(--sans); font-weight:700; font-size:clamp(30px,5.4vw,52px); color:var(--white); margin:10px 0 6px; letter-spacing:-.005em; }
.cycle-block.upcoming .cyc-head h2{ color:var(--gold-lt); text-shadow:var(--glow); }
.cyc-head .meta{ font-family:var(--mono); font-size:13px; color:var(--mute); letter-spacing:.05em; }

/* per-cycle horizontally-scrolling tab menu (own instance per section) */
.cyc-tabs{ display:flex; gap:6px; overflow-x:auto; justify-content:center; margin:0 auto 8px; max-width:640px; scrollbar-width:none; }
.cyc-tabs::-webkit-scrollbar{ display:none; }
.cyc-tabs button{
  flex:0 0 auto; font-family:var(--mono); font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--mute); padding:12px 18px; border-bottom:2px solid transparent; white-space:nowrap;
  transition:color .2s, border-color .2s, background .2s;
}
.cyc-tabs button:hover{ color:var(--champagne); background:rgba(212,175,55,.04); }
.cyc-tabs button[aria-selected="true"]{ color:var(--accent); border-bottom-color:var(--accent); }
.cyc-tabs button .i{ margin-right:6px; }
.cyc-stage{ padding-top:22px; min-height:200px; }

/* stage: recap / flyer / menu / gallery — videos sized large */
.recap-box{ max-width:920px; margin:0 auto; }
.recap-stack{ display:flex; flex-direction:column; gap:26px; max-width:920px; margin:0 auto; }
.cap-note{ text-align:center; font-family:var(--mono); font-size:11px; color:var(--mute); margin-top:14px; letter-spacing:.08em; }

.flyer-box{ display:flex; gap:28px; align-items:flex-start; flex-wrap:wrap; justify-content:center; }
.flyer-img{ flex:0 0 300px; max-width:340px; border:1px solid var(--hairline); border-radius:4px; }
.flyer-ph{ flex:0 0 260px; aspect-ratio:1275/1650; border:1px dashed rgba(57,255,20,.4); border-radius:4px; display:grid; place-items:center; text-align:center; padding:20px; background:linear-gradient(160deg,#12100a,#0a0806); }
.flyer-ph .t{ font-family:var(--serif); font-size:22px; color:var(--white); } .flyer-ph .s{ font-family:var(--mono); font-size:10px; letter-spacing:.16em; color:var(--uv-green); margin-top:10px; text-transform:uppercase; }
.flyer-facts{ flex:1 1 240px; min-width:220px; max-width:100%; }
.flyer-facts .row{ display:flex; justify-content:space-between; gap:14px; padding:11px 0; border-bottom:1px solid var(--hairline); font-family:var(--sans); font-size:14px; }
.flyer-facts .row .k{ color:var(--mute); font-family:var(--mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; white-space:nowrap; flex:0 0 auto; }
.flyer-facts .row .v{ color:var(--champagne); text-align:right; min-width:0; flex:1 1 auto; overflow-wrap:break-word; }

.menu-list{ max-width:600px; margin:0 auto; }
.menu-list .mrow{ display:flex; justify-content:space-between; gap:16px; padding:16px 0; border-bottom:1px solid var(--hairline); }
.menu-list .mrow > div:first-child{ min-width:0; flex:1 1 auto; }
.menu-list .mrow .nm{ font-family:var(--serif); font-size:19px; color:var(--white); }
.menu-list .mrow .ds{ font-family:var(--sans); font-size:12px; color:var(--mute); margin-top:3px; overflow-wrap:break-word; }
.menu-list .mrow .pr{ font-family:var(--mono); color:var(--accent); font-size:14px; white-space:nowrap; flex:0 0 auto; }
.menu-img{ display:block; max-width:520px; margin:0 auto; border:1px solid var(--hairline); border-radius:4px; }

.gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; max-width:820px; margin:0 auto; perspective:1200px; }
.gallery-grid .gph{ aspect-ratio:1/1; border:1px solid var(--hairline); border-radius:4px; display:grid; place-items:center; color:var(--gold-dk); background:linear-gradient(135deg,#181206,#0c0a06); font-size:20px; }
.gallery-grid .gcard{ display:block; border-radius:6px; }

/* ---- archive preview: balanced 3×2 grid of larger, clickable cards ---- */
.gallery-grid.preview{ grid-template-columns:repeat(3,1fr); gap:16px; max-width:900px; }
@media (max-width:560px){ .gallery-grid.preview{ grid-template-columns:repeat(2,1fr); } }

/* ---- full gallery page (#g-grid): large cards, 3 across ---- */
section.gallery-wide{ max-width:1440px; }
#g-grid{ grid-template-columns:repeat(3,1fr); gap:22px; max-width:1380px; }
@media (max-width:860px){ #g-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ #g-grid{ grid-template-columns:1fr; } }

/* ---- art gallery (#art-grid): 93 collective paintings, switchable density ----
   data-density large/medium/dense -> desktop 3/4/6 across, mobile 2/3/4 across */
#art-grid{ gap:18px; max-width:1380px; }
#art-grid[data-density="large"]{ grid-template-columns:repeat(3,1fr); gap:22px; }
#art-grid[data-density="medium"]{ grid-template-columns:repeat(4,1fr); gap:18px; }
#art-grid[data-density="dense"]{ grid-template-columns:repeat(6,1fr); gap:12px; }
@media (max-width:700px){
  #art-grid[data-density="large"]{ grid-template-columns:repeat(2,1fr); gap:14px; }
  #art-grid[data-density="medium"]{ grid-template-columns:repeat(3,1fr); gap:10px; }
  #art-grid[data-density="dense"]{ grid-template-columns:repeat(4,1fr); gap:8px; }
}
/* tiny density switcher above the grid */
.grid-toggle{ display:flex; justify-content:flex-end; gap:6px; max-width:1380px; margin:0 auto 14px; }
.grid-toggle button{
  font-family:var(--mono); font-size:11px; letter-spacing:.08em; line-height:1;
  color:var(--mute); background:none; border:1px solid var(--hairline); border-radius:3px;
  padding:7px 10px; cursor:pointer; transition:color .2s, border-color .2s, box-shadow .2s;
}
.grid-toggle button:hover{ color:var(--accent); border-color:var(--accent); }
.grid-toggle button[aria-pressed="true"]{ color:var(--accent); border-color:var(--accent); box-shadow:var(--glow); }

/* ---- peel / reveal: cards sit tilted+lifted until scrolled into view, then flatten into the grid ---- */
.gallery-grid img,.gallery-grid .gph{
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:4px; cursor:pointer;
  border:1px solid var(--hairline); background-color:#0c0a06;
  --peel-r:-8deg; --peel-x:0px; --peel-y:26px;
  transform:translate(var(--peel-x),var(--peel-y)) rotate(var(--peel-r)) scale(.92);
  opacity:.28; box-shadow:0 22px 34px rgba(0,0,0,.6);
  transition:transform .7s cubic-bezier(.16,.84,.44,1), opacity .6s ease, box-shadow .5s ease;
  transform-style:preserve-3d; will-change:transform,opacity;
}
.gallery-grid img.settled,.gallery-grid .gph.settled{
  transform:translate(0,0) rotate(0deg) scale(1); opacity:1;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
}
.gallery-grid img.settled:hover{ transform:translateY(-4px) scale(1.01); box-shadow:var(--glow); transition-duration:.25s; }
.gallery-grid img:nth-child(odd),.gallery-grid .gph:nth-child(odd){ --peel-r:-9deg; --peel-x:-10px; }
.gallery-grid img:nth-child(even),.gallery-grid .gph:nth-child(even){ --peel-r:8deg; --peel-x:10px; }
.gallery-grid img:nth-child(3n),.gallery-grid .gph:nth-child(3n){ --peel-r:-5deg; --peel-y:34px; }
.gallery-grid img:nth-child(4n),.gallery-grid .gph:nth-child(4n){ --peel-r:6deg; --peel-y:18px; }
/* wrapped preview cards: img is only-child of .gcard, so drive peel via the anchor's position */
.gallery-grid .gcard:nth-child(odd) img{ --peel-r:-9deg; --peel-x:-10px; }
.gallery-grid .gcard:nth-child(even) img{ --peel-r:8deg; --peel-x:10px; }
.gallery-grid .gcard:nth-child(3n) img{ --peel-r:-5deg; --peel-y:34px; }
.gallery-grid img:nth-child(1).settled,.gallery-grid img:nth-child(2).settled{ transition-delay:.02s; }
.gallery-grid img:nth-child(3).settled,.gallery-grid img:nth-child(4).settled{ transition-delay:.06s; }
.gallery-grid img:nth-child(5).settled,.gallery-grid img:nth-child(6).settled{ transition-delay:.1s; }
.gallery-grid img:nth-child(7).settled,.gallery-grid img:nth-child(8).settled{ transition-delay:.14s; }
/* no-JS visitors: never leave images peeled/faded */
.no-js .gallery-grid img,.no-js .gallery-grid .gph{ transform:none; opacity:1; }
.gallery-cta{ text-align:center; margin-top:22px; }

.empty{ text-align:center; font-family:var(--mono); font-size:13px; color:var(--mute); padding:56px 0; letter-spacing:.06em; line-height:1.7; }
.empty small{ color:var(--mute-dk); }
.up-cta{ text-align:center; padding:30px 0 10px; }

/* ---------- LIGHTBOX (gallery page) ---------- */
.lightbox{ position:fixed; inset:0; z-index:120; background:rgba(4,3,2,.94); display:none; align-items:center; justify-content:center; }
.lightbox.open{ display:flex; }
.lightbox img{ max-width:92vw; max-height:86vh; border:1px solid var(--hairline); border-radius:4px; box-shadow:var(--glow-strong); }
.lightbox .lb-close,.lightbox .lb-nav{ position:absolute; background:rgba(8,7,5,.6); border:1px solid var(--hairline); color:var(--champagne); width:48px; height:48px; border-radius:50%; font-size:20px; display:grid; place-items:center; cursor:pointer; transition:border-color .2s, color .2s; }
.lightbox .lb-close:hover,.lightbox .lb-nav:hover{ border-color:var(--accent); color:var(--accent); }
.lightbox .lb-close{ top:20px; right:20px; }
.lightbox .lb-prev{ left:16px; top:50%; transform:translateY(-50%); }
.lightbox .lb-next{ right:16px; top:50%; transform:translateY(-50%); }
.lightbox .lb-count{ position:absolute; bottom:22px; left:50%; transform:translateX(-50%); font-family:var(--mono); font-size:12px; color:var(--mute); letter-spacing:.14em; }
.lightbox .lb-cap{ position:absolute; bottom:44px; left:50%; transform:translateX(-50%); max-width:80vw; text-align:center; font-family:var(--sans); font-size:14px; color:var(--champagne); letter-spacing:.03em; }
