/* ============================================================
   SALMANBOT — landing (Design C)
   Built on the Design-A motion system (oryzo language):
   chapters flip dark/light, one persistent hero object (the
   robot mascot), everything scrubbed by damped scroll.
   Theme: SalmanBot violet + WhatsApp green.
   ============================================================ */
:root {
  --violet: #8b6fd6;
  --violet-deep: #5a43a8;
  --violet-glow: #a78ef0;
  --violet-ice: #d8ccf7;
  --wa: #25d366;
  --wa-deep: #128c4b;
  --ink: #0e0a1f;          /* dark chapter bg */
  --ink-2: #161029;
  --paper: #f6f4fa;        /* light chapter bg */
  --amber: #f0b429;
  --rose: #e0475f;
  --olive: #6f8f3d;

  /* theme-driven (chrome only) */
  --bg: var(--ink);
  --fg: rgba(246, 244, 250, 0.94);
  --fg-dim: rgba(246, 244, 250, 0.6);
  --hairline: rgba(216, 204, 247, 0.16);

  --font-display: "IBM Plex Sans Arabic", "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --vh: 1vh;
  --accent: var(--violet-glow);
}
html[data-theme="light"] {
  --bg: var(--paper);
  --fg: #141021;
  --fg-dim: rgba(20, 16, 33, 0.62);
  --hairline: rgba(90, 67, 168, 0.18);
}
[dir="ltr"] {
  --font-display: "Space Grotesk", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "Inter", "IBM Plex Sans Arabic", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }
.container { max-width: 1240px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px); }
.container.narrow { max-width: 880px; }

/* ---------- typography ---------- */
.display   { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 6.2rem); line-height: 1.02; letter-spacing: -0.02em; }
.display-2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.9rem); line-height: 1.08; letter-spacing: -0.015em; }
.display-3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.9rem); line-height: 1.12; }
[dir="rtl"] .display, [dir="rtl"] .display-2, [dir="rtl"] .display-3 { letter-spacing: 0; line-height: 1.28; }
.eyebrow { font-size: 0.72rem; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 1.4rem; letter-spacing: 0.14em; }
.body-lg { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--fg-dim); max-width: 56ch; margin-top: 1.4rem; }
.line { display: block; overflow: hidden; padding-block: 0.06em; }
.char, .word { display: inline-block; will-change: transform, opacity; }

/* ============ PRELOADER ============ */
#preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.pre-inner { text-align: center; }
.pre-orb { width: 110px; margin: 0 auto 1.4rem; animation: pre-pulse 1.4s ease-in-out infinite; filter: drop-shadow(0 0 34px rgba(167, 142, 240, 0.55)); }
@keyframes pre-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.pre-count { font-size: 2rem; color: var(--violet-ice); }
.pre-label { font-size: 0.65rem; color: rgba(216, 204, 247, 0.5); margin-top: 0.6rem; letter-spacing: 0.22em; }

/* ============ HEADER ============ */
#site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 3.4vw, 44px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.45s ease, border-color 0.45s ease;
}
#site-header.scrolled { background: rgba(14, 10, 31, 0.82); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom-color: var(--hairline); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-orb { width: 36px; height: 36px; will-change: transform; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; display: flex; flex-direction: column; line-height: 1.2; }
.brand-word em { font-style: normal; font-size: 0.5rem; color: var(--fg-dim); letter-spacing: 0.3em; margin-top: 2px; font-family: var(--font-mono); }
#site-nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
#site-nav a { font-size: 0.86rem; font-weight: 500; opacity: 0.85; transition: opacity 0.18s ease; position: relative; padding-bottom: 4px; }
#site-nav:hover a { opacity: 0.4; }
#site-nav a:hover { opacity: 1; }
#site-nav a::after {
  content: ""; position: absolute; bottom: 0; inset-inline-start: 0;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--violet-glow);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#site-nav a.active { opacity: 1; }
#site-nav a.active::after, #site-nav a:hover::after { transform: scaleX(1); }
.header-right { display: flex; align-items: center; gap: 14px; }
.lang-pill {
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 7px 16px; font-size: 0.78rem;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.lang-pill:hover { background: var(--violet-deep); color: #fff; border-color: var(--violet-deep); }
#nav-blocker {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(14, 10, 31, 0.55);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
body.nav-hover #nav-blocker { opacity: 1; }

#menu-btn { display: none; background: none; border: 1px solid var(--hairline); border-radius: 10px; width: 42px; height: 38px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
#menu-btn span { display: block; width: 16px; height: 2px; background: var(--fg); transition: transform 0.3s ease; }
body.menu-open #menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open #menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
#mobile-menu {
  position: fixed; inset-inline: 0; top: 0; z-index: 190;
  background: var(--bg); border-bottom: 1px solid var(--hairline);
  padding: 96px clamp(20px, 6vw, 44px) 34px;
  display: flex; flex-direction: column; gap: 18px;
  transform: translateY(-100%); visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.66, 0, 0.2, 1), visibility 0s linear 0.45s;
}
body.menu-open #mobile-menu { transform: translateY(0); visibility: visible; transition-delay: 0s; }
#mobile-menu a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
#mobile-menu .mm-lang { color: var(--violet-glow); font-size: 1.1rem; }

/* ============ RAIL + STATUS ============ */
#scroll-rail {
  position: fixed; top: 0; bottom: 0; z-index: 140;
  inset-inline-end: 14px;
  width: 2px; pointer-events: none;
  display: flex; justify-content: center;
}
.rail-line { width: 1px; height: 100%; background: rgba(139, 111, 214, 0.35); }
.rail-dot {
  position: absolute; top: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--violet-glow);
  box-shadow: 0 0 12px var(--violet-glow);
  transform: translateY(10vh);
}
.rail-dot .mono {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-end: 14px;
  font-size: 0.56rem; color: #8d7fbb; white-space: nowrap;
}
#status-bar {
  position: fixed; bottom: 16px; z-index: 140;
  inset-inline-start: clamp(20px, 3.4vw, 44px);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.6rem; color: #8d7fbb; letter-spacing: 0.18em;
  pointer-events: none;
}
#sb-text .ch { opacity: 0.35; transition: opacity 0.12s linear; }
#sb-text .ch.lit { opacity: 1; color: var(--violet-glow); }
.sb-dot, .blink-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wa); display: inline-block;
  animation: dot-blink 1.3s ease-in-out infinite;
}
@keyframes dot-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ============ AMBIENT ============ */
#ambient { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.aurora {
  position: absolute; border-radius: 50%;
  filter: blur(70px); pointer-events: none;
  opacity: 0.5; will-change: transform;
}
.aurora.a1 {
  width: 55vw; height: 55vw; top: -18vw; inset-inline-start: -14vw;
  background: radial-gradient(circle, rgba(139, 111, 214, 0.3), transparent 62%);
  animation: aurora-drift-1 26s ease-in-out infinite alternate;
}
.aurora.a2 {
  width: 44vw; height: 44vw; bottom: -16vw; inset-inline-end: -10vw;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.13), transparent 60%);
  animation: aurora-drift-2 34s ease-in-out infinite alternate;
}
@keyframes aurora-drift-1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(9vw, 7vh) scale(1.25); } }
@keyframes aurora-drift-2 { from { transform: translate(0, 0) scale(1.15); } to { transform: translate(-8vw, -6vh) scale(0.92); } }
#hero, #contact, #stats { overflow: hidden; }

body::after {
  content: ""; position: fixed; inset: -60%;
  z-index: 240; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  animation: grain-jump 0.85s steps(6) infinite;
}
@keyframes grain-jump {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); } 60% { transform: translate(-5%, -2%); }
  80% { transform: translate(4%, 4%); } 100% { transform: translate(0, 0); }
}

/* ============ CURSOR ============ */
@media (hover: hover) and (pointer: fine) {
  #cursor-dot {
    position: fixed; top: 0; left: 0; z-index: 400;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--violet-glow); pointer-events: none;
    transform: translate(-50%, -50%);
  }
  #cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 399;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1.5px solid rgba(167, 142, 240, 0.55);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
  }
  body.cursor-hover #cursor-ring {
    width: 58px; height: 58px;
    background: rgba(167, 142, 240, 0.12);
    border-color: rgba(167, 142, 240, 0.9);
  }
}
@media (hover: none), (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ============ ROBOT LAYER ============ */
#orb-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#orb {
  position: absolute; top: 0; left: 0;
  width: min(44vh, 42vw); aspect-ratio: 830 / 769;
  will-change: transform;
}
.orb-img { width: 100%; height: 100%; user-select: none; will-change: transform; }
.orb-glow {
  position: absolute; inset: -30%;
  background: radial-gradient(circle, rgba(139, 111, 214, 0.3) 0%, rgba(139, 111, 214, 0.07) 42%, transparent 68%);
  border-radius: 50%;
}
#orb-shadow {
  position: absolute; top: 0; left: 0;
  width: min(44vh, 42vw); height: calc(min(44vh, 42vw) * 0.14);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(8, 5, 20, 0.5), transparent 68%);
  will-change: transform, opacity;
}
html[data-theme="light"] #orb-shadow { background: radial-gradient(ellipse at center, rgba(20, 14, 40, 0.28), transparent 68%); }
.orb-chip {
  position: absolute; left: 0; top: 0;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(22, 16, 41, 0.75);
  border: 1px solid rgba(216, 204, 247, 0.28);
  color: var(--violet-ice); font-size: 0.62rem;
  backdrop-filter: blur(6px);
  will-change: transform;
  white-space: nowrap;
}
html[data-theme="light"] .orb-chip { background: rgba(255, 255, 255, 0.85); color: var(--violet-deep); border-color: rgba(90, 67, 168, 0.25); }

/* ============ CHAPTERS (own their colors) ============ */
.chapter { position: relative; }
#page { position: relative; }
.chapter {
  --fg: rgba(246, 244, 250, 0.94);
  --fg-dim: rgba(246, 244, 250, 0.6);
  --hairline: rgba(216, 204, 247, 0.16);
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --shadow: 0 20px 60px rgba(6, 3, 16, 0.55);
  background: var(--ink);
  color: var(--fg);
}
.chapter.light {
  --fg: #141021;
  --fg-dim: rgba(20, 16, 33, 0.62);
  --hairline: rgba(90, 67, 168, 0.18);
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(20, 16, 33, 0.08);
  --shadow: 0 20px 60px rgba(20, 14, 40, 0.14);
  background: var(--paper);
  color: var(--fg);
}
#marquee {
  --fg-dim: rgba(246, 244, 250, 0.6);
  --hairline: rgba(216, 204, 247, 0.16);
  background: var(--ink);
}
.chapter { padding-block: clamp(90px, 14vh, 160px); }
#hero, #scenes, #gallery { padding-block: 0; }

/* HERO — A's zones layout */
#hero {
  min-height: calc(var(--vh) * 100);
  height: calc(var(--vh) * 100);
  position: relative;
}
.hero-top {
  position: absolute; top: 88px; left: 50%; transform: translateX(-50%);
  z-index: 70; white-space: nowrap; margin: 0;
}
.hero-brand {
  position: absolute; top: 9vh; inset-inline-start: clamp(20px, 4vw, 64px);
  z-index: 70; margin: 0;
  font-size: clamp(3.6rem, 12.5vw, 12rem);
  line-height: 0.9; letter-spacing: -0.03em;
}
[dir="rtl"] .hero-brand { letter-spacing: 0; line-height: 1.05; top: 6vh; }
.hero-right {
  position: absolute; top: 41vh; inset-inline-end: clamp(20px, 4vw, 64px);
  width: min(33vw, 460px); z-index: 70; text-align: start;
}
.hero-sub { color: var(--fg-dim); font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.55; margin: 0; }
.hero-ctas { display: flex; gap: 14px; margin-top: 2rem; flex-wrap: wrap; position: relative; z-index: 70; }
.hero-card {
  position: absolute; bottom: 9vh; inset-inline-start: clamp(20px, 4vw, 64px);
  width: min(30vw, 360px); z-index: 70;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 16px; padding: 26px 28px;
}
.hc-head { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; line-height: 1.7; }
.hc-rule { border-top: 1.5px dashed rgba(216, 204, 247, 0.35); margin: 18px 0 14px; }
.hc-sub { font-size: 0.82rem; color: var(--fg-dim); line-height: 1.7; text-align: end; }
.hero-tag {
  position: absolute; bottom: 3.4vh; left: 50%; transform: translateX(-50%);
  font-size: 0.64rem; color: var(--fg-dim); display: flex; align-items: center; gap: 9px;
  z-index: 70; white-space: nowrap;
}
.scroll-cue {
  position: absolute; bottom: 26px; inset-inline-end: clamp(20px, 3.4vw, 44px);
  width: 58px; text-align: center; font-size: 0.55rem; color: var(--fg-dim); z-index: 70;
}
.scroll-cue svg { width: 100%; transform: rotate(-90deg); }
.scroll-cue circle { fill: none; stroke: var(--violet-glow); stroke-width: 1.6; stroke-dasharray: 113; stroke-dashoffset: 113; }
.scroll-cue span { display: block; margin-top: 6px; letter-spacing: 0.3em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative; overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  inset-inline-start: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: inset-inline-start 0.55s ease;
}
.btn:hover::before { inset-inline-start: 130%; }
.btn-solid { background: var(--wa); color: #06220f; box-shadow: 0 10px 34px rgba(37, 211, 102, 0.35); }
.btn-solid:hover { background: #3ee27c; box-shadow: 0 14px 44px rgba(37, 211, 102, 0.5); }
.btn-ghost { border-color: var(--hairline); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--violet-glow); color: var(--violet-glow); }
.chapter.light .btn-ghost:hover { color: var(--violet-deep); border-color: var(--violet-deep); }
.btn-accent { background: var(--accent, var(--violet)); color: #100a22; margin-top: 1.8rem; }
.copied { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--violet-deep); color: #fff; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; font-size: 0.7rem; }
#copy-email.did-copy .copied { opacity: 1; }

/* MARQUEE */
#marquee { overflow: hidden; border-block: 1px solid var(--hairline); padding: 18px 0; position: relative; z-index: 12; direction: ltr; }
.marquee-track { display: flex; width: max-content; white-space: nowrap; font-size: 0.78rem; color: var(--fg-dim); will-change: transform; }

/* layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.tick-list { list-style: none; margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.85rem; }
.tick-list li { padding-inline-start: 30px; position: relative; color: var(--fg-dim); font-size: 0.98rem; }
.tick-list li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
  color: var(--accent, var(--violet-glow)); font-weight: 700;
}

/* problem tiles */
.col-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.eco-tile {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--card-border); box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.eco-tile:hover { transform: translateY(-4px) scale(1.015) !important; }
.eco-tile img { aspect-ratio: 1; object-fit: cover; transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.eco-tile:hover img { transform: scale(1.06); }
.tile-bot { background: linear-gradient(160deg, #2a1f47, #161029); display: flex; align-items: center; justify-content: center; }
.tile-bot .tile-robot { width: 70%; aspect-ratio: 830/769; object-fit: contain; }
.tile-name {
  position: absolute; bottom: 10px; inset-inline-start: 10px;
  background: rgba(14, 10, 31, 0.72); color: #fff; backdrop-filter: blur(8px);
  padding: 6px 12px; border-radius: 999px; font-size: 0.6rem;
}

/* ============ SCENES DECK (pinned) ============ */
#scenes { height: 520vh; }
.deck-sticky { position: sticky; top: 0; height: calc(var(--vh) * 100); overflow: hidden; }
.deck-head { padding-top: 96px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.deck-progress { display: flex; gap: 8px; }
.deck-progress i { width: 44px; height: 3px; border-radius: 3px; background: var(--hairline); position: relative; overflow: hidden; }
.deck-progress i::after {
  content: ""; position: absolute; inset: 0; background: var(--accent, var(--violet-glow));
  transform: scaleX(var(--fill, 0)); transform-origin: left center;
}
[dir="rtl"] .deck-progress i::after { transform-origin: right center; }
.deck-card {
  position: absolute; inset: 0; top: 0;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  padding-top: 60px;
}
.deck-card .col-copy { position: relative; z-index: 3; }
.card-index { color: var(--accent, var(--violet-glow)); font-size: 0.68rem; margin-bottom: 1.2rem; letter-spacing: 0.16em; }
.deck-card .tick-list li::before { color: var(--accent); }
.deck-card .btn-accent { background: var(--accent); }
.col-visual { position: relative; }

/* ============ PHONE / CHAT (the living scenes) ============ */
.phone {
  width: min(400px, 92%); margin-inline: auto;
  background: #0b141a;
  border: 1px solid rgba(216, 204, 247, 0.14);
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(4, 2, 12, 0.7);
}
.ph-head {
  display: flex; align-items: center; gap: 12px;
  background: #17212b; padding: 13px 16px;
}
.ph-head.team { background: #241a3d; }
.ph-avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  background: #2a1f47; flex: none; display: flex; align-items: center; justify-content: center;
}
.ph-avatar img { width: 84%; height: 84%; object-fit: contain; }
.ph-id { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.ph-id b { color: #eef1f6; font-size: 0.86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-id i { font-style: normal; font-size: 0.56rem; color: #25d366; letter-spacing: 0.12em; }
.ph-dots { color: rgba(238, 241, 246, 0.5); font-size: 1.1rem; flex: none; }
.ph-body {
  padding: 18px 14px 14px;
  display: flex; flex-direction: column; gap: 9px;
  min-height: 300px;
  background:
    radial-gradient(circle at 20% 10%, rgba(139, 111, 214, 0.06), transparent 40%),
    #0b141a;
}
.msg {
  max-width: 86%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.82rem; line-height: 1.55; color: #e9edef;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  opacity: 0; transform: translateY(14px) scale(0.94);
  will-change: transform, opacity;
}
.msg.in  { background: #202c33; align-self: flex-start; border-end-start-radius: 4px; }
.msg.out { background: #005c4b; align-self: flex-end; border-end-end-radius: 4px; }
.msg.out.human { background: #4a3b7d; }
.msg.sys { background: none; box-shadow: none; align-self: center; color: rgba(233, 237, 239, 0.5); font-size: 0.58rem; padding: 2px 8px; }
.msg.meta { background: none; box-shadow: none; align-self: flex-end; color: rgba(233, 237, 239, 0.45); font-size: 0.56rem; padding: 0; }
.msg b { color: #fff; }
/* order / handoff cards inside a bubble */
.card-msg { display: flex; flex-direction: column; gap: 5px; }
.card-msg b { font-size: 0.62rem; letter-spacing: 0.14em; color: #8ef0b8; margin-bottom: 3px; }
.handoff-card b { color: #ffb3c1; }
.card-msg span { font-size: 0.78rem; }
.card-msg .cm-total { border-top: 1px dashed rgba(255, 255, 255, 0.25); padding-top: 6px; margin-top: 3px; font-weight: 600; }
.card-msg em { font-style: normal; margin-top: 6px; font-size: 0.74rem; color: #8ef0b8; }
.handoff-card em { color: #ffb3c1; }
/* quick-reply chips */
.msg.chips { background: none; box-shadow: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; max-width: 100%; }
.chip {
  border: 1px solid rgba(37, 211, 102, 0.55); color: #25d366;
  border-radius: 999px; padding: 7px 14px; font-size: 0.72rem;
  background: rgba(37, 211, 102, 0.06);
}
.chip.picked { background: #25d366; color: #06220f; font-weight: 600; }
/* typing dots */
.chat-typing {
  align-self: flex-end; display: flex; gap: 5px;
  background: #005c4b; border-radius: 14px; border-end-end-radius: 4px;
  padding: 12px 14px; opacity: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.chat-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #8ef0b8; display: block;
  animation: typing-bounce 1.1s ease-in-out infinite;
}
.chat-typing i:nth-child(2) { animation-delay: 0.18s; }
.chat-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.ph-input {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #17212b; padding: 11px 16px;
  color: rgba(238, 241, 246, 0.4); font-size: 0.66rem;
}
.ph-send {
  font-style: normal; width: 30px; height: 30px; border-radius: 50%;
  background: var(--wa); color: #06220f;
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
  animation: send-pulse 1.7s ease-out infinite;
}
[dir="rtl"] .ph-send { transform: scaleX(-1); }
@keyframes send-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============ HANDOFF ============ */
#handoff .container { text-align: center; }
#handoff .body-lg { margin-inline: auto; }
.account-card {
  margin: 4rem auto 0; max-width: 720px; text-align: start;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
  backdrop-filter: blur(10px);
}
.account-head { display: flex; align-items: center; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--card-border); background: rgba(90, 67, 168, 0.06); }
#orb-slot {
  width: 74px; height: 74px; border-radius: 50%;
  border: 1.5px dashed rgba(90, 67, 168, 0.45);
  flex: none; position: relative;
}
#orb-slot::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 67, 168, 0.12), transparent 70%);
}
.account-id { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.account-id strong { font-family: var(--font-display); font-size: 1.1rem; }
.account-id .mono { font-size: 0.6rem; color: var(--fg-dim); }
.account-badge { display: flex; align-items: center; gap: 8px; font-size: 0.58rem; color: #0f7a3d; background: rgba(37, 211, 102, 0.12); padding: 8px 14px; border-radius: 999px; }
.account-rows { list-style: none; }
.account-rows li { display: flex; align-items: center; gap: 16px; padding: 15px 26px; border-bottom: 1px solid var(--card-border); font-size: 0.94rem; }
.account-rows li:last-child { border-bottom: 0; }
.row-ico { width: 40px; height: 40px; border-radius: 10px; background: rgba(90, 67, 168, 0.1); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; }
.account-rows span:not(.row-ico) { flex: 1; }
.account-rows .ok { font-size: 0.58rem; color: #0f7a3d; }

/* ============ GALLERY ============ */
#gallery { height: 340vh; }
.gallery-sticky { position: sticky; top: 0; height: calc(var(--vh) * 100); overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 5vh; }
.gallery-head { padding-top: 10vh; }
.g-head-thin { font-weight: 500; color: var(--fg-dim); font-size: 0.62em; letter-spacing: 0.02em; display: block; margin-bottom: 0.1em; }
.gallery-track { display: flex; gap: clamp(18px, 3vw, 40px); padding-inline: clamp(20px, 4vw, 48px); will-change: transform; width: max-content; align-items: flex-start; }
.g-item { flex: none; width: clamp(240px, 26vw, 380px); will-change: transform, opacity; }
.g-item > img { border-radius: 18px; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: top; border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.g-item figcaption { margin-top: 12px; font-size: 0.6rem; color: var(--fg-dim); letter-spacing: 0.18em; }
.g-phone .phone.mini { width: 100%; }
.phone.mini .ph-body { min-height: 0; padding: 14px 12px 12px; }
.phone.mini .msg { opacity: 1; transform: none; font-size: 0.76rem; }

/* ============ STATS ============ */
#stats .container { position: relative; z-index: 70; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 4vw, 60px); margin-top: 3rem; }
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat strong { font-size: clamp(2.4rem, 5.4vw, 4.6rem); color: var(--violet-ice); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.stat .mono { font-size: 0.6rem; color: var(--fg-dim); letter-spacing: 0.2em; }

/* ============ STORY ============ */
#story.olive { background: #f2f0fa; }
#story .eyebrow { color: var(--violet-deep); }
.story-ar { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 2rem); color: var(--violet-deep); margin-top: 2.4rem; }

/* ============ CTA + FOOTER ============ */
#contact { padding-bottom: 0; }
.cta-block { text-align: center; padding-block: 10vh 12vh; position: relative; z-index: 5; }
.cta-block .hero-ctas { justify-content: center; }
#site-footer { border-top: 1px solid var(--hairline); padding-top: 64px; background: var(--ink-2); position: relative; z-index: 5; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); padding-bottom: 48px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-brand p { margin-top: 16px; color: var(--fg-dim); font-size: 0.92rem; }
.foot-brand .mono { font-size: 0.6rem; letter-spacing: 0.2em; }
.foot-col { display: flex; flex-direction: column; gap: 12px; }
.foot-col h4 { font-size: 0.62rem; color: var(--fg-dim); letter-spacing: 0.24em; margin-bottom: 6px; }
.foot-col a { font-size: 0.94rem; opacity: 0.85; transition: opacity 0.18s ease, color 0.18s ease; }
.foot-col a:hover { opacity: 1; color: var(--violet-glow); }
.foot-legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 26px; border-top: 1px solid var(--hairline); font-size: 0.58rem; color: var(--fg-dim); letter-spacing: 0.16em; }

/* ============ A11Y ============ */
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--violet-glow); outline-offset: 3px; border-radius: 6px; }
body.is-loading { overflow: hidden; }
.skip-link {
  position: fixed; top: 10px; inset-inline-start: 10px; z-index: 300;
  background: var(--violet-deep); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  transform: translateY(-300%); transition: transform 0.2s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

/* orb weaves behind copy here */
#problem .container, #story .container { position: relative; z-index: 65; }

/* ============ STATIC MOTION FALLBACK ============ */
html.static-motion #preloader,
html.static-motion #orb-layer,
html.static-motion #ambient,
html.static-motion #cursor-dot,
html.static-motion #cursor-ring { display: none !important; }
html.static-motion body::after { display: none; }
html.static-motion .aurora { animation: none; }
html.static-motion .eco-tile { opacity: 1 !important; transform: none !important; }
html.static-motion #scenes { height: auto; }
html.static-motion .deck-sticky { position: static; height: auto; overflow: visible; }
html.static-motion .deck-card { position: static; opacity: 1 !important; visibility: visible !important; padding: 60px 0; transform: none !important; }
html.static-motion .msg, html.static-motion .chat-typing { opacity: 1 !important; transform: none !important; }
html.static-motion #gallery { height: auto; }
html.static-motion .gallery-sticky { position: static; height: auto; }
html.static-motion .gallery-track { overflow-x: auto; width: auto; }
html.static-motion body.is-loading { overflow: auto; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  #site-nav { display: none; }
  #menu-btn { display: flex; }
  .grid-2 { grid-template-columns: 1fr; gap: 34px; }
  #orb { width: min(34vh, 60vw); }
  #orb-shadow { width: min(34vh, 60vw); height: calc(min(34vh, 60vw) * 0.14); }
  #hero { height: auto; min-height: calc(var(--vh) * 100); display: flex; flex-direction: column; padding: 108px clamp(20px, 6vw, 40px) 96px; gap: 22px; }
  .hero-top { position: static; transform: none; white-space: normal; text-align: start; }
  .hero-brand { position: static; font-size: clamp(3.4rem, 16vw, 6.5rem); }
  .hero-right { position: static; width: 100%; margin-top: 32vh; }
  .hero-card { position: static; width: 100%; margin-top: 8px; }
  .deck-card { overflow-y: auto; padding-bottom: 40px; align-items: flex-start; }
  .deck-card .container { padding-top: 8vh; }
  .col-visual { max-width: 440px; margin-inline: auto; width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 34px; }
  #scroll-rail { display: none; }
  .deck-head { padding-top: 84px; }
  #scenes { height: 560vh; }
  .g-item { width: min(78vw, 340px); }
}
@media (min-width: 961px) and (max-height: 720px) {
  .deck-card .display-3 { font-size: clamp(1.2rem, 2.4vw, 1.8rem); }
  .phone { width: min(340px, 88%); }
  .ph-body { min-height: 240px; }
  .deck-card .tick-list { gap: 0.5rem; }
  .deck-card .tick-list li { font-size: 0.86rem; }
  .hero-brand { font-size: clamp(3.2rem, 10vw, 8rem); }
  .hero-right { top: 38vh; }
  .hero-card { width: min(24vw, 300px); padding: 18px 20px; }
}
@media (max-width: 560px) {
  .col-tiles { grid-template-columns: 1fr 1fr; }
  #status-bar { display: none; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.15s !important; }
}
