/* ==============================================================
   آرام — araam.ir
   Single-page CSS. RTL, Persian-first.
   Palette pulled from the app's app_colors.dart.
   ============================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-Light.ttf') format('truetype'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-SemiBold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-ExtraBold.ttf') format('truetype'); font-weight:800; font-style:normal; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../assets/fonts/Vazirmatn-Black.ttf') format('truetype'); font-weight:900; font-style:normal; font-display:swap; }

/* ---------- Tokens (mirrors app_colors.dart) ---------- */
:root {
  --brand:        #5B8DEF;
  --brand-2:      #7C6CF1;
  --brand-soft:   #E4ECFF;

  --cat-blue:     #5B8DEF;
  --cat-violet:   #7C6CF1;
  --cat-coral:    #E26D6D;
  --cat-amber:    #E0A458;
  --cat-green:    #4FB477;
  --cat-teal:     #3FB8B5;
  --cat-pink:     #E07AB1;
  --cat-graphite: #8B8B8B;

  --bg:           #FBFAF7;
  --surface:      #FFFFFF;
  --surface-alt:  #F2F1EC;
  --outline:      #E4E2DC;
  --text:         #1B1B1A;
  --text-muted:   #6C6B66;

  --shadow-sm: 0 2px 8px rgba(20,18,30,0.04), 0 1px 2px rgba(20,18,30,0.04);
  --shadow-md: 0 8px 24px rgba(20,18,30,0.06), 0 2px 6px rgba(20,18,30,0.04);
  --shadow-lg: 0 30px 60px rgba(28,24,56,0.18), 0 8px 18px rgba(28,24,56,0.08);
  --shadow-glow: 0 30px 80px rgba(91,141,239,0.22);

  --r-sm: 10px;
  --r:    16px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  --container: min(1180px, 100%);
  --section-py: clamp(72px, 10vw, 140px);
  --section-px: clamp(20px, 4vw, 32px);

  --font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.4, 0.5, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.1, 1);
}

[data-theme="dark"] {
  --bg:           #0E0E10;
  --surface:      #17171A;
  --surface-alt:  #1F1F23;
  --outline:      #2A2A2F;
  --text:         #F4F3EF;
  --text-muted:   #A0A09A;
  --brand-soft:   #1B2742;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.35);
  --shadow-lg: 0 30px 60px rgba(0,0,0,0.6), 0 8px 18px rgba(0,0,0,0.35);
  --shadow-glow: 0 30px 80px rgba(124,108,241,0.32);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400; font-size: 16px; line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, summary { overflow-wrap: break-word; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--brand-2); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(91,141,239,0.25); color: var(--text); }

/* ---------- View Transition: circular theme wipe ---------- */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: vtClip .58s var(--ease-soft); }
@keyframes vtClip {
  from { clip-path: circle(0% at var(--vt-x, 100%) var(--vt-y, 0%)); }
  to   { clip-path: circle(155% at var(--vt-x, 100%) var(--vt-y, 0%)); }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 80;
  transform: scaleX(0); transform-origin: right center;
  background: linear-gradient(90deg, var(--cat-teal), var(--brand) 45%, var(--brand-2));
  box-shadow: 0 1px 12px rgba(91,141,239,0.55);
  will-change: transform;
}

/* ---------- Cursor spotlight ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,141,239,0.5), transparent 62%);
  pointer-events: none;
  z-index: 9;
  mix-blend-mode: plus-lighter;
  opacity: 0;
  transition: opacity .4s var(--ease);
  will-change: transform;
}
[data-theme="dark"] .cursor-glow {
  background: radial-gradient(circle, rgba(124,108,241,0.42), transparent 62%);
}

/* ---------- Aurora backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.grad-mesh {
  position: absolute; inset: -10%;
  background:
    radial-gradient(60% 50% at 20% 15%, rgba(91,141,239,0.22), transparent 60%),
    radial-gradient(50% 40% at 85% 25%, rgba(124,108,241,0.18), transparent 60%),
    radial-gradient(50% 50% at 50% 90%, rgba(63,184,181,0.10), transparent 60%);
}
[data-theme="dark"] .grad-mesh {
  background:
    radial-gradient(60% 50% at 20% 15%, rgba(91,141,239,0.18), transparent 60%),
    radial-gradient(55% 45% at 85% 25%, rgba(124,108,241,0.22), transparent 60%),
    radial-gradient(60% 60% at 50% 95%, rgba(63,184,181,0.10), transparent 60%);
}
/* morphing aurora blobs */
.aurora {
  position: absolute;
  filter: blur(70px);
  opacity: .6;
  will-change: transform, border-radius;
}
.aurora-a {
  width: 520px; height: 520px; left: -130px; top: 6vh;
  background: radial-gradient(circle, rgba(91,141,239,0.6), transparent 70%);
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  animation: blob1 24s var(--ease) infinite alternate, spin 70s linear infinite;
}
.aurora-b {
  width: 460px; height: 460px; right: -150px; top: 20vh;
  background: radial-gradient(circle, rgba(124,108,241,0.6), transparent 70%);
  border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%;
  animation: blob2 30s var(--ease) infinite alternate, spin 90s linear infinite reverse;
}
.aurora-c {
  width: 400px; height: 400px; left: 42vw; top: 58vh;
  background: radial-gradient(circle, rgba(63,184,181,0.4), transparent 70%);
  border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  animation: blob1 28s var(--ease) infinite alternate, spin 80s linear infinite;
}
[data-theme="dark"] .aurora { opacity: .5; }
@keyframes blob1 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(70px,46px) scale(1.14); }
}
@keyframes blob2 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-56px,72px) scale(1.18); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(to bottom, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 100% 64px;
  -webkit-mask-image: radial-gradient(120% 70% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(120% 70% at 50% 0%, #000 0%, transparent 75%);
  opacity: .5;
}
.noise {
  position: absolute; inset: 0; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .noise { opacity: .07; }

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 12px; --pad-x: 20px;
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: var(--pad-y) var(--pad-x);
  font-weight: 700;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: transparent; color: var(--text);
  transition: transform .3s var(--ease-back), background .25s var(--ease), color .25s var(--ease), box-shadow .35s var(--ease), border-color .25s var(--ease);
  white-space: nowrap; user-select: none; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease-back); }
.btn-sm { --pad-y: 8px;  --pad-x: 14px; font-size: 13px; border-radius: 12px; }
.btn-lg { --pad-y: 14px; --pad-x: 22px; font-size: 15px; border-radius: 18px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 10px 30px rgba(91,141,239,0.32), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 18px 40px rgba(91,141,239,0.45), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover svg { transform: translateY(2px); }
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--outline); }
.btn-ghost:hover { color: var(--text); background: var(--surface-alt); transform: translateY(-2px); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px var(--section-px);
  background: transparent;
  transition: padding .3s var(--ease), backdrop-filter .3s var(--ease);
}
.nav.is-scrolled {
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; letter-spacing: -0.2px; }
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 18px rgba(91,141,239,0.30); transition: transform .5s var(--ease-back); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.nav-links {
  position: relative;
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-pill); padding: 4px;
}
.nav-links a {
  position: relative; z-index: 1;
  display: inline-block; padding: 8px 14px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  border-radius: var(--r-pill); transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); }
.nav-pill {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  border-radius: var(--r-pill); background: var(--surface-alt);
  width: 0; opacity: 0;
  transition: transform .4s var(--ease), width .4s var(--ease), opacity .3s var(--ease);
  pointer-events: none;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--outline);
  color: var(--text); overflow: hidden;
  transition: background .25s var(--ease), transform .25s var(--ease-back);
}
.theme-toggle:hover { background: var(--surface-alt); transform: translateY(-1px) rotate(-12deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) var(--section-px) clamp(40px, 6vw, 80px);
}
.hero-spot {
  position: absolute;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,108,241,0.22), transparent 60%);
  pointer-events: none; z-index: 0;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.hero-inner {
  position: relative; z-index: 1;
  width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  min-height: min(820px, calc(92vh - 80px));
}
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; min-height: auto; gap: 8px; }
  .hero-title { font-size: clamp(27px, 8vw, 46px); letter-spacing: -1px; margin: 6px 0 16px; }
  /* rotator drops to its own line and centers under «بدونِ» */
  #rotator { display: flex; justify-content: center; width: auto !important; }
}

.hero-title {
  font-size: clamp(36px, 7vw, 78px);
  line-height: 1.15; font-weight: 900; letter-spacing: -1.4px;
  margin: 20px 0 20px; color: var(--text); text-wrap: balance;
}
.grad-text {
  background: linear-gradient(115deg, var(--brand) 0%, var(--brand-2) 55%, var(--cat-teal) 110%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 8s ease infinite;
}
@keyframes gradShift { 0%,100% { background-position: 0% center; } 50% { background-position: 100% center; } }

.rotator {
  display: inline-grid; vertical-align: bottom;
  overflow: hidden; text-align: start;
  transition: width .42s var(--ease);
}
.rotator-word { grid-area: 1 / 1; display: inline-block; white-space: nowrap; }
.rotator-word.is-out { animation: wordOut .42s var(--ease) forwards; }
.rotator-word.is-in  { animation: wordIn .52s var(--ease-back) forwards; }
@keyframes wordOut { to { transform: translateY(-0.9em) rotateX(-60deg); opacity: 0; } }
@keyframes wordIn  { from { transform: translateY(0.9em) rotateX(60deg); opacity: 0; } to { transform: translateY(0) rotateX(0); opacity: 1; } }

.hero-sub {
  font-size: clamp(15px, 1.35vw, 18px);
  color: var(--text-muted); max-width: 560px; margin: 0 0 30px; line-height: 1.85;
}
@media (max-width: 940px) { .hero-sub { margin-inline: auto; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
@media (max-width: 940px) { .hero-cta { justify-content: center; } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--text-muted); }
@media (max-width: 940px) { .hero-meta { justify-content: center; } }
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--cat-green); }
.dot-blue { background: var(--brand); }
.dot-violet { background: var(--brand-2); }

/* ---------- Hero stage ---------- */
.hero-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 600px;
  perspective: 1300px;
  perspective-origin: 50% 42%;
}
@media (max-width: 940px) { .hero-stage { min-height: 560px; margin-top: 16px; } }
@media (max-width: 480px) { .hero-stage { min-height: 520px; } }

.stage-glow {
  position: absolute; width: 80%; height: 72%; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,108,241,0.4), rgba(91,141,239,0.18) 45%, transparent 72%);
  filter: blur(34px);
  animation: glowPulse 6s var(--ease) infinite alternate;
}
@keyframes glowPulse { 0% { transform: scale(.92); opacity: .8; } 100% { transform: scale(1.08); opacity: 1; } }

.orbit { position: absolute; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--brand) 30%, transparent); pointer-events: none; }
.orbit-1 { width: clamp(320px,40vw,460px); aspect-ratio: 1; opacity: .38; animation: spin 52s linear infinite; }
.orbit-2 { width: clamp(440px,54vw,600px); aspect-ratio: 1; opacity: .2; animation: spin 84s linear infinite reverse; }
.orbit-1::before, .orbit-2::before {
  content: ''; position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 12px var(--brand);
}
.orbit-2::before { background: var(--cat-teal); box-shadow: 0 0 12px var(--cat-teal); }

.hero-phone {
  position: relative; z-index: 2;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-phone .device { animation: floatPhone 7s var(--ease) infinite alternate; }
/* hold the phone perfectly still while the visitor interacts with it */
.hero-phone.is-held .device { animation-play-state: paused; }
@keyframes floatPhone {
  0%   { transform: translateY(0) rotate(-1.4deg); }
  100% { transform: translateY(-16px) rotate(1.4deg); }
}

/* ---------- Device frame (shared) ---------- */
.device {
  position: relative;
  width: clamp(250px, 30vw, 300px);
  border-radius: 44px;
  background: linear-gradient(150deg, #2b2b32 0%, #141417 45%, #0a0a0c 100%);
  padding: 9px;
  box-shadow: var(--shadow-lg), var(--shadow-glow), inset 0 0 0 1.5px rgba(255,255,255,0.06);
}
.device::before, .device::after {
  content: ''; position: absolute; width: 3px;
  background: linear-gradient(var(--brand), var(--brand-2));
  border-radius: 3px; inset-inline-end: -3px; opacity: .9;
}
.device::before { top: 21%; height: 38px; }
.device::after  { top: 35%; height: 62px; }

.device-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 35px;
  overflow: hidden;
  background: var(--bg);
}
.device-screens .device-screen { aspect-ratio: 720 / 1600; }
.device-screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.device-shine {
  position: absolute; inset: 0; z-index: 5;
  background: linear-gradient(125deg, transparent 38%, rgba(255,255,255,0.2) 50%, transparent 62%);
  transform: translateX(-130%);
  pointer-events: none;
  animation: shineSweep 7.5s var(--ease) 1.5s infinite;
}
@keyframes shineSweep { 0%,72%,100% { transform: translateX(-130%); } 86% { transform: translateX(130%); } }

.device-screens { width: clamp(264px, 33vw, 330px); transition: transform .5s var(--ease); }
.device-screens:hover { transform: translateY(-8px) rotate(-1deg); }

/* ---------- Live app mockup ---------- */
.app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  font-size: 11px;
  color: var(--text);
  user-select: none;
}
.app-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px 3px;
  font-size: 11px; font-weight: 700;
}
.app-bar-stat { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.app-bar-stat svg { width: 17px; height: 10px; fill: currentColor; }
.app-bat {
  width: 19px; height: 10px; border-radius: 3px;
  border: 1.4px solid currentColor; padding: 1.4px;
  position: relative;
}
.app-bat::after {
  content: ''; position: absolute; inset-inline-end: -3px; top: 2.6px;
  width: 1.6px; height: 3.6px; border-radius: 2px; background: currentColor;
}
.app-bat-fill { display: block; width: 72%; height: 100%; border-radius: 1px; background: var(--cat-green); }

.app-top { padding: 6px 16px 8px; }
.app-top-row { display: flex; align-items: center; gap: 5px; }
.app-sprout { width: 14px; height: 14px; color: var(--cat-green); }
.app-today { font-size: 11px; font-weight: 700; color: var(--cat-green); }
.app-date { margin-top: 1px; display: flex; align-items: baseline; gap: 6px; }
.app-date strong { font-size: 25px; font-weight: 900; letter-spacing: -0.5px; }
.app-date span { font-size: 13px; font-weight: 700; color: var(--text-muted); }

.app-seg {
  margin: 0 16px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px;
  background: var(--surface-alt);
  border-radius: var(--r-pill); padding: 3px;
}
.app-seg span {
  text-align: center; padding: 6px 0;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  border-radius: var(--r-pill);
}
.app-seg .seg-on {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 10px rgba(91,141,239,0.4);
}

/* timeline inside the app */
.app-tl { position: relative; flex: 1; margin: 14px 0 18px; overflow: hidden; }
.tl-line {
  position: absolute; top: 6px; bottom: 6px;
  inset-inline-end: 41px; width: 2px;
  background: linear-gradient(var(--outline), color-mix(in srgb,var(--outline) 30%, transparent));
  border-radius: 2px;
}
.tl-item {
  position: absolute; inset-inline: 14px;
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
}
.tl-time {
  width: 30px; flex-shrink: 0; text-align: center;
  font-size: 9.5px; font-weight: 700; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.tl-node {
  width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--cat-blue);
  z-index: 1;
}
.n-green { border-color: var(--cat-green); }
.n-amber { border-color: var(--cat-amber); }
.n-blue  { border-color: var(--cat-blue); }
.n-pink  { border-color: var(--cat-pink); }
.tl-card {
  flex: 1;
  display: flex; align-items: center; gap: 7px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 7px 9px;
  box-shadow: 0 4px 12px rgba(20,18,30,0.05);
  transition: opacity .4s var(--ease), transform .35s var(--ease-back);
}
.tl-check {
  position: relative;
  width: 18px; height: 18px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 2px solid var(--outline);
  border-radius: 50%;
  background: transparent; color: #fff;
  padding: 0;
  transition: background .3s var(--ease-back), border-color .3s var(--ease);
}
.tl-check svg { width: 10px; height: 10px; opacity: 0; transform: scale(.4); transition: opacity .25s var(--ease), transform .3s var(--ease-back); }
.tl-card-main { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.tl-card-main b { font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card-main i { font-size: 8.8px; font-style: normal; color: var(--text-muted); }
.tl-tag { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.t-green { background: var(--cat-green); }
.t-amber { background: var(--cat-amber); }
.t-blue  { background: var(--cat-blue); }
.t-pink  { background: var(--cat-pink); }

.tl-item.is-done .tl-card { opacity: .58; }
.tl-item.is-done .tl-card-main b { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--text-muted); }
.tl-item.is-done .tl-check { background: var(--cat-green); border-color: var(--cat-green); }
.tl-item.is-done .tl-check svg { opacity: 1; transform: scale(1); }
.tl-item.is-done .tl-node { background: var(--cat-green); border-color: var(--cat-green); }

/* victory celebration on tap-to-complete */
.tl-item:hover .tl-card { border-color: color-mix(in srgb, var(--cat-blue) 45%, var(--outline)); }
.tl-item:hover .tl-check { border-color: var(--cat-green); }
.tl-check::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%; border: 2.5px solid var(--cat-green);
  opacity: 0; pointer-events: none;
}
.tl-item.celebrate .tl-check::after { animation: ringBurst .62s var(--ease) forwards; }
.tl-item.celebrate .tl-check svg path { stroke-dasharray: 24; animation: checkDraw .45s var(--ease) forwards; }
@keyframes ringBurst {
  0%   { opacity: .9; transform: scale(.55); }
  100% { opacity: 0; transform: scale(2.9); }
}
@keyframes checkDraw {
  from { stroke-dashoffset: 24; }
  to   { stroke-dashoffset: 0; }
}

/* now line */
.tl-now {
  position: absolute; inset-inline: 14px;
  display: flex; align-items: center; flex-direction: row-reverse;
  z-index: 2;
  pointer-events: none;
}
.tl-now::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(to left, var(--cat-coral), color-mix(in srgb,var(--cat-coral) 10%, transparent));
  border-radius: 2px;
}
.tl-now-time {
  font-size: 9px; font-weight: 800; color: #fff;
  background: var(--cat-coral);
  padding: 2.5px 7px; border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 8px rgba(226,109,109,0.5);
}
.tl-now-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cat-coral); margin: 0 4px;
  box-shadow: 0 0 0 0 rgba(226,109,109,0.5);
  animation: pulse-coral 2s var(--ease) infinite;
}
@keyframes pulse-coral {
  0% { box-shadow: 0 0 0 0 rgba(226,109,109,0.5); }
  100% { box-shadow: 0 0 0 8px rgba(226,109,109,0); }
}

/* staggered task entrance */
.js .hero-loaded .tl-item { animation: taskIn .6s var(--ease-back) backwards; }
.js .hero-loaded .tl-item:nth-of-type(1) { animation-delay: .55s; }
.js .hero-loaded .tl-item:nth-of-type(2) { animation-delay: .68s; }
.js .hero-loaded .tl-item:nth-of-type(3) { animation-delay: .81s; }
.js .hero-loaded .tl-item:nth-of-type(4) { animation-delay: .94s; }
.js .hero-loaded .tl-now { animation: nowIn .5s var(--ease) 1.1s backwards; }
@keyframes taskIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes nowIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Floating glass chips (no backdrop-filter → no lag) ---------- */
.chip {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 13px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 15px;
  box-shadow: var(--shadow-md), 0 16px 32px rgba(28,24,56,0.14);
  font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap;
  will-change: transform;
}
.chip-ai      { top: 5%;  inset-inline-end: -9%; animation: chipFloat 5.5s var(--ease) infinite alternate; }
.chip-done    { bottom: 17%; inset-inline-start: -14%; animation: chipFloat 6.6s var(--ease) .4s infinite alternate; }
.chip-weather { top: 40%; inset-inline-start: -17%; animation: chipFloat 7.4s var(--ease) .9s infinite alternate; }
@keyframes chipFloat { 0% { translate: 0 0; } 100% { translate: 0 -12px; } }
@media (max-width: 940px) {
  .chip-ai      { inset-inline-end: 0%; }
  .chip-done    { inset-inline-start: -2%; }
  .chip-weather { inset-inline-start: -4%; top: 36%; }
}
@media (max-width: 480px) {
  .chip { font-size: 11.5px; padding: 8px 10px; }
  .chip-weather { display: none; }
}

.chip-spark {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
}
.chip-spark svg { width: 14px; height: 14px; animation: sparkSpin 6s linear infinite; }
@keyframes sparkSpin { 0%,100% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } }

.chip-ring { position: relative; width: 30px; height: 30px; flex-shrink: 0; }
.chip-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.chip-ring .ring-bg { fill: none; stroke: var(--surface-alt); stroke-width: 4; }
.chip-ring .ring-fg {
  fill: none; stroke: url(#g) var(--cat-green); stroke: var(--cat-green);
  stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 94.2; stroke-dashoffset: 47;
  transition: stroke-dashoffset 1s var(--ease);
}
.chip-stack { display: flex; flex-direction: column; line-height: 1.3; }
.chip-stack strong { font-weight: 800; font-size: 12.5px; }
.chip-stack small { font-size: 10px; color: var(--text-muted); font-weight: 500; }

.chip-sun {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 8px;
  background: color-mix(in srgb, var(--cat-amber) 20%, transparent); color: var(--cat-amber);
}
.chip-sun svg { width: 15px; height: 15px; animation: spin 14s linear infinite; }

/* ---------- Tap hint (invites tapping the live tasks) ---------- */
.tap-hint {
  position: absolute; z-index: 4;
  top: 49%; inset-inline-end: -7%;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 32px rgba(91,141,239,0.5);
  white-space: nowrap;
  animation: tapBob 1.9s var(--ease) infinite;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.tap-hint svg { width: 17px; height: 17px; }
.tap-hint::after {
  content: ''; position: absolute; inset: -1px;
  border-radius: inherit; border: 2px solid var(--brand-2);
  animation: tapPulse 1.9s var(--ease) infinite;
}
.tap-hint.is-gone { opacity: 0; transform: scale(.8); pointer-events: none; }
@keyframes tapBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes tapPulse {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.55); }
}
@media (max-width: 940px) { .tap-hint { inset-inline-end: 1%; top: 46%; } }
@media (max-width: 480px) { .tap-hint { font-size: 11px; padding: 7px 11px; } }

/* gentle beckon on still-pending checkboxes — stops after first completion */
.tl-item:not(.is-done) .tl-check { animation: checkBeckon 2.2s var(--ease) infinite; }
.app.hinted .tl-check { animation: none; }
@keyframes checkBeckon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,141,239,0); }
  50%      { box-shadow: 0 0 0 5px rgba(91,141,239,0.22); }
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; margin: clamp(16px,3vw,40px) auto 0;
  color: var(--text-muted); font-size: 12px; font-weight: 500;
}
.scroll-hint:hover { color: var(--brand); }
.scroll-hint-mouse { width: 24px; height: 38px; border: 1.6px solid currentColor; border-radius: 13px; position: relative; opacity: .7; }
.scroll-hint-mouse::after {
  content: ''; position: absolute; left: 50%; top: 7px;
  width: 3.5px; height: 7px; border-radius: 2px; background: currentColor;
  transform: translateX(-50%);
  animation: scrollBob 1.8s var(--ease) infinite;
}
@keyframes scrollBob { 0%,100% { transform: translate(-50%,0); opacity: 1; } 60% { transform: translate(-50%,11px); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee {
  direction: ltr;            /* left-anchor the track (page is RTL) */
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--outline);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
/* flat track holds the list 4×; every span carries its own leading gap,
   so -50% (= 2 lists) is an exact whole number of spans → seamless loop.
   direction:ltr anchors the track to the LEFT (in an RTL page it would
   anchor right and slide into empty space); from -50% → 0 = words L→R. */
.marquee-track {
  direction: ltr;
  display: flex; align-items: center;
  width: max-content;
  animation: marquee 90s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track > span {
  flex-shrink: 0;
  margin-inline-start: 38px;
  white-space: nowrap;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 800; color: var(--text);
}
.marquee-track > span.m-star {
  font-size: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- Sections ---------- */
.section { padding: var(--section-py) var(--section-px); }
.section-head { width: var(--container); margin: 0 auto clamp(40px,6vw,64px); text-align: center; }
.section-kicker {
  display: inline-block; padding: 5px 15px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 700; margin-bottom: 14px; letter-spacing: 0.4px;
}
[data-theme="dark"] .section-kicker {
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  color: color-mix(in srgb, var(--brand) 80%, white);
}
.section-title {
  font-size: clamp(26px, 4.6vw, 50px);
  line-height: 1.18; font-weight: 800; letter-spacing: -0.8px;
  margin: 0 0 14px; text-wrap: balance;
}
.section-lede {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--text-muted); max-width: 640px; margin: 0 auto; line-height: 1.8;
}

/* ---------- Bento features ---------- */
.bento {
  width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(186px, auto);
  grid-auto-flow: dense;
  gap: 16px;
}
.bento-lg   { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-lg { grid-column: span 2; grid-row: span 2; }
  .bento-wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-lg, .bento-wide { grid-column: auto; grid-row: auto; }
}

.feature-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  transform-style: preserve-3d;
  overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; inset: -1px;
  background: radial-gradient(240px circle at var(--mx,50%) var(--my,0%), color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%);
  pointer-events: none; opacity: 0;
  transition: opacity .35s var(--ease);
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 32%, var(--outline)); }
.feature-card:hover::before { opacity: 1; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin: 14px 0 6px; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.8; }
.bento-lg h3 { font-size: clamp(20px, 2.4vw, 26px); }
.bento-lg p, .bento-wide p { font-size: 15px; }

.feature-icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand);
  transition: transform .45s var(--ease-back);
}
.feature-card:hover .feature-icon { transform: translateY(-3px) rotate(-7deg) scale(1.06); }
.feature-icon svg { width: 23px; height: 23px; }
.feature-icon-blue     { background: color-mix(in srgb, var(--cat-blue) 18%, transparent); color: var(--cat-blue); }
.feature-icon-violet   { background: color-mix(in srgb, var(--cat-violet) 18%, transparent); color: var(--cat-violet); }
.feature-icon-green    { background: color-mix(in srgb, var(--cat-green) 18%, transparent); color: var(--cat-green); }
.feature-icon-amber    { background: color-mix(in srgb, var(--cat-amber) 20%, transparent); color: var(--cat-amber); }
.feature-icon-coral    { background: color-mix(in srgb, var(--cat-coral) 18%, transparent); color: var(--cat-coral); }
.feature-icon-teal     { background: color-mix(in srgb, var(--cat-teal) 18%, transparent); color: var(--cat-teal); }
.feature-icon-pink     { background: color-mix(in srgb, var(--cat-pink) 20%, transparent); color: var(--cat-pink); }
.feature-icon-graphite { background: color-mix(in srgb, var(--cat-graphite) 20%, transparent); color: var(--cat-graphite); }

/* mini timeline visual (big bento card) */
.mini-tl { position: relative; margin-top: auto; padding-top: 22px; height: 116px; }
.mini-rail {
  position: absolute; inset-inline-end: 10px; top: 22px; bottom: 6px;
  width: 2px; background: var(--outline); border-radius: 2px;
}
.mini-task {
  position: absolute; inset-inline-end: 22px;
  height: 26px; border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--outline);
}
.mini-task::before {
  content: ''; position: absolute; inset-inline-end: -16px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--cat-blue);
}
.mt-1 { top: 22px;  width: 58%; }
.mt-1::before { border-color: var(--cat-green); }
.mt-2 { top: 56px;  width: 78%; }
.mt-2::before { border-color: var(--cat-amber); }
.mt-3 { top: 90px;  width: 46%; }
.mt-3::before { border-color: var(--cat-pink); }
.mini-now {
  position: absolute; inset-inline-end: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cat-coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat-coral) 22%, transparent);
  animation: miniNow 5s var(--ease) infinite;
}
@keyframes miniNow {
  0%, 100% { top: 26px; }
  50%      { top: 92px; }
}

/* mini AI visual (wide bento card) */
.mini-ai { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ai-bubble {
  font-size: 12.5px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 8px 13px;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 6px 16px rgba(91,141,239,0.32);
  align-self: flex-end;
}
.ai-typing {
  display: inline-flex; gap: 4px; align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--outline);
  padding: 9px 12px;
  border-radius: 14px 14px 4px 14px;
}
.ai-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.3s var(--ease) infinite;
}
.ai-typing i:nth-child(2) { animation-delay: .18s; }
.ai-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- Screens showcase ---------- */
.screens-tabs {
  position: relative; width: max-content; max-width: 100%;
  margin: 0 auto 40px;
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-pill); justify-content: center;
}
.tab-indicator {
  position: absolute; top: 0; left: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 22px rgba(91,141,239,0.32);
  opacity: 0;
  transition: transform .42s var(--ease-back), width .42s var(--ease-back), height .42s var(--ease-back), opacity .25s var(--ease);
  pointer-events: none;
}
.screens-tab {
  position: relative; z-index: 1; border: 0;
  padding: 9px 18px;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  background: transparent; border-radius: var(--r-pill);
  transition: color .3s var(--ease);
}
.screens-tab:hover { color: var(--text); }
.screens-tab.is-active { color: #fff; }

.screens-stage {
  width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: minmax(264px, 330px) 1fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
@media (max-width: 760px) { .screens-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.screens-showcase { position: relative; display: grid; place-items: center; }
.screens-glow {
  position: absolute; width: 120%; height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,108,241,0.32), rgba(91,141,239,0.14) 50%, transparent 72%);
  filter: blur(42px); pointer-events: none;
  animation: glowPulse 6.5s var(--ease) infinite alternate;
}

.screens-count {
  display: inline-block;
  font-size: 13px; font-weight: 700; color: var(--brand);
  letter-spacing: 1px; font-variant-numeric: tabular-nums; margin-bottom: 8px;
}
.screens-meta h3 { font-size: clamp(22px, 2.2vw, 30px); margin: 0 0 12px; font-weight: 800; }
.screens-meta p { color: var(--text-muted); font-size: 16px; line-height: 1.9; margin: 0; max-width: 520px; }
@media (max-width: 760px) { .screens-meta p { margin-inline: auto; } }
.screens-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.screens-points li {
  display: flex; align-items: center; gap: 13px;
  font-size: 15px; font-weight: 600; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), transform .3s var(--ease-back), box-shadow .3s var(--ease);
}
.screens-points li:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--outline));
  transform: translateX(-5px);
  box-shadow: var(--shadow-md);
}
.pt-ic {
  display: grid; place-items: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}
.pt-ic svg { width: 13px; height: 13px; }
.screens-cta { margin-top: 24px; }

.screens-thumbs {
  width: var(--container); margin: clamp(38px, 5vw, 60px) auto 0;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.screens-thumbs button {
  padding: 0; width: 62px; aspect-ratio: 9 / 19.5;
  border: 2px solid var(--outline); border-radius: 14px;
  overflow: hidden; background: var(--surface);
  transition: transform .3s var(--ease-back), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.screens-thumbs button:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--brand) 45%, var(--outline)); }
.screens-thumbs button.is-on {
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(91,141,239,0.36);
  transform: translateY(-5px);
}
.screens-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

#screenImg { transition: opacity .4s var(--ease), transform .4s var(--ease); }
#screenImg.is-fading { opacity: 0; transform: scale(1.05) translateY(10px); }
.screens-meta h3, .screens-meta p, .screens-count, .screens-points {
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.screens-meta.is-fading h3,
.screens-meta.is-fading p,
.screens-meta.is-fading .screens-count,
.screens-meta.is-fading .screens-points { opacity: 0; transform: translateY(8px); }

/* ---------- Story ---------- */
.story-inner {
  width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
@media (max-width: 820px) { .story-inner { grid-template-columns: 1fr; } }
.story-text { font-size: 16px; line-height: 1.95; color: var(--text-muted); margin: 0 0 14px; }
.quote {
  position: relative;
  margin: 24px 0 0; padding: 20px 26px;
  border-inline-start: 3px solid var(--brand);
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  font-size: 17px; font-weight: 600; line-height: 1.8; color: var(--text);
}
.quote::before {
  content: '“'; position: absolute; top: -14px; inset-inline-start: 16px;
  font-size: 56px; font-weight: 900; color: var(--brand); opacity: .25; line-height: 1;
}

.story-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat {
  padding: 26px 24px;
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-md); text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-back), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.stat:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 30%, var(--outline)); box-shadow: var(--shadow-md); }
.stat:nth-child(1) { transform: translateY(-14px); }
.stat:nth-child(1):hover { transform: translateY(-20px); }
.stat:nth-child(3) { grid-column: 1 / -1; }
.stat-num {
  font-size: clamp(36px, 4vw, 50px); font-weight: 900; letter-spacing: -2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 8px;
}
.stat-label { color: var(--text-muted); font-size: 14px; }

/* ---------- Download ---------- */
.download-card {
  width: var(--container); margin: 0 auto;
  position: relative; padding: clamp(40px, 6vw, 68px);
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-xl); box-shadow: var(--shadow-md);
  overflow: hidden; text-align: center;
}
.download-glow {
  position: absolute; inset: -1px;
  background:
    radial-gradient(40% 50% at 10% 100%, rgba(91,141,239,0.2), transparent 70%),
    radial-gradient(40% 50% at 90% 0%, rgba(124,108,241,0.24), transparent 70%),
    radial-gradient(30% 40% at 50% 50%, rgba(63,184,181,0.12), transparent 70%);
  pointer-events: none;
  animation: glowPulse 7s var(--ease) infinite alternate;
}
.download-copy { position: relative; }
.download-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 30px 0 14px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 22px 13px 18px; min-width: 210px;
  border-radius: var(--r);
  border: 1px solid var(--outline);
  background: var(--bg); color: var(--text);
  overflow: hidden;
  transition: transform .3s var(--ease-back), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.store-btn:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--outline));
  box-shadow: var(--shadow-md); color: var(--text);
}
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; transition: transform .4s var(--ease-back); }
.store-btn:hover svg { transform: scale(1.12) rotate(-6deg); }
.store-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.store-top { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.store-bot { font-size: 15px; font-weight: 700; }
.store-android { color: var(--cat-green); }
.store-ios { color: var(--text); }
.store-web { color: var(--brand); }
.store-btn .store-meta { color: var(--text); }

/* official store badges (Cafebazaar / Myket) — used as-is, corners baked into the PNG */
.store-badge {
  display: inline-flex; align-items: center;
  transition: transform .3s var(--ease-back), filter .3s var(--ease);
}
.store-badge img { height: 56px; width: auto; display: block; }
.store-badge:hover { transform: translateY(-4px); filter: drop-shadow(0 12px 22px rgba(0,0,0,0.45)); }

.download-note { margin: 14px 0 0; font-size: 13.5px; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-list { width: min(840px, 92vw); margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--r-md); padding: 4px;
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.faq-item:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--outline)); }
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; padding: 18px 22px;
  font-weight: 600; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex-shrink: 0; width: 20px; height: 20px;
  background:
    linear-gradient(currentColor, currentColor) center/12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 12px no-repeat;
  color: var(--text-muted);
  transition: transform .35s var(--ease-back), color .3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(135deg); color: var(--brand); }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--text-muted); line-height: 1.9; }
.faq-item[open] p { animation: faqOpen .4s var(--ease); }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Footer ---------- */
.footer {
  position: relative; overflow: hidden;
  padding: clamp(56px, 8vw, 90px) var(--section-px) 26px;
  border-top: 1px solid var(--outline);
  background: var(--surface);
}
.footer::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 28%, var(--brand-2) 50%, var(--cat-teal) 72%, transparent);
}
.footer-watermark {
  position: absolute; left: 50%; bottom: -0.3em;
  transform: translateX(-50%);
  font-size: clamp(150px, 30vw, 440px);
  font-weight: 900; letter-spacing: -0.05em; line-height: 1;
  white-space: nowrap; pointer-events: none; user-select: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 13%, transparent), transparent 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-inner {
  position: relative; z-index: 1;
  width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr auto;
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 38px; text-align: center; } }

.footer-brand { display: inline-flex; align-items: center; gap: 13px; color: var(--text); }
.footer-brand img { border-radius: 13px; box-shadow: 0 8px 22px rgba(91,141,239,0.34); transition: transform .5s var(--ease-back); }
.footer-brand:hover { color: var(--text); }
.footer-brand:hover img { transform: rotate(-8deg) scale(1.06); }
.footer-brand-text { display: flex; flex-direction: column; text-align: start; }
.footer-name { font-size: 21px; font-weight: 800; }
.footer-tag { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.footer-blurb {
  margin: 18px 0 20px; max-width: 380px;
  color: var(--text-muted); font-size: 14.5px; line-height: 1.95;
}
@media (max-width: 760px) { .footer-blurb { margin-inline: auto; } }
.footer-dl {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(91,141,239,0.4);
  transition: transform .3s var(--ease-back), box-shadow .3s var(--ease);
}
.footer-dl:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 18px 38px rgba(91,141,239,0.5); }
.footer-dl svg { width: 16px; height: 16px; }

.footer-col-title {
  display: block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-nav { display: flex; flex-direction: column; gap: 11px; }
.footer-nav a {
  color: var(--text); font-size: 14.5px; font-weight: 500;
  width: max-content;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
@media (max-width: 760px) { .footer-nav a, .footer-nav { margin-inline: auto; } }
.footer-nav a:hover { color: var(--brand); transform: translateX(-6px); }

.footer-seal a { display: block; width: max-content; }
@media (max-width: 760px) { .footer-seal a { margin-inline: auto; } }
.footer-seal img { border-radius: 10px; max-width: 108px; }

.footer-bottom {
  position: relative; z-index: 1;
  width: var(--container); margin: clamp(40px, 6vw, 64px) auto 0;
  padding-top: 22px; border-top: 1px solid var(--outline);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--text-muted);
}
.back-to-top { color: var(--text-muted); font-weight: 600; }
.back-to-top:hover { color: var(--brand); }

/* ---------- Confetti & sparks ---------- */
.confetti-piece {
  position: fixed; top: 0; left: 0;
  width: 9px; height: 9px;
  pointer-events: none; z-index: 95;
  will-change: transform, opacity;
}
.spark {
  position: fixed; top: 0; left: 0;
  width: 7px; height: 7px; border-radius: 50%;
  pointer-events: none; z-index: 95;
  will-change: transform, opacity;
}

/* ---------- Reveal animations ---------- */
.js .reveal {
  opacity: 0; transform: translateY(32px) scale(.98);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- Hero entrance choreography ---------- */
.js .hero-anim { opacity: 0; transform: translateY(26px); }
.js .hero-loaded .hero-anim { animation: heroIn .9s var(--ease) forwards; }
.js .hero-loaded .hero-anim:nth-child(1) { animation-delay: .05s; }
.js .hero-loaded .hero-anim:nth-child(2) { animation-delay: .15s; }
.js .hero-loaded .hero-anim:nth-child(3) { animation-delay: .25s; }
.js .hero-loaded .hero-anim:nth-child(4) { animation-delay: .35s; }
.js .hero-loaded .hero-anim:nth-child(5) { animation-delay: .45s; }
.js .hero-loaded .hero-stage.hero-anim { animation: stageIn 1.1s var(--ease) .2s forwards; }
@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }
@keyframes stageIn { from { opacity: 0; transform: translateY(40px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal, .js .hero-anim { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  .device-shine, .cursor-glow { display: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px) scale(.96);
  background: var(--text); color: var(--bg);
  padding: 13px 22px; border-radius: var(--r);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .4s var(--ease-back);
  z-index: 100; max-width: 90vw; text-align: center;
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
