/*
 * 100millionpennies.app. The app's look: a flat sage hero with a light sheet sliding up over
 * it. Flat colours only (no gradients), system font, the palette from the app's src/ui/theme.ts.
 */

:root {
  --sage: #4C7468;
  --teal: #4B7B8B;
  --surface: #EEF0EC;
  --card: #FFFFFF;
  --border: #DCE0D9;
  --text: #2A2222;
  --muted: #6F6763;
  --accent: #4C7468;
  --on-hero: #FFFFFF;
  --on-hero-muted: rgba(255, 255, 255, 0.88);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.28);
  --todo-bg: #FFE9A8;
  --todo-text: #5A4300;
  --shadow: 0 6px 20px rgba(22, 32, 28, 0.08);
  --radius-sheet: 32px;
  --radius-card: 20px;
  --max: 760px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sage: #3E6157;
    --surface: #1E1A1A;
    --card: #2E2E2E;
    --border: rgba(255, 255, 255, 0.1);
    --text: #FFFFFF;
    --muted: rgba(255, 255, 255, 0.75);
    --accent: #77A195;
    --todo-bg: #5A4300;
    --todo-text: #FFE9A8;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sage);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-hero);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }

.site-header nav a {
  color: var(--on-hero-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.site-header nav a:hover { background: var(--glass); color: var(--on-hero); }

.site-header nav a[aria-current="page"] {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--on-hero);
}

/* Hero */

.hero { color: var(--on-hero); padding: 40px 0 72px; }

.hero h1 {
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.08;
  margin: 0 0 12px;
}

.hero p { color: var(--on-hero-muted); font-size: 19px; margin: 0; max-width: 560px; }

.hero .eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.counter {
  font-size: clamp(40px, 11vw, 76px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
  margin: 8px 0 16px;
}

.hero .next-milestone {
  color: var(--on-hero);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
}

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.pill {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--on-hero);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

a.pill:hover { background: var(--glass-border); }

/* The light sheet */

.sheet {
  background: var(--surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 40px 0 56px;
  min-height: 60vh;
}

.sheet h2 { font-size: 24px; font-weight: 800; margin: 40px 0 10px; line-height: 1.2; }

.sheet h2:first-child { margin-top: 0; }

.sheet h3 { font-size: 18px; font-weight: 700; margin: 24px 0 6px; }

.sheet p, .sheet ul, .sheet ol { margin: 0 0 14px; }

.sheet ul, .sheet ol { padding-left: 22px; }

.sheet li { margin-bottom: 6px; }

.meta { color: var(--muted); font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 0 0 16px;
}

.card > :last-child { margin-bottom: 0; }

.card h3 { margin-top: 0; }

/* Tiles always go two across (one on phones). */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.tiles .card { margin: 0; }

.tiles .card h3 { font-size: 17px; margin-bottom: 4px; }

.tiles .card p { font-size: 15px; color: var(--muted); }

@media (max-width: 520px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
}

.notice {
  border-left: 4px solid var(--accent);
}

/* Tables (the privacy policy's list of providers) */

.table-scroll { overflow-x: auto; margin: 0 0 16px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-size: 15px;
}

th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }

th { font-weight: 700; }

tr:last-child td { border-bottom: none; }

/* Placeholders still to fill in before launch. Search the folder for class="todo". */
.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
}

/* Footer */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0 40px;
}

.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }

.site-footer a { color: var(--muted); }
