/* asiai.online. ASI brand: violet, blue and cyan on deep ink (dark) or cool paper (light).
   Sora for Latin headlines, Readex Pro for body text and for everything Arabic. */

:root {
  --violet: #7c5cff;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --brand: linear-gradient(120deg, #7c5cff 0%, #4f7bff 50%, #22d3ee 100%);
  --display: "Sora", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 10px;
  --page: min(1200px, 100% - 40px);
  --bar: 68px;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  /* Charcoal with a faint violet cast: softer than black, not navy */
  --bg: #15151c;
  --bg-2: #1a1a22;
  --surface: #1f1f29;
  --surface-2: #292934;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f3f8;
  --muted: #a3a3b5;
  --accent: #ab9cff;
  --accent-2: #5fe3f5;
  --on-accent: #ffffff;
  --logo-text: #f3f3f8;
  --button: #6d4dff;
  --button-hover: #5b3ff0;
  --shadow: 0 16px 36px -24px rgba(0, 0, 0, 0.6);
  --ok: #4ade80;
  --error: #fb7185;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fc;
  --bg-2: #eaeef9;
  --surface: #ffffff;
  --surface-2: #eef1fa;
  --line: rgba(25, 35, 80, 0.12);
  --line-strong: rgba(25, 35, 80, 0.24);
  --text: #0c1330;
  --muted: #535e80;
  --accent: #5a3ee6;
  --accent-2: #0b7f95;
  --on-accent: #ffffff;
  --logo-text: #2c3150;
  --button: #5a3ee6;
  --button-hover: #4a2fd4;
  --shadow: 0 24px 50px -30px rgba(20, 30, 80, 0.35);
  --ok: #15803d;
  --error: #be123c;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

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

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--button);
  color: var(--on-accent);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: var(--body); letter-spacing: 0; }
p { margin: 0; }

.section-title {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  max-width: 20ch;
  text-wrap: balance;
}
html[lang="ar"] .section-title { line-height: 1.3; font-weight: 700; }

.section-sub,
.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 60ch;
}
.lead { color: var(--text); font-size: 20px; line-height: 1.65; }

/* ---------- Buttons and small tools ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:disabled { opacity: 0.65; cursor: progress; }
.button-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.button-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}
.tool[lang="ar"] { font-family: var(--body); }
/* Same width in both languages, so switching never moves the rest of the bar */
[data-lang-toggle] { min-width: 84px; }
#main:focus { outline: none; }
.tool-icon { padding: 0; width: 40px; }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--bar);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.topbar.is-scrolled,
.topbar.menu-open {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.topbar-inner {
  width: var(--page);
  height: 100%;
  margin: 0 auto;
  /* Logo on one side, actions on the other, the page links centred between them */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.topbar-inner > .brand { justify-self: start; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}
/* The logo: a plain violet badge with the A mark, and "ASI" set as real text (Unbounded), which the
   browser draws sharp at any size and distance */
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: #5b45e0;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name {
  font-family: "Unbounded", "Sora", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--logo-text);
}

.nav {
  position: relative;
  isolation: isolate;
  display: flex;
  gap: 4px;
}
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.nav a { position: relative; transition: color 0.3s ease; }
.nav a:hover { color: var(--text); }
/* A pill that glides to the current page (site.js sets --x and --w), and a soft one that follows the pointer */
.nav::before,
.nav::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  pointer-events: none;
}
.nav::before {
  width: var(--w, 0);
  transform: translateX(var(--x, 0));
  background: var(--brand);
  box-shadow: 0 3px 10px -5px rgba(110, 90, 255, 0.45);
  opacity: var(--on, 0);
}
.nav::after {
  width: var(--hw, 0);
  transform: translateX(var(--hx, 0));
  background: var(--surface-2);
  opacity: 0;
  transition: opacity 0.25s ease;
}
/* The pointer's pill sits under the current page's pill, never over it */
.nav::after { z-index: -2; }
.nav.is-hovering::after { opacity: 1; }
.nav[data-slid]::before {
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.nav[data-slid]::after { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease; }

.tools { display: flex; align-items: center; gap: 8px; grid-column: 3; justify-self: end; }
.menu-button { display: none; }

@media (max-width: 1080px) {
  .nav {
    position: absolute;
    top: var(--bar);
    inset-inline: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--bg);
    box-shadow: 0 1px 0 var(--line), var(--shadow);
    display: none;
  }
  .menu-open .nav { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; font-size: 18px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav a:hover { background: transparent; }
  .menu-button { display: inline-flex; }
}

@media (max-width: 560px) {
  .cta { display: none; }
  .topbar-inner { gap: 12px; }
}

/* ---------- Hero: the poster wall ---------- */

.hero {
  width: var(--page);
  margin: 0 auto;
  min-height: calc(100svh - var(--bar));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 24px 0 64px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.hero-title {
  font-size: clamp(44px, 6.6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}

/* The changing last word: all words share one grid cell (so the line never jumps), one shows at a time */
.rotator {
  display: grid;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.rot-word {
  grid-area: 1 / 1;
  justify-self: start;
  white-space: nowrap;
  background: linear-gradient(100deg, #8b5cf6, #4f6bff 35%, #22d3ee 60%, #8b5cf6);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flow 6s linear infinite;
  opacity: 0;
  transform: translateY(105%) rotateX(-50deg);
  filter: blur(6px);
  transition: transform 0.7s cubic-bezier(0.22, 1.2, 0.36, 1), opacity 0.5s ease, filter 0.6s ease;
}
.rot-word.is-on { opacity: 1; transform: none; filter: none; }
.rot-word.is-off { opacity: 0; transform: translateY(-105%) rotateX(50deg); filter: blur(6px); }
/* The headline's words rise in like the section titles, the changing word last */
.hero-title.reveal .rotator {
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.7s ease calc(var(--i) * 80ms), transform 0.9s cubic-bezier(0.22, 1.4, 0.36, 1) calc(var(--i) * 80ms);
}
.hero-title.reveal.is-in .rotator { opacity: 1; transform: none; }
html[lang="ar"] .hero-title { line-height: 1.2; font-weight: 700; letter-spacing: 0; }

.hero-sub {
  margin-top: 24px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 19px;
}

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


.wall {
  position: relative;
  height: min(680px, calc(100svh - var(--bar) - 60px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-14deg) rotateZ(4deg);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
}
html[dir="rtl"] .wall { transform: perspective(1400px) rotateY(14deg) rotateZ(-4deg); }

.wall-col { overflow: hidden; }
.wall-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: drift 70s linear infinite;
}
.wall-col-2 .wall-track { animation-direction: reverse; animation-duration: 84s; }
.wall-col-3 .wall-track { animation-duration: 62s; }
.wall-tile {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* The track holds two copies of its posters, so moving it up by half loops without a seam */
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-50% - 7px)); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; }
  .wall { height: 360px; transform: none; order: 2; }
  html[dir="rtl"] .wall { transform: none; }
}

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

.section {
  width: var(--page);
  margin: 0 auto;
  padding: 104px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: 52px;
}
@media (max-width: 800px) {
  .section { padding: 72px 0; }
  .section-head { grid-template-columns: 1fr; margin-bottom: 36px; }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px 64px;
}
.points { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; }
.points li {
  position: relative;
  padding-inline-start: 36px;
  color: var(--muted);
}
.points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.32em;
  width: 18px;
  height: 18px;
  /* the ASI chevron, small */
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M18 100 60 18l42 82' fill='none' stroke='%23000' stroke-width='20' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M18 100 60 18l42 82' fill='none' stroke='%23000' stroke-width='20' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

/* Services: a list, not a wall of cards */
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 48px;
}
@media (max-width: 1100px) { .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.service {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.service-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--accent);
}
.service-icon svg { width: 24px; height: 24px; }
.service-title { font-size: 21px; line-height: 1.3; }
.service-text { margin-top: 8px; color: var(--muted); }
@media (max-width: 800px) { .service-list { grid-template-columns: 1fr; } }

/* Live apps */
.app-grid,
.video-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.app {
  --tint: hsl(var(--hue) 85% 66%);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background:
    radial-gradient(120% 70% at 100% 0%, hsl(var(--hue) 80% 60% / 0.12), transparent 60%),
    var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
[data-theme="light"] .app { --tint: hsl(var(--hue) 70% 38%); }
.app:hover { border-color: color-mix(in srgb, var(--tint) 55%, transparent); transform: translateY(-2px); }
.app.is-suggested { border-color: var(--tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 30%, transparent); }
.app.is-hidden, .video.is-hidden { opacity: 0.55; }
.app-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.app-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--tint);
  background: hsl(var(--hue) 80% 60% / 0.13);
}
.app-icon svg { width: 24px; height: 24px; }
.app-name { font-family: "Sora", var(--body); font-weight: 700; font-size: 20px; }
.app-category { color: var(--tint); font-size: 14px; font-weight: 500; }
.app-desc { color: var(--muted); font-size: 15px; flex: 1; margin-top: 4px; }
.app-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.host { color: var(--muted); direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.app-open { font-weight: 600; color: var(--text); white-space: nowrap; }
.hidden-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 28px;
  padding: 16px 20px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.notice-text { flex: 1 1 280px; }
.notice-action { font-weight: 600; color: var(--accent); }

.plain-list { columns: 2; }

/* Videos */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-count { font-size: 13px; opacity: 0.7; }

.video {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  overflow: hidden;
}
.video-shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}
.video-shot img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s ease; }
.video-shot:hover img { opacity: 0.82; }
.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(21, 21, 28, 0.6);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.video-play svg { width: 24px; height: 24px; fill: currentColor; margin-inline-start: 3px; }
html[dir="rtl"] .video-play svg { margin-inline-start: 0; margin-inline-end: 3px; }
.video-shot:hover .video-play { transform: scale(1.08); background: var(--button); }
.video-length {
  position: absolute;
  inset-inline-end: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(21, 21, 28, 0.8);
  color: #fff;
  font-size: 13px;
}
.video-shot .hidden-tag { position: absolute; top: 10px; inset-inline-start: 10px; }
.video-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.video-name { font-size: 20px; }
.video-category { color: var(--accent-2); font-size: 14px; font-weight: 500; }
.video-desc { color: var(--muted); font-size: 15px; flex: 1; }
.video-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.video-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.video-download:hover { color: var(--text); }
.video-download-icon svg { width: 18px; height: 18px; }

.lang-switch {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}
/* The highlight sits under the chosen button and glides to the other one (site.js sets --x and --w) */
.lang-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--w, 0);
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 2px 8px -4px rgba(110, 90, 255, 0.4);
  transform: translateX(var(--x, 0));
}
.lang-switch[data-slid]::before { transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.lang-switch button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.lang-switch button[aria-pressed="true"] { color: #fff; font-weight: 600; }
/* Before the script has measured the pill, the chosen button carries the highlight itself */
.lang-switch:not([style]) button[aria-pressed="true"] { background: var(--brand); }

/* Player */
.player {
  width: min(1180px, 100% - 24px);
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.player::backdrop { background: rgba(5, 5, 8, 0.85); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.player-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 20px;
}
.player-title { font-size: 22px; }
.player-category { color: var(--muted); font-size: 14px; }
.player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 140px);
  background: #000;
}

/* How we work: a real sequence, so the steps are numbered */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 52px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 76px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  font-family: "Sora", sans-serif;
  font-size: 60px;
  font-weight: 800;
  line-height: 1;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 30px;
  inset-inline-start: 56px;
  inset-inline-end: -14px;
  height: 1px;
  background: var(--line-strong);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 21px; }
.steps p { margin-top: 8px; color: var(--muted); }
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 48px 64px;
  align-items: start;
}
.contact-info .section-sub { margin-top: 18px; }
.channels { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; }
.channel { display: flex; gap: 14px; align-items: center; }
.channel-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.channel-icon svg { width: 21px; height: 21px; }
.channel-body { display: flex; flex-direction: column; line-height: 1.35; }
.channel-label { color: var(--muted); font-size: 14px; }
.channel-value { font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
a.channel-value:hover { color: var(--accent); }
.socials { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; }
.social {
  --tone: #0a66c2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding-block: 0;
  padding-inline: 7px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.social:hover { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, var(--surface)); }
.social-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tone);
  color: #fff;
}
.social-icon svg { width: 20px; height: 20px; }
.social-instagram { --tone: #d6249f; }
.social-instagram .social-icon { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-facebook { --tone: #1877f2; }
.social-x { --tone: #111111; }
[data-theme="dark"] .social-x .social-icon { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.social-youtube { --tone: #ff0033; }

.contact-form {
  display: grid;
  gap: 18px;
  padding: 32px;
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
}
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-size: 14px; font-weight: 500; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--bg);
  font-size: 16px;
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
html[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-status { font-size: 15px; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--error); }
.contact-form .button { justify-self: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .contact-form .button { justify-self: stretch; }
}

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  width: var(--page);
  margin: 0 auto;
  padding: 36px 0 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.brand-small .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.brand-small .brand-name { font-size: 19px; }
.footer-text { color: var(--muted); font-size: 14px; flex: 1 1 260px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Pages ---------- */

/* Every page is the same document; data-page on <html> says which sections it shows */
html[data-page="home"] main > section:not(.hero, .about, .services, .process, .cta-band),
html[data-page="about"] main > section:not(.about, .process, .cta-band),
html[data-page="services"] main > section:not(.services, .cta-band),
html[data-page="live"] main > section:not(.live, .cta-band),
html[data-page="videos"] main > section:not(.videos, .cta-band),
html[data-page="contact"] main > section:not(.contact) { display: none; }

/* The page's own section opens it, without the divider above */
html[data-page="about"] .about,
html[data-page="services"] .services,
html[data-page="live"] .live,
html[data-page="videos"] .videos,
html[data-page="contact"] .contact { border-top: 0; padding-top: 56px; }

.nav a[aria-current="page"] { color: #fff; }
/* Before the script has measured the menu, the current page carries the pill itself */
.nav:not([style]) a[aria-current="page"] { background: var(--brand); }
@media (max-width: 1080px) {
  .nav::before, .nav::after { display: none; }
  .nav a[aria-current="page"], .nav:not([style]) a[aria-current="page"] { background: transparent; color: var(--accent); }
}

/* Moving to another page: its content rises in */
main.is-entering > section:not([hidden]) { animation: page-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
main.is-entering > section:not([hidden]):nth-of-type(n + 2) { animation-delay: 0.08s; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* The invitation to get in touch, at the end of every page but Contact */
.cta-band {
  width: var(--page);
  margin: 0 auto 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 40px 44px;
  border-radius: 28px;
  /* A thin brand-gradient edge: the inner layers fill the padding box, the gradient shows only in the border */
  border: 1px solid transparent;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(124, 92, 255, 0.22), transparent 60%) padding-box,
    radial-gradient(80% 140% at 100% 100%, rgba(34, 211, 238, 0.16), transparent 60%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, rgba(139, 92, 246, 0.4), rgba(79, 107, 255, 0.14) 45%, rgba(34, 211, 238, 0.35)) border-box;
  box-shadow: 0 20px 50px -40px rgba(110, 90, 255, 0.25);
}
.band-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.band-sub { margin-top: 8px; color: var(--muted); max-width: 52ch; }
@media (max-width: 600px) { .cta-band { padding: 28px 24px; } .cta-band .button { width: 100%; } }

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

/* One hover for every button: the brand gradient flows in, a light streak sweeps across,
   and the button lifts with a glow. */
.button,
.tool,
.chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, color 0.25s ease, border-color 0.25s ease;
}
.button::before,
.tool::before,
.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(110deg, #8b5cf6, #4f6bff, #22d3ee, #8b5cf6);
  background-size: 300% 100%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.button::after,
.tool::after,
.chip::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
}
.button:hover:not(:disabled),
.tool:hover,
.chip:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 18px -10px rgba(110, 90, 255, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.button:hover:not(:disabled)::before,
.tool:hover::before,
.chip:hover::before {
  opacity: 1;
  transform: scale(1);
  animation: flow 3s linear infinite;
}
.button:hover:not(:disabled)::after,
.tool:hover::after,
.chip:hover::after {
  animation: streak 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.button:active:not(:disabled),
.tool:active,
.chip:active { transform: translateY(-1px) scale(0.98); }
.chip:hover .chip-count { opacity: 1; }

@keyframes flow {
  from { background-position: 0% 50%; }
  to { background-position: 300% 50%; }
}
@keyframes streak {
  from { transform: translateX(-120%) skewX(-20deg); }
  to { transform: translateX(520%) skewX(-20deg); }
}

/* Titles: site.js wraps each word and toggles .is-in each time the title scrolls into view.
   The headline's words rise out of a blur, one after another. */
.hero-title.reveal .w {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.7em) rotateX(-70deg) scale(0.92);
  transform-origin: 50% 100%;
  transition:
    opacity 0.7s ease calc(var(--i) * 80ms),
    filter 0.8s ease calc(var(--i) * 80ms),
    transform 0.9s cubic-bezier(0.22, 1.4, 0.36, 1) calc(var(--i) * 80ms);
}
/* Balanced wrapping lays out word boxes wrongly in Chromium (words pile up), so revealed titles wrap normally */
.reveal { position: relative; perspective: 600px; text-wrap: wrap; }
.hero-title.reveal.is-in .w { opacity: 1; filter: blur(0); transform: none; }

/* Section titles: each word slides up out of its own slot, one after another, in a soft gradient that
   runs across the whole title (each word shows its part of it), then a line draws in underneath. */
.section-title,
.band-title {
  --t1: #ffffff;
  --t2: #d9d2ff;
  --t3: #9fe7f5;
}
[data-theme="light"] .section-title,
[data-theme="light"] .band-title {
  --t1: #0c1330;
  --t2: #3d2fb0;
  --t3: #0b6e82;
}
.reveal .wm {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.reveal:not(.hero-title) .w {
  display: inline-block;
  background: linear-gradient(90deg, var(--t1), var(--t2) 55%, var(--t3));
  background-size: calc(var(--words, 1) * 100%) 100%;
  background-position: calc(var(--i) / max(var(--words, 1) - 1, 1) * 100%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translateY(110%) skewY(7deg);
  transform-origin: 0 100%;
  transition: transform 0.3s ease;
}
.reveal.is-in:not(.hero-title) .w {
  transform: none;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 70ms);
}
.reveal::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -0.28em;
  width: 2.4em;
  height: 4px;
  border-radius: 4px;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(110, 90, 255, 0.3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
html[dir="rtl"] .reveal::after { transform-origin: right; }
.reveal.is-in::after {
  transform: scaleX(1);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--words, 4) * 70ms + 0.4s);
}
.hero-title.reveal::after { display: none; }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wall-track { animation: none; }
  .reveal .w { opacity: 1; filter: none; transform: none !important; transition: none !important; }
  .reveal::after { transform: scaleX(1); transition: none; }
  .rot-word { animation: none; transition: none; }
  .hero-title.reveal .rotator { opacity: 1; transform: none; transition: none; }
  main.is-entering > section { animation: none !important; }
  .nav::before, .nav::after { transition: none !important; }
  .button::before, .tool::before, .chip::before, .button::after, .tool::after, .chip::after { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Switching light and dark: no transitions for that moment (site.js) */
.is-switching-theme *,
.is-switching-theme *::before,
.is-switching-theme *::after { transition: none !important; }
