:root {
  --bg: #ffffff;
  --text: #1c1c1c;
  --muted: #7a7a7a;
  --line: #e9e9e9;
  --accent: #1c1c1c;
  --heart: #e0245e;
  --gap: 6px;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }

/* ---------- header ---------- */
.site-header { text-align: center; padding: 56px 16px 40px; }
.brand { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 5vw, 44px); letter-spacing: .18em; text-transform: uppercase; }
.tagline { margin-top: 10px; color: var(--muted); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- home grid ---------- */
.gallery-list { max-width: 1280px; margin: 0 auto; padding: 0 24px 64px; display: grid; gap: 40px 28px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { display: block; }
.card-img { aspect-ratio: 3 / 2; overflow: hidden; background: #f2f2f2; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .4s; opacity: 0; }
.card-img img.loaded { opacity: 1; }
.card:hover .card-img img { transform: scale(1.03); }
.card-title { margin-top: 16px; font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.card-meta { margin-top: 6px; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- gallery cover ---------- */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: #111; }
.cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.cover img.loaded { opacity: .92; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.05) 55%); }
.cover-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: 12vh; text-align: center; color: #fff; padding: 0 16px; }
.cover-title { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 6vw, 60px); letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.cover-date { margin-top: 12px; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; opacity: .9; }
.cover-btn { margin-top: 28px; display: inline-block; padding: 13px 30px; border: 1px solid rgba(255,255,255,.85); color: #fff; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; transition: background .2s, color .2s; }
.cover-btn:hover { background: #fff; color: #111; }
.cover-brand { position: absolute; z-index: 1; top: 24px; left: 0; right: 0; text-align: center; color: #fff; font-family: var(--display); letter-spacing: .2em; text-transform: uppercase; font-size: 15px; }

/* ---------- toolbar ---------- */
.toolbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.toolbar-inner { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.toolbar .t-title { flex: 1; min-width: 0; }
.t-title .name { font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-title .sub { font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 4px; font-size: 13px; white-space: nowrap; }
.tbtn:hover { background: #f3f3f3; }
.tbtn svg { width: 19px; height: 19px; flex: none; }
.tbtn.active { color: var(--heart); }
.tbtn .count { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .tbtn .label { display: none; } .tbtn { padding: 9px; } }

/* ---------- justified grid ---------- */
.grid-wrap { max-width: 1600px; margin: 0 auto; padding: var(--gap); }
.row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.tile { position: relative; background: #f2f2f2; overflow: hidden; cursor: zoom-in; flex: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.tile img.loaded { opacity: 1; }
.tile .actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.tile:hover .actions, .tile .actions:has(.fav.on) { opacity: 1; }
.tile .actions button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; }
.tile .actions button:hover { background: rgba(0,0,0,.7); }
.tile .actions svg { width: 18px; height: 18px; }
.tile .fav.on { color: var(--heart); background: #fff; }
@media (hover: none) { .tile .actions { opacity: 1; } .tile .actions .dl { display: none; } .tile .actions button { width: 30px; height: 30px; } }
.empty { text-align: center; color: var(--muted); padding: 80px 16px; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: #0d0d0d; display: none; color: #fff; touch-action: none; user-select: none; }
.lb.open { display: block; }
.lb-stage { position: absolute; inset: 56px 0 56px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s ease, opacity .25s; }
.lb-top, .lb-bottom { position: absolute; left: 0; right: 0; height: 56px; display: flex; align-items: center; padding: 0 8px; gap: 4px; }
.lb-top { top: 0; } .lb-bottom { bottom: 0; justify-content: center; font-size: 13px; letter-spacing: .14em; color: #bbb; }
.lb-top .spacer { flex: 1; }
.lb button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.lb button:hover { background: rgba(255,255,255,.1); }
.lb button svg { width: 22px; height: 22px; }
.lb .fav.on { color: var(--heart); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
@media (hover: none) { .lb-nav { display: none !important; } }

/* ---------- toast / modal ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1c1c1c; color: #fff; padding: 12px 18px; border-radius: 6px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 150; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 8px; padding: 28px; width: 100%; max-width: 420px; }
.modal h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: 18px; }
.modal p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal .opt { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; text-align: left; }
.modal .opt:hover { border-color: #bbb; }
.modal .opt small { color: var(--muted); }
.modal .opt[disabled] { opacity: .45; cursor: default; }
.modal .cancel { margin-top: 6px; width: 100%; padding: 10px; color: var(--muted); font-size: 14px; }
.progress { height: 4px; background: #eee; border-radius: 2px; overflow: hidden; margin-top: 8px; display: none; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---------- footer ---------- */
footer { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 40px 16px 48px; }
@media (max-width: 640px) {
  .gallery-list { grid-template-columns: 1fr; padding: 0 16px 48px; gap: 32px; }
  .site-header { padding: 40px 16px 28px; }
  :root { --gap: 3px; }
}

/* ---------- logo ---------- */
.logo { display: block; width: 72px; height: 72px; margin: 0 auto 18px; color: var(--text); }
.cover-brand .logo-sm { width: 40px; height: 40px; margin: 0 auto 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
@media (max-width: 600px) { .logo { width: 56px; height: 56px; margin-bottom: 14px; } }

/* ---------- teams ---------- */
.card-title .lock { width: 15px; height: 15px; margin-left: 8px; vertical-align: -1px; color: var(--muted); }
.card.soon { cursor: default; }
.card-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #f4f2ee; color: #9a948a; }
.card-placeholder .logo { width: 64px; height: 64px; margin: 0; color: #b9b2a6; }
.card-placeholder span { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
.card.soon .card-title, .card.soon .card-meta { color: var(--muted); }
.team-header { padding-top: 28px; }
.team-header .brand { margin: 0; font-size: clamp(26px, 4.5vw, 40px); }
.mini-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 36px; font-family: var(--display); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.mini-brand .logo { width: 30px; height: 30px; margin: 0; color: var(--text); }
.mini-brand:hover { color: var(--text); }
.cover-back { display: inline-block; margin-top: 18px; color: rgba(255,255,255,.85); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.cover-back:empty { display: none; }
.cover-back:hover { color: #fff; }

/* ---------- PIN screen ---------- */
body.gated > :not(.pin-gate) { display: none !important; }
.pin-gate { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; background: #141414; overflow-x: hidden; overflow-y: auto; }
.pin-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.45); transform: scale(1.08); }
.pin-card { position: relative; width: 100%; max-width: 380px; background: #fff; border-radius: 10px; padding: 32px 28px 26px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.pin-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.pin-brand .logo { width: 26px; height: 26px; margin: 0; color: var(--text); }
.pin-card h1 { margin: 22px 0 6px; font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: .1em; text-transform: uppercase; }
.pin-sub { color: var(--muted); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.pin-card form { margin-top: 26px; }
.pin-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pin-card input { width: 100%; max-width: 220px; font: 500 28px/1 var(--body); letter-spacing: .5em; text-align: center; text-indent: .5em; padding: 12px 8px; border: 1px solid #d6d6d6; border-radius: 8px; outline: none; }
.pin-card input:focus { border-color: var(--text); }
.pin-card button { display: block; width: 100%; max-width: 220px; margin: 14px auto 0; padding: 13px; background: var(--text); color: #fff; border-radius: 8px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.pin-card button:disabled { opacity: .6; }
.pin-msg { min-height: 20px; margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.pin-msg.err { color: #c62828; }
.pin-back { display: inline-block; margin-top: 14px; font-size: 12px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.pin-back:hover { color: var(--text); }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
