:root {
  --bg: #f0f0f0;
  --panel: #f4f1ea;
  --panel-2: #eae6dc;
  --text: #3a3a3a;
  --muted: #5b6b56;
  --accent: #6b7a66;
  --accent-2: #8c3f33;
  --line: #c3cbbe;
  --shadow: 0 6px 24px rgba(46, 58, 43, .15);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #f7f7f7 0%, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}
img { display: block; }

/* ─── Header ─── */
header.site {
  text-align: center;
  padding: 56px 20px 24px;
}
header.site h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 1px;
  font-weight: 700;
}
header.site .dates {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 200;
  letter-spacing: .5px;
}
header.site .tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .95rem;
  font-style: italic;
  letter-spacing: .3px;
}

/* ─── Hero video ─── */
.hero {
  margin: 8px auto 56px;
  width: 85vw;
  max-width: 1600px;
}
.hero-frame {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.hero video {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
}
.dl-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dl-label {
  color: var(--muted);
  font-size: .9rem;
}
.dl-buttons {
  display: flex;
  gap: 8px;
}

/* ─── Buttons ─── */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: .92rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.btn:hover { background: #ded9cc; border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover { background: #55624f; }
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn.ghost:hover { color: var(--text); background: rgba(0,0,0,.05); }
.btn.icon { padding: 9px 13px; font-size: 1.1rem; }

/* ─── Gallery sections ─── */
.gallery {
  width: min(1400px, calc(100% - 32px));
  margin: 28px auto 48px;
  padding: 28px 28px 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 2px rgba(46, 58, 43, .05);
}
/* Photographs is a column of per-category boxes; the boxed look is on each
   .cat-box, not the outer section. */
#photoSection {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
#videoSection { background: #dde3e7; }  /* muted sky */
#aiSection    { background: #e0dde6; }  /* muted lavender */

.cat-box {
  padding: 24px 24px 28px;
  margin: 0 0 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 2px rgba(46, 58, 43, .05);
}
.cat-box:last-child { margin-bottom: 0; }
.cat-box > .category-header {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.section-title {
  margin: 32px 0 4px;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .5px;
}
.section-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .95rem;
  max-width: 720px;
}
.category-header {
  grid-column: 1 / -1;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin: 18px 0 4px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* ─── Cards ─── */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  appearance: none;
  text-align: left;
  padding: 0;
  color: inherit;
  font-family: inherit;
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}
.card .thumb {
  aspect-ratio: 4 / 3;
  background: #cfd6c6;
  overflow: hidden;
  position: relative;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card.video .thumb::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,.9);
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  pointer-events: none;
}
.card.ai .thumb::before {
  content: "AI";
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 999px;
  z-index: 2;
}
.heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s, transform .1s;
  z-index: 3;
}
.heart:hover { background: rgba(0,0,0,.8); }
.heart.on { background: var(--accent-2); color: #fff; }
.heart.on:hover { background: #6d2f27; }

/* ─── Cart pill + tray ─── */
.cart-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  z-index: 50;
  transition: transform .15s, background .15s;
}
.cart-pill:hover { background: #55624f; transform: scale(1.05); }
.cart-pill[data-empty="true"] { background: var(--panel-2); color: var(--muted); }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--accent-2);
  color: #fff;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cart-pill[data-empty="true"] .cart-count { display: none; }
.cart-icon { line-height: 1; }

.cart-tray {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: min(360px, calc(100vw - 48px));
  max-height: 70vh;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.cart-tray[hidden] { display: none; }
.cart-tray-head, .cart-tray-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cart-tray-foot { border-top: 1px solid var(--line); border-bottom: none; }
.cart-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}
.cart-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: .9rem;
}
.cart-list li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-list .rm {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem;
}
.cart-list .rm:hover { color: var(--accent-2); }
.cart-list .empty { color: var(--muted); text-align: center; padding: 24px; }

/* ─── Overlays / lightbox / compare ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,7,10,.94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.overlay[hidden] { display: none; }
.viewer {
  position: relative;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.viewer-head, .viewer-foot {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}
.viewer-head { justify-content: space-between; }
.viewer-foot { justify-content: center; flex-wrap: wrap; }
.viewer-foot .spacer { flex: 1; }
.viewer-head .title {
  font-weight: 600;
  font-size: 1rem;
  color: #f4f1ea;
}
.viewer-body {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 75vh;
}
.viewer-body img, .viewer-body video {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* compare slider — adapted from existing /compare/ SPA */
.compare {
  position: relative;
  max-width: 92vw;
  max-height: 74vh;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare img.before {
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  z-index: 2;
}
.cmp-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  z-index: 4;
  pointer-events: none;
}
.cmp-label.l { left: 12px; }
.cmp-label.r { right: 12px; }
.cmp-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  z-index: 3;
  pointer-events: none;
}
.cmp-grip {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: #fff;
  z-index: 4;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.cmp-grip::after {
  content: "‹ ›";
  color: #3a3a3a;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* ─── Footer ─── */
.site-foot {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px 60px;
  font-size: .9rem;
}

/* ─── Mobile tweaks ─── */
@media (max-width: 700px) {
  .hero { width: 94vw; }
  .gallery { width: calc(100% - 16px); padding: 20px 16px 24px; margin: 16px auto 28px; }
  .cat-box { padding: 18px 14px 22px; margin-bottom: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .cart-pill { width: 56px; height: 56px; bottom: 16px; right: 16px; }
  .cart-tray { bottom: 80px; right: 16px; }
  .viewer-foot .spacer { flex-basis: 100%; height: 0; }
}
