/* ==========================================================================
   SpendCue — support site
   Tokens mirror the app's asset catalog (color.brand.primary, color.bg.*).
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #f6f8f4;
  --bg-deep: #e9f0e8;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --ink: #142a1f;
  --muted: #55665c;
  --faint: #8a988f;
  --line: rgba(20, 42, 31, 0.1);
  --line-strong: rgba(20, 42, 31, 0.18);

  --brand: #246b4f;
  --brand-ink: #1a5039;
  --brand-soft: #e2efe5;
  --on-brand: #ffffff;
  --mint: #7fc792;
  --gold: #c98a1b;
  --blue: #2f6fe4;
  --teal: #1f8f86;
  --flow: linear-gradient(120deg, #2f6fe4 0%, #1f8f86 55%, #1e9e6a 100%);

  --aurora-1: rgba(127, 199, 146, 0.45);
  --aurora-2: rgba(47, 111, 228, 0.18);
  --aurora-3: rgba(227, 169, 59, 0.22);

  --shadow-sm: 0 1px 2px rgba(20, 42, 31, 0.06), 0 2px 8px rgba(20, 42, 31, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 42, 31, 0.04), 0 12px 32px -8px rgba(20, 42, 31, 0.14);
  --shadow-lg: 0 30px 80px -20px rgba(20, 42, 31, 0.32), 0 12px 24px -12px rgba(20, 42, 31, 0.18);

  --radius: 22px;
  --radius-sm: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0b1510;
    --bg-deep: #0f1d16;
    --surface: #13211a;
    --glass: rgba(16, 28, 22, 0.7);
    --ink: #eef5ee;
    --muted: #a7b8ad;
    --faint: #75877b;
    --line: rgba(238, 245, 238, 0.09);
    --line-strong: rgba(238, 245, 238, 0.16);

    --brand: #a0d6ac;
    --brand-ink: #c3e8cb;
    --brand-soft: rgba(160, 214, 172, 0.12);
    --on-brand: #0b1510;
    --mint: #a0d6ac;
    --gold: #efc87c;
    --blue: #7aa6ff;
    --teal: #7accc4;

    --aurora-1: rgba(160, 214, 172, 0.16);
    --aurora-2: rgba(70, 120, 230, 0.16);
    --aurora-3: rgba(239, 200, 124, 0.08);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Arabic", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
}

a {
  color: var(--brand-ink);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  letter-spacing: 0;
  line-height: 1.3;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[dir="rtl"] .flip {
  transform: scaleX(-1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.3s var(--ease-out);
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  width: min(var(--max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Ambient background — drifting aurora + fading grid
   -------------------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.blob.b1 {
  top: -18vmax;
  inset-inline-start: -10vmax;
  background: radial-gradient(circle, var(--aurora-1), transparent 65%);
  animation: drift-a 22s var(--ease-in-out) infinite alternate;
}

.blob.b2 {
  top: -10vmax;
  inset-inline-end: -16vmax;
  background: radial-gradient(circle, var(--aurora-2), transparent 65%);
  animation: drift-b 26s var(--ease-in-out) infinite alternate;
}

.blob.b3 {
  top: 30vh;
  left: 30%;
  width: 34vmax;
  height: 34vmax;
  background: radial-gradient(circle, var(--aurora-3), transparent 65%);
  animation: drift-c 30s var(--ease-in-out) infinite alternate;
}

@keyframes drift-a {
  to { transform: translate3d(12vmax, 8vmax, 0) scale(1.15); }
}

@keyframes drift-b {
  to { transform: translate3d(-10vmax, 14vmax, 0) scale(0.9); }
}

@keyframes drift-c {
  to { transform: translate3d(-14vmax, -6vmax, 0) scale(1.2); }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  view-transition-name: site-header;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.site-header {
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s, -webkit-backdrop-filter 0.4s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background-color: var(--glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  view-transition-name: brand-icon;
  transition: transform 0.5s var(--spring);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav a {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}

.nav a:hover {
  color: var(--ink);
  background: var(--brand-soft);
}

.nav a[aria-current="page"] {
  color: var(--on-brand);
  background: var(--brand);
}

.nav .lang {
  color: var(--brand-ink);
}

/* --------------------------------------------------------------------------
   Buttons & chips
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 11px 20px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--brand) 70%, transparent);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease-out), background 0.3s;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn .icon {
  transition: transform 0.4s var(--spring);
}

.btn:hover .icon.arrow {
  transform: translateX(4px);
}

html[dir="rtl"] .btn:hover .icon.arrow {
  transform: scaleX(-1) translateX(4px);
}

.btn.ghost {
  border-color: var(--line-strong);
  background: var(--glass);
  color: var(--ink);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn.ghost:hover {
  border-color: var(--brand);
  background: var(--surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--brand-ink);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[dir="rtl"] .eyebrow {
  padding: 6px 10px 6px 14px;
  letter-spacing: 0;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 2.2s var(--ease-out) infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(3.2); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Motion primitives
   -------------------------------------------------------------------------- */

/* Load-in: pure CSS so content shows without JS. */
.rise {
  animation: rise 1s var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* Headline word cascade (words are wrapped by site.js). */
.split .w {
  display: inline-block;
  animation: word-in 1.1s var(--ease-out) both;
  animation-delay: calc(var(--i) * 55ms + 120ms);
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.55em) rotate(2deg); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* Scroll reveal: hidden only once JS confirms it can reveal. */
html.js .reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.985);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Gradient text that slowly shifts */
.hl {
  background: linear-gradient(100deg, var(--brand) 0%, var(--blue) 30%, var(--teal) 60%, var(--brand) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: word-in 1.1s var(--ease-out) both, sheen 9s linear infinite;
}

@keyframes sheen {
  to { background-position: -250% 0; }
}

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-block: clamp(32px, 7vw, 88px) clamp(48px, 8vw, 110px);
}

.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.75rem);
  font-weight: 760;
}

html[lang="fr"] .hero h1,
html[lang="es"] .hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.3rem);
}

html[lang="ar"] .hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

html[lang="ar"] .doc-hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

.lede {
  max-width: 600px;
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 30px;
  color: var(--faint);
  font-size: 0.88rem;
  font-weight: 600;
}

.trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-line .icon {
  color: var(--brand);
}

/* Shared keyframes */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes grow {
  from { transform: scaleX(0); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* Floating privacy chips around the device */

.chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.25;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  white-space: nowrap;
  animation:
    chip-in 1s var(--spring) var(--d) both,
    float 6s var(--ease-in-out) calc(var(--d) + 1s) infinite;
}

html[dir="rtl"] .chip {
  padding: 10px 10px 10px 14px;
}

.chip small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.chip .ci {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.chip.c1 { --d: 1.1s; top: 14%; inset-inline-start: -2%; }
.chip.c2 { --d: 1.35s; top: 46%; inset-inline-end: -6%; }
.chip.c3 { --d: 1.6s; bottom: 12%; inset-inline-start: 2%; }

@keyframes chip-in {
  from { opacity: 0; transform: translateY(16px) scale(0.8); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(52px, 7vw, 96px);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 740;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.03rem;
}

.kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[dir="rtl"] .kicker {
  letter-spacing: 0;
}

/* Promise tiles */

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

.promise {
  position: relative;
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.promise h3 {
  margin: 22px 0 8px;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.promise p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.p-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  transition: transform 0.6s var(--spring);
}

.promise:hover .p-icon {
  transform: rotate(-6deg) scale(1.08);
}

.p-icon .icon {
  width: 26px;
  height: 26px;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

html.js .reveal .p-icon .icon {
  stroke-dashoffset: 1;
}

html.js .reveal.in .p-icon .icon {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + 300ms);
}

/* Bento cards with cursor spotlight */

.bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}

.tile {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: clamp(24px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  isolation: isolate;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out), border-color 0.4s;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.tile:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.tile:hover::before {
  opacity: 1;
}

.tile.big {
  grid-row: span 2;
}

.tile .t-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.tile h3 {
  margin: 24px 0 10px;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}

.tile p {
  color: var(--muted);
}

.tile .go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--brand-ink);
  font-weight: 700;
}

.tile .go .icon {
  transition: transform 0.4s var(--spring);
}

.tile:hover .go .icon.arrow {
  transform: translateX(5px);
}

html[dir="rtl"] .tile:hover .go .icon.arrow {
  transform: scaleX(-1) translateX(5px);
}

.toc-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 26px;
  padding: 0;
  list-style: none;
}

.toc-preview li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.4s var(--spring), border-color 0.3s, color 0.3s;
  transition-delay: calc(var(--i, 0) * 30ms);
}

.tile:hover .toc-preview li {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  color: var(--ink);
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.3s var(--spring);
}

.copy-btn:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn .check {
  display: none;
}

.copy-btn.done {
  border-color: var(--brand);
  color: var(--brand-ink);
}

.copy-btn.done .check {
  display: block;
  stroke-dasharray: 1;
  animation: draw 0.5s var(--ease-out) both;
  stroke-dashoffset: 1;
}

.copy-btn.done .copy {
  display: none;
}

/* CTA band */

.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(32px, 6vw, 64px);
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  background: #0f2a1e;
  color: #eef5ee;
  isolation: isolate;
}

.cta::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: conic-gradient(from 90deg at 70% 40%, #246b4f, #2f6fe4, #1e9e6a, #c98a1b, #246b4f);
  filter: blur(70px);
  opacity: 0.55;
  animation: spin 18s linear infinite;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 24, 17, 0.2), rgba(10, 24, 17, 0.55));
}

.cta h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.cta p {
  margin: 14px 0 0;
  color: rgba(238, 245, 238, 0.78);
  font-size: 1.08rem;
}

.cta .btn {
  background: #eef5ee;
  color: #0f2a1e;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   Document pages (privacy, terms)
   -------------------------------------------------------------------------- */

.progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  height: 3px;
  background: var(--flow);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  pointer-events: none;
}

html[dir="rtl"] .progress {
  transform-origin: right;
}

.doc-hero {
  max-width: 880px;
  padding-block: clamp(36px, 7vw, 92px) clamp(32px, 5vw, 56px);
}

.doc-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  font-weight: 760;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.meta-chip .icon {
  color: var(--brand);
}

.glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.glance-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
  transition: transform 0.5s var(--spring), border-color 0.3s;
}

.glance-item:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.glance-item .icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--brand);
}

.doc-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(56px, 8vw, 110px);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.toc-title {
  margin: 0 0 14px;
  padding-inline-start: 18px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[dir="rtl"] .toc-title {
  letter-spacing: 0;
}

.toc-rail {
  position: relative;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-inline-start: 1px solid var(--line);
}

.toc-indicator {
  position: absolute;
  inset-inline-start: -1px;
  top: 0;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--brand);
  transition: transform 0.5s var(--ease-out), height 0.5s var(--ease-out), opacity 0.3s;
}

.toc a {
  display: block;
  padding: 7px 0 7px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.25s, transform 0.4s var(--ease-out);
}

html[dir="rtl"] .toc a {
  padding: 7px 18px 7px 0;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.active {
  color: var(--brand-ink);
  font-weight: 700;
  transform: translateX(4px);
}

html[dir="rtl"] .toc a.active {
  transform: translateX(-4px);
}

.doc {
  counter-reset: sec;
  padding: clamp(26px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.doc section {
  counter-increment: sec;
}

.doc section + section {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.doc h2 {
  margin-bottom: 18px;
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 720;
}

.doc h2::before {
  content: counter(sec, decimal-leading-zero);
  display: inline-block;
  margin-inline-end: 12px;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  vertical-align: 0.3em;
}

.doc h2 .anchor {
  display: inline-block;
  margin-inline-start: 10px;
  color: var(--faint);
  font-size: 0.8em;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.35s var(--ease-out), color 0.2s;
}

.doc h2:hover .anchor,
.doc h2 .anchor:focus-visible {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .doc h2 .anchor {
    display: none;
  }
}

.doc h2 .anchor:hover {
  color: var(--brand);
}

.doc p,
.doc li {
  color: color-mix(in srgb, var(--ink) 86%, var(--muted));
}

.doc ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc li {
  position: relative;
  padding-inline-start: 34px;
}

.doc li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.18em;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23246b4f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

@media (prefers-color-scheme: dark) {
  .doc li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0d6ac' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  }
}

.callout {
  position: relative;
  margin: 26px 0;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  isolation: isolate;
}

.callout::before {
  /* animated gradient hairline */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(110deg, var(--brand), var(--blue), var(--gold), var(--brand));
  background-size: 300% 100%;
  animation: sheen 8s linear infinite;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.callout p {
  margin: 0;
  color: var(--ink);
  font-weight: 550;
}

.callout .btn {
  margin-top: 16px;
  min-height: 44px;
  font-size: 0.95rem;
}

.to-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.35s, transform 0.5s var(--spring), border-color 0.25s;
}

.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Footer & toast
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding-block: 32px 44px;
  color: var(--muted);
  font-size: 0.92rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.foot-links a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--brand-ink);
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.92rem;
  font-weight: 650;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 20px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.5s var(--spring);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* --------------------------------------------------------------------------
   Cross-document view transitions (Chrome 126+, Safari 18.2+)
   -------------------------------------------------------------------------- */

@view-transition {
  navigation: auto;
}

main {
  overflow-x: clip;
  view-transition-name: page;
}

::view-transition-old(page) {
  animation: vt-out 0.28s var(--ease-in-out) both;
}

::view-transition-new(page) {
  animation: vt-in 0.6s var(--ease-out) both;
}

::view-transition-group(brand-icon) {
  animation-duration: 0.5s;
  animation-timing-function: var(--spring);
}

@keyframes vt-out {
  to { opacity: 0; transform: translateY(-14px) scale(0.99); filter: blur(6px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateY(26px); filter: blur(8px); }
}

/* ==========================================================================
   Motion layer — scroll-linked, pointer-reactive and ambient animation
   ========================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes turn {
  to { --angle: 360deg; }
}

/* Film grain keeps large gradients from banding and adds texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Soft light that trails the cursor. */
.aura {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 16%, transparent) 0%, color-mix(in srgb, var(--blue) 6%, transparent) 35%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
  will-change: transform;
}

.aura.on {
  opacity: 1;
}

/* Magnetic pull (JS sets --mx/--my on hover). */
.magnetic {
  translate: var(--tx, 0) var(--ty, 0);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease-out), background 0.3s, translate 0.5s var(--spring);
}

/* 3D tilt using the individual `rotate` property so it never fights reveal transforms. */
.tilt-group {
  perspective: 1100px;
}

.tilt {
  rotate: var(--rax, 0) var(--ray, 1) 0 var(--rang, 0deg);
}

html.js .tilt.reveal {
  transition-property: opacity, transform, rotate, box-shadow, border-color;
  transition-duration: 0.9s, 1s, 0.5s, 0.6s, 0.4s;
  transition-timing-function: var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s, 0s;
}

/* Rotating conic border that lights up on hover. */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0 55%, var(--brand) 70%, var(--blue) 82%, transparent 92%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  animation: turn 3.5s linear infinite paused;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.tile.glow-border::after {
  inset: 0;
}

.glow-border:hover::after,
.glow-border:focus-visible::after {
  opacity: 1;
  animation-play-state: running;
}

/* Section titles: words blur in once revealed. */
html.js [data-words] .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(8px);
  transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out), filter 0.8s var(--ease-out);
  transition-delay: calc(var(--i) * 45ms + 80ms);
}

html.js .in [data-words] .w,
html.js [data-words].in .w {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* --------------------------------------------------------------------------
   Hero: rotating word, live notifications, scroll-linked exit
   -------------------------------------------------------------------------- */

.rotator {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  animation: word-in 1.1s var(--ease-out) both;
  animation-delay: calc(var(--i, 4) * 55ms + 120ms);
}

.rotator {
  transition: width 0.7s var(--ease-out);
}

.rotator .hl {
  grid-area: 1 / 1;
  justify-self: start;
  white-space: nowrap;
  padding-inline-end: 0.04em;
  opacity: 0;
  transform: translateY(70%);
  filter: blur(10px);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), filter 0.6s var(--ease-out);
  animation: sheen 9s linear infinite;
}

.rotator .hl.on {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.rotator .hl.out {
  opacity: 0;
  transform: translateY(-70%);
  filter: blur(10px);
}

.notifs {
  position: absolute;
  top: 6.2%;
  right: 3.5%;
  left: 3.5%;
  z-index: 3;
  height: calc(var(--pw) * 0.215);
}

/* iOS-style banner: icon · [title …… now] / body */
.notif {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: calc(var(--pw) * 0.034);
  padding: 0 calc(var(--pw) * 0.042);
  border-radius: calc(var(--pw) * 0.075);
  background: rgba(250, 252, 249, 0.84);
  color: #101d16;
  box-shadow: 0 10px 30px -8px rgba(16, 29, 22, 0.35);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  font-size: calc(var(--pw) * 0.041);
  line-height: 1.28;
  text-align: start;
  opacity: 0;
  transform: translateY(-120%) scale(0.92);
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--spring);
}

.notif.show {
  opacity: 1;
  transform: none;
}

.notif.hide {
  opacity: 0;
  transform: translateY(-60%) scale(0.96);
  transition: opacity 0.35s, transform 0.45s var(--ease-in-out);
}

.phone-screen .notif img {
  flex: none;
  width: calc(var(--pw) * 0.112);
  height: calc(var(--pw) * 0.112);
  border-radius: 23%;
  object-fit: cover;
}

.notif > div {
  flex: 1;
  min-width: 0;
}

.notif .nt {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.notif b,
.notif small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notif b {
  flex: 1;
  min-width: 0;
  font-weight: 650;
}

.notif small {
  display: block;
  color: #4e5a53;
  font-size: 1em;
}

.notif time {
  flex: none;
  color: #7c8882;
  font-size: 0.86em;
}

@media (prefers-color-scheme: dark) {
  .notif {
    background: rgba(44, 50, 47, 0.86);
    color: #f2f5f2;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  }

  .notif small {
    color: #c3ccc6;
  }

  .notif time {
    color: #95a09a;
  }
}

@supports (animation-timeline: view()) {
  .hero-copy {
    animation: hero-copy-out linear both;
    animation-timeline: view();
    animation-range: exit 10% exit 90%;
  }

  .showcase {
    animation: stage-out linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 100%;
  }

  @keyframes hero-copy-out {
    to { opacity: 0; transform: translateY(-70px); filter: blur(6px); }
  }

  @keyframes stage-out {
    to { opacity: 0.25; transform: translateY(-60px) scale(0.9); }
  }
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  display: grid;
  gap: 12px;
  padding-block: 12px clamp(24px, 4vw, 40px);
  overflow: hidden;
  direction: ltr;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.marquee-track.reverse {
  animation-direction: reverse;
  animation-duration: 56s;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  to { transform: translateX(calc(-50% - 6px)); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.4s var(--spring);
}

.pill:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
}

.pill .icon {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* --------------------------------------------------------------------------
   Scroll-lit manifesto
   -------------------------------------------------------------------------- */

.manifesto {
  max-width: 980px;
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 720;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

html[lang="ar"] .manifesto {
  letter-spacing: 0;
  line-height: 1.45;
}

html.js .manifesto .w {
  opacity: 0.14;
  transition: opacity 0.35s ease, color 0.5s ease;
}

html.js .manifesto .w.lit {
  opacity: 1;
}

.manifesto .key .w.lit,
html:not(.js) .manifesto .key {
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Data-flow diagram
   -------------------------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 1.2fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 0;
  row-gap: 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.node b {
  font-size: 1.05rem;
}

.node small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.node .n-icon {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--brand), var(--teal));
  color: var(--on-brand);
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}

.node .n-icon .icon {
  width: 30px;
  height: 30px;
}

.node .n-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid color-mix(in srgb, var(--brand) 40%, transparent);
  border-radius: 26px;
  animation: ripple 2.6s var(--ease-out) infinite;
}

@keyframes ripple {
  from { transform: scale(0.9); opacity: 1; }
  to { transform: scale(1.35); opacity: 0; }
}

.node.n-phone { grid-column: 1; grid-row: 1; }
.node.cloud { grid-column: 3; grid-row: 1; }

.wire {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  height: 52px;
}

.wire span {
  position: absolute;
  right: -2px;
  left: -2px;
  height: 6px;
  background: radial-gradient(circle, var(--brand) 2.5px, transparent 3px) 0 50% / 20px 6px repeat-x;
  animation: dots 0.9s linear infinite;
}

.wire span:first-child { top: 14px; }

.wire span:last-child {
  bottom: 14px;
  background-image: radial-gradient(circle, var(--blue) 2.5px, transparent 3px);
  animation-direction: reverse;
  animation-duration: 1.1s;
}

.wire em {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-ink);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

@keyframes dots {
  to { background-position-x: 20px; }
}

.drop {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  width: 6px;
  height: 92px;
}

.drop::before {
  content: "";
  position: absolute;
  inset: 0 0 26px;
  background: radial-gradient(circle, var(--faint) 2.5px, transparent 3px) 50% 0 / 6px 18px repeat-y;
  mask-image: linear-gradient(#000 40%, transparent);
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  animation: dots-down 1.2s linear infinite;
}

@keyframes dots-down {
  to { background-position-y: 18px; }
}

.barrier {
  position: absolute;
  bottom: -12px;
  left: 50%;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #d64545;
  color: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, #d64545 18%, transparent);
  transform: translateX(-50%);
  animation: barrier 2.4s var(--ease-in-out) infinite;
}

.barrier .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

@keyframes barrier {
  0%, 100% { box-shadow: 0 0 0 6px color-mix(in srgb, #d64545 18%, transparent); }
  50% { box-shadow: 0 0 0 12px color-mix(in srgb, #d64545 6%, transparent); }
}

.blocked {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.blocked div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--faint);
  font-weight: 650;
}

.blocked .icon {
  width: 22px;
  height: 22px;
}

.blocked span {
  position: relative;
}

.blocked span::after {
  content: "";
  position: absolute;
  top: 52%;
  right: -2px;
  left: -2px;
  height: 2px;
  border-radius: 2px;
  background: #d64545;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 150ms + 500ms);
}

html[dir="rtl"] .blocked span::after {
  transform-origin: right;
}

html:not(.js) .blocked span::after,
.in .blocked span::after {
  transform: scaleX(1);
}

/* Odometer stats */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.stat {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat strong {
  display: flex;
  align-items: flex-end;
  font-size: clamp(2.4rem, 3.8vw, 3.2rem);
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-ink);
}

.stat p {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.odo {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}

.odo-strip {
  display: flex;
  flex-direction: column;
  transform: translateY(-90%);
  transition: transform 2.4s cubic-bezier(0.2, 0.9, 0.15, 1);
  transition-delay: calc(var(--i, 0) * 200ms + 200ms);
}

.odo-strip span {
  height: 1em;
}

html.js .stat.reveal:not(.in) .odo-strip {
  transform: none;
  transition: none;
}

/* --------------------------------------------------------------------------
   Footer wordmark
   -------------------------------------------------------------------------- */

.footer-mark {
  display: block;
  margin: 0 auto -0.18em;
  overflow: hidden;
  font-size: clamp(3.5rem, 13vw, 10rem);
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.06em;
  text-align: center;
  direction: ltr;
  user-select: none;
  pointer-events: none;
}

.footer-mark .l {
  display: inline-block;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 26%, transparent), transparent 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.js .footer-mark .l {
  transform: translateY(70%);
  opacity: 0;
  transition: transform 1.1s var(--ease-out), opacity 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 50ms);
}

html.js .footer-mark.in .l {
  transform: none;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Document heroes: animated illustrations
   -------------------------------------------------------------------------- */

.doc-hero.has-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: none;
}

.art {
  position: relative;
  display: grid;
  width: clamp(240px, 26vw, 340px);
  aspect-ratio: 1;
  place-items: center;
  animation: rise 1.2s var(--ease-out) 0.3s both;
}

/* Privacy: lock core with orbiting services */

.orbit .ring {
  position: absolute;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

.orbit .r1 { inset: 0; animation: spin 60s linear infinite; }
.orbit .r2 { inset: 17%; border-style: solid; border-color: var(--line); animation: spin 40s linear infinite reverse; }
.orbit .r3 { inset: 33%; border: 0; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%); }

.orbit .wave {
  position: absolute;
  width: 30%;
  aspect-ratio: 1;
  border: 1.5px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: 50%;
  animation: wave 4s var(--ease-out) infinite;
}

.orbit .wave:nth-of-type(2) { animation-delay: 1.33s; }
.orbit .wave:nth-of-type(3) { animation-delay: 2.66s; }

@keyframes wave {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(3.3); opacity: 0; }
}

.orbit .core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 30%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 30%;
  background: linear-gradient(145deg, var(--brand), var(--teal));
  color: var(--on-brand);
  box-shadow: 0 20px 50px -14px color-mix(in srgb, var(--brand) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: core 5s var(--ease-in-out) infinite;
}

.orbit .core .icon {
  width: 46%;
  height: 46%;
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease-out) 0.8s forwards;
}

@keyframes core {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-3deg); }
}

.orbit .orbiter {
  position: absolute;
  inset: 0;
  animation: spin 22s linear infinite;
  animation-delay: var(--start, 0s);
}

.orbit .orbiter.inner {
  inset: 17%;
  animation-duration: 16s;
  animation-direction: reverse;
}

.orbit .orbiter > span {
  position: absolute;
  top: -22px;
  left: calc(50% - 22px);
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--brand-ink);
  box-shadow: var(--shadow-md);
  animation: spin 22s linear infinite reverse;
  animation-delay: var(--start, 0s);
}

.orbit .orbiter.inner > span {
  animation-duration: 16s;
  animation-direction: normal;
}

.orbit .orbiter.muted > span {
  color: #d64545;
}

/* Terms: stacked paper with a seal that stamps in */

.paper-art .paper {
  position: absolute;
  inset: 8% 16% 8% 8%;
  padding: 11% 10%;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: rotate(-4deg);
  animation: float 7s var(--ease-in-out) infinite;
}

.paper-art .paper.back {
  inset: 10% 8% 6% 18%;
  box-shadow: var(--shadow-md);
  opacity: 0.7;
  transform: rotate(7deg);
  animation-delay: -2s;
}

.paper-art .paper i {
  display: block;
  width: var(--w, 100%);
  height: 9px;
  margin-bottom: 13px;
  border-radius: 6px;
  background: var(--line-strong);
  transform-origin: left;
  animation: grow 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i) * 110ms + 500ms);
}

html[dir="rtl"] .paper-art .paper i {
  transform-origin: right;
}

.paper-art .paper i.title {
  height: 14px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--brand) 55%, transparent);
}

.paper-art .seal {
  position: absolute;
  inset-inline-end: 2%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  width: 34%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), var(--teal));
  color: var(--on-brand);
  box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--brand) 85%, transparent);
  animation: stamp 0.8s var(--spring) 1.5s both;
}

.paper-art .seal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.paper-art .seal .icon {
  width: 46%;
  height: 46%;
  stroke-width: 2.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.7s var(--ease-out) 2.1s forwards;
}

@keyframes stamp {
  from { opacity: 0; transform: scale(2.2) rotate(-25deg); }
  to { opacity: 1; transform: none; }
}

/* Active section in long documents */

.doc h2::before {
  transition: background 0.4s, color 0.4s, box-shadow 0.5s var(--ease-out);
}

.doc section.is-active h2::before {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 0 0 5px var(--brand-soft);
}

/* Back-to-top doubles as a reading progress ring */

.to-top::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--p, 0) * 360deg), transparent 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
}

/* Motion-layer responsive rules */

@media (max-width: 1020px) {
  .doc-hero.has-art {
    grid-template-columns: minmax(0, 1fr);
  }

  .art {
    justify-self: center;
    width: 260px;
    order: -1;
  }
}

@media (max-width: 860px) {
  .flow {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .node.n-phone { grid-column: 1; grid-row: 1; }
  .wire { grid-column: 1; grid-row: 2; width: 52px; height: 110px; justify-self: center; }
  .node.cloud { grid-column: 1; grid-row: 3; }

  .wire span,
  .wire span:first-child,
  .wire span:last-child {
    top: -2px;
    bottom: -2px;
    right: auto;
    left: 14px;
    width: 6px;
    height: auto;
    background-position: 50% 0;
    background-size: 6px 20px;
    background-repeat: repeat-y;
    animation-name: dots-down-20;
  }

  .wire span:last-child {
    left: auto;
    right: 14px;
  }

  @keyframes dots-down-20 {
    to { background-position-y: 20px; }
  }

  .drop { grid-column: 1; grid-row: 4; margin-top: 18px; }
  .blocked { grid-column: 1; grid-row: 5; grid-template-columns: minmax(0, 1fr); }

  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .doc-hero .art {
    width: 210px;
  }
}

@media (hover: none) {
  .aura {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .showcase,
  .marquee-track {
    animation: none !important;
  }

  .aura {
    display: none;
  }

  html.js .manifesto .w {
    opacity: 1;
  }
}

/* ==========================================================================
   App showcase — real screens, tour, download
   ========================================================================== */

@property --tour-c {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(36, 107, 79, 0.4);
}

/* Header download pill */

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.nav-cta .icon {
  width: 1.05em;
  height: 1.05em;
  stroke-width: 2.2;
}

.header-actions {
  display: flex;
  align-items: center;
}

/* App Store button (custom, not Apple's badge artwork) */

.store-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 20px 7px 7px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  isolation: isolate;
  box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--ink) 80%, transparent);
}

html[dir="rtl"] .store-btn {
  padding: 9px 9px 9px 22px;
}

.store-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--bg) 30%, transparent) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 4.5s var(--ease-in-out) 2s infinite;
}

@keyframes shine {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.store-btn img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg) 18%, transparent);
}

.store-btn small {
  display: block;
  opacity: 0.75;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.1;
}

.store-btn b {
  display: block;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.store-btn .icon {
  width: 22px;
  height: 22px;
  margin-inline-start: 6px;
  stroke-width: 2.2;
  transition: transform 0.4s var(--spring);
}

.store-btn:hover .icon {
  transform: translateY(3px);
}

.store-btn.light {
  background: #f6f8f4;
  color: #0f2a1e;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.55);
}

.store-btn.light::after {
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.9) 50%, transparent 65%);
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.86rem;
  font-weight: 600;
}

.langs span + span::before {
  content: "·";
  margin-inline-end: 6px;
}

/* --------------------------------------------------------------------------
   Phone frame around real screenshots
   -------------------------------------------------------------------------- */

.phone {
  --pw: 280px;
  position: relative;
  width: var(--pw);
  padding: calc(var(--pw) * 0.032);
  border-radius: calc(var(--pw) * 0.165);
  background: linear-gradient(145deg, #34453b, #0b120e 45%, #26342c);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 0 0 4px rgba(0, 0, 0, 0.6);
}

.phone-screen {
  position: relative;
  aspect-ratio: 1320 / 2868;
  overflow: hidden;
  border-radius: calc(var(--pw) * 0.135);
  background: #070a08;
  isolation: isolate;
}

.phone-screen picture {
  display: block;
  height: 100%;
}

.phone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-screen::before {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: 1.45%;
  left: 50%;
  z-index: 5;
  width: 31%;
  height: 3.4%;
  border-radius: 999px;
  background: #030504;
  transform: translateX(-50%);
}

.phone-screen::after {
  /* glass glare */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0%, transparent 26%, transparent 72%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Hero showcase: three phones fan out
   -------------------------------------------------------------------------- */

.showcase {
  --px: 0;
  --py: 0;
  position: relative;
  display: grid;
  min-height: clamp(520px, 44vw, 600px);
  place-items: center;
  perspective: 1600px;
}

.showcase::before {
  content: "";
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--aurora-1), var(--aurora-2), var(--aurora-3), var(--aurora-1));
  filter: blur(60px);
  animation: spin 26s linear infinite;
}

.fan {
  --pw: clamp(200px, 16.5vw, 246px);
  position: relative;
  width: var(--pw);
  transform: rotateY(calc(var(--px) * 12deg)) rotateX(calc(var(--py) * -8deg));
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-out);
}

.fan .phone {
  --pw: inherit;
}

.fan .p-side {
  position: absolute;
  top: 0;
  left: 0;
  filter: saturate(0.9);
}

.fan .p-left {
  transform: translateX(-56%) translateZ(-160px) rotateY(24deg) rotateZ(-3deg);
  animation: fan-left 1.5s var(--ease-out) 0.55s both;
}

.fan .p-right {
  transform: translateX(56%) translateZ(-160px) rotateY(-24deg) rotateZ(3deg);
  animation: fan-right 1.5s var(--ease-out) 0.55s both;
}

.fan .p-center {
  transform: translateZ(40px);
  animation: center-in 1.3s var(--ease-out) 0.2s both;
}

@keyframes fan-left {
  from { opacity: 0; transform: translateX(0) translateZ(-160px) rotateY(0) rotateZ(0); }
}

@keyframes fan-right {
  from { opacity: 0; transform: translateX(0) translateZ(-160px) rotateY(0) rotateZ(0); }
}

@keyframes center-in {
  from { opacity: 0; transform: translateY(80px) translateZ(40px) scale(0.92); filter: blur(10px); }
  to { opacity: 1; transform: translateZ(40px); filter: none; }
}

.fan-float {
  position: relative;
  animation: float 8s var(--ease-in-out) 1.8s infinite;
  transform-style: preserve-3d;
}

/* iOS-style home screen widget */

.widget {
  display: grid;
  align-content: space-between;
  width: 140px;
  aspect-ratio: 1;
  padding: 16px;
  border-radius: 34px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(160, 214, 172, 0.35), transparent 55%),
    linear-gradient(155deg, #1f6a4b, #0f3626);
  color: #fff;
  box-shadow: 0 24px 50px -18px rgba(8, 30, 20, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-align: start;
}

.widget .ring {
  width: 54px;
  height: 54px;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}

.ring .track { stroke: rgba(255, 255, 255, 0.16); }

.ring .bar {
  stroke: #a6e5bb;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: ring-fill 2s var(--ease-out) 1.6s forwards;
}

@keyframes ring-fill {
  to { stroke-dashoffset: var(--to, 28); }
}

.widget b {
  display: block;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.widget small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.showcase .widget {
  position: absolute;
  bottom: 9%;
  inset-inline-start: -2%;
  z-index: 4;
  animation:
    chip-in 1s var(--spring) 1.5s both,
    float 7s var(--ease-in-out) 2.5s infinite;
}

.showcase .chip.c1 {
  --d: 1.8s;
  top: 38%;
  inset-inline-start: auto;
  inset-inline-end: -4%;
}

/* --------------------------------------------------------------------------
   Feature tour: sticky phone, screens wipe between steps
   -------------------------------------------------------------------------- */

.tour {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 96px);
}

.tour-steps {
  position: relative;
  padding-inline-start: 34px;
}

.tour-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.tour-rail::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(var(--brand), var(--blue));
  transform: scaleY(var(--tp, 0));
  transform-origin: top;
}

.step {
  display: flex;
  min-height: 68vh;
  flex-direction: column;
  justify-content: center;
  opacity: 0.25;
  transition: opacity 0.6s var(--ease-out);
}

html:not(.js) .step,
.step.active {
  opacity: 1;
}

.step-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--brand-ink);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

.step-num::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-inline-start: -41px;
  margin-inline-end: 17px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}

.step.active .step-num::before {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 6px var(--brand-soft);
}

.step h3 {
  max-width: 520px;
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 750;
}

.step p {
  max-width: 460px;
  color: var(--muted);
  font-size: 1.02rem;
}

.step ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.step li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.step-shot {
  display: none;
}

.tour-stage {
  position: sticky;
  top: var(--header-h);
  display: grid;
  height: calc(100vh - var(--header-h));
  min-height: 600px;
  place-items: center;
}

.tour-glow {
  position: absolute;
  width: min(560px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tour-c), transparent 64%);
  filter: blur(10px);
  transition: --tour-c 1s var(--ease-out);
}

.tour[data-step="1"] { --tour-c: rgba(36, 107, 79, 0.42); }
.tour[data-step="2"] { --tour-c: rgba(31, 143, 134, 0.42); }
.tour[data-step="3"] { --tour-c: rgba(47, 111, 228, 0.36); }
.tour[data-step="4"] { --tour-c: rgba(229, 120, 52, 0.34); }
.tour[data-step="5"] { --tour-c: rgba(201, 138, 27, 0.36); }
.tour[data-step="6"] { --tour-c: rgba(36, 107, 79, 0.42); }

.tour-count {
  position: absolute;
  top: 8%;
  inset-inline-end: 4%;
  color: var(--faint);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9rem;
  font-weight: 700;
}

.tour-count b {
  display: inline-block;
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1;
}

.tour-count b.tick {
  animation: tick 0.5s var(--ease-out);
}

@keyframes tick {
  from { opacity: 0; transform: translateY(40%); }
}

.tour-phone {
  --pw: clamp(220px, 18vw, 262px);
}

.shot {
  position: absolute;
  inset: 0;
  z-index: var(--z);
  clip-path: inset(100% 0 0 0);
  transition:
    clip-path 0.95s var(--ease-out),
    transform 0.95s var(--ease-out),
    filter 0.95s var(--ease-out);
}

.shot.past {
  clip-path: inset(0 0 0 0);
  transform: scale(0.9) translateY(-2%);
  filter: brightness(0.55) blur(3px);
}

.shot.active,
html:not(.js) .shot:first-child {
  clip-path: inset(0 0 0 0);
  transform: none;
  filter: none;
}

/* --------------------------------------------------------------------------
   Daily guide spotlight
   -------------------------------------------------------------------------- */

.daily {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.ring-hero {
  position: relative;
  display: grid;
  width: min(320px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  place-items: center;
}

.ring-hero::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%);
  filter: blur(20px);
}

.ring-hero svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ring-hero circle {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

.ring-hero .track {
  stroke: var(--line);
}

.ring-hero .bar {
  stroke: url(#ringGrad);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 2.4s var(--ease-out) 0.3s;
}

html:not(.js) .ring-hero .bar,
.in .ring-hero .bar,
.ring-hero.in .bar {
  stroke-dashoffset: 4;
}

.ring-hero .tick-marks {
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-dasharray: 0.4 2.9;
}

.ring-center {
  position: relative;
  text-align: center;
}

.ring-center small {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.ring-center strong {
  display: block;
  margin: 4px 0;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ring-center .pill-mini {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 28px 0 10px;
}

.eq-tile {
  flex: 1 1 120px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.eq-tile b {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.eq-tile small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.eq-tile.result {
  border-color: transparent;
  background: linear-gradient(145deg, var(--brand), var(--teal));
  color: var(--on-brand);
}

.eq-tile.result small {
  color: inherit;
  opacity: 0.8;
}

.eq-op {
  color: var(--faint);
  font-size: 1.6rem;
  font-weight: 300;
}

html.js .equation > * {
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  transition: opacity 0.6s var(--ease-out), transform 0.7s var(--spring);
  transition-delay: calc(var(--i, 0) * 160ms + 200ms);
}

html.js .in .equation > * {
  opacity: 1;
  transform: none;
}

.footnote {
  color: var(--faint);
  font-size: 0.88rem;
}

.daily h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 740;
}

/* Widgets row */

.widgets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.lock {
  position: relative;
  flex: 1 1 280px;
  max-width: 340px;
  padding: 20px 22px 22px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(90% 70% at 20% 0%, rgba(47, 111, 228, 0.45), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, rgba(30, 158, 106, 0.5), transparent 60%),
    #0b1510;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.lock .date {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.85;
}

.lock .time {
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  direction: ltr;
}

.lock-widgets {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.lw-circle {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.lw-circle .ring {
  position: absolute;
  inset: 4px;
  width: auto;
  height: auto;
  transform: rotate(-90deg);
}

.lw-circle .ring circle {
  stroke-width: 6;
}

.lw-circle .ring .bar {
  stroke: #fff;
}

.lw-circle span {
  font-size: 0.8rem;
  font-weight: 800;
}

.lw-rect {
  display: grid;
  align-content: center;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  text-align: start;
  backdrop-filter: blur(10px);
}

.lw-rect small {
  font-size: 0.7rem;
  font-weight: 650;
  opacity: 0.8;
}

.lw-rect b {
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Free & Premium
   -------------------------------------------------------------------------- */

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

.plan {
  position: relative;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.plan h3 {
  font-size: 1.35rem;
}

.plan .plan-sub {
  margin: 8px 0 22px;
  color: var(--muted);
}

.plan ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 550;
}

.plan li .icon {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  stroke-width: 2.6;
}

.plan.premium {
  border-color: transparent;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-md);
}

.plan.premium::after {
  opacity: 1;
  animation-play-state: running;
  background: conic-gradient(from var(--angle), var(--gold), var(--brand), var(--blue), var(--gold));
}

.plan .tag {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[dir="rtl"] .plan .tag {
  letter-spacing: 0;
}

.plans-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 0.9rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Final download panel
   -------------------------------------------------------------------------- */

.download {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(32px, 6vw, 72px);
  overflow: hidden;
  border-radius: calc(var(--radius) + 12px);
  background: #0d2419;
  color: #eef5ee;
  isolation: isolate;
}

.download::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: conic-gradient(from 120deg at 30% 50%, #246b4f, #2f6fe4, #1e9e6a, #c98a1b, #246b4f);
  filter: blur(80px);
  opacity: 0.5;
  animation: spin 22s linear infinite;
}

.download::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, rgba(8, 22, 15, 0.15), rgba(8, 22, 15, 0.55));
}

.download h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 780;
}

.download p {
  margin: 12px 0 24px;
  color: rgba(238, 245, 238, 0.78);
  font-size: 1.03rem;
}

.download .langs {
  color: rgba(238, 245, 238, 0.6);
}

.big-icon {
  position: relative;
  width: clamp(110px, 11vw, 150px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 23%;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
  animation: float 6s var(--ease-in-out) infinite;
}

.big-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.big-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 62%);
  transform: translateX(-130%);
  animation: shine 5s var(--ease-in-out) 1s infinite;
}

.qr {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background: #fff;
  color: #0d2419;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.qr svg {
  width: 132px;
  height: 132px;
}

.qr small {
  max-width: 150px;
  color: #55665c;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

/* Scan line sweeping the QR */
.qr .scan {
  position: relative;
  display: block;
  overflow: hidden;
}

.qr .scan::after {
  content: "";
  position: absolute;
  right: -6px;
  left: -6px;
  height: 26%;
  background: linear-gradient(180deg, transparent, rgba(30, 158, 106, 0.35), transparent);
  animation: scan 2.8s var(--ease-in-out) infinite;
}

@keyframes scan {
  0% { top: -30%; }
  100% { top: 105%; }
}

/* --------------------------------------------------------------------------
   Sticky "GET" bar
   -------------------------------------------------------------------------- */

.getbar {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(440px, calc(100% - 24px));
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--shadow-lg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  opacity: 0;
  transform: translate(-50%, 140%);
  pointer-events: none;
  transition: transform 0.6s var(--spring), opacity 0.4s;
}

.getbar.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.getbar img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.getbar div {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.getbar b {
  display: block;
  font-size: 0.98rem;
}

.getbar small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.get-pill {
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.3s var(--spring);
}

.get-pill:active {
  transform: scale(0.94);
}

/* Showcase responsive */

@media (max-width: 1020px) {
  .showcase {
    min-height: 600px;
  }

  .hero .langs {
    justify-content: center;
  }

  .daily {
    grid-template-columns: minmax(0, 1fr);
  }

  .download {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .download .big-icon {
    display: none;
  }
}

@media (max-width: 900px) {
  .tour {
    grid-template-columns: minmax(0, 1fr);
  }

  .tour-stage,
  .tour-rail {
    display: none;
  }

  .tour-steps {
    padding-inline-start: 0;
  }

  .step {
    min-height: 0;
    padding-block: 36px;
    opacity: 1;
    text-align: center;
    align-items: center;
  }

  .step-num::before {
    display: none;
  }

  .step ul {
    justify-content: center;
  }

  .step-shot {
    display: block;
    margin-top: 28px;
  }

  .step-shot .phone {
    --pw: 230px;
    margin-inline: auto;
  }

  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .download {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .download .langs {
    justify-content: center;
  }

  .download .qr {
    display: none;
  }

  .nav .nav-features {
    display: none;
  }
}

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

  .showcase {
    min-height: 520px;
  }

  .fan {
    --pw: 200px;
  }

  .fan .p-left { transform: translateX(-44%) translateZ(-160px) rotateY(24deg) rotateZ(-3deg); }
  .fan .p-right { transform: translateX(44%) translateZ(-160px) rotateY(-24deg) rotateZ(3deg); }

  .showcase .widget {
    width: 108px;
    padding: 11px;
    border-radius: 24px;
    inset-inline-start: 0;
    bottom: 6%;
  }

  .showcase .widget .ring {
    width: 34px;
    height: 34px;
  }

  .showcase .widget b {
    font-size: 1rem;
  }

  .showcase .widget small {
    font-size: 0.62rem;
  }

  .showcase .chip.c1 {
    display: none;
  }

  .store-btn {
    width: 100%;
    justify-content: center;
  }

  .equation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .eq-tile.result {
    grid-column: 1 / -1;
  }

  .equation .eq-op.eq {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shot {
    transition: none;
  }

  .getbar {
    transition: none;
  }
}


/* Language menu */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--brand-ink);
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  transition: background 0.25s;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  background: var(--brand-soft);
}

.lang-menu summary .icon {
  width: 1.1em;
  height: 1.1em;
}

.lang-pop {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: -4px;
  z-index: 60;
  display: grid;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: pop-in 0.35s var(--spring);
}

html[dir="rtl"] .lang-pop {
  transform-origin: top left;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.92); }
}

.lang-pop a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: start;
}

.lang-pop a:hover {
  background: var(--brand-soft);
}

.lang-pop .tick {
  width: 1.1em;
  height: 1.1em;
  color: var(--brand);
  opacity: 0;
}

.lang-pop a[aria-current] .tick {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero .lede {
    margin-inline: auto;
  }

  .hero .actions,
  .hero .trust-line {
    justify-content: center;
  }

  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile.big {
    grid-row: auto;
  }

  .cta {
    grid-template-columns: 1fr;
  }

  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    min-width: 0;
  }

  /* TOC becomes a sticky, horizontally scrolling chip rail */
  .toc {
    top: var(--header-h);
    z-index: 20;
    margin-inline: calc(var(--gutter) * -1);
    padding: 10px var(--gutter);
    background: var(--glass);
    border-block: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
  }

  .toc-title,
  .toc-indicator {
    display: none;
  }

  .toc ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border: 0;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .toc ol::-webkit-scrollbar {
    display: none;
  }

  .toc li {
    flex: none;
    scroll-snap-align: start;
  }

  .toc a,
  html[dir="rtl"] .toc a {
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .toc a.active,
  html[dir="rtl"] .toc a.active {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--on-brand);
    transform: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .brand span {
    display: none;
  }

  .nav a {
    padding: 7px 11px;
    font-size: 0.86rem;
  }

  .chip {
    padding: 8px 12px 8px 8px;
    font-size: 0.78rem;
  }

  .chip small {
    display: none;
  }

  .chip .ci {
    width: 28px;
    height: 28px;
  }

  .chip.c1 { inset-inline-start: 0; }
  .chip.c2 { inset-inline-end: 0; }
  .chip.c3 { inset-inline-start: 4%; }

  .promises,
  .glance {
    grid-template-columns: 1fr;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .doc {
    border-radius: var(--radius);
  }
}


/* Narrow phones: keep the header on one line */
@media (max-width: 420px) {
  .nav {
    gap: 0;
  }

  .nav a,
  .lang-menu summary {
    padding: 6px 9px;
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .nav a[href$="terms/"] {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: keep the polish, drop the movement.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .blob,
  .showcase::before,
  .cta::before {
    animation: none !important;
  }

  @view-transition {
    navigation: none;
  }
}
