/* Homepage. Black and white only, on the tokens in styles.css.
   Motion: one easing, opacity plus short rises, scroll-linked drift where
   the browser supports it. Everything is visible without JS and still for
   prefers-reduced-motion. */

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
  font-weight: 600;
  font-display: swap;
}

:root {
  --band-bg: #0a0a0a;
  --band-fg: #fafafa;
  --band-soft: #a3a3a3;
  --band-line: #262626;
  --band-card: #141414;
}

@media (prefers-color-scheme: dark) {
  :root {
    --band-bg: #161616;
    --band-line: #2c2c2c;
    --band-card: #1e1e1e;
  }
}

h2 {
  margin: 0 0 56px;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
  max-width: 18ch;
  text-wrap: balance;
}

h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  padding: 64px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.badge b {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  font-size: 0.8125rem;
}

.badge:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 7.6vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}

.hero-row {
  display: grid;
  gap: 28px;
  margin-top: 32px;
}

.hero .lead {
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 40ch;
}

@media (min-width: 900px) {
  .hero-row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* The stage: three real screens on a dotted panel, cropped at the bottom. */

.stage {
  position: relative;
  margin-top: 56px;
  height: clamp(360px, 44vw, 580px);
  border-radius: 32px 32px 0 0;
  background: var(--panel);
  overflow: hidden;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 22%, transparent) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(ellipse 70% 90% at 50% 0%, #000 20%, transparent 75%);
  mask: radial-gradient(ellipse 70% 90% at 50% 0%, #000 20%, transparent 75%);
}

.phone {
  position: absolute;
  width: 25%;
  max-width: 300px;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(16px, 2.4vw, 30px);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.18), 0 2px 6px rgb(0 0 0 / 0.06);
}

.phone.center {
  left: 50%;
  top: 11%;
  width: 27%;
  max-width: 324px;
  transform: translateX(-50%);
  z-index: 2;
}

.phone.left {
  left: 12%;
  top: 26%;
  transform: rotate(-5deg);
}

.phone.right {
  right: 12%;
  top: 22%;
  transform: rotate(5deg);
}

.chip-note {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.12);
  font-size: 0.875rem;
  line-height: 1.3;
}

.chip-note b {
  display: block;
  font-weight: 600;
}

.chip-note small {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.chip-note .dot {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--ink);
}

.chip-note.one {
  left: 30%;
  top: 9%;
}

.chip-note.two {
  right: 27%;
  top: 46%;
}

@media (max-width: 760px) {
  .stage {
    height: 400px;
    border-radius: 24px 24px 0 0;
  }

  .phone.left {
    display: none;
  }

  .phone.center {
    left: 7%;
    top: 12%;
    width: 50%;
    transform: none;
  }

  .phone.right {
    right: 5%;
    top: 26%;
    width: 44%;
  }

  .chip-note.one {
    left: 38%;
    top: 5%;
  }

  .chip-note.two {
    display: none;
  }
}

/* Entrance: text rises in order, then the screens, then the notes. */

html.js .hero [data-in] {
  opacity: 0;
  transform: translateY(18px);
}

html.js.ready .hero [data-in] {
  opacity: 1;
  transform: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

html.js .phone img {
  opacity: 0;
  transform: translateY(56px);
}

html.js.ready .phone img {
  opacity: 1;
  transform: none;
  transition: opacity 1000ms var(--ease) 420ms, transform 1100ms var(--ease) 420ms;
}

html.js.ready .phone.left img {
  transition-delay: 540ms;
}

html.js.ready .phone.right img {
  transition-delay: 660ms;
}

html.js .chip-note {
  opacity: 0;
  scale: 0.94;
}

html.js.ready .chip-note {
  opacity: 1;
  scale: 1;
  transition: opacity 600ms var(--ease) 1300ms, scale 600ms var(--ease) 1300ms;
}

html.js.ready .chip-note.two {
  transition-delay: 1550ms;
}

/* Scroll-linked drift: each screen moves at its own pace. */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .phone {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }

    @keyframes drift {
      from {
        translate: 0 calc(var(--d, 20) * 1px);
      }

      to {
        translate: 0 calc(var(--d, 20) * -1.6px);
      }
    }
  }
}

/* ---- Marquee: what ZLO reads and where it sends ---------------------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

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

.marquee-track span {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.marquee-track span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 48px 2px 0;
  border-radius: 50%;
  background: var(--line);
  vertical-align: middle;
}

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

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

/* ---- Flow: a pinned screen that changes as the steps scroll past ------ */

.flow {
  padding: 120px 0 40px;
}

.flow-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.flow-step img {
  display: block;
  width: min(58%, 240px);
  height: auto;
  margin: 0 0 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.1);
}

.flow-step .num {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.flow-step h3 {
  font-size: clamp(1.625rem, 3.2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.flow-step p:last-child {
  margin: 14px 0 0;
  color: var(--ink-soft);
  max-width: 38ch;
}

.flow-phone {
  display: none;
}

@media (min-width: 900px) {
  .flow-grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 80px;
    align-items: start;
  }

  .flow-phone {
    position: sticky;
    top: calc(var(--header) + 32px);
    height: calc(100vh - var(--header) - 64px);
    max-height: 720px;
    display: grid;
    place-items: center;
    border-radius: 32px;
    background: var(--panel);
  }

  .flow-screen {
    position: relative;
    height: 84%;
    aspect-ratio: 540 / 1200;
  }

  .flow-screen img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    border: 1px solid var(--line);
    box-shadow: 0 30px 70px rgb(0 0 0 / 0.16);
    opacity: 0;
    transform: scale(0.97) translateY(10px);
    transition: opacity 500ms var(--ease), transform 700ms var(--ease);
  }

  .flow-screen img.on {
    opacity: 1;
    transform: none;
  }

  .flow-step {
    min-height: 64vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    border-top: 0;
    opacity: 0.28;
    transition: opacity 500ms var(--ease);
  }

  .flow-step.on,
  html:not(.js) .flow-step {
    opacity: 1;
  }

  .flow-step img {
    display: none;
  }
}

/* ---- ZLO AI: the one inverted band on the page ------------------------- */

.ai {
  background: var(--band-bg);
  color: var(--band-fg);
  padding: 120px 0;
  margin-top: 80px;
}

.ai .wrap {
  display: grid;
  gap: 56px;
}

.ai h2 {
  margin-bottom: 20px;
  max-width: 14ch;
}

.ai .intro {
  margin: 0;
  color: var(--band-soft);
  max-width: 42ch;
  font-size: 1.125rem;
}

.ai .points {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--band-line);
}

.ai .points li {
  padding: 14px 0;
  border-bottom: 1px solid var(--band-line);
}

.ai-cards {
  display: grid;
  gap: 16px;
}

.ai-card {
  background: var(--band-card);
  border: 1px solid var(--band-line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.ai-card p {
  margin: 0;
}

.ai-card .label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--band-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.ai-card .said {
  margin: 0 0 14px;
  color: var(--band-soft);
  font-style: italic;
  min-height: 1.6em;
}

.ai-card .said .caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  background: var(--band-soft);
  vertical-align: -0.1em;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.ai-card .out {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.ai-card .muted {
  color: var(--band-soft);
  margin-top: 6px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  padding: 4px 12px;
  border: 1px solid var(--band-line);
  border-radius: 999px;
  font-size: 0.875rem;
}

.chip.solid {
  background: var(--band-fg);
  color: var(--band-bg);
  border-color: var(--band-fg);
  font-weight: 600;
}

html.js .ai-card .chip {
  opacity: 0;
  transform: translateY(6px);
}

html.js .ai-card.done .chip {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms);
}

@media (min-width: 900px) {
  .ai .wrap {
    grid-template-columns: 5fr 6fr;
    gap: 80px;
    align-items: center;
  }

  .ai-cards {
    grid-template-columns: 1fr 1fr;
  }

  .ai-card.wide {
    grid-column: 1 / -1;
  }
}

/* ---- More: five cells, each a different surface ------------------------ */

.more {
  padding: 120px 0 40px;
}

.bento {
  display: grid;
  gap: 16px;
}

.cell {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
}

.cell h3 {
  font-size: 1.5rem;
  line-height: 1.15;
  max-width: 18ch;
}

.cell p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* A soft light follows the pointer across a cell. */
.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--ink) 7%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

@media (hover: hover) {
  .cell:hover::after {
    opacity: 1;
  }
}

.cell.seq {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}

.cell.seq p {
  color: color-mix(in srgb, var(--on-ink) 62%, transparent);
}

.cell.seq::after {
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--on-ink) 12%, transparent), transparent 70%);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 auto;
  padding: 8px 0 40px;
  list-style: none;
}

.timeline li {
  position: relative;
  padding-top: 26px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 1px;
  background: color-mix(in srgb, var(--on-ink) 30%, transparent);
  transform-origin: left;
}

.timeline li.end::before {
  right: auto;
  width: 0;
}

.timeline .node {
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid var(--on-ink);
}

.timeline .end .node {
  background: var(--on-ink);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--on-ink) 18%, transparent);
}

.timeline b {
  display: block;
  font-weight: 600;
}

.timeline small {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--on-ink) 60%, transparent);
}

html.js .cell.seq .timeline li::before {
  transform: scaleX(0);
}

html.js .cell.seq .timeline li {
  opacity: 0;
}

html.js .cell.seq.in .timeline li {
  opacity: 1;
  transition: opacity 500ms var(--ease);
  transition-delay: calc(300ms + var(--n, 0) * 450ms);
}

html.js .cell.seq.in .timeline li::before {
  transform: none;
  transition: transform 700ms var(--ease);
  transition-delay: calc(400ms + var(--n, 0) * 450ms);
}

.timeline li:nth-child(2) {
  --n: 1;
}

.timeline li:nth-child(3) {
  --n: 2;
}

.cell.find {
  background: var(--panel);
  border-color: transparent;
  justify-content: flex-start;
  padding-bottom: 0;
}

.cell.find img {
  display: block;
  width: min(78%, 300px);
  height: 300px;
  object-fit: cover;
  object-position: top;
  margin: 28px auto 0;
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -10px 50px rgb(0 0 0 / 0.14);
  transition: transform 700ms var(--ease);
}

@media (hover: hover) {
  .cell.find:hover img {
    transform: translateY(-10px);
  }
}

.cell.lang {
  background: var(--panel);
  border-color: transparent;
}

.hello {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 auto !important;
  padding-bottom: 28px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: none !important;
}

.hello span:first-child {
  font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  font-size: 3.25rem;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--ink);
  text-align: left;
}

.hello span:last-child {
  font-size: 3.25rem;
  color: color-mix(in srgb, var(--ink) 28%, transparent);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
  margin-bottom: auto;
  padding-bottom: 0;
}

.bars i {
  width: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
}

.bars i:nth-child(1) {
  height: 25%;
  background: var(--ink);
}

.bars i:nth-child(2) {
  height: 50%;
}

.bars i:nth-child(3) {
  height: 75%;
}

.bars i:nth-child(4) {
  height: 100%;
}

.cell.offline .bars {
  margin-bottom: 40px;
}

.cell.yours {
  min-height: 0;
  padding-block: 28px;
}

.cell.yours ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  color: var(--ink-soft);
}

.cell.yours li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
  }

  .cell.seq {
    grid-column: span 7;
  }

  .cell.find {
    grid-column: span 5;
    grid-row: span 2;
  }

  .cell.find img {
    height: auto;
    flex: 1;
    min-height: 0;
    width: min(82%, 340px);
    margin-top: 36px;
  }

  .cell.lang {
    grid-column: span 4;
  }

  .cell.offline {
    grid-column: span 3;
  }

  .cell.yours {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
  }

  .cell.yours ul {
    margin: 0;
    grid-template-columns: repeat(3, auto);
    gap: 40px;
  }

  .cell.yours li {
    padding: 0 0 0 16px;
    border-top: 0;
    border-left: 1px solid var(--line);
    max-width: 22ch;
  }
}

/* ---- Plans ------------------------------------------------------------- */

.plans {
  padding: 120px 0 40px;
}

.plan-rows {
  margin: 0;
  display: grid;
  gap: 40px;
}

.plan-rows div {
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.plan-rows dt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.plan-rows .price {
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.plan-rows .price small {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.plan-rows dd {
  margin: 16px 0 0;
  color: var(--ink-soft);
  max-width: 36ch;
}

.plans-link {
  margin: 40px 0 0;
  color: var(--ink-soft);
}

.plans-link a {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 900px) {
  .plan-rows {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* ---- Availability -------------------------------------------------------- */

.avail {
  padding: 120px 0;
}

.avail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.avail-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.avail-list .state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.avail-list .state i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-soft);
}

.avail-list .state.live {
  color: var(--ink);
}

.avail-list .state.live i {
  background: var(--ink);
  border-color: var(--ink);
}

.avail-list .state.live i::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

.avail-note {
  margin: 24px 0 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html.js .hero [data-in],
  html.js .phone img,
  html.js .chip-note,
  html.js .ai-card .chip,
  html.js .cell.seq .timeline li,
  html.js .cell.seq .timeline li::before {
    opacity: 1 !important;
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
  }

  .marquee-track,
  .ai-card .said .caret,
  .avail-list .state.live i::after {
    animation: none;
  }

  .marquee-track {
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    gap: 8px 32px;
    padding: 0 24px;
  }

  .marquee-track [aria-hidden] {
    display: none;
  }

  .marquee-track span::before {
    margin-right: 32px;
  }

  .flow-screen img,
  .flow-step,
  .cell.find img {
    transition: none;
  }
}
