/* PoopScale public site. Palette follows mobile/src/shared/ui/theme.ts. */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700;900&display=swap');

:root {
  --ink: #342039;
  --ink-raised: #432C49;
  --muted: #796C7D;
  --accent: #AA3E09;
  --pop: #FF792A;
  --soft: #FFF0E5;
  --bg: #FCFAF9;
  --line: #E8DFE6;
  --gold: #E9A600;
  --band1: #E8DFE6;
  --band2: #F6CDB0;
  --band3: #FFAA6E;
  --band4: #FF792A;
  --band5: #E9A600;
  --measure: 66ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 1.0625rem/1.6 Nunito, system-ui, sans-serif;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, 1040px); margin-inline: auto; }

/* Header */
.site-header { padding-block: 20px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* Home hero */
.hero { padding-block: 40px 24px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-weight: 900; font-size: clamp(2.75rem, 7vw, 5rem); line-height: 0.95; letter-spacing: -0.04em; margin: 0 0 20px; }
.hero p { font-size: 1.2rem; color: var(--ink-raised); max-width: 34ch; margin: 0 0 28px; }
.hero-judge { width: 100%; max-width: 380px; justify-self: center; height: auto; }

.store-badge { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; text-decoration: none; padding: 14px 22px; border-radius: 14px; font-weight: 700; }
.store-badge:hover { background: var(--ink-raised); color: #fff; }
.note { display: block; margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

/* The scale: the one loud element on the page */
.scale { padding-block: 32px 56px; }
.scale h2 { font-weight: 900; font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.scale > .wrap > p { color: var(--muted); margin: 0 0 24px; max-width: var(--measure); }
.ruler { display: grid; grid-template-columns: 20fr 20fr 20fr 20fr 21fr; border-radius: 18px; overflow: hidden; }
.band { padding: 18px 14px 16px; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; }
.band:nth-child(1) { background: var(--band1); }
.band:nth-child(2) { background: var(--band2); }
.band:nth-child(3) { background: var(--band3); }
.band:nth-child(4) { background: var(--band4); color: #fff; }
.band:nth-child(5) { background: var(--band5); }
.band b { font-weight: 900; font-size: 2rem; letter-spacing: -0.03em; line-height: 1; }
.band span { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }

.facts { padding-block: 8px 64px; }
.facts .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.facts h3 { font-weight: 900; font-size: 1.15rem; margin: 0 0 6px; }
.facts p { margin: 0; color: var(--ink-raised); }

/* Long-form pages */
.doc { padding-block: 24px 72px; }
.doc .wrap { max-width: var(--measure); }
.doc h1 { font-weight: 900; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -0.03em; margin: 16px 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-weight: 900; font-size: 1.35rem; letter-spacing: -0.01em; margin: 40px 0 8px; }
.doc h3 { font-weight: 700; font-size: 1.1rem; margin: 24px 0 4px; }
.doc ul { padding-left: 1.25em; }
.doc li + li { margin-top: 6px; }
.callout { background: var(--soft); border-radius: 14px; padding: 16px 20px; margin: 24px 0; }
.callout p { margin: 0; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .hero-judge { max-width: 240px; grid-row: 1; }
  .ruler { grid-template-columns: 1fr; }
  .band { min-height: 0; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 14px; padding: 14px 16px; }
  .site-nav { gap: 14px; }
  .band b { font-size: 1.4rem; min-width: 4.5ch; }
  .facts .wrap { grid-template-columns: 1fr; gap: 24px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { border: 0; padding: 2px 0; }
  tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  td:first-child { font-weight: 700; }
}
