/**
 * The landing page.
 *
 * Hand-written and served as a static file with no build step: the page is a single document, and
 * the deployment is an upload to shared hosting where every additional build is one more thing to
 * forget. Colours, radii and motion come from tokens.css beside this file — a copy of
 * packages/design-tokens/tokens.css that `npm run deploy:stage` refreshes — so this page and the
 * product cannot drift apart. Edit the source, never the copy.
 *
 * Direction-neutral throughout: logical properties only, so the Arabic page is the same stylesheet.
 */

/* ---- Typeface ----------------------------------------------------------------------------- */

@font-face {
  font-family: 'Readex Pro Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url('fonts/readex-pro-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: 'Readex Pro Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url('fonts/readex-pro-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Readex Pro Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url('fonts/readex-pro-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Base --------------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root[lang='ar'] body {
  line-height: 1.85;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--text-primary);
}

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

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* An arrow points toward the end of the line, so it turns around in Arabic. */
:root[dir='rtl'] .icon-flip {
  transform: scaleX(-1);
}

/* Images drawn for one theme only — the wordmark in ink for light surfaces, in white for dark. */
.show-dark {
  display: none;
}

:root[data-theme='dark'] .show-light {
  display: none;
}

:root[data-theme='dark'] .show-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .show-light {
    display: none;
  }

  :root:not([data-theme='light']) .show-dark {
    display: block;
  }
}

/* ---- Buttons ------------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding-inline: 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  min-height: 3.25rem;
  padding-inline: 1.625rem;
  border-radius: var(--radius-lg);
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.14);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow:
    inset 0 -1px 0 rgb(0 0 0 / 0.14),
    var(--shadow-accent);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface-card);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* On the lime card, where the lime button would vanish into its own background. */
.btn-ink {
  background: var(--tvm-ink-950);
  color: var(--tvm-ink-50);
}

.btn-ink:hover {
  background: var(--tvm-ink-800);
}

@media (max-width: 559px) {
  .hide-sm {
    display: none;
  }
}

/* ---- Header ------------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  background: var(--surface-glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  transition: border-color var(--duration-normal) var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.625rem;
  border-radius: var(--radius-md);
}

.brand-mark {
  width: 2.125rem;
  height: 2.125rem;
}

.brand-word {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

/*
 * The logo mirrors as a whole in Arabic — the mark at the line's visual start rather than forced
 * left, which .brand's flex row already does simply by no longer being pinned to dir="ltr" (a row's
 * visual order follows its own direction). The wordmark column's edge-alignment flips to match, so
 * the wordmark and tagline stay flush on whichever edge now sits away from the mark.
 */
:root[dir='rtl'] .brand-word {
  align-items: flex-start;
}

/* A step smaller on a narrow phone, where the header also has to hold two buttons. */
.brand-word .word {
  width: auto;
  height: 14px;
}

.brand-word .endorse {
  width: auto;
  height: 8px;
}

@media (min-width: 560px) {
  .brand-word .word {
    height: 16px;
  }

  .brand-word .endorse {
    height: 9px;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding-inline: 0.625rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.lang-switch:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

@media (max-width: 399px) {
  .lang-switch .icon {
    display: none;
  }
}

.lang-short,
.label-short {
  display: none;
}

/*
 * A narrow phone: the logo, the language, the theme button and "Start free" must share one row.
 * The language shortens to "EN" / "ع" (its full name stays as the accessible label) and the gaps
 * tighten, rather than anything being dropped.
 */
@media (max-width: 439px) {
  .lang-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .lang-short {
    display: inline;
  }

  .nav-actions {
    gap: 0;
  }

  .lang-switch {
    padding-inline: 0.5rem;
  }

  .theme-switch {
    width: 2.5rem;
  }

  .nav-actions .btn {
    padding-inline: 0.875rem;
  }
}

/*
 * The legal pages' "Back to TaskViaMe" is wider than the landing page's "Start free", so it gives way
 * to its short form ("Home") a step earlier — measured: the full words overflow a 440px phone by up
 * to 32px in Arabic. The full words stay as the accessible name.
 */
@media (max-width: 519px) {
  .label-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .label-short {
    display: inline;
  }
}

/*
 * The theme button, icon only: a sun in light that turns into a crescent in dark — the rays turn
 * away while a disc slides across the core — the same drawing as the app's header.
 */
.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.theme-switch:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.theme-switch:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-switch svg {
  overflow: visible;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.theme-switch-core,
.theme-switch-bite,
.theme-switch-rays {
  transform-box: view-box;
  transform-origin: 12px 12px;
  transition:
    transform var(--duration-normal) var(--ease-spring),
    opacity var(--duration-fast) var(--ease-out);
}

:root[data-theme='dark'] .theme-switch svg {
  transform: rotate(-40deg);
}

:root[data-theme='dark'] .theme-switch-core {
  transform: scale(1.55);
}

:root[data-theme='dark'] .theme-switch-bite {
  transform: translate(-7.5px, 5px);
}

:root[data-theme='dark'] .theme-switch-rays {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-switch svg {
    transform: rotate(-40deg);
  }

  :root:not([data-theme='light']) .theme-switch-core {
    transform: scale(1.55);
  }

  :root:not([data-theme='light']) .theme-switch-bite {
    transform: translate(-7.5px, 5px);
  }

  :root:not([data-theme='light']) .theme-switch-rays {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
  }
}

/* The new theme spreads out from the button as a circle (where view transitions exist). */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  animation: tvm-theme-reveal 520ms var(--ease-out);
}

@keyframes tvm-theme-reveal {
  from {
    clip-path: circle(0 at var(--reveal-x, 50%) var(--reveal-y, 0));
  }

  to {
    clip-path: circle(var(--reveal-r, 150%) at var(--reveal-x, 50%) var(--reveal-y, 0));
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: 2.5rem 3.5rem;
}

/* A wash of the brand hue behind the top of the page, faint enough to read as light, not colour. */
.hero::before {
  content: '';
  position: absolute;
  inset: -20rem -10rem auto;
  z-index: -1;
  height: 44rem;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  opacity: 0.8;
}

@media (min-width: 960px) {
  .hero {
    padding-block: 4.5rem 6rem;
  }
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: 2.5rem;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.eyebrow-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: tvm-pulse 2.4s var(--ease-out) infinite;
}

h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.75rem, 11vw, 4.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Arabic needs the height for its ascenders and dots, and letter-spacing would break its joins. */
:root[lang='ar'] h1 {
  line-height: 1.25;
  letter-spacing: 0;
}

.highlight {
  color: var(--accent-text);
}

.lead {
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--text-secondary);
  font-size: clamp(1.0625rem, 2.6vw, 1.25rem);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (max-width: 479px) {
  .cta-row .btn {
    flex: 1 1 100%;
  }
}

.assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.assurances li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.assurances .icon {
  width: 1rem;
  height: 1rem;
  color: var(--accent-text);
  stroke-width: 2.6;
}

/* The two phones share one grid cell and are pushed apart with individual transform properties, so
   the entrance animation can own `transform` without undoing where each phone sits. */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 30rem;
  isolation: isolate;
}

@media (min-width: 960px) {
  .hero-visual {
    min-height: 40rem;
  }
}

.hero-glow {
  position: absolute;
  inset: 14% 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
  filter: blur(28px);
  opacity: 0.65;
}

.phone {
  grid-area: 1 / 1;
  width: min(56vw, 16.5rem);
  aspect-ratio: 390 / 844;
  padding: 0.5rem;
  border-radius: 2.5rem;
  background: var(--tvm-ink-950);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.1),
    0 30px 60px -24px rgb(0 0 0 / 0.5),
    var(--shadow-lg);
}

@media (min-width: 960px) {
  .phone {
    width: 18rem;
  }
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 2rem;
}

.phone-front {
  z-index: 2;
  translate: -24% 0;
  rotate: -4deg;
}

.phone-back {
  z-index: 1;
  translate: 26% 5%;
  rotate: 5deg;
  scale: 0.9;
}

:root[dir='rtl'] .phone-front {
  translate: 24% 0;
  rotate: 4deg;
}

:root[dir='rtl'] .phone-back {
  translate: -26% 5%;
  rotate: -5deg;
}

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.4375rem;
  padding-inline: 0.4375rem 0.875rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.chip-accepted {
  top: 12%;
  inset-inline-start: 1%;
}

.chip-approved {
  bottom: 14%;
  inset-inline-end: 1%;
}

.chip-dot {
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
}

.chip-dot.is-soft {
  background: var(--status-accepted-bg);
  color: var(--status-accepted-fg);
}

.chip-dot .icon {
  width: 0.9375rem;
  height: 0.9375rem;
  stroke-width: 2.6;
}

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

.section {
  padding-block: 4.5rem;
}

.section-flush {
  padding-block-start: 0;
}

@media (min-width: 768px) {
  .section {
    padding-block: 6.5rem;
  }

  .section-flush {
    padding-block-start: 0;
  }
}

.section-head {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}

.section-head > p:not(.kicker) {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.kicker {
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[lang='ar'] .kicker {
  font-size: 0.9375rem;
  letter-spacing: 0;
}

h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.875rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

:root[lang='ar'] h2 {
  line-height: 1.35;
  letter-spacing: 0;
}

/* ---- How it works ------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.step,
.feature,
.plan {
  padding: 1.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 1.125rem;
  font-weight: 700;
}

.step h3 {
  margin-top: 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.step p,
.feature p {
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

/* ---- Spotlight ---------------------------------------------------------------------------- */

/* Always the logo's black, in both themes: the one moment the page wears the brand at full strength. */
.spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 3rem 1.5rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 2rem;
  background: var(--tvm-ink-1000);
  color: var(--tvm-ink-50);
}

@media (min-width: 768px) {
  .spotlight {
    padding: 4.5rem 4rem;
  }
}

/*
 * The painted ripple that used to stand in for the mark.
 *
 * Gone: the real one is drawn beside it now, at the logo's own proportions and turning. Two sets of
 * concentric circles on one card read as a moiré, and the eye cannot tell which is the brand.
 */
.spotlight::before {
  content: none;
}

.spotlight-unused-rings {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-end: -18rem;
  z-index: -1;
  width: 46rem;
  aspect-ratio: 1;
  translate: 0 -50%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 2.9rem, rgb(255 255 255 / 0.07) 2.9rem calc(2.9rem + 1px));
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
}

/* ---- Orbits ---------------------------------------------------------------------------------
   The mark, turning.

   The shape is drawn in the markup above from `landing/brand/mark-tile.svg`'s own coordinates, so
   this file only has to say how it sits and how it moves. Nothing here approximates the logo; it is
   the logo, at another size.

   Laid back on its X axis so the assembly turns on a plane tilted away from the reader rather than
   flat to it — the nodes then travel an ellipse and the whole thing reads as depth. That one
   `rotateX` is the entire 3D of it: no library, no canvas, and the browser hands it to the
   compositor.

   The tilt is gentle on purpose. Past about forty degrees the mark stops being recognisable as
   itself and becomes a spinning dial, which is a different thing from a brand. */

.orbit {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: -11rem;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  translate: 0 -50%;
  pointer-events: none;
  overflow: visible;
  transform: rotateX(34deg);
}

/*
 * The three rings, and the triangle between the nodes.
 *
 * Wallpaper behind a heading, so dimmer than the mark is drawn — but an earlier pass had these at
 * 8% on a near-black card, which is not dim, it is absent. A line nobody can see is not restraint.
 */
.orbit-ring {
  stroke: rgb(255 255 255 / 0.22);
}

.orbit-link {
  stroke: rgb(255 255 255 / 0.14);
}

.orbit-node {
  stroke: color-mix(in srgb, var(--tvm-lime-400) 65%, transparent);
}

.orbit-core {
  fill: color-mix(in srgb, var(--tvm-lime-400) 85%, transparent);
}

.orbit-tick {
  stroke: color-mix(in srgb, var(--tvm-lime-400) 30%, transparent);
}

/*
 * Ring, triangle and nodes turn as one rigid piece.
 *
 * They have to: the triangle's corners *are* the nodes, so moving the nodes on their own would pull
 * the shape apart. Rotating the ring with them costs nothing, since a turning circle looks still.
 *
 * `transform-box: fill-box` makes the origin the group's own bounding box rather than the SVG
 * viewport's, which is what lets `50% 50%` mean the centre of the mark.
 */
.orbit-spin {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: tvm-orbit-spin 42s linear infinite;
}

@keyframes tvm-orbit-spin {
  to {
    rotate: 360deg;
  }
}

/* A phone has no room for a thirty-four-rem mark, and a decoration is the first thing to go. */
@media (max-width: 767px) {
  .orbit {
    display: none;
  }
}

.spotlight .kicker,
.spotlight .accent {
  color: var(--tvm-lime-400);
}

.spotlight h2 {
  max-width: 40rem;
  color: #fff;
}

.spotlight-lead {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--tvm-ink-300);
  font-size: 1.0625rem;
}

.modes-title {
  margin-top: 2.5rem;
  color: #fff;
  font-weight: 600;
}

.modes {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

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

.mode {
  padding: 1.25rem;
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.04);
}

.mode-icon,
.feature-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
}

.mode-icon {
  background: rgb(209 253 11 / 0.12);
  color: var(--tvm-lime-400);
}

.mode h3 {
  margin-top: 0.875rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.mode p {
  margin-top: 0.25rem;
  color: var(--tvm-ink-400);
  font-size: 0.9375rem;
}

/* ---- Features ----------------------------------------------------------------------------- */

.features {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.feature {
  transition:
    translate var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

/* Lifted with `translate`, not `transform`, which the scroll reveal owns. */
@media (hover: hover) {
  .feature:hover {
    translate: 0 -3px;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
  }
}

.feature-icon {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.feature h3 {
  margin-top: 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

/* ---- Depth ---------------------------------------------------------------------------------
   The company site builds its feel from real CSS 3D — `perspective` with `preserve-3d` — rather
   than a WebGL canvas, and that is the half worth having here: one property, run on the compositor,
   and it costs the page nothing to download.

   The perspective sits on the **grid**, not on the card, because perspective applies to an element's
   children rather than to itself. On a page with no sheets or fixed children inside these lists that
   is safe; anywhere in the app it would not be, since a perspective — like a transform — makes an
   element the containing block for everything `position: fixed` within it.

   The tilt itself uses the independent `rotate` property for the same reason `.feature` lifts with
   `translate`: the scroll reveal owns `transform` on these cards, and writing one would cancel the
   other. The three longhands compose instead of fighting. */

.steps,
.features,
.plans {
  perspective: 1200px;
}

/*
 * Asked for at the media query rather than undone later.
 *
 * A reduced-motion block further down cannot win this: `.step:hover` outranks `.step`, so the reset
 * would lose and the card would still snap into a lean — which is the one thing somebody who asked
 * for less motion does not want. Stating the condition here means the rule never exists for them.
 */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .step:hover,
  .plan:hover {
    rotate: x 1.5deg;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
  }

  .feature:hover {
    rotate: x 1.5deg;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* A press leans the card away and shrinks it a touch, the way a physical thing gives. */
  .step:active,
  .feature:active,
  .plan:active {
    rotate: x 2.5deg;
    scale: 0.995;
  }
}

/*
 * `translate` is listed here as well, deliberately.
 *
 * This rule comes after `.feature`'s own transition and a `transition` shorthand replaces the whole
 * list rather than adding to it — so leaving it out would silently delete the lift that card already
 * had, and the hover would snap instead of easing. The same trap the app's `.pressable` carries a
 * warning about.
 */
.step,
.feature,
.plan {
  transition:
    rotate var(--duration-normal) var(--ease-out),
    scale var(--duration-normal) var(--ease-out),
    translate var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

/* ---- Pricing ------------------------------------------------------------------------------ */

.plans {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr));
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 600;
}

.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem;
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.plan-period {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}

.plan-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.plan-limit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
  font-weight: 500;
}

.plan-limit .icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--accent-text);
  stroke-width: 2.4;
}

.pricing-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ---- Final call to action ----------------------------------------------------------------- */

.cta-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 3.5rem 1.5rem;
  border-radius: 2rem;
  background: var(--tvm-lime-400);
  color: var(--tvm-ink-950);
  text-align: center;
}

@media (min-width: 768px) {
  .cta-card {
    padding: 5rem 3rem;
  }
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 56rem;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 3.2rem, rgb(0 0 0 / 0.07) 3.2rem calc(3.2rem + 1px));
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent);
  mask-image: radial-gradient(closest-side, #000 45%, transparent);
}

.cta-card h2 {
  max-width: 36rem;
  margin: 0 auto;
  color: inherit;
}

.cta-card p {
  margin-top: 0.875rem;
  color: rgb(10 10 9 / 0.72);
  font-size: 1.0625rem;
}

.cta-card .btn {
  margin-top: 2rem;
}

/* ---- Footer ------------------------------------------------------------------------------- */

.site-footer {
  padding-block: 3.5rem calc(2.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .footer-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    gap: 3rem;
  }
}

.footer-brand {
  opacity: 0.9;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.footer-brand:hover {
  opacity: 1;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  max-width: 30rem;
}

@media (min-width: 768px) {
  /*
   * Aligned to the reading start, not to the outer edge of the page.
   *
   * `end` looked right in English and wrong in Arabic: it left-aligns Arabic text, so a wrapped
   * disclaimer's second line hung off the wrong side and the short copyright line below it sat on
   * an edge of its own. Both lines share one edge this way, and each language gets the alignment
   * it reads in.
   */
  .footer-meta {
    align-items: flex-start;
    text-align: start;
  }
}

.footer-disclaimer {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.footer-dot {
  width: 3px;
  height: 3px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: currentColor;
  opacity: 0.6;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.footer-link:hover {
  color: var(--accent-text);
  border-color: var(--accent-text);
}

/* ---- Legal page ---------------------------------------------------------------------------- */

/*
 * The privacy policy. Prose rather than a pitch, so it scopes its own heading sizes instead of
 * inheriting the hero-scaled bare h2 above — a legal document's section headings are not a landing
 * page's section headings.
 */

.legal-container {
  max-width: 42rem;
}

.legal h1 {
  margin-top: 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

:root[lang='ar'] .legal h1 {
  line-height: 1.4;
  letter-spacing: 0;
}

.legal-updated {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.legal-lead {
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.legal-section {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--border-subtle);
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal-section p {
  margin-top: 0.875rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

:root[lang='ar'] .legal-section p {
  line-height: 1.9;
}

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

/*
 * Everything that animates in is hidden only when the `js` class is present, which the head script
 * adds before first paint. If scripts are blocked the page simply appears, rather than staying
 * invisible waiting for an animation that never runs.
 */

.js .rise {
  animation: tvm-rise 0.9s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

.js .phone-front {
  animation: tvm-phone-in 1.1s var(--ease-out) 0.15s backwards;
}

.js .phone-back {
  animation: tvm-phone-in 1.1s var(--ease-out) 0.3s backwards;
}

.chip {
  animation: tvm-float 6s var(--ease-in-out) infinite;
}

.chip-approved {
  animation-delay: -3s;
}

.js .chip {
  animation:
    tvm-fade-in 0.8s var(--ease-out) 0.8s backwards,
    tvm-float 6s var(--ease-in-out) 0.8s infinite;
}

.js .chip-approved {
  animation:
    tvm-fade-in 0.8s var(--ease-out) 1s backwards,
    tvm-float 6s var(--ease-in-out) -2s infinite;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out),
    translate var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s, 0s, 0s;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes tvm-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes tvm-phone-in {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
}

@keyframes tvm-fade-in {
  from {
    opacity: 0;
  }
}

@keyframes tvm-float {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes tvm-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  }

  70%,
  100% {
    box-shadow: 0 0 0 10px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  /* The tilt rules above are already conditioned on this preference; the perspective that frames
     them goes too, so nothing is left setting up a depth nothing uses. */
  .steps,
  .features,
  .plans {
    perspective: none;
  }

  /*
   * The orbits go entirely, rather than freezing.
   *
   * `animation: none` above would stop them mid-turn and leave three lights parked at arbitrary
   * points of their ellipses — wrong-looking in a way the moving version never is. And a decoration
   * that exists only as motion has nothing to say once the motion is refused.
   */
  .orbit {
    display: none;
  }
}
