/* ==========================================================================
   DateSpark stylesheet
   Direction: editorial print. A set index of 120 entries on warm paper,
   near-black ink, one ember-red accent used with discipline. Hairline rules,
   tabular colophon meta, asymmetric margins, folio section heads.
   Fonts: Fraunces (display), Outfit (text), Fragment Mono (colophon data).
   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");
}

@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fragment-mono-400.woff2") format("woff2");
}

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

:root {
  --bg: #F5EFE3;             /* warm paper */
  --surface: #ECE4D3;        /* deeper paper for tinted blocks */
  --ink: #1B1712;            /* near-black warm ink */
  --muted: #5D5344;          /* softened ink, 6.5:1 on paper */
  --accent: #B0371C;         /* ember red, 5.4:1 on paper */
  --accent-soft: #F0DCD0;    /* pale ember wash, backgrounds only */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* extended tokens */
  --font-mono: "Fragment Mono", "SF Mono", "Cascadia Mono", monospace;
  --ink-on-ink-muted: #C4B9A4;   /* secondary text on the ink footer slab */
  --rule: rgba(27, 23, 18, 0.28);       /* hairline rule */
  --rule-soft: rgba(27, 23, 18, 0.16);  /* faint hairline */
  --pad-left: clamp(1.25rem, 7vw, 6.5rem);
  --pad-right: clamp(1.25rem, 4vw, 3.5rem);
  --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;
  font-kerning: normal;
  hanging-punctuation: first;
  overflow-x: hidden;
}

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

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

p {
  margin: 0 0 1em;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 140ms ease, text-decoration-color 140ms ease,
    text-decoration-thickness 140ms ease;
}

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

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

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

button {
  font: inherit;
}

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

/* ---- 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.75rem 1.4rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  outline-color: var(--accent);
}

/* ---- Masthead ----------------------------------------------------------------
   A broadsheet nameplate: wordmark left, small-caps contents right, closed by
   an Oxford rule (thick over thin). Not sticky; paper does not follow you. */

header {
  max-width: 1360px;
  margin-inline: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  padding: 1.4rem var(--pad-right) 1.1rem var(--pad-left);
  position: relative;
  border-bottom: 2px solid var(--ink);
}

header::after {
  content: "";
  position: absolute;
  left: var(--pad-left);
  right: var(--pad-right);
  bottom: -6px;
  border-bottom: 1px solid var(--rule);
}

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

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

header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.7rem;
}

header nav a {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

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

header nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ---- Hero: the opening spread -------------------------------------------------
   Folio line across the top, oversized display left, lede hanging in the
   right margin column behind a hairline. */

.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-block: clamp(2.2rem, 5vw, 4rem) clamp(2.2rem, 5vw, 4rem);
}

/* Reading order in DOM is folio, h1, kicker, lede, hint; visually the
   kicker is an overline above the headline. */
.hero__folio { order: 0; }
.hero__kicker { order: 1; }
.hero h1 { order: 2; }
.hero__lede { order: 3; }
.hero__hint { order: 4; }

.hero__folio {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin: 0 0 clamp(2rem, 4.5vw, 3.4rem);
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6.2vw, 5.1rem);
  line-height: 1.0;
  letter-spacing: -0.022em;
  max-width: 14ch;
}

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

.hero__kicker {
  margin: 0 0 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__lede {
  margin: 1.8rem 0 0;
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--ink);
  max-width: 52ch;
}

.hero__hint {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 44ch;
}

@media (min-width: 980px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3.4fr);
    grid-template-rows: auto auto auto auto;
    column-gap: clamp(3rem, 6vw, 5.5rem);
  }

  .hero__folio {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hero__kicker {
    grid-column: 1;
    grid-row: 2;
  }

  .hero h1 {
    grid-column: 1;
    grid-row: 3 / span 2;
  }

  .hero__lede,
  .hero__hint {
    grid-column: 2;
    border-left: 1px solid var(--rule);
    padding-left: 2rem;
  }

  .hero__lede {
    grid-row: 3;
    align-self: end;
    margin-top: 0;
    padding-bottom: 0.4rem;
  }

  .hero__hint {
    grid-row: 4;
    margin-top: 0;
    padding-bottom: 0.2rem;
  }
}

/* ---- Filters: a typographic control strip --------------------------------------
   Three ruled rows of text buttons behind a small-caps caption column.
   Ink states, no pills. */

.filters {
  border-top: 2px solid var(--ink);
  scroll-margin-top: 1.5rem;
}

.filters__group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.6rem;
  border-bottom: 1px solid var(--rule-soft);
  padding-block: 0.35rem;
}

.filters__caption {
  flex: 0 0 6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-btn {
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.7rem 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.5em;
  transition: color 140ms ease, text-decoration-color 140ms ease,
    text-decoration-thickness 140ms ease;
}

.filter-btn:hover {
  color: var(--ink);
  text-decoration-color: var(--rule);
}

.filter-btn.is-active {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2.5px;
}

/* ---- Surprise: a print stamp, not a pill ---- */

.filters__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.8rem;
  padding-block: 1.6rem 0.4rem;
}

.btn--surprise {
  appearance: none;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 0.85rem 1.9rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.btn--surprise::after {
  content: " \2192";
  letter-spacing: 0;
}

.btn--surprise:hover,
.btn--surprise:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.btn--surprise:active {
  transform: translateY(1px);
}

.filters__count {
  margin: 0;
  min-height: 1.6em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--accent);
}

.card-hidden-note {
  margin: 0;
  padding: 2.6rem 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ---- Section folio heads -------------------------------------------------------- */

.grid-heading {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 2.6rem 0 0;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}

.grid-heading::before {
  content: "";
  width: 2rem;
  border-top: 2px solid var(--accent);
}

.grid-heading::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule-soft);
}

/* ---- The index ------------------------------------------------------------------
   Numbered ledger entries. Single column on small screens; a two column
   index divided by a hairline on wide ones. */

.idea-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(3rem, 6vw, 5.5rem);
  padding-block: 0.4rem 1.6rem;
}

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

  .idea-grid::before {
    content: "";
    position: absolute;
    top: 1.4rem;
    bottom: 1.4rem;
    left: 50%;
    width: 1px;
    background: var(--rule-soft);
  }
}

.idea-card {
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0 1.9rem;
  scroll-margin-top: 2.5rem;
}

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

.idea-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.idea-card__no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  position: relative;
  display: inline-block;
  transition: color 140ms ease;
}

.idea-card:hover .idea-card__no,
.idea-card:focus-within .idea-card__no {
  color: var(--accent);
}

.idea-card__labels {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.idea-card__category {
  color: var(--muted);
}

.idea-card__price {
  color: var(--ink);
}

.idea-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.42rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  transition: text-decoration-color 140ms ease;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

.idea-card:hover .idea-card__title {
  text-decoration-color: var(--rule);
}

.idea-card__blurb {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

.idea-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.7rem;
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

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

.idea-card__meta li + li::before {
  content: "/";
  color: var(--rule);
}

.idea-card__meta li:first-child {
  color: var(--ink);
}

/* Extravagant entries get more air and a footnote mark */

.idea-card[data-price="splurge"] {
  padding-block: 2.2rem 2.5rem;
}

.idea-card[data-price="splurge"] .idea-card__title {
  font-size: 1.58rem;
}

.idea-card[data-price="splurge"] .idea-card__title::after {
  content: " *";
  color: var(--accent);
}

.idea-card[data-price="splurge"] .idea-card__price {
  color: var(--accent);
}

.grid-note {
  margin: 0.2rem 0 3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---- Spotlight: the surprise pick gets hand-circled ------------------------------ */

.is-spotlight .idea-card__no {
  color: var(--accent);
}

.is-spotlight .idea-card__no::after {
  content: "";
  position: absolute;
  inset: -0.55em -0.85em -0.5em -0.8em;
  border: 2px solid var(--accent);
  border-radius: 54% 46% 58% 42% / 62% 44% 56% 38%;
  transform: rotate(-5deg);
  pointer-events: none;
  animation: circled 480ms var(--ease-out) backwards;
}

.is-spotlight .idea-card__title {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-decoration-skip-ink: none;
}

@keyframes circled {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(1.35);
  }
  to {
    opacity: 1;
    transform: rotate(-5deg) scale(1);
  }
}

/* ---- FAQ: numbered questions, ruled like the index -------------------------------- */

.faq {
  max-width: 74ch;
  padding-block: 3rem 4rem;
  counter-reset: faq;
}

.faq h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 1.8rem;
}

.faq__item {
  counter-increment: faq;
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  border-top: 1px solid var(--rule);
  padding-block: 1.35rem 1.5rem;
}

.faq__item::before {
  content: counter(faq, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.25rem;
}

.faq__q {
  grid-column: 2;
  margin: 0 0 0.45rem;
  font-size: 1.18rem;
  line-height: 1.25;
}

.faq__a {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

/* ---- Hub pages ---------------------------------------------------------------------- */

.hub-intro {
  padding-block: clamp(2rem, 4.5vw, 3.4rem) 1rem;
}

.hub-intro__folio {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin: 0 0 clamp(1.8rem, 4vw, 2.8rem);
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hub-intro h1 {
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin-bottom: 0.5em;
}

.hub-intro p:not(.hub-intro__folio) {
  max-width: 54ch;
  color: var(--muted);
}

/* DOM order is folio p, h1, then the two intro paragraphs; the first
   intro paragraph is therefore the second p and reads in full ink. */
.hub-intro p:nth-of-type(2) {
  color: var(--ink);
  font-size: 1.02rem;
}

@media (min-width: 980px) {
  .hub-intro {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    column-gap: clamp(3rem, 6vw, 5.5rem);
  }

  .hub-intro .hub-intro__folio {
    grid-column: 1 / -1;
  }

  .hub-intro h1 {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin-bottom: 0;
  }

  .hub-intro p:not(.hub-intro__folio) {
    grid-column: 2;
    border-left: 1px solid var(--rule);
    padding: 0 0 1.1em 2rem;
    margin: 0;
  }

  .hub-intro p:not(.hub-intro__folio):last-of-type {
    padding-bottom: 0.2em;
  }
}

.hub-ideas .grid-heading {
  margin-top: 2.4rem;
}

.hub-back {
  margin: 0 0 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.hub-back a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
  transition: color 140ms ease, border-color 140ms ease;
}

.hub-back a::after {
  content: " \2192";
  letter-spacing: 0;
}

.hub-back a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.prose {
  max-width: 66ch;
  padding-block: clamp(2rem, 4.5vw, 3.4rem) 4.5rem;
}

.prose h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 0.7em;
}

.prose h1 + p::first-letter,
.prose h1 + section > p:first-child::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.2em;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--accent);
}

.prose h2 {
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
  font-size: 1.45rem;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.15rem;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 1rem;
  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;
  font-weight: 400;
  color: var(--ink);
}

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

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

/* ---- Footer: the colophon slab ---------------------------------------------------------- */

footer {
  margin-top: 3rem;
  background: var(--ink);
  color: var(--ink-on-ink-muted);
  padding: 3.2rem var(--pad-right) 3.6rem var(--pad-left);
}

footer :focus-visible {
  outline-color: var(--bg);
}

.site-footer__name {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  color: var(--bg);
}

.site-footer__tagline {
  margin: 0 0 2.2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.02rem;
  max-width: 46ch;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.8rem;
  max-width: 60rem;
}

footer nav a {
  color: var(--ink-on-ink-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 185, 164, 0.35);
  padding-bottom: 0.25rem;
  transition: color 140ms ease, border-color 140ms ease;
}

footer nav a:hover {
  color: var(--bg);
  border-bottom-color: var(--bg);
}

@media (min-width: 980px) {
  footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: clamp(3rem, 6vw, 5.5rem);
    align-items: start;
  }

  .site-footer__name,
  .site-footer__tagline {
    grid-column: 1;
  }

  .site-footer__tagline {
    margin-bottom: 0;
  }

  footer nav {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    justify-content: flex-end;
    margin-top: 0.6rem;
  }
}

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

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

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

.hero > *,
.hub-intro > * {
  animation: rise 550ms var(--ease-out) backwards;
}

.hero > *:nth-child(1),
.hub-intro > *:nth-child(1) { animation-delay: 40ms; }
.hero > *:nth-child(2),
.hub-intro > *:nth-child(2) { animation-delay: 120ms; }
.hero > *:nth-child(3),
.hub-intro > *:nth-child(3) { animation-delay: 200ms; }
.hero > *:nth-child(n + 4),
.hub-intro > *:nth-child(n + 4) { animation-delay: 280ms; }

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

.grid-heading,
.idea-grid,
.prose {
  animation: fade-in 650ms ease 380ms 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;
  }

  .btn--surprise:active {
    transform: none;
  }

  /* The circled pick still reads clearly without motion */
  .is-spotlight .idea-card__no::after {
    animation: none;
  }
}

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

@media (max-width: 700px) {
  header {
    padding-top: 1.1rem;
  }

  .filters__group {
    column-gap: 1.4rem;
    padding-block: 0.6rem 0.7rem;
  }

  .filters__caption {
    flex-basis: 100%;
    padding-bottom: 0.1rem;
  }

  .filter-btn {
    padding-block: 0.45rem;
  }

  .btn--surprise {
    width: 100%;
  }

  .idea-card__head {
    margin-bottom: 0.4rem;
  }

  .idea-card__labels {
    white-space: normal;
    text-align: right;
  }
}
