/* FocusDo — site styles
   Visual language borrowed from the app: a pink → lavender → blue sky,
   Liquid Glass surfaces, and the icon's four-dot constellation. */

:root {
  --sky-1: #ffd6e0;
  --sky-2: #c4b5fd;
  --sky-3: #93c5fd;
  --ink: #1b1530;
  --ink-soft: #4a4366;
  --ink-mute: #7a7396;
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --shadow: 0 30px 60px -30px rgba(52, 30, 110, 0.35);
  --do: #e24b4a;
  --schedule: #3b82f6;
  --delegate: #ef9f27;
  --eliminate: #8b8a94;
  --radius-l: 32px;
  --radius-m: 22px;
  --serif: "Instrument Serif", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Geist", "Noto Sans SC", "PingFang SC", -apple-system, sans-serif;
  --max: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky-1: #2d1b3d;
    --sky-2: #1e1b4b;
    --sky-3: #0f172a;
    --ink: #f4f1ff;
    --ink-soft: #c9c2e8;
    --ink-mute: #918ab3;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-strong: rgba(255, 255, 255, 0.11);
    --glass-edge: rgba(255, 255, 255, 0.16);
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sky-2);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--schedule); outline-offset: 3px; border-radius: 8px; }

/* ── Sky: drifting gradient blobs + grain ─────────────────────────────── */
.sky {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: linear-gradient(160deg, var(--sky-1) 0%, var(--sky-2) 50%, var(--sky-3) 100%);
}
.sky span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: drift 26s ease-in-out infinite alternate;
}
.sky span:nth-child(1) { width: 52vmax; height: 52vmax; left: -14vmax; top: -18vmax; background: #ffc2d4; }
.sky span:nth-child(2) { width: 44vmax; height: 44vmax; right: -16vmax; top: 18vh; background: #a78bfa; animation-delay: -8s; }
.sky span:nth-child(3) { width: 48vmax; height: 48vmax; left: 18vw; bottom: -26vmax; background: #7dd3fc; animation-delay: -15s; }
@media (prefers-color-scheme: dark) {
  .sky span { opacity: .28; }
}
@keyframes drift {
  to { transform: translate3d(6vw, 4vh, 0) scale(1.08); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Glass ─────────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
section { padding-block: clamp(72px, 11vw, 140px); }

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 14px; z-index: 50;
  width: min(var(--max), 100% - 24px); margin: 14px auto 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 14px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: 15px; color: var(--ink-soft);
  padding: 7px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--glass-strong); color: var(--ink); }
.lang { position: relative; }
.lang select {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: 999px;
  padding: 7px 30px 7px 14px; cursor: pointer;
}
.lang::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1.5px solid var(--ink-soft); border-bottom: 1.5px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
}
@media (max-width: 720px) {
  .nav-links .opt { display: none; }
}

/* ── Type ──────────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--do); box-shadow: 0 0 0 4px rgba(226, 75, 74, .18); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1.02; margin: 0; }
h1 { font-size: clamp(54px, 8.4vw, 116px); }
h2 { font-size: clamp(40px, 5.6vw, 76px); }
h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; }
h1 em, h2 em { font-style: italic; color: var(--do); }
:lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hans) h3 { font-weight: 600; letter-spacing: 0; line-height: 1.15; }
:lang(zh-Hans) h1 em, :lang(zh-Hans) h2 em { font-style: normal; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 34ch; margin: 22px 0 0; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 600; font-size: 16px; padding: 14px 22px; border-radius: 999px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 18px 30px -16px rgba(27, 21, 48, .6); }
@media (prefers-color-scheme: dark) { .btn-primary { background: #fff; color: #1b1530; } }
.btn-primary small { display: block; font-size: 11px; font-weight: 500; opacity: .7; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.btn-primary span { line-height: 1.15; }
.btn-ghost { color: var(--ink); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-grid > *, .how > * { min-width: 0; }
@media (max-width: 920px) { .hero-grid > :last-child { margin-top: 28px; } }

/* The constellation: the app icon's four dots, blown up into the matrix itself */
.matrix {
  --size: min(520px, 88vw);
  position: relative; width: var(--size); aspect-ratio: 1; margin-inline: auto;
  border-radius: 44px; padding: 18px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px;
}
.axis {
  position: absolute; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
.axis-x { top: -30px; left: 50%; transform: translateX(-50%); }
.axis-y { left: -34px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.quad {
  position: relative; border-radius: 28px; padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 7px; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--glass-edge);
}
.quad h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.quad h4 i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.quad .orb {
  position: absolute; right: 14px; bottom: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, .55));
  box-shadow: 0 0 40px rgba(255, 255, 255, .7);
  width: var(--orb); height: var(--orb); opacity: .9;
  animation: breathe 6s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) {
  .quad .orb { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9), rgba(255,255,255,.2)); box-shadow: 0 0 40px rgba(196,181,253,.35); }
}
@keyframes breathe { 50% { transform: scale(1.06); } }
.q-do { --c: var(--do); --orb: 76px; }
.q-schedule { --c: var(--schedule); --orb: 52px; }
.q-delegate { --c: var(--delegate); --orb: 40px; }
.q-eliminate { --c: var(--eliminate); --orb: 24px; }
.q-do .orb { animation-delay: -1s; }
.q-delegate .orb { animation-delay: -3s; }

.chip {
  position: relative; z-index: 1; font-size: 13px; line-height: 1.25; padding: 8px 11px; border-radius: 13px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge);
  display: flex; gap: 8px; align-items: center; max-width: 100%;
  opacity: 0; transform: translate(var(--fx, 0), var(--fy, -40px)) rotate(var(--fr, -6deg)) scale(.92);
  animation: land .9s cubic-bezier(.2, .9, .25, 1.2) forwards;
  animation-delay: calc(.35s + var(--i) * .13s);
}
.chip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--c); flex: none; }
.chip.done { text-decoration: line-through; color: var(--ink-mute); }
.chip.done::before { background: var(--c); }
@keyframes land { to { opacity: 1; transform: none; } }

/* ── Hero intro stagger ───────────────────────────────────────────────── */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--d, 0) * .1s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Marquee of quadrant words ────────────────────────────────────────── */
.ticker { overflow: hidden; padding-block: 22px; border-block: 1px solid var(--glass-edge); }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: ticker 40s linear infinite; }
.ticker span { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); white-space: nowrap; color: var(--ink-soft); }
.ticker span i { font-style: normal; display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--c); margin-right: .45em; vertical-align: middle; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── How it works ─────────────────────────────────────────────────────── */
.how { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 920px) { .how { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 20px; border-radius: var(--radius-m); }
.steps b { font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1; color: var(--c); }
.steps strong { display: block; font-size: 17px; }
.steps p { margin: 2px 0 0; color: var(--ink-soft); font-size: 15.5px; }

/* Phone mockup */
.phones { position: relative; display: flex; justify-content: center; min-height: 600px; }
.phone {
  --w: 280px;
  width: var(--w); aspect-ratio: 1206 / 2622; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #2a2440, #0d0b16);
  box-shadow: 0 50px 80px -40px rgba(30, 15, 70, .6), inset 0 0 0 1.5px rgba(255, 255, 255, .12);
  flex: none;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; background: var(--sky-2); }
.phones .phone:nth-child(1) { transform: rotate(-6deg) translate(40px, 30px); z-index: 1; }
.phones .phone:nth-child(2) { transform: rotate(5deg) translate(-40px, -10px); z-index: 2; }
@media (max-width: 560px) {
  .phones { min-height: 0; }
  .phone { --w: min(170px, 43vw); }
  .phones .phone:nth-child(1) { transform: rotate(-6deg) translate(28px, 22px); }
  .phones .phone:nth-child(2) { transform: rotate(5deg) translate(-28px, -6px); }
}

/* ── Features bento ───────────────────────────────────────────────────── */
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head p { color: var(--ink-soft); font-size: 19px; margin: 18px 0 0; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { border-radius: var(--radius-l); padding: 28px; position: relative; overflow: hidden; }
.card p { color: var(--ink-soft); margin: 10px 0 0; font-size: 15.5px; }
.card .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--c, #8b5cf6) 18%, transparent); color: var(--c, #8b5cf6);
}
.card .ic svg { width: 24px; height: 24px; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
@media (max-width: 920px) { .span-3, .span-2, .span-4 { grid-column: span 6; } }
@media (min-width: 621px) and (max-width: 920px) { .span-2 { grid-column: span 3; } }

/* Live Activity mini-mock inside the focus card */
.island {
  margin-top: 22px; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 26px;
  background: #0d0b16; color: #fff; max-width: 340px;
}
.island .ring { width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--do) 0 68%, rgba(255,255,255,.15) 68% 100%); display: grid; place-items: center; flex: none; }
.island .ring::after { content: ""; width: 28px; height: 28px; border-radius: 50%; background: #0d0b16; }
.island b { font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 600; margin-left: auto; letter-spacing: -.01em; }
.island small { display: block; opacity: .6; font-size: 12px; }

/* ── Gallery ──────────────────────────────────────────────────────────── */
.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 30px;
  margin-inline: calc((100vw - min(var(--max), 100vw - 32px)) / -2); padding-inline: max(16px, calc((100vw - var(--max)) / 2));
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; scroll-snap-align: center; flex: none; }
.gallery .phone { --w: 250px; }
.gallery figcaption { text-align: center; margin-top: 14px; font-size: 14px; color: var(--ink-soft); }

/* ── Privacy pledge ───────────────────────────────────────────────────── */
.pledge { border-radius: 44px; padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .pledge { grid-template-columns: 1fr; } }
.pledge ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pledge li { display: flex; gap: 14px; align-items: center; font-size: 18px; font-weight: 500; }
.pledge li::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: #22c55e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* ── Final CTA ────────────────────────────────────────────────────────── */
.cta { text-align: center; }
.cta img { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 28px; box-shadow: 0 30px 50px -20px rgba(60, 30, 120, .5); }
.cta .actions { justify-content: center; }
.cta .lede { margin-inline: auto; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { padding: 40px 0 56px; color: var(--ink-mute); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; border-top: 1px solid var(--glass-edge); padding-top: 28px; }
footer nav { display: flex; gap: 22px; margin-left: auto; }
footer a { text-decoration: none; color: var(--ink-soft); }
footer a:hover { color: var(--ink); }

/* ── Long-form pages (privacy, support) ───────────────────────────────── */
.doc { padding-top: clamp(48px, 7vw, 88px); }
.doc-head { max-width: 820px; margin-bottom: 40px; }
.doc-head .lede { max-width: 56ch; }
.doc-body { border-radius: var(--radius-l); padding: clamp(26px, 5vw, 56px); max-width: 860px; }
.doc-body h2 { font-size: clamp(28px, 3vw, 36px); margin: 44px 0 12px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--ink-soft); }
.doc-body strong { color: var(--ink); }
.doc-body ul { padding-left: 1.2em; }
.doc-body li { margin: 6px 0; }
.meta { font-size: 14px; color: var(--ink-mute); margin-top: 18px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 36px; }
@media (max-width: 680px) { .summary { grid-template-columns: 1fr; } }
.summary div { padding: 18px 20px; border-radius: var(--radius-m); }
.summary b { display: block; font-size: 16px; }
.summary span { font-size: 14px; color: var(--ink-soft); }
details { border-top: 1px solid var(--glass-edge); padding: 4px 0; }
details:last-of-type { border-bottom: 1px solid var(--glass-edge); }
summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 18px; color: var(--ink);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 30px; font-weight: 400; color: var(--ink-mute); transition: transform .25s;
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details > div { padding: 0 0 18px; }
.contact-card { margin-top: 40px; padding: 26px 28px; border-radius: var(--radius-m); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact-card p { margin: 4px 0 0; }

/* Language blocks on long-form pages: only the active one shows. */
[data-lang-block] { display: none; }
html[lang="en"] [data-lang-block="en"],
html[lang="fr"] [data-lang-block="fr"],
html[lang="zh-Hans"] [data-lang-block="zh-Hans"] { display: block; }

/* ── Scroll reveal ────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .chip, .reveal { opacity: 1 !important; transform: none !important; }
  .ticker-track { transform: none; }
}

/* Release notes */
.changelog { list-style: none; margin: 0; padding: 0; }
.changelog li { padding: 22px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.changelog li:first-child { border-top: 0; padding-top: 0; }
.changelog h2 { display: inline; margin: 0 12px 0 0 !important; font-size: clamp(24px, 2.6vw, 30px); }
.changelog time { color: var(--ink-soft); font-size: 15px; }
.changelog p { margin: 8px 0 0; }
.changelog ul { margin: 8px 0 0; padding-left: 1.2em; }
.changelog ul li { padding: 0; border: 0; margin: 4px 0; color: var(--ink-soft); }
