/* ==========================================================================
   DateSpark stylesheet
   Direction: 2026 clean minimalist. The dataset is the design: a full-width
   ledger of 120 hairline-divided rows, mono index numbers and metadata,
   soft serif titles for warmth, one carmine accent used with intent.
   Type: Fraunces (display) + Hanken Grotesk (text) + DM Mono (metadata).
   Flat and sharp: 1px rules, square corners, zero shadows, motion under
   160ms ease-out or none at all.
   ========================================================================== */

/* ---- 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: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-var.woff2") format("woff2");
}

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

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

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

:root {
  color-scheme: light dark;

  /* light: warm blush paper, near-black ink, one carmine accent */
  --bg: #F7EFEB;            /* paper */
  --surface: #F0E5DF;       /* row hover tint, one shade into the paper */
  --ink: #221A16;           /* warm near-black, 15.1:1 on paper */
  --muted: #6A5B52;         /* secondary text, 5.7:1 on paper */
  --accent: #A61E3F;        /* carmine, 6.4:1 on paper */
  --accent-soft: #F1DEDD;   /* spotlight row tint */
  --rule: #221A16;          /* structural 1px rules */
  --hairline: rgba(34, 26, 22, 0.18);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 4.5vw, 3.5rem);
  --edge: max(var(--gutter), calc((100% - 72rem) / 2));
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1614;          /* warm near-black paper */
    --surface: #272019;
    --ink: #EFE7E1;         /* 14.6:1 on paper */
    --muted: #AC9E95;       /* 6.9:1 on paper */
    --accent: #F28A9B;      /* rose, 7.6:1 on paper */
    --accent-soft: #362424;
    --rule: #EFE7E1;
    --hairline: rgba(239, 231, 225, 0.18);
  }
}

/* ---- 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.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

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

p {
  margin: 0 0 1em;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

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

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

button {
  font: inherit;
}

main {
  display: block;
  padding-inline: var(--edge);
}

/* ---- Utilities --------------------------------------------------------------- */

.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 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  outline-offset: -2px;
}

/* mono caption: the small uppercase metadata voice used across the page */
.filters__caption,
.hero__kicker,
.hero__count-label,
.idea-card__labels,
.site-footer__nav a,
.hub-back {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---- Header ------------------------------------------------------------------ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1.1rem var(--edge) 1rem;
  border-bottom: 1px solid var(--hairline);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-header__brand img {
  height: 22px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1.4rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 120ms var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---- Hero: compact left-aligned title block + one oversized count ------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
}

.hero > * {
  grid-column: 1;
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.5rem, 5vw, 4.05rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hero .hero__lede {
  order: 1;
  margin: 1.4rem 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.hero .hero__kicker {
  order: 2;
  margin: 1.6rem 0 0;
  color: var(--muted);
}

.hero .hero__hint {
  order: 3;
  margin: 2.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* the one deliberate grid break: the dataset size, oversized, right-set */
.hero__count {
  grid-column: 2;
  grid-row: 1 / span 4;
  margin: 0;
  text-align: right;
}

.hero__count-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.hero__count-label {
  display: block;
  margin-top: 0.7rem;
  color: var(--accent);
}

/* ---- Filter strip: text lines with live counts --------------------------------- */

.filters {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}

.filters__group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.5rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--hairline);
}

/* caption column width matches the ledger index column exactly */
.filters__caption {
  flex: 0 0 4.25rem;
  color: var(--muted);
}

/* text filter, not a pill: active state is ink + a 2px accent underline */
.filter-btn {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 0 2px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

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

.filter-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.filter-btn__count {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6875rem;
  color: var(--muted);
}

.filter-btn.is-active .filter-btn__count {
  color: var(--accent);
}

.filters__status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--rule);
}

.btn--surprise {
  background: none;
  border: 0;
  border-bottom: 2px solid var(--accent);
  padding: 0 0 2px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 120ms var(--ease), border-color 120ms var(--ease);
}

.btn--surprise:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.filters__count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.card-hidden-note {
  margin: 0;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---- The ledger ------------------------------------------------------------------ */

.idea-grid {
  display: block;
  margin-bottom: 1rem;
}

.idea-card {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) 15rem;
  column-gap: 1.5rem;
  align-items: start;
  padding: 1.15rem 0.75rem 1.3rem;
  margin-inline: -0.75rem;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 1.5rem;
  transition: background-color 140ms var(--ease);
}

.idea-card:hover {
  background-color: var(--surface);
}

.idea-card__index {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
}

.idea-card:hover .idea-card__index {
  color: var(--accent);
}

.idea-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin: 0;
  line-height: 1.6;
}

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

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

.idea-card__title {
  margin: 0.3rem 0 0;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.idea-card__blurb {
  margin: 0.45rem 0 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* spec column: one datum per line, right edge shared by every row */
.idea-card__meta {
  display: block;
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--muted);
}

.idea-card__meta li {
  margin-bottom: 0.25rem;
}

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

/* surprise pick: accent left rule + tinted paper, nothing louder */
.is-spotlight,
.is-spotlight:hover {
  background-color: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.is-spotlight:focus-visible {
  outline-offset: -2px;
}

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

.faq {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 5rem);
  margin-top: 4rem;
  padding-block: 1.6rem 4.5rem;
  border-top: 1px solid var(--rule);
  counter-reset: faq;
}

.faq h2 {
  grid-column: 1;
  margin: 0;
  font-size: 1.6rem;
  max-width: 12ch;
}

.faq__item {
  grid-column: 2;
  counter-increment: faq;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--hairline);
}

.faq__item:last-of-type {
  border-bottom: 0;
}

.faq__q {
  margin: 0 0 0.45rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.faq__q::before {
  content: counter(faq, decimal-leading-zero);
  display: inline-block;
  margin-right: 0.9rem;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  transform: translateY(-0.25em);
}

.faq__a {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

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

.hub-intro {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  max-width: 46rem;
}

.hub-intro h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.hub-intro p {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 0.9em;
}

.ledger-heading {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.5rem;
  letter-spacing: -0.005em;
}

.ledger-heading__count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-left: 0.5rem;
  vertical-align: super;
  line-height: 0;
}

.hub-back {
  margin: 2.25rem 0 4rem;
  color: var(--muted);
}

.hub-back a {
  color: var(--muted);
}

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

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

.prose {
  max-width: 42rem;
  padding-block: clamp(2.5rem, 6vw, 4rem) 5rem;
}

.prose h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 1.4rem;
}

.prose h2 {
  margin-top: 2.4em;
  font-size: 1.5rem;
}

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

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

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

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

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

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
  margin-top: 2rem;
  padding: 2.25rem var(--edge) 3.5rem;
  border-top: 1px solid var(--rule);
}

.site-footer__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
}

.site-footer__tagline {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.55rem 3rem;
  align-content: start;
}

.site-footer__nav a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
}

.site-footer__nav a:hover {
  color: var(--accent);
}

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

/* ---- Mid screens ----------------------------------------------------------------------------- */

@media (max-width: 920px) {
  /* flex keeps the deliberate reading order (title, lede, kicker, hint) */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__count {
    display: none;
  }

  .faq {
    display: block;
  }

  .faq h2 {
    max-width: none;
    margin-bottom: 0.6rem;
  }
}

/* ---- Small screens: rows stack, nothing scrolls sideways -------------------------------------- */

@media (max-width: 760px) {
  .idea-card {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    column-gap: 1rem;
    padding-block: 1.05rem 1.2rem;
  }

  .idea-card__title {
    font-size: 1.1875rem;
  }

  .idea-card__meta {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.2rem 1.1rem;
    margin-top: 0.55rem;
    text-align: left;
  }

  .idea-card__meta li {
    margin-bottom: 0;
    white-space: nowrap;
  }

  .filters__caption {
    flex-basis: 100%;
  }

  .site-footer {
    flex-direction: column;
    gap: 1.75rem;
  }

  .site-footer__nav {
    gap: 0.5rem 2.25rem;
  }
}
