/*
  ============================================================
  Selections page styles
  ============================================================
  Loaded on top of site.css. Overrides the minimal cream body
  aesthetic with a dark-mode-first product grid, modal, and
  supporting chrome (nav, footer).
*/

/* ---------- Theme tokens (Selections page only) ---------- */

:root {
  --ink: #111111;
  --ink-soft: #2a2a2a;
  --muted: #6b6b6b;
  --hairline: #e5e5e5;
  --rule: #1a1a1a;
  --placeholder-bg: #f2f2f2;
  --card-bg: #ffffff;
  --card-img-bg: #f7f6f4;
  --card-border: #e2e0dc;
  --card-border-hover: #b8b5ae;
  --card-shadow: 0 16px 40px -12px rgba(0,0,0,0.16);
  --card-name: #1a1a1a;
  --card-brand: #000000;
  --page-bg: #f3efe6;
  --nav-bg: #f3efe6;
}

/* Override the site.css cream background for this page */
body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
}
nav.primary .theme-toggle {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
nav.primary .theme-toggle:hover { opacity: 1; }

/* ---------- Page header ---------- */

main {
  width: auto;
  max-width: none;
  padding: 0;
}

.section-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 48px 120px;
}
.section-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 72px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--ink);
}
.section-deck {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 21px;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.5;
  margin-bottom: 48px;
}

/* ---------- Filter pills + shuffle ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}
.pill {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.pill:hover {
  border-color: var(--card-border-hover);
}
.pill.active {
  background: var(--ink);
  color: var(--page-bg);
  border-color: var(--ink);
}
.pill-shuffle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}
.pill-shuffle.spinning svg {
  animation: shuffleSpin 0.45s ease;
}
@keyframes shuffleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Product grid ---------- */

.curated-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.curated-item {
  cursor: pointer;
}
.curated-item .card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.curated-item:hover .card {
  border-color: var(--card-border-hover);
  box-shadow: var(--card-shadow);
  transform: translateY(-4px);
}
.curated-item .img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--card-img-bg);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15%;
  box-sizing: border-box;
  position: relative;
}
.curated-item .img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  transition: transform 0.45s ease;
}
.curated-item:hover .img img {
  transform: scale(1.03);
}
}
/* Corner arrow */
.curated-item .arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(20,20,20,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.curated-item .arrow svg { width: 13px; height: 13px; }
.curated-item:hover .arrow {
  background: var(--ink);
  color: var(--page-bg);
  transform: translate(2px, -2px);
}
.curated-item .meta {
  padding: 26px 28px 30px;
  background: var(--card-bg);
}
.curated-item .brand {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--card-brand);
  margin-bottom: 14px;
}
.curated-item .name {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--card-name);
}

.curated-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

/* ---------- Modal ---------- */

.selection-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
  backdrop-filter: blur(6px);
}
.selection-modal.active {
  display: flex;
}
.selection-modal .modal-inner {
  background: var(--card-bg);
  max-width: 1120px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(380px, 460px) 1fr;
  position: relative;
  border-radius: 4px;
}
.selection-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.selection-modal .modal-image {
  background: var(--card-img-bg);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12%;
  box-sizing: border-box;
}
.selection-modal .modal-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
}
.selection-modal .modal-text {
  padding: 72px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.selection-modal .modal-category {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.selection-modal .modal-brand {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.selection-modal .modal-name {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 40px;
  color: var(--ink);
}
.selection-modal .modal-note-wrap {
  margin-top: 0;
}
.selection-modal .modal-note-header {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}
.selection-modal .modal-note {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.selection-modal .modal-link {
  margin-top: 44px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  display: inline-block;
  width: fit-content;
  text-decoration: none;
}
.selection-modal .modal-link:hover { opacity: 0.6; }

/* ---------- Footer ---------- */

footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 48px 40px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
footer .social-icons {
  display: flex;
  gap: 16px;
}
footer .social-icons a {
  color: var(--ink);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  text-decoration: none;
}
footer .social-icons a:hover { opacity: 1; }
footer .social-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
footer .footer-clock {
  color: var(--muted);
}
footer .clock-sep {
  margin: 0 8px;
  opacity: 0.5;
}
footer .right {
  color: var(--muted);
}
/* Selections page uses the full grid width — nav aligns to that edge */
nav.top {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(1400px, calc(100% - 96px));
  max-width: none;
  text-align: right;
}
/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  nav.primary { padding: 16px 24px; }
  nav.primary .links { gap: 18px; }
  .section-page { padding: 48px 24px 80px; }
  .section-title { font-size: 44px; }
  .section-deck { font-size: 18px; margin-bottom: 32px; padding-bottom: 24px; }
  .curated-grid { grid-template-columns: 1fr; gap: 20px; }
  .selection-modal { padding: 16px; }
  .selection-modal .modal-inner { grid-template-columns: 1fr; }
  .selection-modal .modal-text { padding: 40px 32px 48px; }
  .selection-modal .modal-name { font-size: 24px; margin-bottom: 28px; }
  footer { flex-direction: column; text-align: center; padding: 32px 24px; }
}
