/* Homepage, part 2: ZLO AI, the feature grid, plans, availability and the
   closing call to action. See home.css for the rules. */

/* ---- ZLO AI: a tinted panel with three real outputs ---------------------- */

.ai {
  margin-top: 80px;
  padding: 112px 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

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

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

.ai .points {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.ai .points li {
  position: relative;
  padding-left: 22px;
}

.ai .points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--glow-a), var(--glow-c));
}

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

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

.ai-card.glow {
  border: 1.5px solid transparent;
}

.ai-card p {
  margin: 0;
}

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

.ai-card .label span:last-child {
  color: var(--tint);
}

.ai-card .said {
  min-height: 3.2em;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.ai-card .said .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--tint);
  animation: blink 900ms steps(1) infinite;
}

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

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

.ai-card .muted {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

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

.chip {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tint-soft);
  font-size: 0.875rem;
}

.chip.solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

/* The chips arrive once the note has been "heard". */
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: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: center;
  }

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

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

/* ---- More: six 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;
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}

.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 violet light follows the pointer across a cell. */
.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease);
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--glow-a) 26%, transparent), transparent 70%);
}

@media (hover: hover) {
  .cell:hover {
    border-color: var(--glow-a);
  }

  .cell:hover::after {
    opacity: 1;
  }
}

.cell.seq {
  background: linear-gradient(140deg, var(--tint-soft), var(--paper) 70%);
}

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

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

.timeline li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--glow-a), var(--glow-c));
  transform-origin: left;
}

.timeline li.end::before {
  display: none;
}

.timeline .node {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--tint);
  background: var(--paper);
}

.timeline .end .node {
  background: var(--tint);
}

.timeline b {
  display: block;
  font-size: 1.0625rem;
}

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

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);
  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: 32px 32px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  transition: transform 600ms var(--ease);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cell.find:hover img {
    transform: translateY(-10px);
  }
}

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

.hello {
  display: flex;
  flex-direction: column;
  margin: 0 0 auto !important;
  padding-bottom: 32px;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: none !important;
}

.hello span:first-child {
  font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
  color: var(--ink);
}

.hello span:last-child {
  color: var(--tint);
}

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

.bars i {
  width: 12px;
  border-radius: 4px;
  border: 1.5px solid var(--glow-a);
}

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

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

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

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

/* The code is always black on white so it scans in dark mode too. */
.cell.qr {
  gap: 28px;
}

.cell.qr svg {
  flex: none;
  width: 168px;
  height: 168px;
  border-radius: 20px;
  border: 1px solid var(--line);
  order: -1;
}

.cell.yours ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

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

@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;
    object-fit: cover;
  }

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

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

  .cell.qr {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
  }

  .cell.qr svg {
    order: 0;
  }

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

  .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: 16px;
}

.plan-rows div {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease), transform 300ms var(--ease);
}

@media (hover: hover) {
  .plan-rows div:hover {
    border-color: var(--glow-a);
    background: var(--panel);
  }
}

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

.plan-rows .price {
  font-size: clamp(2.75rem, 5vw, 4rem);
  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: 32px 0 0;
  color: var(--ink-soft);
}

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

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

/* ---- 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(--tint);
  border-color: var(--tint);
}

.avail-list .state.live i::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--tint);
  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;
}

/* ---- Closing: the mascot stands on a deep violet panel ------------------- */

.mascot {
  --glow-fill: #0b0a12;
  margin: 56px 0 0;
  border-radius: 28px;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(120% 90% at 50% 30%, #241a52, #0b0a12 70%) padding-box,
    conic-gradient(from var(--glow-angle), var(--glow-a), var(--glow-b), var(--glow-c), var(--glow-a)) border-box;
}

.mascot img {
  display: block;
  width: min(100%, 360px);
  height: auto;
  /* The wings reach the edge of the frame at full spread: fade them out
     instead of cutting them off. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

@media (min-width: 900px) {
  .closing .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: center;
    gap: 64px;
  }

  .mascot {
    margin: 0;
  }
}

/* ---- Reduced motion: nothing moves; fades and colour stay ---------------- */

@media (prefers-reduced-motion: reduce) {
  html.js .hero [data-in] {
    transform: none;
  }

  html.js.ready .hero [data-in] {
    transition: opacity 700ms ease;
    transition-delay: calc(var(--i, 0) * 110ms);
  }

  html.js .ai-card .chip,
  html.js .cell.seq .timeline li::before {
    transform: none;
  }

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

  .avail-list .state.live i::after {
    display: none;
  }
}
