/* ==========================================================================
   DateSpark stylesheet
   Direction: modern romantic evening warmth. Candlelit espresso-plum dark,
   warm cream type, one ember accent used sharply.
   Fonts: Fraunces (display), Outfit (body). Self-hosted woff2 only.
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-600.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fraunces-italic-400.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/outfit-400-600.woff2") format("woff2");
}

/* ---- Tokens ---------------------------------------------------------------- */

:root {
  --bg: #191014;            /* deep espresso plum, the candlelit room */
  --surface: #241820;       /* lifted card surface */
  --ink: #F6EADC;           /* warm cream text */
  --muted: #C4A99F;         /* warm taupe secondary text */
  --accent: #FF7A59;        /* ember coral */
  --accent-soft: #FFC5A8;   /* soft candle peach */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* extended tokens */
  --accent-deep: #E85D3D;   /* deeper ember for gradients */
  --on-accent: #2A1210;     /* dark espresso text on ember fills */
  --gold: #EFC98A;          /* splurge tier */
  --sage: #B9CCA4;          /* free tier */
  --line: #7C665F;          /* visible control borders, 3:1 on bg */
  --hairline: rgba(246, 234, 220, 0.10);
  --glow: rgba(255, 122, 89, 0.28);
  --radius-card: 18px;
  --radius-pill: 999px;
  --pad-inline: clamp(1.15rem, 4vw, 3rem);
  --ease-out: cubic-bezier(0.22, 0.65, 0.28, 1);
}

/* ---- Reset and base -------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Candlelight in the room: two soft glows breathing at the top of the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52rem 34rem at 18% -8%, rgba(255, 122, 89, 0.11), transparent 62%),
    radial-gradient(44rem 30rem at 88% -4%, rgba(214, 96, 133, 0.08), transparent 60%),
    radial-gradient(60rem 44rem at 50% 118%, rgba(255, 122, 89, 0.05), transparent 65%);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
}

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
}

h3 {
  font-size: 1.28rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-color: rgba(255, 197, 168, 0.4);
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button {
  font: inherit;
}

main {
  display: block;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

/* ---- Visually hidden utility ------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Skip link ------------------------------------------------------------- */

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ---- Header and nav -------------------------------------------------------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding: 0.8rem var(--pad-inline);
  background: rgba(25, 16, 20, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--hairline);
}

header > a:first-of-type {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}

header img[src*="logo"] {
  height: 26px;
  width: auto;
}

header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.35rem;
}

header nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding-block: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

header nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.7rem;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease, filter 180ms ease;
}

/* The signature: an ember struck in the dark */
.btn--surprise {
  position: relative;
  overflow: hidden;
  color: var(--on-accent);
  background: linear-gradient(135deg, #FF9166 0%, var(--accent) 45%, var(--accent-deep) 100%);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 8px 28px rgba(255, 122, 89, 0.32),
    inset 0 1px 0 rgba(255, 236, 210, 0.45);
}

.btn--surprise::before {
  content: "\2726";
  font-size: 1.05em;
  line-height: 1;
  transform-origin: 50% 52%;
  transition: transform 500ms var(--ease-out);
}

.btn--surprise::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 245, 230, 0.5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 650ms ease;
}

.btn--surprise:hover,
.btn--surprise:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.4),
    0 12px 40px rgba(255, 122, 89, 0.45),
    inset 0 1px 0 rgba(255, 236, 210, 0.55);
}

.btn--surprise:hover::before {
  transform: rotate(180deg) scale(1.15);
}

.btn--surprise:hover::after {
  transform: translateX(120%);
}

.btn--surprise:active {
  transform: translateY(0) scale(0.98);
}

/* ---- Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: clamp(3.8rem, 9vw, 7rem) clamp(2.6rem, 6vw, 4.2rem);
}

.hero h1 {
  max-width: 17ch;
  margin-inline: auto;
}

.hero h1 em,
.hero em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-soft);
}

.hero p {
  max-width: 46ch;
  margin: 1.1rem auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.65;
}

.hero .btn,
.hero a.btn {
  margin-top: 1.9rem;
}

/* Small kicker line under the headline, above the lede */
.hero .hero__kicker {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Filter bar -------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.4rem;
  margin-block: 0.5rem 2.2rem;
  padding: clamp(1.2rem, 3vw, 1.8rem) clamp(1.2rem, 3vw, 2rem);
  background: linear-gradient(165deg, rgba(46, 30, 38, 0.85), rgba(32, 20, 26, 0.9));
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-card) + 6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 5.5rem;
}

.filters__group {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Each group's small printed caption (build emits the span) */
.filters__caption {
  flex: 0 0 7.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-btn {
  padding: 0.42rem 1.05rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.filter-btn:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.filter-btn.is-active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 4px 18px var(--glow);
}

.filters .btn--surprise {
  margin-top: 0.2rem;
}

.filters__count {
  flex: 1 1 auto;
  margin: 0.2rem 0 0;
  min-height: 1.5em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--accent-soft);
}

.filters__count:empty {
  min-height: 0;
}

/* ---- Idea grid ---------------------------------------------------------------- */

.idea-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  padding-block: 0.25rem 3.5rem;
}

@media (min-width: 720px) {
  .idea-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.3rem;
  }
}

@media (min-width: 1080px) {
  .idea-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Idea card ----------------------------------------------------------------- */

.idea-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.45rem 1.45rem 1.3rem;
  background: linear-gradient(165deg, #2A1C24 0%, var(--surface) 55%, #211520 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  scroll-margin-top: 6.5rem;
  transition: transform 220ms var(--ease-out), border-color 220ms ease, box-shadow 220ms ease;
}

.idea-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 89, 0.35);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.4),
    0 4px 24px rgba(255, 122, 89, 0.12);
}

.idea-card[hidden] {
  display: none;
}

.idea-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
}

.idea-card__category,
.idea-card__price {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.idea-card__category {
  color: var(--accent-soft);
  background: rgba(255, 122, 89, 0.14);
  border: 1px solid rgba(255, 122, 89, 0.28);
}

.idea-card__price {
  color: var(--ink);
  background: rgba(246, 234, 220, 0.08);
  border: 1px solid rgba(246, 234, 220, 0.2);
}

/* Price tiers get their own candle: sage for free, gold for extravagant */
.idea-card[data-price="free"] .idea-card__price {
  color: var(--sage);
  background: rgba(185, 204, 164, 0.12);
  border-color: rgba(185, 204, 164, 0.3);
}

.idea-card[data-price="splurge"] .idea-card__price {
  color: var(--gold);
  background: rgba(239, 201, 138, 0.12);
  border-color: rgba(239, 201, 138, 0.34);
}

.idea-card__title {
  margin: 0.15rem 0 0;
  font-size: 1.34rem;
  line-height: 1.2;
}

.idea-card__blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

.idea-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.55rem;
  margin: auto 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.idea-card__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.idea-card__meta li + li::before {
  content: "\00B7";
  color: var(--accent);
  font-weight: 600;
}

/* First meta item is the cost estimate: give it the ember */
.idea-card__meta li:first-child {
  color: var(--accent-soft);
  font-weight: 600;
}

/* ---- Spotlight: the randomizer landed here ------------------------------------ */

.is-spotlight {
  border-color: var(--accent);
  animation: spotlight-pulse 1.7s ease-in-out infinite;
}

@keyframes spotlight-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px var(--accent),
      0 0 24px 2px rgba(255, 122, 89, 0.25),
      0 14px 40px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 3px var(--accent),
      0 0 60px 10px rgba(255, 122, 89, 0.45),
      0 14px 40px rgba(0, 0, 0, 0.4);
  }
}

/* ---- Hidden-note (shown when a filter combination empties the grid) ------------ */

.card-hidden-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
}

/* ---- Hub intro ------------------------------------------------------------------ */

.hub-intro {
  max-width: 62ch;
  margin: 0 auto 2.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

.hub-intro p:first-child {
  font-size: 1.14rem;
  color: var(--ink);
}

/* Tighten the grid's top padding under the hub intro */
.hub-ideas .idea-grid {
  padding-top: 0.5rem;
}

/* ---- FAQ ------------------------------------------------------------------------ */

.faq {
  max-width: 46rem;
  margin: 0 auto;
  padding-block: 2.5rem 4.5rem;
}

.faq h2 {
  text-align: center;
  margin-bottom: 1.6rem;
}

/* FAQ ships as plain headings with answer paragraphs */
.faq h3 {
  margin: 1.4rem 0 0.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  font-size: 1.12rem;
}

.faq h3 + p {
  color: var(--muted);
}

/* ---- Prose pages (about, privacy) ------------------------------------------------ */

.prose {
  max-width: 66ch;
  margin-inline: auto;
  padding-block: 1rem 4.5rem;
}

.prose h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-top: 2rem;
}

.prose h2 {
  margin-top: 2.2em;
}

.prose h3 {
  margin-top: 1.8em;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
}

.prose strong {
  color: var(--ink);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.5em 0;
}

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

footer {
  margin-top: 2rem;
  padding: 2.6rem var(--pad-inline) 3rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

footer nav {
  justify-content: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

footer a:hover {
  color: var(--accent-soft);
  border-bottom-color: var(--accent);
}

footer img[src*="logo"] {
  height: 22px;
  width: auto;
  opacity: 0.85;
}

/* ---- Page-load reveal (CSS only, one gentle stagger) ------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero > * {
  animation: rise 650ms var(--ease-out) backwards;
}

.hero > *:nth-child(1) { animation-delay: 60ms; }
.hero > *:nth-child(2) { animation-delay: 160ms; }
.hero > *:nth-child(3) { animation-delay: 260ms; }
.hero > *:nth-child(n + 4) { animation-delay: 340ms; }

.filters {
  animation: rise 700ms var(--ease-out) 320ms backwards;
}

.idea-grid,
.hub-intro {
  animation: fade-in 800ms ease 480ms backwards;
}

/* ---- 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;
  }

  .idea-card:hover,
  .btn--surprise:hover {
    transform: none;
  }

  /* Spotlight still reads clearly without motion */
  .is-spotlight {
    animation: none;
    box-shadow:
      0 0 0 3px var(--accent),
      0 0 44px 6px rgba(255, 122, 89, 0.4);
  }
}

/* ---- Small screens -------------------------------------------------------------------- */

@media (max-width: 540px) {
  header {
    justify-content: center;
  }

  header nav {
    justify-content: center;
    row-gap: 0;
  }

  .filters__caption {
    flex-basis: 100%;
  }

  .filters .btn--surprise {
    flex: 1 1 100%;
  }

  .filters__count {
    text-align: center;
  }
}
