/* Yalla Sawa landing page. Colors mirror packages/ui/src/tokens.ts. System Arabic fonts only:
   no web-font download on weak connections. */
:root {
  --primary: #004850;
  --primary-deep: #00343a;
  --primary-soft: #e4f1f2;
  --accent: #0ad8d8;
  --coral: #f97557;
  --driver: #b45309;
  --driver-surface: #fff7ed;
  --driver-border: #f5d9b8;
  --canvas: #f3f5f6;
  --surface: #ffffff;
  --border: #e2e4e8;
  --text: #111318;
  --text-2: #5b6270;
  --text-3: #8a919e;
  --radius: 16px;
  --shadow: 0 2px 8px rgba(11, 31, 34, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 20, 24, 0.35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "SF Arabic",
    "Segoe UI",
    "Noto Sans Arabic",
    Tahoma,
    sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.narrow {
  max-width: 860px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand img {
  width: 132px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.site-nav a:not(.nav-cta) {
  display: none;
}

.site-nav .nav-cta {
  background: var(--primary);
  color: #fff;
}

.site-nav .nav-cta:hover {
  background: var(--primary-deep);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 500px at 15% 110%, rgba(10, 216, 216, 0.28), transparent 60%),
    radial-gradient(700px 400px at 100% -10%, rgba(249, 117, 87, 0.18), transparent 60%),
    linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%);
}

.hero::after {
  /* faint dashed road line running through the hero */
  content: "";
  position: absolute;
  inset-inline: -10%;
  bottom: 56px;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 0 36px,
    transparent 36px 64px
  );
  transform: rotate(-4deg);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
  padding-block: 48px 64px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(10, 216, 216, 0.12);
  border: 1px solid rgba(10, 216, 216, 0.35);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0;
}

.hero .lead {
  margin-top: 16px;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 36em;
}

.hero-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  flex: 1 1 200px;
  max-width: 280px;
  padding: 12px 20px;
  border-radius: 14px;
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.store-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.store-button:focus-visible,
.play-button:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.store-button span {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.store-button strong {
  font-size: 1.08rem;
}

.store-button small {
  font-size: 0.82rem;
  color: var(--text-2);
}

.platform-icon {
  width: 30px;
  height: 30px;
  flex: none;
  fill: currentColor;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(300px, 78vw);
  aspect-ratio: 600 / 1260;
  padding: 10px;
  border-radius: 46px;
  background: #0b1416;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  transform: rotate(-3deg);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
  background: var(--canvas);
}

/* Sections */
.section {
  padding-block: 64px;
}

.tinted {
  background: var(--canvas);
}

.section-lead {
  text-align: center;
  color: var(--text-2);
  margin: 12px auto 0;
  max-width: 40em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card p {
  color: var(--text-2);
  margin-top: 8px;
}

/* Video */
.video-section {
  background: var(--canvas);
}

.video-frame {
  position: relative;
  margin-top: 32px;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: var(--primary-deep);
  box-shadow: 0 16px 40px rgba(0, 52, 58, 0.25);
}

.video-frame img,
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-frame img {
  opacity: 0.85;
}

.play-button {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px 14px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.play-button:hover {
  transform: scale(1.05);
}

.play-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.video-fallback {
  position: absolute;
  inset-inline: 0;
  bottom: 16px;
  text-align: center;
  color: #fff;
}

/* How it works */
.how-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

/* Features */
.feature-grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.icon-well {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}

.feature-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Drivers */
.drivers-card {
  display: grid;
  gap: 24px;
  padding: 32px 24px;
  border-radius: 24px;
  background: var(--driver-surface);
  border: 1px solid var(--driver-border);
}

.drivers-card h2 {
  text-align: start;
  color: var(--driver);
}

.drivers-card p {
  margin-top: 12px;
  color: var(--text-2);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  align-content: center;
}

.check-list li {
  position: relative;
  padding-inline-start: 36px;
  font-weight: 600;
}

.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.3em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--driver)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

/* Download */
.download-section {
  background:
    radial-gradient(700px 360px at 50% 120%, rgba(10, 216, 216, 0.22), transparent 70%),
    var(--primary);
  color: #fff;
}

.download-section .section-lead {
  color: rgba(255, 255, 255, 0.8);
}

.download-section .downloads {
  justify-content: center;
}

.install-grid {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.install-grid .card {
  color: var(--text);
}

.install-grid h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.install-grid h3 .platform-icon {
  width: 24px;
  height: 24px;
}

.install-steps {
  margin: 12px 0 0;
  padding-inline-start: 1.4em;
  color: var(--text-2);
}

.install-steps li + li {
  margin-top: 6px;
}

.text-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-inner img {
  width: 108px;
  height: auto;
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
}

.muted {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

/* Wider screens */
@media (min-width: 640px) {
  .how-steps,
  .install-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .site-nav a:not(.nav-cta) {
    display: inline-block;
  }
  .brand img {
    width: 168px;
  }
  .hero-inner {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding-block: 80px 96px;
  }
  .how-steps,
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .drivers-card {
    grid-template-columns: 1.2fr 1fr;
    padding: 48px;
  }
  .section {
    padding-block: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .store-button,
  .play-button {
    transition: none;
  }
}
