/* halfshape — coming soon. One screen: the logo intro, then the maze game. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/spacegrotesk-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/spacegrotesk-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/spacegrotesk-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --aqua: #5ef4f7;
  --black: #000000;
  --ice: #eefdff;
  --muted: #8a8a8a;
  --soft: rgba(238, 253, 255, 0.62);
  --line: rgba(238, 253, 255, 0.14);
  --accent: var(--aqua);
  --font-en: 'Space Grotesk', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-ar: 'Thmanyah Sans', 'Geeza Pro', 'Noto Naskh Arabic', system-ui, sans-serif;
  --pad: clamp(18px, 3.4vw, 52px);
  --mark: clamp(150px, 30vmin, 330px);
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dir: 1;
}
[dir='rtl'] {
  --dir: -1;
}
[data-accent='ice'] {
  --accent: var(--ice);
}
[data-accent='gradient'] {
  --accent: #a6fafc;
}

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

html,
body {
  height: 100%;
}

body.cs {
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--black);
  color: var(--ice);
  font-family: var(--font-en);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang='ar'] body.cs {
  font-family: var(--font-ar);
  font-feature-settings: 'ss01'; /* Thmanyah Sans alternates: traditional kaf, swash endings */
}
/* text set in Space Grotesk keeps that font's default forms */
html[lang='ar'] .cs-hud__value,
html[lang='ar'] .cs-foot__progress,
html[lang='ar'] .cs-page__num,
html[lang='ar'] .cs-lang {
  font-feature-settings: normal;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.u-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ background -- */
/* One of two looping films. coming-soon.js picks it and loads it after the page; it fades in once
   it can play through and fades out while the game runs, so the maze keeps a black ground. */
.cs-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
[data-video='ready']:not([data-stage='morph']):not([data-stage='game']) .cs-video {
  opacity: 1;
  transition: opacity 1.2s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .cs-video {
    transition: none;
  }
}

/* ---------------------------------------------------------------- header -- */
.cs-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 18px var(--pad);
}
.cs-top__logo {
  display: block;
  flex: none;
  border-radius: 4px;
}
.cs-top__logo img {
  display: block;
  width: auto;
  height: 30px;
}
.cs-top__end {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-inline-start: auto;
}
.cs-lang {
  flex: none;
  min-width: 56px;
  padding: 7px 16px 8px;
  border: 1px solid rgba(238, 253, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-ar);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.cs-lang:lang(en) {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.12em;
}
.cs-lang:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* menu: the about panel and the brand guidelines site */
.cs-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 24px);
  margin-inline-end: clamp(4px, 1vw, 12px);
}
.cs-nav__link {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}
html[lang='ar'] .cs-nav__link {
  font-size: 14px;
  letter-spacing: 0;
}
.cs-nav__link:hover {
  color: var(--accent);
}
.cs-nav__link--out::after {
  content: ' \2197';
  letter-spacing: 0;
}

.cs-nav__link[aria-current='page'] {
  color: var(--accent);
}

/* ------------------------------------------------------------ about page -- */
/* #about: the company story from the profile, laid over the stage between header and footer */
.cs-page {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: rgba(0, 0, 0, 0.84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  outline: none;
  animation: cs-fade 0.4s var(--ease-out) both;
}
.cs-page__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 44px) var(--pad) clamp(56px, 10vh, 120px);
}
.cs-page__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.cs-page__back:hover {
  color: var(--accent);
}
.cs-page__back svg {
  display: block;
  transform: scaleX(var(--dir));
}
.cs-page__head {
  margin-top: clamp(28px, 7vh, 80px);
  animation: cs-rise 0.7s 0.05s var(--ease-out) both;
}
.cs-page__eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cs-page__title {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(40px, 6.6vw, 92px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.cs-page__lede {
  margin: 20px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 1.7vw, 22px);
}
.cs-page__section {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3.2fr);
  gap: 20px 48px;
  margin-top: clamp(56px, 10vh, 112px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  animation: cs-rise 0.7s 0.12s var(--ease-out) both;
}
.cs-page__label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cs-page__note {
  margin: 0 0 28px;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.cs-page__text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 44px;
}
.cs-page__text p {
  margin: 0;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.65;
}
.cs-page__text p + p {
  color: var(--soft);
}
.cs-page__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 36px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-page__num {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.cs-page__item-title {
  margin: 0 0 10px;
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.cs-page__item-text,
.cs-page__services {
  margin: 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.65;
}
.cs-page__services {
  padding: 0;
  list-style: none;
}
.cs-page__services li + li {
  margin-top: 6px;
}
html[lang='ar'] .cs-page__back,
html[lang='ar'] .cs-page__eyebrow,
html[lang='ar'] .cs-page__label {
  font-size: 14px;
  letter-spacing: 0;
}
html[lang='ar'] .cs-page__title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}
html[lang='ar'] .cs-page__note,
html[lang='ar'] .cs-page__item-title {
  font-weight: 700;
  letter-spacing: 0;
}
html[lang='ar'] .cs-page__text p {
  line-height: 1.9;
}
html[lang='ar'] .cs-page__item-text,
html[lang='ar'] .cs-page__services {
  font-size: 16px;
  line-height: 1.85;
}
@media (max-width: 1000px) {
  .cs-page__section {
    grid-template-columns: 1fr;
  }
  .cs-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .cs-page__text,
  .cs-page__grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs-page,
  .cs-page__head,
  .cs-page__section {
    animation: none;
  }
}

/* HUD and game tools: laid out from the morph on, so nothing shifts when play starts */
.cs-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 34px);
  transform: translate(-50%, -50%);
}
.cs-hud__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}
.cs-hud__label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[lang='ar'] .cs-hud__label {
  font-size: 12px;
  letter-spacing: 0;
}
.cs-hud__value {
  min-width: 4ch;
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.cs-hud__value--score {
  color: var(--accent);
}
.cs-lives {
  display: flex;
  gap: 6px;
  align-self: center;
}
.cs-lives i {
  width: 16px;
  height: 10px;
  border-radius: 0 0 16px 16px;
  background: var(--accent);
  transition: opacity 0.3s;
}
.cs-lives i.is-lost {
  opacity: 0.16;
}

.cs-tools {
  display: none;
  gap: 6px;
}
.cs-tool {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(238, 253, 255, 0.24);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cs-tool:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cs-icon {
  display: block;
}
.cs-icon-play,
[data-paused='true'] .cs-icon-pause {
  display: none;
}
[data-paused='true'] .cs-icon-play {
  display: block;
}
[data-sound='on'] .cs-sound {
  border-color: var(--accent);
  color: var(--accent);
}

.cs-hud,
.cs-tools {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0s 0.35s;
}
[data-stage='morph'] .cs-tools,
[data-stage='game'] .cs-tools {
  display: flex;
}
[data-stage='game'] .cs-hud,
[data-stage='game'] .cs-tools {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s 0.1s;
}

/* ----------------------------------------------------------------- stage -- */
.cs-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  outline: none;
}
[data-stage='game'] .cs-stage {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.cs-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------------ hero -- */
.cs-hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.2vmin, 24px);
  padding: 24px;
  text-align: center;
}
.cs-hero__mark {
  position: relative;
  margin-block-end: clamp(10px, 2.6vmin, 30px);
}
.cs-mark {
  display: block;
  width: var(--mark);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cs-mark:focus-visible {
  outline-offset: 16px;
}
.cs-mark__art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transform-origin: 50% 100%;
}
.cs-mark__body {
  fill: var(--accent);
  transition: fill 0.3s;
}
[data-accent='gradient'] .cs-mark__body {
  fill: url(#cs-grad);
}
.cs-mark__eye {
  fill: var(--black);
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.cs-hint {
  position: absolute;
  top: 62%;
  inset-inline-start: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  color: var(--accent);
  white-space: nowrap;
  pointer-events: none;
}
.cs-hint__arrow {
  display: block;
  transform: scaleX(var(--dir));
}
.cs-hint__arrow path {
  stroke-dasharray: 130;
}
.cs-hint__text {
  margin-inline-start: 34px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: cs-bob 1.6s ease-in-out infinite;
}
html[lang='ar'] .cs-hint__text {
  font-size: 16px;
  letter-spacing: 0;
}
@keyframes cs-bob {
  50% {
    transform: translate(calc(-5px * var(--dir)), -4px);
  }
}

.cs-hero__title {
  margin: 0;
  font-size: clamp(42px, 8.6vmin, 108px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
html[lang='ar'] .cs-hero__title {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}
/* the headline reel (coming-soon.js): one row tall, spinning through the services */
.cs-reel {
  --reel-row: 1.14em;
  position: relative;
  display: block;
  height: var(--reel-row);
  overflow: hidden;
}
html[lang='ar'] .cs-reel {
  --reel-row: 1.5em;
}
.cs-reel.is-spinning {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.cs-reel__strip {
  display: block;
  will-change: transform;
}
.cs-reel__strip--ghost {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  opacity: 0;
}
.cs-reel__item {
  display: block;
  height: var(--reel-row);
  line-height: var(--reel-row);
  white-space: nowrap;
}
.cs-hero__line {
  margin: 0;
  color: var(--soft);
  font-size: clamp(14px, 1.9vmin, 18px);
}

/* leaving the hero for the game, and coming back */
.cs-hero__title,
.cs-hero__line,
.cs-hint {
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
[data-stage='morph'] .cs-hero__title,
[data-stage='morph'] .cs-hero__line,
[data-stage='morph'] .cs-hint,
[data-stage='game'] .cs-hero__title,
[data-stage='game'] .cs-hero__line,
[data-stage='game'] .cs-hint {
  opacity: 0;
  transform: translateY(18px);
}
[data-stage='morph'] .cs-hero,
[data-stage='game'] .cs-hero {
  pointer-events: none;
}
[data-stage='morph'] .cs-mark,
[data-stage='game'] .cs-mark {
  visibility: hidden;
}

/* ------------------------------------------------------------- revisions -- */
/* The second game. Its revisions are page elements over the canvas, so they keep the page's type
   (and Thmanyah's ss01 in Arabic); coming-soon.js places them with transforms. */
.cs-revs {
  --rev-size: clamp(11px, calc(0.6vw + 7px), 15px);
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
}
html[lang='ar'] .cs-revs {
  --rev-size: clamp(12px, calc(0.6vw + 8px), 16px);
}
[data-game='revisions'][data-stage='game'] .cs-revs {
  opacity: 1;
}
.cs-rev,
.cs-stamp {
  position: absolute;
  top: 0;
  left: 0;
}
.cs-rev {
  will-change: transform;
}
.cs-rev__card {
  position: relative;
  display: block;
  padding: 0.36em 0.95em 0.46em;
  border: 1px solid rgba(238, 253, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--ice);
  font-size: var(--rev-size);
  line-height: 1.25;
  white-space: nowrap;
  animation: cs-rev-in 0.5s var(--ease-out) var(--delay, 0s) both;
}
/* a comment's tail, so each one reads as feedback */
.cs-rev__card::after {
  content: '';
  position: absolute;
  top: 100%;
  inset-inline-start: 1.15em;
  width: 7px;
  height: 6px;
  background: rgba(238, 253, 255, 0.42);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
html[dir='rtl'] .cs-rev__card::after {
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.cs-rev[data-hp='2'] .cs-rev__card {
  border-color: rgba(238, 253, 255, 0.9);
  background: rgba(40, 46, 47, 0.92);
}
.cs-rev[data-hp='3'] .cs-rev__card,
.cs-rev--boss .cs-rev__card {
  border-color: var(--ice);
  background: var(--ice);
  color: var(--black);
}
.cs-rev[data-hp='2'] .cs-rev__card::after,
.cs-rev[data-hp='3'] .cs-rev__card::after,
.cs-rev--boss .cs-rev__card::after {
  background: var(--ice);
}
.cs-rev--boss .cs-rev__card {
  padding: 0.5em 1.2em 0.6em;
  font-size: calc(var(--rev-size) * 1.45);
  font-weight: 500;
}
/* the boss's patience, as a bar under it */
.cs-rev--boss .cs-rev__card::before {
  content: '';
  position: absolute;
  top: calc(100% + 12px);
  left: 14%;
  right: 14%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--hp, 100%), rgba(238, 253, 255, 0.18) 0);
}
.cs-rev.is-hit .cs-rev__card {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--black);
}
.cs-rev.is-done .cs-rev__card {
  text-decoration-line: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  animation: cs-rev-done 0.36s var(--ease-out) forwards;
}
.cs-deadline {
  position: absolute;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
html[lang='ar'] .cs-deadline {
  font-size: 12px;
  letter-spacing: 0;
}
.cs-stamp {
  padding: 0.12em 0.5em 0.2em;
  border: 2px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-size: clamp(24px, 5vmin, 44px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-10deg);
  animation: cs-stamp 1.5s var(--ease-out) forwards;
}
html[lang='ar'] .cs-stamp {
  letter-spacing: 0;
}
@keyframes cs-rev-in {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.92);
  }
}
@keyframes cs-rev-done {
  30% {
    transform: scale(1.08);
  }
  to {
    opacity: 0;
    transform: scale(0.7);
  }
}
@keyframes cs-stamp {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1.9);
  }
  16%,
  75% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-10deg) scale(1);
  }
}
@keyframes cs-stamp-still {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  80% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs-rev__card {
    animation-duration: 0.01ms;
    animation-delay: 0s;
  }
  .cs-stamp {
    animation-name: cs-stamp-still;
  }
}

/* --------------------------------------------------------------- overlay -- */
.cs-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  animation: cs-fade 0.3s both;
}
.cs-overlay[data-kind='ready'],
.cs-overlay[data-kind='wave'] {
  align-items: end;
  padding-bottom: clamp(16px, 5vh, 56px);
  background: none;
  pointer-events: none;
}
/* the ship sits at the bottom, so the revisions game keeps its cards in the middle */
[data-game='revisions'] .cs-overlay[data-kind='ready'],
.cs-overlay[data-kind='wave'] {
  align-items: center;
  padding-bottom: 24px;
}
.cs-overlay__card {
  max-width: 440px;
  padding: 26px 30px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.88);
  text-align: center;
}
.cs-overlay[data-kind='ready'] .cs-overlay__card,
.cs-overlay[data-kind='wave'] .cs-overlay__card {
  padding: 12px 26px 14px;
  border-radius: 999px;
}
.cs-overlay__eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
html[lang='ar'] .cs-overlay__eyebrow {
  font-size: 13px;
  letter-spacing: 0;
}
.cs-overlay__eyebrow:empty,
.cs-overlay__body:empty,
.cs-overlay__actions:empty {
  display: none;
}
.cs-overlay__title {
  margin: 0;
  font-size: clamp(28px, 4.4vmin, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.cs-overlay[data-kind='ready'] .cs-overlay__title,
.cs-overlay[data-kind='wave'] .cs-overlay__title {
  font-size: 17px;
}
html[lang='ar'] .cs-overlay__title {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}
.cs-overlay__body {
  margin: 10px 0 0;
  color: var(--soft);
}
.cs-overlay[data-kind='ready'] .cs-overlay__body,
.cs-overlay[data-kind='wave'] .cs-overlay__body {
  margin-top: 2px;
  font-size: 13px;
}
.cs-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.cs-btn {
  padding: 11px 20px 12px;
  border: 1px solid rgba(238, 253, 255, 0.3);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.cs-btn:hover {
  border-color: var(--ice);
}
.cs-btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--black);
  font-weight: 500;
}
.cs-btn--primary:hover {
  border-color: transparent;
  background: var(--ice);
}

/* ---------------------------------------------------------------- footer -- */
.cs-foot {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin-inline: var(--pad);
  padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 12px;
}
html[lang='ar'] .cs-foot {
  font-size: 13px;
}
.cs-foot__note {
  text-align: center;
}
.cs-foot__end {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 18px;
}
.cs-foot__progress {
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
}
.cs-foot__progress:empty {
  display: none;
}
.cs-swatches {
  display: flex;
  gap: 12px;
}
.cs-swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--aqua);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.cs-swatch--ice {
  background: var(--ice);
}
.cs-swatch--gradient {
  background: linear-gradient(45deg, #ffffff, #57f9ff 90%);
}
.cs-swatch[aria-checked='true'] {
  box-shadow: 0 0 0 3px var(--black), 0 0 0 4px var(--ice);
}

/* ----------------------------------------------------------------- intro -- */
@keyframes cs-fade {
  from {
    opacity: 0;
  }
}
@keyframes cs-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes cs-drop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}
@keyframes cs-intro-move {
  0%,
  52% {
    transform: translateY(var(--intro-dy, 0px)) scale(var(--intro-scale, 1.8));
  }
}
@keyframes cs-intro-fill {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes cs-intro-eye {
  from {
    transform: scale(0) rotate(-140deg);
  }
}
@keyframes cs-draw {
  from {
    stroke-dashoffset: 130;
  }
}
.js [data-stage='intro'] .cs-mark {
  animation: cs-intro-move 2.5s var(--ease) both;
}
.js [data-stage='intro'] .cs-mark__art {
  animation: cs-intro-fill 1s 0.1s var(--ease-out) both;
}
.js [data-stage='intro'] .cs-mark__eye {
  animation: cs-intro-eye 0.8s 0.75s var(--ease-out) both;
}
.js [data-stage='intro'] .cs-top {
  animation: cs-drop 0.7s 1.6s var(--ease-out) both;
}
.js [data-stage='intro'] .cs-foot {
  animation: cs-rise 0.7s 1.7s var(--ease-out) both;
}
.js [data-stage='intro'] .cs-hero__title {
  animation: cs-rise 0.8s 1.85s var(--ease-out) both;
}
.js [data-stage='intro'] .cs-hero__line {
  animation: cs-rise 0.8s 2s var(--ease-out) both;
}
.js [data-stage='intro'] .cs-hint {
  animation: cs-fade 0.5s 2.35s both;
}
.js [data-stage='intro'] .cs-hint__arrow path {
  animation: cs-draw 0.8s 2.4s var(--ease-out) both;
}

/* ------------------------------------------------------------ responsive -- */
/* narrow: the HUD moves into the footer row while playing */
@media (max-width: 900px) {
  .cs-foot {
    grid-template-columns: 1fr auto;
  }
  .cs-foot__note {
    display: none;
  }
  .cs-hud {
    position: fixed;
    top: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: auto;
    inset-inline-start: var(--pad);
    z-index: 6;
    min-height: 28px;
    transform: none;
  }
  [data-stage='game'] .cs-foot__company {
    visibility: hidden;
  }
}

@media (max-width: 720px) {
  .cs-top {
    gap: 12px;
    min-height: 64px;
    padding-block: 14px;
  }
  .cs-top__end,
  .cs-tools {
    gap: 6px;
  }
  .cs-nav {
    gap: 12px;
    margin-inline-end: 2px;
  }
  .cs-nav__link {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  html[lang='ar'] .cs-nav__link {
    font-size: 13px;
  }
  [data-stage='morph'] .cs-nav,
  [data-stage='game'] .cs-nav {
    display: none;
  }
  .cs-hud {
    gap: 16px;
  }
  .cs-hud__item {
    gap: 6px;
  }
  .cs-hud__value {
    min-width: 0;
    font-size: 16px;
  }
  [data-stage='game'] .cs-swatches {
    display: none;
  }
  .cs-hint {
    position: static;
    align-items: center;
    margin-top: 12px;
  }
  .cs-hint__arrow {
    width: 44px;
    height: 30px;
    transform: scaleX(var(--dir)) rotate(22deg);
  }
  .cs-hint__text {
    margin-inline-start: 0;
  }
  .cs-foot__company {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .cs-top__logo img {
    height: 24px;
  }
  .cs-tool {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 340px) {
  .cs-hud__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-stage='intro'] *,
  .js [data-stage='intro'] {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .cs-hint__text {
    animation: none;
  }
}
