:root {
  --ink: #3b3c3d;
  --gold: #8b8361;
  --gold-soft: #a89f7b;
  --gold-faint: rgba(139, 131, 97, 0.14);
  --bg: #ffffff;
  --paper: #f5f5f5;
  --card: #ffffff;
  --muted: #6f6b63;
  --muted-2: #8a857c;
  --line: rgba(59, 60, 61, 0.12);
  --line-strong: rgba(59, 60, 61, 0.22);
  --shadow: 0 18px 50px rgba(59, 60, 61, 0.08);
  --shadow-soft: 0 8px 24px rgba(59, 60, 61, 0.06);
  --font: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 16px;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font-family: inherit; }

img { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

/* ——— Login ——— */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 0;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(139, 131, 97, 0.22), transparent 55%),
    var(--ink);
}

.login-card {
  width: 100%;
  max-width: 420px;
  margin-top: auto;
  margin-bottom: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo {
  height: 42px;
  width: auto;
  margin: 0 auto 28px;
}

.login-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

.login-card h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.login-card .lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.5;
}

.login-card form {
  text-align: left;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-faint);
  background: #fff;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.15s, background 0.15s, opacity 0.15s;
}

.btn:hover { background: #2a2b2c; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-full { width: 100%; margin-top: 6px; }

.btn-ghost {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  height: auto;
  padding: 8px 4px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.btn-ghost:hover { color: var(--ink); background: transparent; }

.form-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: #9a3b32;
  font-size: 13.5px;
  text-align: center;
}

.login-note {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ——— App shell ——— */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: var(--ink);
  border-bottom: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
}

.brand-rule {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.28);
}

.brand-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  white-space: nowrap;
}

.header-meta strong { color: #fff; font-weight: 600; }

.app-header .btn-ghost { color: rgba(255, 255, 255, 0.72); }
.app-header .btn-ghost:hover { color: #fff; }

.page {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.intro h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.1;
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 36em;
  line-height: 1.55;
}

.count {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 6px;
}

/* ——— Filters ——— */
.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  margin: 0 -24px 28px;
  padding: 10px 24px 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  width: 72px;
  flex: 0 0 72px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover { border-color: var(--ink); }

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip-all.is-on {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.select { position: relative; min-width: 220px; }

.select-btn {
  appearance: none;
  width: 100%;
  min-width: 220px;
  height: 34px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.select-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
}

.select-btn:hover,
.select.is-open .select-btn { border-color: var(--ink); }

.select-btn.has-value {
  border-color: var(--gold);
  color: var(--ink);
}

.select-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 16;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow: auto;
}

.select-menu[hidden] { display: none; }

.select-menu button {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.select-menu button:hover,
.select-menu button.is-on { background: var(--gold-faint); }

.client-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
  max-width: 220px;
  margin: 0 0 14px;
}

.client-logo img {
  max-height: 48px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.privacy {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 40px;
  background:
    radial-gradient(800px 180px at 50% 0%, rgba(139, 131, 97, 0.10), transparent 60%),
    #f5f5f5;
}

.event.is-feature .privacy { min-height: 320px; }

.privacy .client-logo {
  height: 72px;
  max-width: 280px;
  margin: 0 auto 20px;
  justify-content: center;
}

.privacy .client-logo img {
  max-height: 72px;
  max-width: 280px;
  object-position: center;
}

.privacy-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.privacy p {
  margin: 0;
  max-width: 28em;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}


#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-footer {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.login .site-footer {
  margin-top: auto;
  width: calc(100% + 40px);
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

/* ——— Events ——— */
.events { display: grid; gap: 28px; }

.event {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.event.is-feature { box-shadow: var(--shadow); }

.photos {
  display: grid;
  gap: 3px;
  background: #e8e8e8;
  max-height: min(42vh, 400px);
  overflow: hidden;
}

.photos.n-1 { grid-template-columns: 1fr; }
.photos.n-2 { grid-template-columns: 1fr 1fr; }
.photos.n-3 { grid-template-columns: 1.45fr 1fr; grid-template-rows: 1fr 1fr; }
.photos.n-3 .photo:first-child { grid-row: 1 / span 2; }
.photos.n-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.photo {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: #e0e0e0;
  min-height: 0;
  overflow: hidden;
}

.photos.n-1 .photo { aspect-ratio: 16 / 9; max-height: min(42vh, 400px); }
.photos.n-2 .photo { aspect-ratio: 4 / 3; }
.photos.n-3,
.photos.n-4 { aspect-ratio: 16 / 9.2; }

.photos.n-3 .photo,
.photos.n-4 .photo { aspect-ratio: auto; height: 100%; }

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.6s ease;
}

.photo:hover img { transform: scale(1.03); }

.event-body { padding: 22px 24px 26px; }

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.tag:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--gold-soft);
}

.event h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.event.is-feature h2 { font-size: 32px; }

.event-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14.5px;
}

.event-desc {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 62em;
}

.privacy-note {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
}

.service {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--gold-faint);
  border-radius: 999px;
  padding: 5px 10px;
}

.case {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.case-block h3 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.case-block p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.demo-banner {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 10px 16px;
  background: var(--gold-faint);
  color: var(--ink);
  border-radius: 10px;
  font-size: 13.5px;
  text-align: center;
}

/* ——— Lightbox ——— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 20, 18, 0.88);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 16px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  gap: 12px;
  padding: 4px 4px 12px;
}

.lightbox-bar p { margin: 0; font-size: 14px; }
.lightbox-bar span { color: rgba(255,255,255,0.7); }

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.lightbox-stage img {
  max-width: min(100%, 1100px);
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 12px;
}

.lightbox .btn-ghost { color: #fff; }
.lightbox .btn-ghost:hover { color: #fff; text-decoration: underline; }

.icon-btn {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.icon-btn:hover { background: rgba(255,255,255,0.2); }

.hidden { display: none !important; }


/* ——— View switch ——— */
.view-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  margin: 0 0 22px;
  background: var(--card);
}

.view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.view-btn.is-on {
  background: var(--ink);
  color: #fff;
}

/* ——— Brands ——— */
.brands {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.brand-card {
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  min-width: 0;
}

.brand-logo {
  background: #fff;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
}

.brand-logo img {
  max-width: 80%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-logo-fallback {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

.brand-body { padding: 16px 18px 18px; }

.brand-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.brand-meta span { display: block; }

@media (min-width: 900px) {
  .events {
    grid-template-columns: 1fr 1fr;
  }
  .event.is-feature {
    grid-column: 1 / -1;
  }
  .event.is-feature .photos,
  .event.is-feature .photos.n-1 .photo {
    max-height: min(48vh, 440px);
  }
  .event.is-feature .case {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  }
  .brands {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .brands {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .app-header { padding: 0 16px; height: 64px; }
  :root { --header-h: 64px; }
  .header-expiry { display: none; }
  .login-card { padding: 32px 22px; }
  .page { padding: 24px 16px 64px; }
  .filters { margin: 0 -16px 20px; padding: 8px 16px 12px; }
  .filter-label { width: 100%; flex-basis: 100%; }
  .select, .select-btn { width: 100%; min-width: 0; }
  .event-body { padding: 18px 16px 20px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 8px; }
  .count { padding-bottom: 0; }
  .event h2, .event.is-feature h2 { font-size: 22px; }
  .photos.n-2 { grid-template-columns: 1fr; }
  .photos.n-2 .photo { aspect-ratio: 16 / 9; }
  .photos,
  .photos.n-1 .photo,
  .photos.n-2 .photo {
    max-height: min(38vh, 280px);
  }
  .brand-title { display: none; }
  .brand-rule { display: none; }
  .brands { grid-template-columns: 1fr 1fr; gap: 12px; }
  .brand-logo { padding: 20px 16px; aspect-ratio: 4 / 3; }
  .brand-logo img { max-height: 56px; }
  .brand-card h2 { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .photo:hover img { transform: none; }
}
