/* unclutrdflow.com — values from docs/06-design-system.md §2–§4 (v4). Dark first; light follows the system. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --canvas: #0C0D10;
  --surface1: #141518;
  --surface2: #1C1D21;
  --surface3: #25262B;
  --outline: rgba(255, 255, 255, 0.07);
  --outline-strong: rgba(255, 255, 255, 0.13);
  --text-primary: #F1F2F4;
  --text-secondary: #AEB1BA;
  --text-tertiary: #8C8F98;
  --accent: #FA7385;
  --accent-text: #FD9AA3;
  --accent-text-hover: #FFC2C8;
  --accent-fill: #CE3349;
  --accent-fill-pressed: #B3203A;
  --accent-container: rgba(250, 115, 133, 0.13);
  --on-accent: #FFFFFF;
  --error-text: #FB7E5D;
  --neutral-tint: #72747D;
  --on-tint: #101116;
  --premium: #E8CE99;
  --on-premium: #33230F;
  --max: 1200px;
  --gutter: 24px;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #F6F7F9;
    --surface1: #FFFFFF;
    --surface2: #EFF0F4;
    --surface3: #E4E6EC;
    --outline: rgba(0, 0, 0, 0.07);
    --outline-strong: rgba(0, 0, 0, 0.13);
    --text-primary: #16181F;
    --text-secondary: #545764;
    --text-tertiary: #696B75;
    --accent: #CC3148;
    --accent-text: #B8263F;
    --accent-text-hover: #8F1A30;
    --accent-fill: #CC3148;
    --accent-container: rgba(204, 49, 72, 0.10);
    --error-text: #BA2900;
    --neutral-tint: #8C8F98;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent-text); }
a:hover { color: var(--accent-text-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface1); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.stack { display: flex; flex-direction: column; }

/* Type */
.caps { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.caps.muted { color: var(--text-tertiary); }
.display { font-size: clamp(3.25rem, 7.4vw, 6.5rem); line-height: 0.96; font-weight: 800; letter-spacing: -0.035em; }
.display .dim { color: var(--text-tertiary); }
.title { font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; }
.title-page { font-size: clamp(2.75rem, 6vw, 4.5rem); line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.title-section { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.title-section small { font-size: 16px; font-weight: 600; color: var(--text-tertiary); }
.lead { font-size: 19px; line-height: 1.55; color: var(--text-secondary); max-width: 36rem; }
.body { color: var(--text-secondary); }
.fine { font-size: 13px; color: var(--text-tertiary); }
.numeral { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 14px 24px; border-radius: 8px; font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-fill-pressed); color: var(--on-accent); }
.btn-ghost { color: var(--text-primary); border: 1px solid var(--outline-strong); font-weight: 600; }
.btn-ghost:hover { background: var(--surface2); color: var(--text-primary); }
.btn-small { min-height: 44px; padding: 10px 18px; font-size: 15px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--outline); }
.site-header .wrap { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text-primary); text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand:hover { color: var(--text-primary); }
.nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 28px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav a:not(.btn) { color: var(--text-secondary); text-decoration: none; padding: 10px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text-primary); }
/* One header row at every width: section links go first, then the page links (the footer keeps them all) */
@media (max-width: 960px) { .nav .hide-sm { display: none; } }
@media (max-width: 560px) {
  .nav .hide-xs { display: none; }
  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand svg { width: 32px; height: 32px; }
}

.site-footer { border-top: 1px solid var(--outline-strong); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 32px; padding-top: 48px; padding-bottom: 56px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 14px; font-weight: 600; }
.site-footer nav a { color: var(--text-secondary); text-decoration: none; padding: 10px 0; }
.site-footer nav a:hover { color: var(--text-primary); }
.site-footer .legal-line { flex: 1 0 100%; font-size: 13px; color: var(--text-tertiary); }

/* Home: hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; padding-top: 96px; padding-bottom: 112px; }
.hero-copy { flex: 1 1 520px; min-width: 0; gap: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { flex: 0 1 380px; min-width: 0; display: flex; justify-content: center; margin: 0 auto; }
@media (max-width: 600px) { .hero { padding-top: 56px; padding-bottom: 72px; gap: 48px; } }

/* Home: the phone */
.phone { width: 100%; max-width: 360px; background: var(--canvas); border: 10px solid var(--surface3); border-radius: 44px; overflow: hidden; }
.phone-top { padding: 28px 20px 12px; display: flex; flex-direction: column; gap: 14px; }
.phone-title { font-size: 40px; line-height: 44px; font-weight: 800; letter-spacing: -0.025em; }
.chips { display: flex; gap: 8px; overflow: hidden; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 6px; border: 1px solid var(--outline-strong); color: var(--text-secondary); }
.chip.on { background: var(--text-primary); color: var(--canvas); border-color: var(--text-primary); }
.chip.on span { opacity: 0.62; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.rows { list-style: none; padding: 0; border-top: 1px solid var(--outline-strong); }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 20px; background: var(--surface1); border-bottom: 1px solid var(--outline-strong); }
.badge { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.row-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { font-size: 15px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 11px; line-height: 14px; color: var(--text-tertiary); }
.row-meta b { font-weight: 700; letter-spacing: 0.08em; }
.phone-bottom { height: 84px; display: flex; justify-content: flex-end; align-items: center; padding: 0 20px; }
.fab { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-fill); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }

/* Category colours: tint and ink are the same in both themes; label text is per theme */
.c-task      { --tint: #60B0FF; --ink: #0C2842; --label: #60B0FF; }
.c-idea      { --tint: #EBB432; --ink: #342300; --label: #EBB432; }
.c-reminder  { --tint: #EC76B3; --ink: #3B192A; --label: #EC76B3; }
.c-journal   { --tint: #61CB7C; --ink: #0C2E16; --label: #61CB7C; }
.c-reference { --tint: #30C8CF; --ink: #002F32; --label: #30C8CF; }
.c-project   { --tint: #AA9AFD; --ink: #262041; --label: #AA9AFD; }
.c-sorting   { --tint: var(--neutral-tint); --ink: var(--on-tint); --label: var(--text-secondary); }
@media (prefers-color-scheme: light) {
  .c-task { --label: #0365AF; } .c-idea { --label: #8E5E01; } .c-reminder { --label: #97386B; }
  .c-journal { --label: #007834; } .c-reference { --label: #067780; } .c-project { --label: #6451AC; }
}
.badge { background: var(--tint); color: var(--ink); }
.row-meta b { color: var(--label); }
.dot { background: var(--tint); }

/* Home: category bands */
.section-head { gap: 16px; padding-top: 96px; padding-bottom: 56px; }
.section-head .title { max-width: 52rem; }
.band { background: var(--tint); color: var(--ink); }
.band .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px; padding-top: 36px; padding-bottom: 36px; }
.band-label { flex: 0 0 160px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.band-quote { flex: 1 1 420px; font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.band-note { flex: 0 1 300px; font-size: 15px; line-height: 1.5; font-weight: 500; }

/* Home: sections */
.section { padding-top: 120px; padding-bottom: 120px; gap: 56px; }
.section.tight { padding-top: 0; }
.alt { background: var(--surface1); border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); }
.quiet { background: var(--surface2); }
.grid { display: grid; gap: 48px 40px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 48px; }
.ruled { border-top: 1px solid var(--outline-strong); padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.ruled h3 { font-size: 19px; font-weight: 700; }
.ruled.big h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.ruled p { color: var(--text-secondary); font-size: 15px; }
.ruled.big p { font-size: 16px; }
.ruled svg { color: var(--accent-text); }

.note { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; background: var(--surface1); border: 1px solid var(--outline); border-radius: 12px; padding: 24px 28px; }
.note p { flex: 1 1 420px; color: var(--text-secondary); }
.note strong { color: var(--text-primary); }
.note.accent { background: var(--accent-container); border: 0; }
.note.accent p { color: var(--text-primary); }
.note.accent svg { color: var(--accent-text); }

.plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.plan { border: 1px solid var(--outline-strong); border-radius: 16px; padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.plan.pro { border-color: var(--premium); background: var(--surface1); }
.plan-name { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.plan ul { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text-secondary); line-height: 1.5; }
.pill { align-self: flex-start; background: var(--premium); color: var(--on-premium); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; }
@media (max-width: 600px) { .plan { padding: 28px 24px; } }

.split { display: flex; flex-wrap: wrap; gap: 48px 64px; padding-top: 112px; padding-bottom: 112px; }
.split > :first-child { flex: 1 1 380px; gap: 16px; }
.list-ruled { flex: 1 1 520px; list-style: none; padding: 0; }
.list-ruled li { border-top: 1px solid var(--outline-strong); padding: 18px 0; color: var(--text-secondary); line-height: 1.55; }
.list-ruled li:last-child { border-bottom: 1px solid var(--outline-strong); }
.list-ruled strong { color: var(--text-primary); }

.cta { padding-top: 128px; padding-bottom: 128px; gap: 28px; align-items: flex-start; }
.cta h2 { font-size: clamp(2.75rem, 6vw, 5rem); line-height: 1; font-weight: 800; letter-spacing: -0.03em; }

/* Legal pages */
.page-head { gap: 16px; padding-top: 80px; padding-bottom: 24px; }
.page-head .lead { max-width: 40rem; }
.legal-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 72px; padding-top: 40px; padding-bottom: 120px; }
.toc { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; border-top: 1px solid var(--outline-strong); padding-top: 20px; }
.toc .caps { margin-bottom: 8px; }
.toc a { color: var(--text-secondary); text-decoration: none; padding: 5px 0; }
.toc a:hover { color: var(--text-primary); }
@media (min-width: 900px) { .toc { position: sticky; top: 24px; } }
@media (max-width: 899px) { .toc { max-width: none; } }
.legal { flex: 999 1 560px; min-width: 0; max-width: 46rem; }
.legal .intro { font-size: 19px; line-height: 1.6; color: var(--text-primary); margin-bottom: 14px; }
.legal h2 { margin: 56px 0 16px; font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; scroll-margin-top: 24px; }
.legal h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 700; }
.legal p, .legal li { line-height: 1.7; color: var(--text-secondary); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 0 0 8px; }
.legal strong { color: var(--text-primary); }

/* Delete account */
.steps { list-style: none; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.steps li { border-top: 1px solid var(--outline-strong); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.5; font-weight: 600; }
.steps .numeral { font-size: 48px; }
.steps strong { font-weight: 800; }
.boxes { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.box { border: 1px solid var(--outline-strong); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.box ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-secondary); }
.box .caps.deleted { color: var(--error-text); }
.measure { max-width: 46rem; }
