@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Inter (SIL OFL 1.1) — self-hosted latin subset, see fonts/OFL-Inter.txt */
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* BubbledotICG-FinePos (CC BY 4.0, Web Fonts) — credited in the page footer */
@font-face {
  font-family: "BubbledotICG-FinePos";
  src: url("fonts/BubbledotICG-FinePos.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- Background video ---------- */

.bg {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

/* A light wash behind the copy so white type stays readable over the bright sky. */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 45% at 50% 42%, rgba(0, 0, 0, 0.32), transparent 75%);
}

@media (max-width: 900px) {
  .bg::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.5) 18%, rgba(0, 0, 0, 0.5) 46%, transparent 66%);
  }
}

/* ---------- Page: one viewport, 3 regions ---------- */

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
  overflow: hidden;
}

.header,
.hero,
.stats,
.legal,
.mobile-menu {
  position: relative;
  z-index: 1;
}

/* ---------- 1) Header ---------- */

.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  width: 100%;
  max-width: 720px;
  animation: slideDown 0.7s var(--ease) both;
}

.logo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  transition: transform 0.3s var(--ease);
}

.logo:hover {
  transform: scale(1.04);
}

.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.nav {
  flex: 1;
  max-width: 430px;
  height: clamp(44px, 5.2vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link.is-active {
  opacity: 1;
}

.nav-link.is-active::after,
.m-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.sign-in {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 20px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: var(--nav-shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
  cursor: pointer;
}

.sign-in .icon {
  font-size: 1.1em;
  margin-top: -2px;
}

.sign-in:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-inline-start: calc(clamp(18px, 2.8vw, 28px) * -0.6);
}

.lang-toggle {
  display: grid;
  place-items: center;
  width: clamp(44px, 5.2vw, 48px);
  height: clamp(44px, 5.2vw, 48px);
  border: 0;
  border-radius: 50%;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--nav-shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

html[lang="ar"] .lang-toggle {
  font-size: 13px;
}

.lang-toggle:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

.burger {
  display: none;
}

/* ---------- 2) Hero ---------- */

.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 80px);
  width: 100%;
  max-width: 1120px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 900px;
  text-align: center;
}

.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}

.trust-avatar {
  position: relative;
  display: grid;
  width: var(--trust-size);
  height: var(--trust-size);
  padding: 5px;
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  transition: transform 0.35s var(--ease);
}

.trust-avatar > span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: calc(var(--trust-size) * 0.34);
}

.trust-avatar + .trust-avatar {
  margin-inline-start: calc(var(--trust-size) * -0.42);
}

.trust-avatar.a1 { z-index: 1; }
.trust-avatar.a2 { z-index: 2; }
.trust-avatar.a3 { z-index: 4; }

.trust:hover .a1 { transform: translateY(-2px); }
.trust:hover .a2 { transform: translateY(-4px); }
.trust:hover .a3 { transform: translateY(-2px); }

.trust-pill {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: var(--trust-size);
  margin-inline-start: calc(var(--trust-size) * -0.42);
  padding-inline: calc(var(--trust-size) * 0.58) 16px;
  border-radius: 999px;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  color: var(--trust-text);
  font-weight: 500;
  font-size: clamp(12px, 1.4vw, 13.5px);
  white-space: nowrap;
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 6.2vw, 80px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #fff;
}

.headline .line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s var(--ease) forwards;
}

.headline .l1 { animation-delay: 0.12s; }
.headline .l2 { animation-delay: 0.3s; }

/* The parent only groups the lines; each line animates on its own. */
.headline.anim {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

/* Arabic glyphs are not in the dot-matrix fonts: draw them with the system Arabic
   face under a dot grid so the headline keeps the same retro LED texture. */
html[lang="ar"] .headline {
  font-family: "BubbledotICG-FinePos", "Geist Pixel Circle", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
}

html[lang="ar"] .headline .line {
  padding-block: 0.04em;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 84%, transparent 92%);
  mask-image: radial-gradient(circle closest-side, #000 84%, transparent 92%);
  -webkit-mask-size: 0.055em 0.055em;
  mask-size: 0.055em 0.055em;
}

.subhead {
  max-width: min(500px, 92%);
  margin: clamp(14px, 2.2vh, 22px) 0 0;
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  font-weight: 400;
  line-height: 1.55;
  color: #d0d0d0;
}

.subhead.anim {
  --final-opacity: 0.8;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: clamp(20px, 3.4vh, 34px);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 22px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
  cursor: pointer;
}

.cta .icon {
  font-size: 1.2em;
  margin-top: -2px;
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 0 30px rgba(255, 255, 255, 0.45),
    0 0 64px rgba(255, 255, 255, 0.2);
}

.cta.anim {
  animation-name: revealPulse;
  animation-duration: 1.1s;
}

[data-store][aria-disabled="true"] {
  cursor: default;
}

/* ---------- Phone (proportions from the App Store generator) ---------- */

.device {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone {
  --w: clamp(180px, 29vh, 300px);
  position: relative;
  flex-shrink: 0;
  width: var(--w);
  aspect-ratio: 940 / 1973;
  border-radius: calc(var(--w) * 0.1617);
  background: linear-gradient(145deg, #c9cdca 0%, #6e7470 22%, #2b302d 50%, #7d837f 78%, #d4d7d5 100%);
  box-shadow:
    0 calc(var(--w) * 0.08) calc(var(--w) * 0.18) rgba(0, 0, 0, 0.55),
    0 0 calc(var(--w) * 0.3) rgba(255, 255, 255, 0.08);
  animation: phoneFloat 6s ease-in-out 1.4s infinite alternate;
}

.phone::before {
  content: "";
  position: absolute;
  inset: calc(var(--w) * 0.0064);
  border-radius: calc(var(--w) * 0.1553);
  background: #050605;
}

/* Side buttons */
.phone::after {
  content: "";
  position: absolute;
  left: calc(var(--w) * -0.0064);
  top: calc(var(--w) * 0.553);
  width: calc(var(--w) * 0.0075);
  height: calc(var(--w) * 0.16);
  border-radius: 4px;
  background: linear-gradient(90deg, #5b615d, #a7aca8, #5b615d);
  box-shadow: 0 calc(var(--w) * 0.19) 0 #7d837f;
}

.phone-screen {
  position: absolute;
  inset: calc(var(--w) * 0.0277);
  border-radius: calc(var(--w) * 0.134);
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}

.screen.is-active {
  opacity: 1;
  transform: none;
}

.phone-dots {
  display: flex;
  gap: 6px;
}

.phone-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.4s var(--ease), background 0.4s ease;
}

.phone-dots span.is-active {
  width: 18px;
  background: #fff;
}

/* ---------- 3) Stats ---------- */

.stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 24px);
  width: 100%;
  max-width: 920px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.stat-icon {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 33px);
  line-height: 1;
  color: #fff;
}

.stat-value {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.stat-label {
  font-size: clamp(11px, 1.2vw, 12.5px);
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Legal line ---------- */

.legal {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 16px;
  margin-top: clamp(8px, 1.6vh, 16px);
  font-size: 11.5px;
  color: var(--muted);
}

.social {
  display: flex;
  gap: 8px;
}

.social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pill-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--sign-in-text);
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

.social a:hover {
  background: #fff;
  color: #000;
  transform: translateY(-1px);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 10px;
}

.legal-links a {
  padding: 6px 2px;
  transition: color 0.2s ease;
}

.legal-links a:hover {
  color: #fff;
}

/* ---------- Shared entrance ---------- */

.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

.d005 { --d: 0.05s; }
.d028 { --d: 0.28s; }
.d034 { --d: 0.34s; }
.d04 { --d: 0.4s; }
.d05 { --d: 0.5s; }
.d058 { --d: 0.58s; }
.d066 { --d: 0.66s; }
.d074 { --d: 0.74s; }
.d082 { --d: 0.82s; }

.i0 { --i: 0; }
.i1 { --i: 1; }
.i2 { --i: 2; }
.i3 { --i: 3; }
.i4 { --i: 4; }

@keyframes reveal {
  to {
    opacity: var(--final-opacity, 1);
    transform: none;
    filter: none;
  }
}

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1.03);
    filter: none;
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes headlineFade {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes phoneFloat {
  from { translate: 0 -6px; }
  to { translate: 0 6px; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes linkIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Mobile menu ---------- */

.menu-overlay,
.mobile-menu {
  display: none;
}

/* ---------- ≤900px: phone moves under the copy and peeks up from the stats ---------- */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding-top: clamp(16px, 4vh, 40px);
  }

  /* The device box takes the space left between the button and the stats; the phone
     is sized from that height (cqh) so the whole frame always fits, never cropped. */
  .device {
    flex: 1;
    min-height: 0;
    width: 100%;
    margin-top: clamp(16px, 3vh, 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size;
  }

  .phone {
    --w: min(50vw, 250px, calc(100cqh * 940 / 1973));
    animation: none;
  }

  .phone-dots {
    display: none;
  }
}

/* ---------- ≤720px ---------- */

@media (max-width: 720px) {
  .nav,
  .header > .sign-in {
    display: none;
  }

  .header {
    justify-content: space-between;
  }

  .header-end {
    margin: 0;
  }

  .logo,
  .lang-toggle {
    width: 48px;
    height: 48px;
  }

  .burger {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--pill-dark);
    box-shadow: var(--nav-shadow);
    transition: background 0.3s ease;
  }

  .burger span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 1.5px;
    margin: -0.75px 0 0 -9px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.35s var(--ease), opacity 0.2s ease, background 0.3s ease;
  }

  .burger span:nth-child(1) { transform: translateY(-6.5px); }
  .burger span:nth-child(3) { transform: translateY(6.5px); }

  .burger[aria-expanded="true"] {
    background: #fff;
  }

  .burger[aria-expanded="true"] span {
    background: #000;
  }

  .burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

  .header {
    position: relative;
    z-index: 3;
  }

  .menu-overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: overlayIn 0.28s ease both;
  }

  .mobile-menu:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    z-index: 3;
    top: calc(clamp(16px, 2.4vh, 28px) + 60px);
    left: clamp(14px, 3vw, 32px);
    right: clamp(14px, 3vw, 32px);
    max-width: 420px;
    margin: 0 auto;
    padding: 22px 18px 20px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    animation: menuIn 0.38s var(--ease) both;
  }

  .m-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    font-weight: 500;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--nav-text);
    opacity: 0;
    animation: linkIn 0.4s var(--ease) forwards;
    animation-delay: calc(0.06s + var(--i) * 0.05s);
  }

  .m-link:not(.is-active) {
    color: rgba(46, 46, 46, 0.5);
  }

  .m-link.is-active::after {
    bottom: 8px;
  }

  .m-sign-in {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    margin-top: 12px;
    border-radius: 999px;
    background: var(--pill-dark);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    opacity: 0;
    animation: linkIn 0.4s var(--ease) forwards;
    animation-delay: calc(0.06s + var(--i) * 0.05s);
  }

  .headline {
    letter-spacing: -0.08em;
    line-height: 1.05;
  }

  html[lang="ar"] .headline {
    letter-spacing: 0;
    line-height: 1.3;
  }

  .trust-pill {
    font-size: 12px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: clamp(10px, 1.8vh, 18px);
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .trust {
    --trust-size: 34px;
  }

  .headline {
    letter-spacing: -0.09em;
    line-height: 1.04;
  }

  html[lang="ar"] .headline {
    line-height: 1.28;
  }
}

@media (max-height: 700px) {
  .trust {
    margin-bottom: 12px;
  }

  .subhead {
    margin-top: 10px;
  }

  .cta {
    margin-top: 16px;
  }

  .stat {
    gap: 3px;
  }
}

/* ---------- Tablet (721–900px): bigger phone rising from the stats ---------- */

@media (max-width: 900px) {
  /* Soft halo so the copy holds up over the brightest frames of the video. */
  .headline.anim {
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
  }

  .subhead {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
  }
}

@media (min-width: 721px) and (max-width: 900px) {
  .phone {
    --w: min(320px, calc(100cqh * 940 / 1973));
  }
}

/* ---------- Phones: bigger type, a real phone peek, compact stats, safe areas ---------- */

@media (max-width: 720px) {
  .page {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }

  .hero {
    padding-top: clamp(14px, 3.4vh, 32px);
  }

  .trust {
    margin-bottom: clamp(12px, 2vh, 18px);
  }

  .headline {
    font-size: clamp(34px, 11vw, 50px);
  }

  html[lang="ar"] .headline {
    font-size: clamp(34px, 10.6vw, 48px);
  }

  /* Bigger dots read better at phone sizes. */
  html[lang="ar"] .headline .line {
    -webkit-mask-image: radial-gradient(circle closest-side, #000 88%, transparent 96%);
    mask-image: radial-gradient(circle closest-side, #000 88%, transparent 96%);
    -webkit-mask-size: 0.07em 0.07em;
    mask-size: 0.07em 0.07em;
  }

  .subhead {
    max-width: min(420px, 100%);
    margin-top: clamp(10px, 1.8vh, 16px);
    font-size: 15.5px;
    line-height: 1.5;
  }

  .subhead.anim {
    --final-opacity: 0.92;
  }


  html[lang="ar"] .subhead {
    line-height: 1.65;
  }

  .cta {
    margin-top: clamp(16px, 2.6vh, 24px);
    padding: 13px 26px;
    font-size: 15px;
  }

  .device {
    margin-top: clamp(12px, 2vh, 20px);
    margin-bottom: clamp(8px, 1.4vh, 14px);
  }

  .phone {
    --w: min(66vw, 280px, calc(100cqh * 940 / 1973));
  }

  /* Stats: icon beside value and label, two rows of two */
  .stats {
    row-gap: 12px;
    column-gap: 12px;
    margin-top: 0;
  }

  .stat {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 1px;
    align-items: center;
    text-align: start;
  }

  .stat-icon {
    grid-row: 1 / span 2;
    width: 26px;
    font-size: 22px;
    text-align: center;
  }

  .stat-value {
    justify-self: start;
    font-size: 19px;
    line-height: 1.2;
  }

  .stat-label {
    justify-self: start;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .legal {
    margin-top: 6px;
    font-size: 11px;
  }

  .legal {
    gap: 0 12px;
    margin-top: 4px;
    font-size: 10.5px;
  }

  .legal-links {
    gap: 0 8px;
  }

  .legal-links a {
    padding: 7px 2px;
  }

  .social {
    gap: 6px;
  }

  .social a {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}

@media (max-width: 720px) {
  .cta {
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .cta {
    padding: 12px 18px;
    font-size: 14px;
  }

  .legal {
    gap: 0 6px;
    font-size: 10.5px;
  }
}

/* Phones: the stats sit beside the phone so the whole frame fits at a useful size.
   Grid areas: header / copy / [stats | phone] / footer. RTL flips the row on its own. */
@media (max-width: 720px) {
  .page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "header header"
      "copy copy"
      "stats device"
      "legal legal";
    column-gap: 14px;
  }

  .header { grid-area: header; }
  .hero { display: contents; }
  .stats { grid-area: stats; }
  .legal { grid-area: legal; }

  .hero-copy {
    grid-area: copy;
    justify-self: center;
    padding-top: clamp(12px, 2.4vh, 24px);
  }

  .device {
    grid-area: device;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    height: auto;
    margin: clamp(14px, 2.4vh, 24px) 0 clamp(10px, 1.6vh, 16px);
  }

  .phone {
    --w: min(100cqw, 280px, calc(100cqh * 940 / 1973));
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    row-gap: clamp(12px, 2.2vh, 20px);
    margin: clamp(14px, 2.4vh, 24px) 0 clamp(10px, 1.6vh, 16px);
  }

  html[lang="ar"] .headline {
    line-height: 1.2;
  }

  .stats,
  .legal {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  }

  .stat-label {
    color: #b4b4b4;
  }

  /* Footer: social icons and links flow together in two short rows. */
  .legal-links {
    display: contents;
  }

  .legal-links > span[aria-hidden] {
    display: none;
  }

  .legal {
    gap: 0 12px;
  }
}

/* Short phones (SE, mini): tighten, and drop the phone when it would be a sliver. */
@media (max-width: 720px) and (max-height: 720px) {
  .headline {
    font-size: clamp(30px, 9.6vw, 42px);
  }

  html[lang="ar"] .headline {
    font-size: clamp(30px, 9.4vw, 40px);
  }

  .subhead {
    font-size: 14.5px;
  }
}

@media (max-width: 720px) and (max-height: 700px) {
  .device {
    display: none;
  }

  .page {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "header header"
      "copy copy"
      "stats stats"
      "legal legal";
  }

  .hero-copy {
    align-self: center;
    padding-top: 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 8px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .anim,
  .headline .line,
  .m-link,
  .m-sign-in {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .subhead.anim {
    opacity: 0.8;
  }
}
