/* Spiro site. Colour, type and shape mirror docs/DESIGN-TOKENS.md: Inter, the indigo icon
   palette, the fading bucket headers, the list accents and the app neutrals. The one addition is
   a mid-tone ink for body copy, since onSurfaceVariant is a label tone and reads too light at
   paragraph length. Light and dark follow the visitor's system preference. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --indigo-deep: #12142f;
  --indigo: #2a2f63;
  --indigo-lift: #33397a;
  --spark: #8fa0f5;

  --blue: #4fa3ef;
  --coral: #e06547;
  --amber: #efc13e;
  --teal: #5ebfa0;
  --violet: #9b7be8;
  --rose: #ec6f9e;
  --cyan: #4cc6d9;
  --orange: #f0913c;
  --green: #57b85f;
  --slate: #8892a6;

  --b-overdue: #e0564a;
  --b-today: #57a1f3;
  --b-tomorrow: #7bcffb;
  --b-week: #bbbbc9;

  --mood-1: #696e6f;
  --mood-2: #5d8b90;
  --mood-3: #63a970;
  --mood-4: #b2cc8a;
  --mood-5: #efde8a;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f9;
  --ink: #0a0a0c;
  --ink-2: #55555f;
  --ink-3: #8e8e99;
  --line: #e2e2e9;

  --wrap: 1120px;
  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 10, 12, .04), 0 18px 40px -20px rgba(10, 10, 12, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --b-overdue: #ee6e60;
    --b-today: #6fb0f6;
    --b-tomorrow: #8fd8fc;
    --b-week: #77778a;

    --bg: #0b0b0f;
    --surface: #141419;
    --surface-2: #1c1c23;
    --ink: #f2f2f6;
    --ink-2: #b4b4c0;
    --ink-3: #8b8b98;
    --line: #2b2b34;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 20px 44px -22px rgba(0, 0, 0, .8);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Stroke properties are inherited, so they must be set on the element that carries the <use>:
   a rule matching the <symbol> in the sprite never reaches the cloned shadow content. */
.ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: #fff;
  color: var(--indigo);
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
  z-index: 50;
}

.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--spark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Type ---------- */

h1, h2, h3 { font-weight: 800; letter-spacing: -.032em; margin: 0; }

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.08;
  max-width: 19ch;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.14;
  max-width: 18ch;
}

p { margin: 0; }

.lede {
  font-size: clamp(1.04rem, 1.4vw, 1.18rem);
  color: var(--ink-2);
  max-width: 58ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--c, var(--blue));
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(110% 80% at 12% -10%, var(--indigo-lift) 0%, transparent 58%),
    radial-gradient(80% 70% at 92% 8%, var(--indigo) 0%, transparent 55%),
    linear-gradient(165deg, #181c42 0%, var(--indigo-deep) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -140px 25% auto;
  width: 560px;
  height: 560px;
  z-index: -1;
  background: radial-gradient(circle, rgba(143, 160, 245, .30), transparent 62%);
  pointer-events: none;
}

.top { padding: 22px 0 4px; }

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -.02em;
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 28px;
  font-size: .93rem;
  font-weight: 500;
}

.top nav a {
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  transition: color .15s;
}

.top nav a:hover { color: #fff; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  padding: clamp(36px, 6vw, 64px) 0 clamp(72px, 9vw, 116px);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.pill {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .82);
}

.hero h1 span { color: var(--spark); }

.hero p {
  color: rgba(255, 255, 255, .78);
  max-width: 48ch;
  margin-top: 24px;
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 650;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .15s, background-color .15s, border-color .15s;
}

.button:hover { transform: translateY(-1px); }

.button.solid { background: #fff; color: var(--indigo-deep); }
.button.solid:hover { background: #eceefb; }

.button.ghost {
  border: 1px solid rgba(255, 255, 255, .30);
  color: #fff;
}

.button.ghost:hover { border-color: rgba(255, 255, 255, .6); }

.button.dark { background: var(--indigo); color: #fff; }
.button.dark:hover { background: var(--indigo-lift); }

.fine {
  margin-top: 22px;
  font-size: .85rem;
  color: rgba(255, 255, 255, .52);
}

/* ---------- The device mock ---------- */

.device {
  width: min(322px, 100%);
  margin-inline: auto;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .05));
  box-shadow: 0 50px 90px -34px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(255, 255, 255, .11);
}

.screen {
  position: relative;
  overflow: hidden;
  border-radius: 31px;
  background: #101013;
  color: #f2f2f6;
  padding: 20px 17px 74px;
}

.screen-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.screen-bar b { font-size: 1.1rem; letter-spacing: -.02em; }
.screen-bar span { font-size: .72rem; color: rgba(255, 255, 255, .45); }

.rings {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.ringlet {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.ringlet svg.dial { width: 46px; height: 46px; transform: rotate(-90deg); }
.ringlet .trk { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: 4; }

.ringlet .arc {
  fill: none;
  stroke: var(--c);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--pct));
  animation: dial 1s cubic-bezier(.22, .8, .28, 1) both;
}

@keyframes dial { from { stroke-dashoffset: 100; } }

.ringlet .glyph {
  position: absolute;
  top: 13px;
  left: 50%;
  translate: -50% 0;
  width: 20px;
  height: 20px;
  color: var(--c);
}

.ringlet b {
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .5);
}

.bucket {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0 9px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.bucket i {
  font-style: normal;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 2px 8px;
}

.b1 { color: var(--b-overdue); }
.b2 { color: var(--b-today); }
.b3 { color: var(--b-tomorrow); }
.b4 { color: var(--b-week); }

.row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  font-size: .8rem;
}

.box {
  position: relative;
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 2px solid var(--c);
}

.box.on { background: var(--c); }

.box.on::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #101013;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.row.done { color: rgba(255, 255, 255, .4); text-decoration: line-through; }
.row em { margin-left: auto; font-style: normal; font-size: .68rem; color: rgba(255, 255, 255, .42); }

.fab {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 17px;
  background: var(--blue);
  color: #08111c;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -8px rgba(79, 163, 239, .8);
}

.fab svg { width: 21px; height: 21px; stroke-width: 2.2; }

/* ---------- Sections ---------- */

section { padding: clamp(64px, 9vw, 116px) 0; }
.tint { background: var(--surface-2); }
.intro h2 { margin: 18px 0 20px; }

/* ---------- Feature blocks ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 100px);
}

.feature h3 { margin: 18px 0 18px; }
.feature.flip .art { order: -1; }

.points {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 15px;
}

.points li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  color: var(--ink-2);
  font-size: .97rem;
  line-height: 1.55;
}

.points li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin: .58em 0 0 6px;
  border-radius: 50%;
  background: var(--c);
}

.art {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow);
}

.art-note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  color: var(--ink-3);
}

.art .bucket { color: var(--ink-3); margin-top: 20px; }
.art .bucket:first-child { margin-top: 0; }
.art .bucket i { color: var(--ink-3); background: var(--surface-2); }
.art .row { font-size: .92rem; color: var(--ink); }
.art .row.done { color: var(--ink-3); }
.art .row em { color: var(--ink-3); }
.art .box.on::after { border-color: var(--surface); }

.habit-head { display: flex; align-items: center; gap: 20px; }
.habit-head svg.dial { width: 84px; height: 84px; transform: rotate(-90deg); flex: none; }
.habit-head .trk { fill: none; stroke: var(--line); stroke-width: 7; }

.habit-head .arc {
  fill: none;
  stroke: var(--c);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--pct));
  animation: dial 1.1s cubic-bezier(.22, .8, .28, 1) both;
}

.habit-head strong { display: block; font-size: 1.1rem; letter-spacing: -.02em; }
.habit-head span { display: block; font-size: .88rem; color: var(--ink-3); }
.habit-head span.hot { color: var(--c); font-weight: 600; }

.strip { display: flex; gap: 6px; margin-top: 24px; }

.strip i {
  flex: 1;
  height: 30px;
  border-radius: 7px;
  background: var(--surface-2);
}

.strip i.met { background: var(--c); }
.strip i.part { background: color-mix(in srgb, var(--c) 42%, transparent); }
.strip i.off { background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--line) 4px 8px); }
.strip i.today { box-shadow: inset 0 0 0 2px var(--c); }

.strip-key {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: .72rem;
  color: var(--ink-3);
}

.sub-head {
  margin: 26px 0 12px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.month.heat { max-width: 330px; }
.month.heat span { border-radius: 6px; }
.heat .h1 { background: color-mix(in srgb, var(--c) 25%, transparent); }
.heat .h2 { background: color-mix(in srgb, var(--c) 50%, transparent); }
.heat .h3 { background: color-mix(in srgb, var(--c) 75%, transparent); }
.heat .h4 { background: var(--c); }

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: .95rem;
}

.stat + .stat { border-top: 1px solid var(--line); }
.stat .k { color: var(--ink-3); }
.stat .v { font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .v.dash { color: var(--ink-3); font-weight: 500; }

.stat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 0 4px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c);
}

.stat-head:first-child { margin-top: 0; }
.stat-head svg { width: 15px; height: 15px; }

.month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.month span {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--surface-2);
}

.month .m1 { background: var(--mood-1); }
.month .m2 { background: var(--mood-2); }
.month .m3 { background: var(--mood-3); }
.month .m4 { background: var(--mood-4); }
.month .m5 { background: var(--mood-5); }

.month-key {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: .78rem;
  color: var(--ink-3);
}

.swatches { display: flex; gap: 5px; }

.swatches b {
  width: 15px;
  height: 15px;
  border-radius: 5px;
}

/* ---------- Widgets ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .92rem;
  font-weight: 550;
}

.chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

/* ---------- Privacy panel ---------- */

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: clamp(38px, 6vw, 76px);
  color: #fff;
  background:
    radial-gradient(90% 100% at 88% 0%, var(--indigo-lift) 0%, transparent 62%),
    linear-gradient(150deg, var(--indigo) 0%, var(--indigo-deep) 100%);
}

.panel .eyebrow { color: rgba(255, 255, 255, .62); }
.panel .eyebrow::before { background: var(--spark); }
.panel h2 { margin: 18px 0 20px; }
.panel p { color: rgba(255, 255, 255, .78); max-width: 58ch; }

.facts {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.facts li {
  padding: 24px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .10);
}

.facts b {
  display: block;
  font-size: 1.02rem;
  letter-spacing: -.02em;
  margin-bottom: 7px;
}

.facts span { font-size: .88rem; color: rgba(255, 255, 255, .68); line-height: 1.5; }
.facts svg { width: 22px; height: 22px; color: var(--spark); margin-bottom: 14px; }
.panel .cta { margin-top: 38px; }

/* ---------- Get it ---------- */

.get h2 { margin: 18px 0 20px; }

.notes {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  display: grid;
  gap: 12px;
  max-width: 62ch;
}

.notes li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  font-size: .92rem;
  color: var(--ink-3);
}

.notes li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: .62em 0 0 6px;
  border-radius: 50%;
  background: var(--ink-3);
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  font-size: .9rem;
  color: var(--ink-3);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

footer nav { display: flex; gap: 24px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- Prose pages ---------- */

.prose-head {
  color: #fff;
  background:
    radial-gradient(100% 90% at 10% 0%, var(--indigo-lift) 0%, transparent 60%),
    linear-gradient(160deg, #181c42 0%, var(--indigo-deep) 100%);
  padding-bottom: clamp(48px, 7vw, 76px);
}

.prose-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-top: clamp(30px, 5vw, 52px); }
.prose-head p { color: rgba(255, 255, 255, .66); margin-top: 16px; font-size: .96rem; }

.prose {
  max-width: 72ch;
  padding: clamp(44px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
  font-size: 1.03rem;
}

.prose h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  max-width: none;
  margin: 56px 0 16px;
  scroll-margin-top: 24px;
}

.prose h3 {
  font-size: 1.12rem;
  font-weight: 700;
  max-width: none;
  margin: 34px 0 12px;
}

.prose p { margin: 0 0 18px; color: var(--ink-2); }
.prose ul { margin: 0 0 18px; padding-left: 22px; color: var(--ink-2); }
.prose li { margin-bottom: 10px; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--ink); text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  overflow-wrap: anywhere;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: .95rem;
}

.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.prose th { color: var(--ink); font-weight: 650; white-space: nowrap; }

.callout {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 24px 26px;
}

.callout p:last-child { margin-bottom: 0; }

.toc {
  margin: 36px 0 0;
  padding: 24px 26px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 8px; color: var(--ink-2); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Narrow ---------- */

@media (max-width: 900px) {
  .hero-grid, .feature { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .art { order: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 52px; }
  h2, h3 { max-width: 22ch; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .top nav { display: none; }
  .toc ol { columns: 1; }
  .prose th { white-space: normal; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
