/* ════════════════════════════════════════════
   BEN'S WISHLIST — styles
   Palette: warm cream, deep holly green,
   cranberry, aged gold — with Fraunces + Inter.
   ════════════════════════════════════════════ */

:root {
  --cream: #f7efe3;
  --surface: #fffdf8;
  --ink: #22312a;
  --ink-soft: #55645b;
  --green: #1d4733;
  --green-deep: #0e2a1f;
  --green-glow: #27573f;
  --cranberry: #a8362f;
  --cranberry-dark: #8c2b25;
  --gold: #c9a24b;
  --gold-soft: rgba(201, 162, 75, 0.45);
  --border: #e7dcc9;
  --shadow: 0 2px 6px rgba(34, 49, 42, 0.08), 0 14px 34px rgba(34, 49, 42, 0.10);
  --shadow-lift: 0 6px 14px rgba(34, 49, 42, 0.12), 0 26px 54px rgba(34, 49, 42, 0.18);
  --radius: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(29, 71, 51, 0.055) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ══════════ HERO ══════════ */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--cream);
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(201, 162, 75, 0.28), transparent 60%),
    linear-gradient(168deg, var(--green-deep) 0%, var(--green) 58%, var(--green-glow) 100%);
  padding: 0 1.25rem 4.5rem;
}

.garland {
  display: block;
  width: 100%;
  height: clamp(56px, 9vw, 92px);
}

.garland .wire {
  fill: none;
  stroke: rgba(247, 239, 227, 0.35);
  stroke-width: 2;
}

.garland .bulb { stroke: rgba(0, 0, 0, 0.18); stroke-width: 1; }
.bulb-red   { fill: #d0524a; filter: drop-shadow(0 0 6px rgba(208, 82, 74, 0.9)); }
.bulb-gold  { fill: #e4c565; filter: drop-shadow(0 0 6px rgba(228, 197, 101, 0.9)); }
.bulb-cream { fill: #f7efe3; filter: drop-shadow(0 0 6px rgba(247, 239, 227, 0.9)); }
.bulb-green { fill: #5f9b78; filter: drop-shadow(0 0 6px rgba(95, 155, 120, 0.9)); }

.garland .star {
  fill: var(--gold);
  filter: drop-shadow(0 0 10px rgba(201, 162, 75, 0.95));
}

.hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding-top: clamp(1rem, 4vw, 2.5rem);
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-weight: 600;
  font-size: clamp(3.1rem, 11vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}

.hero-badges {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 0.9rem;
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(247, 239, 227, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(4px);
}

.badge-dot { color: var(--gold); font-size: 1.3em; }

.hero-note {
  margin: 1.6rem auto 0;
  max-width: 34rem;
  color: rgba(247, 239, 227, 0.82);
  font-size: 0.98rem;
}

.scroll-cue {
  display: inline-flex;
  margin-top: 2.1rem;
  padding: 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 239, 227, 0.25);
  color: rgba(247, 239, 227, 0.8);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  animation: cue-bob 2.6s ease-in-out infinite;
}

.scroll-cue:hover { border-color: var(--gold); color: var(--gold); }

@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ══════════ STICKY CATEGORY NAV ══════════ */

.category-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 239, 227, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.category-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }

.nav-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--green);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-pill:hover { border-color: var(--gold); transform: translateY(-1px); }

.nav-pill.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

.nav-count {
  min-width: 1.45rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}
.nav-pill.active .nav-count { background: var(--gold); color: var(--green-deep); }

/* ══════════ WISHLIST SECTIONS ══════════ */

.wishlist {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4.5rem;
}

.category + .category { margin-top: 3rem; }

.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--gold-soft);
  padding-bottom: 0.6rem;
  margin-bottom: 1.4rem;
}

.category-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  letter-spacing: -0.01em;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.category-icon { font-size: 0.9em; }

.category-count {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cranberry);
  background: rgba(168, 54, 47, 0.09);
  border: 1px solid rgba(168, 54, 47, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

/* ══════════ CARD GRID ══════════ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.4rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: var(--gold);
}

.card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ── Card media (preview image / skeleton / fallback) ── */

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(130deg, #efe5d2 0%, #f6efe0 100%);
  display: block;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #ece2d0 8%, #f7efe3 30%, #ece2d0 55%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -80% 0; }
}

.card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.6rem;
  background: radial-gradient(circle at 50% 40%, rgba(201, 162, 75, 0.35), transparent 65%), linear-gradient(130deg, #efe5d2, #f6efe0);
}

/* ── Card body ── */

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.05rem 1.15rem 1.15rem;
}

.card-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--green-deep);
}

.card-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.publisher {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: var(--cranberry);
  color: #fdf3ec;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card:hover .view-btn { background: var(--cranberry-dark); }

/* ══════════ REVEAL ANIMATION ══════════ */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════ EMPTY STATE & NOSCRIPT ══════════ */

.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.empty code, .noscript code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.noscript {
  text-align: center;
  padding: 2rem;
  color: var(--ink-soft);
}

/* ══════════ FOOTER ══════════ */

.footer {
  background: var(--green-deep);
  color: rgba(247, 239, 227, 0.9);
  text-align: center;
  padding: 2.5rem 1.25rem 2.75rem;
}

.footer-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  color: var(--gold);
}

.footer-sub {
  margin: 0.6rem auto 0;
  max-width: 34rem;
  font-size: 0.85rem;
  color: rgba(247, 239, 227, 0.65);
}

.footer-sub a { color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-sub a:hover { border-bottom-color: var(--gold); }

/* ══════════ RESPONSIVE ══════════ */

@media (max-width: 640px) {
  .hero { padding-bottom: 3.25rem; }
  .hero-badges { flex-direction: column; gap: 0.5rem; }
  .badge-dot { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .category-head { align-items: center; }
}

/* ══════════ REDUCED MOTION ══════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
