/* Timo site. Tokens mirror the app's Timo design system (ui/theme/Color.kt). */

:root {
  --surface: #FEFCF7;
  --raised: #FFFFFF;
  --mint: #F6FBF4;
  --peach: #FEF5E6;
  --ink: #0E4446;
  --body: #526D7C;
  --forest: #3B775A;
  --forest-deep: #245C45;
  --on-forest: #FFFFFF;
  --hairline: #E6EBEA;
  --attention: #8A4B00;
  --wall-a: #E4F1E3;
  --wall-b: #F3F8EE;
  --shadow: 14, 68, 70;

  --g-lagoon: linear-gradient(150deg, #2A7A69, #0E4446);
  --g-dusk: linear-gradient(150deg, #4A619A, #1E2A4F);
  --g-ember: linear-gradient(150deg, #8A5300, #4A2A12);
  --g-plum: linear-gradient(150deg, #6E4A86, #3A2346);
  --g-ocean: linear-gradient(150deg, #1F6F8B, #0F3550);
  --g-forest: linear-gradient(150deg, #3B775A, #1D4A37);
  --g-slate: linear-gradient(150deg, #5B6B7A, #2B3440);
  --g-moss: linear-gradient(150deg, #5F7029, #33401C);

  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #0F1F1C;
    --raised: #172B27;
    --mint: #142520;
    --peach: #261F17;
    --ink: #EAF3EE;
    --body: #A8C0C4;
    --forest: #6CBF92;
    --forest-deep: #8FD6B0;
    --on-forest: #0B2A1E;
    --hairline: #263A36;
    --attention: #F2B25C;
    --wall-a: #16302A;
    --wall-b: #1B2D26;
    --shadow: 0, 0, 0;
  }
}
:root[data-theme="dark"] {
  --surface: #0F1F1C;
  --raised: #172B27;
  --mint: #142520;
  --peach: #261F17;
  --ink: #EAF3EE;
  --body: #A8C0C4;
  --forest: #6CBF92;
  --forest-deep: #8FD6B0;
  --on-forest: #0B2A1E;
  --hairline: #263A36;
  --attention: #F2B25C;
  --wall-a: #16302A;
  --wall-b: #1B2D26;
  --shadow: 0, 0, 0;
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: var(--forest-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.15; margin: 0; }

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

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--surface);
  padding: 8px 14px; border-radius: 10px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */

.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.site-nav { display: flex; gap: 20px; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

/* Hero */

.hero { padding: clamp(24px, 6vw, 72px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 11ch;
}

.hero .lede {
  margin: 24px 0 32px;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  max-width: 34ch;
}

.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  background: var(--forest-deep);
  color: var(--on-forest);
  font-weight: 500; text-decoration: none;
}
.store svg { width: 22px; height: 22px; flex: none; }
.store[aria-disabled="true"] { cursor: default; }
.store-note { margin: 14px 0 0; font-size: 0.9rem; }

/* The home screen: the one loud thing on the page */

.homescreen {
  position: relative;
  margin-top: 64px;
  padding: 28px;
  border-radius: 40px;
  background:
    radial-gradient(120% 80% at 100% 0%, var(--wall-b), transparent 60%),
    linear-gradient(170deg, var(--wall-a), var(--wall-b));
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.homescreen .mascot {
  position: absolute;
  width: 132px;
  top: -92px; right: 30px;
  filter: drop-shadow(0 8px 14px rgba(var(--shadow), 0.18));
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.widget {
  position: relative;
  aspect-ratio: 1;
  grid-column: span 2;
  border-radius: 28px;
  padding: 18px 18px 16px;
  color: #FFFFFF;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 24px -12px rgba(var(--shadow), 0.45);
}
.widget::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(90% 60% at 20% 0%, rgba(255,255,255,0.16), transparent 70%);
  pointer-events: none;
}
.widget.wide { grid-column: span 4; aspect-ratio: auto; flex-direction: row; align-items: center; gap: 16px; padding: 18px 22px; }

.w-title { font-size: 0.95rem; font-weight: 500; line-height: 1.25; }
.w-num { margin-top: auto; font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.w-unit { margin-top: 6px; font-size: 0.82rem; opacity: 0.88; }
.wide .w-num { margin-top: 0; font-size: 2.6rem; }
.wide .w-text { display: flex; flex-direction: column; }

.lagoon { background: var(--g-lagoon); }
.dusk { background: var(--g-dusk); }
.ember { background: var(--g-ember); }
.plum { background: var(--g-plum); }
.ocean { background: var(--g-ocean); }
.forest { background: var(--g-forest); }
.slate { background: var(--g-slate); }
.moss { background: var(--g-moss); }

.dock {
  margin-top: 22px;
  display: flex; justify-content: center; gap: 22px;
}
.app {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--ink);
}
.app img, .app span.blank {
  width: 52px; height: 52px; border-radius: 16px;
}
.app span.blank { display: block; background: var(--raised); opacity: 0.7; box-shadow: inset 0 0 0 1px var(--hairline); }

/* Sections */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--hairline); }

.section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.section .intro { margin: 16px 0 0; max-width: 52ch; font-size: 1.1rem; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px) 0;
}
.feature + .feature { border-top: 1px dashed var(--hairline); }
.feature h3 { font-size: 1.45rem; letter-spacing: -0.01em; }
.feature p { margin: 12px 0 0; max-width: 44ch; }
.feature ul { margin: 12px 0 0; padding-left: 1.1em; max-width: 44ch; }
.feature li + li { margin-top: 6px; }

.features { margin-top: 24px; }

/* Quick add mock */
.quickadd {
  background: var(--raised);
  border-radius: 24px;
  padding: 20px 22px;
  box-shadow: 0 1px 0 var(--hairline), 0 18px 40px -24px rgba(var(--shadow), 0.4);
  max-width: 440px;
}
.qa-field {
  font-size: 1.35rem; color: var(--ink);
  border-bottom: 2px solid var(--forest);
  padding-bottom: 8px;
}
.qa-field mark {
  background: color-mix(in srgb, var(--forest) 18%, transparent);
  color: inherit; border-radius: 6px; padding: 0 4px;
}
.qa-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--forest-deep); font-size: 0.9rem; font-weight: 500;
}
.qa-chip svg { width: 16px; height: 16px; }

/* Down, then up */
.flip {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.flip li {
  border-radius: 20px;
  padding: 16px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.flip .when { font-size: 0.8rem; }
.flip .count { display: block; margin-top: 18px; font-size: 1.5rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.flip li.today { background: var(--g-lagoon); box-shadow: none; }
.flip li.today .when, .flip li.today .count { color: #FFFFFF; }

/* Reminder options */
.reminders {
  list-style: none; margin: 0; padding: 8px; max-width: 440px;
  background: var(--raised); border-radius: 22px;
  box-shadow: 0 1px 0 var(--hairline), 0 18px 40px -24px rgba(var(--shadow), 0.4);
}
.reminders li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border-radius: 14px;
  color: var(--ink);
}
.reminders li span:last-child { color: var(--body); font-size: 0.92rem; text-align: right; }
.reminders li.on { background: var(--mint); box-shadow: inset 0 0 0 1px var(--hairline); }
.reminders li.on span:first-child { font-weight: 500; }

/* Gradients */
.swatches {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.swatches li {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  padding: 10px 12px;
  display: flex; align-items: flex-end;
  color: #FFFFFF; font-size: 0.85rem; text-transform: capitalize;
}

/* Privacy band */
.privacy-band { background: var(--peach); border-top: 0 !important; }
.privacy-band .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px); align-items: start;
}
.privacy-band ul { margin: 0; padding: 0; list-style: none; }
.privacy-band li {
  padding: 14px 0 14px 34px;
  position: relative;
  border-bottom: 1px solid color-mix(in srgb, var(--attention) 18%, transparent);
}
.privacy-band li:last-child { border-bottom: 0; }
.privacy-band li::before {
  content: "";
  position: absolute; left: 2px; top: 19px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--forest-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22Zm-1.5 15.6-4.3-4.3 1.6-1.6 2.7 2.7 6-6 1.6 1.6-7.6 7.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22Zm-1.5 15.6-4.3-4.3 1.6-1.6 2.7 2.7 6-6 1.6 1.6-7.6 7.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.privacy-band li strong { color: var(--ink); font-weight: 500; }
.privacy-band .more { margin-top: 24px; }

/* Footer */
.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--ink); }

/* Privacy policy page */

.policy { padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.policy .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.policy h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.03em; }
.policy .meta { margin: 12px 0 0; font-size: 0.95rem; }
.policy h2 { font-size: 1.35rem; margin: 48px 0 0; letter-spacing: -0.01em; }
.policy h3 { font-size: 1.05rem; margin: 24px 0 0; }
.policy p, .policy ul, .policy dl { margin: 12px 0 0; }
.policy ul { padding-left: 1.2em; }
.policy li + li { margin-top: 8px; }
.policy strong { color: var(--ink); font-weight: 500; }
.policy dt { color: var(--ink); font-weight: 500; margin-top: 16px; }
.policy dd { margin: 4px 0 0; }

.summary {
  margin-top: 32px;
  padding: 24px 26px;
  border-radius: 24px;
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--hairline);
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
}
.summary img { width: 72px; }
.summary h2 { margin: 0; font-size: 1.15rem; }
.summary ul { margin-top: 10px; }

.toc { margin-top: 32px; font-size: 0.95rem; }
.toc ol { margin: 8px 0 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; margin: 0 0 6px; }

/* Responsive */

@media (max-width: 880px) {
  .hero .wrap, .privacy-band .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 13ch; }
  .homescreen { margin-top: 96px; }
  .feature { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .homescreen { padding: 18px; border-radius: 32px; }
  .homescreen .mascot { width: 104px; top: -74px; right: 18px; }
  .grid { gap: 12px; }
  .widget { border-radius: 22px; padding: 14px; }
  .widget.wide { padding: 14px 16px; }
  .w-num { font-size: 2.4rem; }
  .wide .w-num { font-size: 2.1rem; }
  .w-title { font-size: 0.85rem; }
  .w-unit { font-size: 0.74rem; }
  .flip { grid-template-columns: 1fr; }
  .flip .count { margin-top: 6px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches li { aspect-ratio: 5 / 2; }
  .summary { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .site-nav { gap: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  .homescreen .mascot { animation: peek 700ms cubic-bezier(.2,.9,.3,1.2) 250ms both; }
  @keyframes peek {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}
