/* Big Dinks Media — shared stylesheet
   Palette/type borrowed from Big Dinks Pickleball (docs/04-brand-guidelines.md)
   until Big Dinks Media has its own confirmed brand assets. */

:root {
  --ink: #111111;
  --bg: #ffffff;
  --red: #E4002B;
  --muted: #6B7280;
  --border: #E5E7EB;
  --panel: #F7F7F8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: 'Jost', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4,
.brand, .site-nav a, button, .btn, label.form-label {
  font-family: 'DM Sans', Arial, sans-serif;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink); }
p.lede { color: var(--muted); font-size: 1.1rem; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { color: var(--ink); }
.brand-mark { height: 64px; width: auto; display: block; }

.site-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.site-nav a {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.site-nav a.active,
.site-nav a:hover { color: var(--red); }

/* Hero */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.hero .tag {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  background: #FDE9ED;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: #c40025; border-color: #c40025; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Section */
.section {
  padding: 56px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-head .btn { flex-shrink: 0; }

/* Gallery grid (cards) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.gallery-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(17,17,17,0.08);
}
.gallery-card-cover {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.gallery-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-card-body { padding: 16px 18px 20px; }
.gallery-card-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.gallery-card-body h3 { margin-bottom: 4px; color: var(--ink); }
.gallery-card-body p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Photo tile placeholder (used for both cover + grid images) */
.photo-tile {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--ink);
  display: flex;
  align-items: flex-end;
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  display: block;
}
.photo-tile.placeholder {
  background: linear-gradient(135deg, var(--tile-a, #1a1a1a), var(--tile-b, #3a3a3a));
}
.photo-tile.placeholder img { display: none; }
.photo-tile.placeholder::before {
  content: "\1F4F7";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 1.6rem;
  opacity: 0.55;
}
.photo-tile-caption {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
}

/* Image grid inside a single gallery — dense, edge-to-edge tiles (Google
   Photos style): uniform square cells, cropped to fill, tight gap, no
   border/radius. The photo's full, uncropped shape is instead shown when you
   click into the lightbox — that's where "don't crop" applies. */
/* Desktop: show each photo's full, uncropped shape at a large size (3 per row).
   Mobile: dense cropped squares (Google Photos style) — better for quick scrolling on a phone. */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.image-grid .photo-tile-wrap {
  overflow: hidden;
  cursor: pointer;
  display: flex;
}
.image-grid .photo-tile { position: static; width: 100%; height: auto; }
.image-grid .photo-tile img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.image-grid .photo-tile.placeholder { aspect-ratio: 4 / 3; height: auto; }

@media (max-width: 640px) {
  .image-grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
  .image-grid .photo-tile-wrap { aspect-ratio: 1 / 1; position: relative; }
  .image-grid .photo-tile { height: 100%; }
  .image-grid .photo-tile img { height: 100%; object-fit: cover; }
  .image-grid .photo-tile.placeholder { aspect-ratio: auto; height: 100%; }
}

/* Gallery header */
.gallery-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}
.gallery-header .meta-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 18px;
}
.back-link:hover { color: var(--red); }

.gallery-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.gallery-header-row .lede { margin-bottom: 0; }

/* Select-photos mode on the single-gallery image grid */
.select-check {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(17,17,17,0.35);
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
}
.image-grid.select-mode .select-check { display: flex; }
.image-grid.select-mode .photo-tile-wrap { cursor: pointer; }

/* On phones, select mode switches to fewer, wider rectangular tiles — easier to tap the
   checkbox accurately than a dense grid of small squares. Normal browsing stays square. */
@media (max-width: 640px) {
  .image-grid.select-mode {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .image-grid.select-mode .photo-tile-wrap {
    aspect-ratio: 4 / 3;
  }
}
.photo-tile-wrap.selected .select-check {
  background: var(--red);
  border-color: var(--red);
}
.photo-tile-wrap.selected { outline: 3px solid var(--red); outline-offset: -3px; }
.photo-tile-wrap.selected .photo-tile { opacity: 0.85; }

.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 150;
  display: none;
  align-items: center;
  gap: 14px;
  background: #111111;
  color: #fff;
  padding: 12px 16px 12px 20px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  max-width: calc(100vw - 32px);
  flex-wrap: wrap;
  justify-content: center;
}
.selection-bar.open { display: flex; }
.selection-bar .selection-count { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.selection-bar .btn { padding: 9px 18px; font-size: 0.78rem; }
.selection-bar .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.selection-bar .btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox-frame {
  width: 100%;
  max-height: 74vh;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Show the full photo, uncropped — letterboxed within the frame rather than
   forced to fill a fixed box. Placeholders (no real photo) keep a fixed box
   since there's no real image to size from. */
.lightbox-frame .photo-tile {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 74vh;
}
.lightbox-frame .photo-tile img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
}
.lightbox-frame .photo-tile.placeholder {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 74vh;
}
.lightbox-caption {
  color: #f5f5f5;
  font-size: 0.95rem;
  text-align: center;
}
.lightbox-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lightbox-download:hover { background: var(--red); border-color: var(--red); color: #fff; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--red); border-color: var(--red); }

/* Panels / cards used on About and Shop pages */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.chip {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #f2f2f2;
  padding: 48px 0 28px;
  margin-top: 40px;
}
.site-footer .brand-mark-footer { height: 56px; margin-bottom: 14px; }
.site-footer a { color: #f2f2f2; }
.site-footer a:hover { color: var(--red); }
.footer-inner p { color: #c9c9c9; margin: 0 0 6px; font-size: 0.9rem; }
.footer-copy { margin-top: 18px; color: #8a8a8a; font-size: 0.8rem; }

.note-banner {
  background: #FDE9ED;
  border: 1px solid #F6C4CE;
  color: #7A0018;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.88rem;
  margin: 24px 0;
}
