/*
 * AnMotion site. The palette is the app's own (core/ui Theme.kt) plus the navy and lavender of
 * the Play icon, so a visitor who installs the app recognises it from the page they came from.
 * Dark only: the app is dark, and its screenshots sit on navy.
 */
:root {
  --bg: #12142a;
  --bg-deep: #0d0f20;
  --surface: #181b34;
  --surface-2: #1f2242;
  --border: #282c4d;
  --border-strong: #363b63;
  --text: #ebebf2;
  --muted: #a6a9c2;
  --faint: #6e7291;
  --lav: #b3a9e6;
  --lav-mid: #5a558c;
  --lav-deep: #3d3c62;
  --accent: #5b8cff;
  --accent-hover: #7aa2ff;
  --playhead: #ff5c6c;
  --key: #bfc6d4;
  --cel: #3b6bd6;
  --success: #57d9a3;
  --radius: 18px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --tl-period: 8s;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lav); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #d4ccff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(42px, 7.2vw, 92px); letter-spacing: -0.05em; line-height: 0.96; }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; font-weight: 700; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--lav); margin-bottom: 18px;
}
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; max-width: 38em; }
.lead-xl { font-size: clamp(19px, 2vw, 24px); color: #c9c6ea; }
.fine { color: var(--faint); font-size: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border-radius: 999px; font-weight: 650; font-size: 16px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s, color .2s;
}
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(91, 140, 255, .7); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--lav); color: #fff; }
.btn-link { padding: 0; min-height: 0; color: var(--lav); }
.btn-link:hover .ico { transform: translateX(3px); }
.btn-link .ico { transition: transform .2s; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; align-items: center; }
.actions.center { justify-content: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 20, 42, .78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(54, 59, 99, .55);
}
.header-row { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand:hover { color: #fff; }
.logo { width: 38px; height: 24px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 550; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .08em; border: 1px solid var(--border-strong); border-radius: 8px; padding: 5px 8px; }
.lang:hover { color: var(--text); border-color: var(--lav); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; cursor: pointer; border-radius: 12px; border: 1px solid var(--border-strong); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu[open] summary i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu[open] summary i:nth-child(2) { opacity: 0; }
.menu[open] summary i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-panel {
  position: absolute; right: 0; top: 54px; min-width: 240px; display: flex; flex-direction: column; padding: 8px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.menu-panel a { color: var(--text); text-decoration: none; padding: 12px 14px; border-radius: 10px; font-weight: 550; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--surface-2); }

@media (max-width: 1020px) {
  .nav { display: none; }
  .menu { display: block; }
}
@media (max-width: 520px) {
  .header-end .btn-sm { display: none; }
}

/* ---------- home hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%; height: 900px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(91, 140, 255, .18), transparent 70%),
              radial-gradient(closest-side at 70% 60%, rgba(179, 169, 230, .14), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(50px, 6.6vw, 92px); text-wrap: initial; }
.hero .lead-xl { margin-top: 26px; }
.hero-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.hero-mark .logo { width: 76px; height: 48px; }
.hero-mark .logo path { animation: ghost 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-mark .logo path:nth-child(2) { animation-delay: .15s; }
.hero-mark .logo path:nth-child(3) { animation-delay: .3s; }
@keyframes ghost { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--faint); font-size: 14.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--lav-mid); border-radius: 1px; }

/* ---------- screenshots ---------- */
.shot { margin: 0; position: relative; }
.shot img {
  border-radius: 22px 0 0 22px; border: 1px solid #2c3058; border-right: 0;
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255,255,255,.02);
  background: var(--bg-deep);
}
.bleed { margin-right: calc(-1 * var(--gutter) - max(0px, (100vw - var(--wrap)) / 2)); }
.flip .bleed { margin-right: 0; margin-left: calc(-1 * var(--gutter) - max(0px, (100vw - var(--wrap)) / 2)); }
.flip .shot img { border-radius: 0 22px 22px 0; border-right: 1px solid #2c3058; border-left: 0; object-fit: cover; object-position: left; }
.shot-plain img { border-radius: var(--radius); border: 1px solid #2c3058; }

/* ---------- timeline motif ---------- */
.tl-wrap { position: relative; margin-top: clamp(40px, 6vw, 72px); }
.tl {
  --name-w: 168px;
  position: relative; background: #111226; border: 1px solid #262948; border-radius: 16px; overflow: hidden;
  font: 500 12px/1 var(--font); color: #8f92ab; box-shadow: 0 40px 80px -40px rgba(0,0,0,.7);
}
.tl-bar { display: flex; align-items: center; gap: 16px; height: 42px; padding: 0 16px; border-bottom: 1px solid #22253f; background: #14152b; }
.tl-tc { color: #e6e6ec; font-family: var(--mono); font-size: 13px; }
.tl-fps { color: #60607e; }
.tl-exp { margin-left: auto; display: flex; gap: 6px; align-items: center; color: #60607e; }
.tl-exp b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-weight: 600; color: #9a9aa8; }
.tl-exp b.on { background: #2e4480; color: #fff; }
.tl-body { display: flex; }
.tl-names { width: var(--name-w); flex: none; border-right: 1px solid #22253f; padding-top: 24px; }
.tl-names span { display: flex; align-items: center; height: 34px; padding-left: 16px; white-space: nowrap; overflow: hidden; }
.tl-names span::before { content: ""; width: 9px; height: 9px; margin-right: 10px; border: 1.5px solid #5b5e7a; border-radius: 2px; flex: none; }
.tl-names span.is-cel::before { border-style: dashed; }
.tl-tracks { position: relative; flex: 1; min-width: 0; }
.tl-ruler { height: 24px; border-bottom: 1px solid #22253f;
  background: repeating-linear-gradient(90deg, #3a3d5c 0 1px, transparent 1px 10%) 0 100% / 100% 8px no-repeat,
              repeating-linear-gradient(90deg, #2a2c46 0 1px, transparent 1px 2.5%) 0 100% / 100% 4px no-repeat; }
.tl-track { position: relative; height: 34px; border-bottom: 1px solid #1a1c33; }
.tl-track:nth-child(odd) { background: #15162c; }
.tl-track .kf {
  position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; transform: rotate(45deg);
  background: var(--key); border-radius: 1px; animation: kf var(--tl-period) linear infinite;
}
.tl-track .bar { position: absolute; top: 9px; bottom: 9px; background: rgba(91, 140, 255, .16); border-radius: 5px; }
.tl-track .cel {
  position: absolute; top: 8px; bottom: 8px; background: var(--cel); border-radius: 4px; opacity: .75;
  animation: cel var(--tl-period) linear infinite;
}
.tl-sweep { position: absolute; inset: 0; pointer-events: none; animation: sweep var(--tl-period) linear infinite; }
.tl-head { position: absolute; right: 0; top: 0; bottom: 0; width: 2px; margin-right: -1px; background: var(--playhead); box-shadow: 0 0 14px rgba(255, 92, 108, .6); }
.tl-head::before { content: ""; position: absolute; top: 4px; left: -6px; width: 14px; height: 14px; background: var(--playhead); border-radius: 3px 3px 7px 7px; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes kf { 0% { background: var(--accent); box-shadow: 0 0 0 5px rgba(91,140,255,.25); } 8%, 100% { background: var(--key); box-shadow: none; } }
@keyframes cel { 0% { opacity: 1; background: #5b8cff; } 10%, 100% { opacity: .75; background: var(--cel); } }
@media (max-width: 640px) {
  .tl { --name-w: 112px; }
  .tl-fps, .tl-exp { display: none; }
}

/* ---------- generic blocks ---------- */
.block { padding: clamp(72px, 10vw, 140px) 0; }
.block-alt { background: linear-gradient(180deg, var(--bg-deep), var(--bg)); border-top: 1px solid #1d2040; }
.block-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.block-head .lead { margin-top: 20px; }
.block-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.block-head.center .lead { margin-left: auto; margin-right: auto; }

.feature { padding: clamp(64px, 9vw, 120px) 0; overflow: hidden; }
.feature + .feature { border-top: 1px solid #1b1e3a; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.flip .feature-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.flip .feature-copy { order: 2; }
.feature h2 { font-size: clamp(34px, 4.6vw, 60px); }
.feature .lead { margin-top: 22px; }
.more { margin-top: 26px; }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: #d2d3e4; font-size: 16.5px; }
.checks .ico { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--success); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: border-color .2s, transform .2s, background .2s;
}
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
a.card:hover { border-color: var(--lav-mid); background: var(--surface-2); transform: translateY(-2px); color: var(--text); }
.card-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #24284c; color: var(--lav); margin-bottom: 6px; }
.card-icon svg { width: 22px; height: 22px; }
.card-more { margin-top: auto; padding-top: 6px; color: var(--lav); }
.card-more .ico { width: 18px; height: 18px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.half { padding: clamp(26px, 4vw, 44px); border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.half h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.03em; margin: 6px 0 14px; }
.half .tag { font-family: var(--mono); font-size: 12.5px; color: var(--faint); letter-spacing: .04em; }
.half p { color: var(--muted); }
.half.draw { background: radial-gradient(120% 90% at 0% 0%, rgba(59,107,214,.2), transparent 60%), var(--surface); }
.half.move { background: radial-gradient(120% 90% at 100% 0%, rgba(179,169,230,.18), transparent 60%), var(--surface); }

/* stat strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--bg); padding: 26px 24px; }
.facts b { display: block; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; font-weight: 800; color: var(--text); line-height: 1.1; }
.facts span { color: var(--muted); font-size: 14.5px; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 44px); border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.plan.featured { border-color: #4b4790; background: radial-gradient(100% 80% at 100% 0%, rgba(179,169,230,.16), transparent 60%), var(--surface-2); }
.plan h3 { font-size: 26px; }
.plan .price { font-size: clamp(36px, 4vw, 48px); font-weight: 800; letter-spacing: -0.04em; margin: 14px 0 4px; }
.plan .price small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .checks { margin-bottom: 28px; }
.plan .actions { margin-top: auto; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 20px 24px; font-weight: 650; font-size: 17.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; width: 14px; height: 14px; flex: none; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--lav); border-radius: 2px; transition: transform .2s; }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0); }
.faq-a { padding: 0 24px 22px; color: var(--muted); }
.faq-a p + p { margin-top: 10px; }

/* page hero (inner pages) */
.page-hero { position: relative; padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; right: -10%; top: -40%; width: 70%; height: 140%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(179, 169, 230, .13), transparent 70%);
}
.page-hero .wrap { position: relative; }
.page-hero h1 { max-width: 15em; }
.page-hero .lead { margin-top: 26px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 28px; font-size: 14px; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #44476a; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* long-form text */
.prose-section { padding: 0 0 clamp(64px, 8vw, 110px); }
.prose { max-width: 820px; }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 64px; }
.prose h3 { margin-top: 40px; }
.prose p, .prose li { color: #c8c9dc; font-size: 18px; line-height: 1.7; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--lav-mid); }
.prose ol li::marker { color: var(--lav); font-weight: 700; }
.prose figure { margin: 40px 0; }
.prose figure img { border-radius: var(--radius); border: 1px solid #2c3058; }
.prose figcaption { margin-top: 12px; color: var(--faint); font-size: 14.5px; }
.prose .note { padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--lav); }
.prose .note p { font-size: 16.5px; }
.prose kbd { font-family: var(--mono); font-size: .85em; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); font-weight: 650; }
.prose td { color: #c8c9dc; }
.table-scroll { overflow-x: auto; }
.toc { padding: 22px 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.toc p { font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--lav); }
.toc ol { margin: 12px 0 0; }
.toc li { font-size: 16.5px; }

/* CTA band */
.cta-band { padding: clamp(80px, 11vw, 150px) 0; text-align: center; position: relative; overflow: hidden; border-top: 1px solid #1d2040; }
.cta-band::before { content: ""; position: absolute; left: 50%; top: 60%; width: 900px; height: 600px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(91,140,255,.16), transparent 70%); pointer-events: none; }
.cta-inner { position: relative; }
.cta-inner .logo { width: 96px; height: 60px; margin: 0 auto 30px; }
.cta-inner .lead { margin: 22px auto 0; }
.cta-inner .fine { margin-top: 18px; }

/* footer */
.site-footer { background: var(--bg-deep); border-top: 1px solid #1d2040; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); margin: 14px 0 22px; }
.site-footer h2 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer li a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-footer li a:hover { color: var(--text); }
.footer-fine { margin-top: 48px; padding-top: 22px; border-top: 1px solid #1d2040; color: var(--faint); font-size: 13.5px; }

/* reveal on scroll — CSS only, and only where scroll-driven animations exist */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 960px) {
  .hero-grid, .feature-grid, .flip .feature-grid { grid-template-columns: 1fr; }
  .flip .feature-copy { order: 0; }
  .bleed, .flip .bleed { margin-left: 0; margin-right: calc(-1 * var(--gutter)); }
  .flip .shot img { border-radius: 22px 0 0 22px; border-left: 1px solid #2c3058; border-right: 0; }
  .split, .plans { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .btn { min-height: 50px; padding: 0 20px; }
  .actions .btn { width: 100%; justify-content: center; }
  .prose p, .prose li { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  /* A still playhead part-way along still tells the story the moving one does. */
  .tl-sweep { transform: translateX(-62%); }
}
