/* Feed & Snooze website. Colours, type and radii mirror src/theme/theme.tsx so the site reads as the app. */

@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #f6f2ea;
  --card: #fffdf8;
  --card-border: #eae2d5;
  --raised: #efe9dd;
  --ink: #2b2622;
  --muted: #6e655c;
  --line: #e4dccf;
  --primary: #3f5a44;
  --on-primary: #ffffff;
  --link: #2f4533;
  --danger: #8c3b2a;
  --feed-dot: #6f8f73;
  --feed-fill: #dde8dc;
  --feed-strong: #2f4533;
  --sleep-dot: #8d83b8;
  --sleep-fill: #e6e1f2;
  --sleep-strong: #453c6c;
  --pump-dot: #d69a6c;
  --pump-fill: #f6e1d0;
  --pump-strong: #6b3d1a;
  --neutral-fill: #eae3d6;
  --neutral-strong: #5a5249;
}

/* The app's night palette: no white anywhere, same hues as day. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141210;
    --card: #1e1b18;
    --card-border: #2e2925;
    --raised: #221e1b;
    --ink: #d9d0c2;
    --muted: #a39a8e;
    --line: #2e2925;
    --primary: #2f4533;
    --on-primary: #e3f0e4;
    --link: #b9d3bb;
    --danger: #e0a090;
    --feed-fill: #25332a;
    --feed-strong: #b9d3bb;
    --sleep-fill: #2a2740;
    --sleep-strong: #c9c2e6;
    --pump-fill: #3a2a1e;
    --pump-strong: #ebc3a2;
    --neutral-fill: #2a2521;
    --neutral-strong: #d9d0c2;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--feed-dot);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.narrow {
  max-width: 44rem;
}

.skip {
  position: absolute;
  left: -999rem;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--card);
  padding: 0.6rem 1rem;
  border-radius: 12px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--card-border);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--raised);
  color: var(--ink);
}

/* Buttons, shaped like the app's Btn */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 1.5rem;
  border-radius: 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.btn:hover {
  opacity: 0.9;
}
.btn.outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--card-border);
}

/* Landing */
.hero {
  padding: 3.5rem 0 3rem;
}
.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 54rem) {
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }
  .hero {
    padding: 5rem 0 4.5rem;
  }
}
.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--feed-strong);
  font-weight: 700;
  font-size: 0.875rem;
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
.lede {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.1875rem;
  line-height: 1.55;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.fineprint {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* A slice of the app timeline, drawn in CSS */
.timeline {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 1.1rem;
  display: grid;
  gap: 0.6rem;
  max-width: 24rem;
  width: 100%;
  justify-self: center;
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.2rem 0.4rem 0.4rem;
  font-weight: 700;
}
.timeline-head span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.875rem;
}
.entry {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  background: var(--neutral-fill);
  color: var(--neutral-strong);
}
.entry time {
  font-weight: 700;
  font-size: 0.9375rem;
}
.entry strong {
  display: block;
  font-weight: 700;
  line-height: 1.3;
}
.entry small {
  display: block;
  font-size: 0.8125rem;
  opacity: 0.85;
}
.entry.feed {
  background: var(--feed-fill);
  color: var(--feed-strong);
}
.entry.sleep {
  background: var(--sleep-fill);
  color: var(--sleep-strong);
}
.entry.pump {
  background: var(--pump-fill);
  color: var(--pump-strong);
}
.entry.next {
  background: transparent;
  border: 1px dashed var(--feed-dot);
  color: var(--ink);
}

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}
h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section > .wrap > p {
  max-width: 40rem;
  color: var(--muted);
}
.cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.25rem;
}
.card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9688rem;
}
.dot {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--feed-dot);
}
.dot.sleep {
  background: var(--sleep-dot);
}
.dot.pump {
  background: var(--pump-dot);
}
.plain {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  max-width: 40rem;
}
.plain li {
  padding-left: 1.4rem;
  position: relative;
}
.plain li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--feed-dot);
}

/* Document pages: privacy, terms, support */
.doc {
  padding: 2.75rem 0 4rem;
}
.doc h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
}
.doc .updated {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.doc h2 {
  margin: 2.5rem 0 0.6rem;
  font-size: 1.375rem;
  scroll-margin-top: 1rem;
}
.doc h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.0625rem;
}
.doc p,
.doc li {
  max-width: 68ch;
}
.doc ul,
.doc ol {
  padding-left: 1.3rem;
}
.doc li + li {
  margin-top: 0.35rem;
}
.summary,
.notice {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
}
.summary h2 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}
.summary ul {
  margin: 0;
}
.notice {
  background: var(--raised);
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.toc {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  columns: 2 14rem;
  column-gap: 2rem;
  font-size: 0.9688rem;
}
.toc li {
  margin: 0 0 0.3rem;
  break-inside: avoid;
}
.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9375rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
}
tr:last-child td {
  border-bottom: 0;
}
details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 0 1.25rem;
  margin: 0 0 0.6rem;
}
summary {
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  font-weight: 700;
}
details[open] {
  padding-bottom: 0.6rem;
}
details > :not(summary) {
  color: var(--muted);
}

/* Publisher details that are still missing. scripts/check-website.mjs blocks a release while any remain. */
.todo {
  background: var(--pump-fill);
  color: var(--pump-strong);
  border-radius: 6px;
  padding: 0.05em 0.4em;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-footer a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer p {
  margin: 0;
  align-self: center;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
