/* TodoIt site. Colours follow ColorTokensLight.xaml / ColorTokensDark.xaml in the app repo. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --canvas: #f4f7f9;
  --surface: #ffffff;
  --subtle: #eaeff2;
  --ink: #1b2a32;
  --muted: #44565f;
  --faint: #5f7079;
  --line: #dce4e9;
  --brand: #3a5a70;
  --brand-dark: #2b3b42;
  --brand-subtle: #dce6ed;
  --accent: #ff4500;
  --on-accent: #ffffff;
  --link: #3a5a70;
  --shadow: 0 24px 60px -24px rgba(27, 42, 50, 0.35);

  --tag1: #fbdde4; --tag1t: #8e2b45;
  --tag2: #e4f0cc; --tag2t: #4a6b12;
  --tag3: #fbf0c4; --tag3t: #7a6310;
  --tag4: #d6f2df; --tag4t: #1f6b3f;
  --tag5: #cff0ee; --tag5t: #1b6662;
  --tag6: #d4e8fb; --tag6t: #1f5a8e;
  --tag7: #e3dcf8; --tag7t: #54419a;
  --tag8: #f3d9f2; --tag8t: #86338a;

  --max: 1120px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #11181c;
    --surface: #1a2429;
    --subtle: #222e34;
    --ink: #e6edf1;
    --muted: #b3c1c9;
    --faint: #8a9ba5;
    --line: #2d3b43;
    --brand: #8db4ce;
    --brand-dark: #0d1417;
    --brand-subtle: #2b3b42;
    --link: #8db4ce;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);

    --tag1: #4a2430; --tag1t: #f6b8c8;
    --tag2: #2f3d1c; --tag2t: #cde59a;
    --tag3: #463f1c; --tag3t: #eddc8f;
    --tag4: #1f3f2c; --tag4t: #a5ddb8;
    --tag5: #1c3f3d; --tag5t: #9adad6;
    --tag6: #1f3550; --tag6t: #a6ccf0;
    --tag7: #34294f; --tag7t: #cbbef0;
    --tag8: #4a2a4a; --tag8t: #e8b6e5;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 18px/1.6 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
header.site {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.25s, box-shadow 0.25s;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
header.site.solid { background: var(--brand-dark); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
header.site nav { display: flex; gap: 22px; }
header.site nav a { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
header.site nav a:hover { color: #fff; }
/* inner pages have no video behind the header */
body.inner header.site { position: sticky; background: var(--brand-dark); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--brand-dark) center / cover no-repeat;
  overflow: hidden;
  isolation: isolate;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(27, 42, 50, 0.94) 0%, rgba(34, 52, 62, 0.82) 45%, rgba(43, 59, 66, 0.55) 100%),
    linear-gradient(0deg, rgba(17, 24, 28, 0.6), transparent 35%);
}
.hero .wrap { width: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 700; font-stretch: 85%; margin: 0 0 20px; text-wrap: balance; }
.hero p.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: rgba(255, 255, 255, 0.84); max-width: 34em; margin: 0 0 28px; }

/* live quick-add demo */
.qa { max-width: 520px; margin: 0 0 28px; }
.qa-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.96); color: #1b2a32;
  border-radius: 999px; padding: 8px 8px 8px 22px;
  font-size: 1.05rem; min-height: 56px;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.5);
}
.qa-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.qa-text::after { content: ""; display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; background: var(--accent); vertical-align: text-bottom; animation: caret 1s steps(1) infinite; }
.qa-add { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform 0.15s; }
.qa-add svg { width: 20px; height: 20px; stroke: #fff; }
.qa-add.press { transform: scale(0.88); }
.qa-card {
  margin-top: 12px; background: var(--surface); color: var(--ink);
  border-radius: 18px; padding: 14px 18px 14px 16px; display: flex; gap: 14px; align-items: flex-start;
  min-height: 92px; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s;
}
.qa-card.show { opacity: 1; transform: none; }
.qa-box { width: 24px; height: 24px; flex: none; margin-top: 3px; border: 2.5px solid var(--accent); border-radius: 4px; }
.qa-title { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; line-height: 1.5; background: var(--subtle); color: var(--muted);
}
.chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.qa .chip { opacity: 0; transform: scale(0.8); }
.qa .chip.in { opacity: 1; transform: none; transition: opacity 0.25s, transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.chip.t1 { background: var(--tag1); color: var(--tag1t); }
.chip.t2 { background: var(--tag2); color: var(--tag2t); }
.chip.t3 { background: var(--tag3); color: var(--tag3t); }
.chip.t4 { background: var(--tag4); color: var(--tag4t); }
.chip.t5 { background: var(--tag5); color: var(--tag5t); }
.chip.t6 { background: var(--tag6); color: var(--tag6t); }
.chip.t7 { background: var(--tag7); color: var(--tag7t); }
.chip.t8 { background: var(--tag8); color: var(--tag8t); }
@keyframes caret { 50% { opacity: 0; } }

.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 12px;
  background: #fff; color: #1b2a32; text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5); }
.store-btn svg { width: 22px; height: 22px; fill: currentColor; }
.store-btn small { display: block; font-size: 0.72rem; font-weight: 500; color: #5f7079; line-height: 1.1; }
.store-btn[data-placeholder] { cursor: default; }
.store-btn[data-placeholder]:hover { transform: none; box-shadow: none; }
.hero .store-note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); margin-top: 12px; }

.hero-phone { justify-self: center; width: min(300px, 70vw); will-change: transform; }

/* ---------- phone frame ---------- */
.phone {
  position: relative; width: 100%; aspect-ratio: 540 / 1088;
  background: #0d1417; border-radius: 13% / 6.4%; padding: 2.6%;
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 10.5% / 5.2%; overflow: hidden; background: var(--surface); }
.phone .screen img, .phone .screen video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone::after { content: ""; position: absolute; top: 3.6%; left: 50%; width: 3.4%; aspect-ratio: 1; transform: translateX(-50%); background: #0d1417; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }

/* ---------- sections ---------- */
section { padding: 96px 0; }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; font-stretch: 88%; margin: 0 0 16px; text-wrap: balance; }
h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 8px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; margin: 0 0 8px; }
p { margin: 0 0 1em; }

/* live demo section */
.demo { background: var(--surface); }
.demo .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.demo .phone { width: min(300px, 74vw); margin: 0 auto; }
.syntax { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.syntax li { display: flex; gap: 14px; align-items: baseline; }
.syntax code { flex: none; min-width: 5.2em; font: inherit; font-weight: 600; }
.try {
  margin-top: 32px; display: flex; gap: 16px; align-items: center; padding: 16px 20px; background: var(--canvas);
  border: 1px solid var(--line); border-radius: 18px; max-width: 460px; cursor: pointer; user-select: none; position: relative; width: 100%; text-align: left; font: inherit; color: inherit;
}
.try .qa-box { transition: background 0.15s; display: grid; place-items: center; }
.try .qa-box svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 3.2; opacity: 0; }
.try[aria-pressed="true"] .qa-box { background: var(--accent); }
.try[aria-pressed="true"] .qa-box svg { opacity: 1; }
.try[aria-pressed="true"] .try-title { text-decoration: line-through; color: var(--faint); }
.try-title { font-weight: 600; transition: color 0.2s; }
.try small { display: block; color: var(--faint); font-size: 0.85rem; font-weight: 400; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; width: 100%; height: 100%; }

/* features */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.feature + .feature { margin-top: 120px; }
.feature.flip .visual { order: -1; }
.feature .visual { display: flex; justify-content: center; gap: 0; position: relative; }
.feature .visual .phone { width: min(280px, 60vw); }
.feature .visual.pair .phone:first-child { transform: translateX(10%) rotate(-3deg); }
.feature .visual.pair .phone:last-child { transform: translateX(-10%) translateY(36px) rotate(3deg); }
.feature p { color: var(--muted); max-width: 32em; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; color: var(--muted); }
.facts li { padding-left: 24px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 12px; height: 2.5px; background: var(--accent); border-radius: 2px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.seen { opacity: 1; transform: none; }
.visual.pair .phone:first-child.reveal.seen { transform: translateX(10%) rotate(-3deg); }
.visual.pair .phone:last-child.reveal.seen { transform: translateX(-10%) translateY(36px) rotate(3deg); }

/* small features */
.small-features { background: var(--surface); }
.small-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px 36px; margin-top: 40px; }
.small-grid h3 { font-size: 1.15rem; }
.small-grid p { color: var(--muted); font-size: 1rem; margin: 0; }
.small-grid .ico { width: 36px; height: 36px; margin-bottom: 12px; color: var(--accent); }
.small-grid .ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* gallery */
.gallery h2 { margin-bottom: 36px; }
.reel { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 20px 36px; margin: 0 -20px; scrollbar-width: thin; }
.reel figure { margin: 0; flex: none; width: 240px; scroll-snap-align: center; }
.reel figcaption { margin-top: 18px; font-size: 0.95rem; color: var(--muted); text-align: center; }
.reel .phone { box-shadow: 0 16px 36px -18px rgba(27, 42, 50, 0.5); }

/* privacy */
.privacy-band { background: var(--brand-dark); color: #fff; }
.privacy-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.privacy-band h2 { color: #fff; }
.privacy-band p { color: rgba(255, 255, 255, 0.78); }
.privacy-band a { color: #fff; }
.no-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.no-list li { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); display: flex; gap: 14px; font-size: 1.15rem; font-weight: 500; }
.no-list li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.no-list svg { width: 22px; height: 22px; flex: none; margin-top: 4px; stroke: var(--accent); fill: none; stroke-width: 2.4; stroke-linecap: round; }
.no-list span { display: block; font-size: 0.95rem; font-weight: 400; color: rgba(255, 255, 255, 0.65); }

/* closing */
.closer { text-align: left; }
.closer .store-btn { background: var(--brand-dark); color: #fff; }
.closer .store-btn small { color: rgba(255, 255, 255, 0.65); }
.closer .store-note { font-size: 0.85rem; color: var(--faint); margin-top: 12px; }
@media (prefers-color-scheme: dark) {
  .closer .store-btn { background: #e6edf1; color: #11181c; }
  .closer .store-btn small { color: #44565f; }
}

/* inner pages */
main.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 96px; }
main.doc h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 8px; font-stretch: 88%; }
main.doc h2 { font-size: 1.4rem; letter-spacing: -0.015em; margin: 40px 0 8px; font-stretch: 100%; }
main.doc li { margin-bottom: 8px; }
.meta { color: var(--faint); }

footer.site { background: var(--brand-dark); color: rgba(255, 255, 255, 0.7); padding: 36px 0 44px; font-size: 0.95rem; }
footer.site a { color: rgba(255, 255, 255, 0.85); margin-right: 20px; }
footer.site p { margin: 14px 0 0; font-size: 0.88rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  section { padding: 72px 0; }
  .hero .wrap, .demo .wrap, .feature, .privacy-band .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { min-height: auto; }
  .hero .wrap { padding-top: 104px; }
  .hero-phone { display: none; }
  .feature.flip .visual { order: 0; }
  .feature + .feature { margin-top: 88px; }
  header.site nav { gap: 16px; }
  header.site nav a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .visual.pair .phone:first-child.reveal { transform: translateX(10%) rotate(-3deg); }
  .visual.pair .phone:last-child.reveal { transform: translateX(-10%) translateY(36px) rotate(3deg); }
  .qa-text::after { animation: none; }
  .qa .chip { opacity: 1; transform: none; }
  .qa-card { opacity: 1; transform: none; transition: none; }
}
.store-btn .eye { fill: #fff; }

html, body { overflow-x: clip; }
@media (max-width: 860px) {
  .feature .visual.pair .phone:first-child,
  .visual.pair .phone:first-child.reveal.seen { transform: translateX(6%) rotate(-3deg); }
  .feature .visual.pair .phone:last-child,
  .visual.pair .phone:last-child.reveal.seen { transform: translateX(-6%) translateY(24px) rotate(3deg); }
  .feature .visual.pair .phone { width: 44vw; }
}
