/* Arab TV Guide — website styles. Mirrors the app theme (mobile/src/theme/index.ts). */
@font-face { font-family: 'Cairo'; font-weight: 400; font-display: swap; src: url('../fonts/Cairo-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-weight: 600; font-display: swap; src: url('../fonts/Cairo-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-weight: 700; font-display: swap; src: url('../fonts/Cairo-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-weight: 900; font-display: swap; src: url('../fonts/Cairo-Black.ttf') format('truetype'); }

:root {
  --bg: #08080d;
  --bg-elevated: #0f0f17;
  --surface: #14141e;
  --surface-high: #1c1c2a;
  --surface-highest: #262638;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5fa;
  --text-dim: #a8a8be;
  --text-mute: #6f6f88;
  --primary: #8b5cf6;
  --primary-soft: rgba(139, 92, 246, 0.18);
  --accent: #ec4899;
  --gold: #ffc83d;
  --live: #ff3d5a;
  --success: #34d399;
  --brand: linear-gradient(135deg, #8b5cf6, #ec4899);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 600px at 85% -5%, rgba(236, 72, 153, 0.16), transparent 70%),
    radial-gradient(900px 700px at 0% 8%, rgba(139, 92, 246, 0.2), transparent 70%);
  background-repeat: no-repeat;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); background: rgba(8, 8, 13, 0.72); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand-link { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 19px; }
.brand-link img { width: 40px; height: 40px; border-radius: 11px; }
.nav { display: flex; align-items: center; gap: 26px; font-weight: 600; color: var(--text-dim); font-size: 15px; }
.nav a:hover { color: var(--text); }
.lang { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.lang button { font: inherit; font-size: 14px; font-weight: 700; color: var(--text-dim); background: transparent; border: 0; padding: 5px 13px; border-radius: 999px; cursor: pointer; transition: all 0.2s; }
.lang button:hover { color: var(--text); }
.lang button[aria-pressed='true'] { background: var(--brand); color: #fff; box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45); }
@media (max-width: 860px) { .nav { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 700; border-radius: 999px; padding: 13px 26px; border: 1px solid var(--border-strong); background: var(--surface-high); color: var(--text); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.btn:hover { transform: translateY(-2px); background: var(--surface-highest); }
.btn.primary { background: var(--brand); border-color: transparent; box-shadow: 0 12px 34px rgba(139, 92, 246, 0.4); }
.btn.primary:hover { box-shadow: 0 16px 40px rgba(236, 72, 153, 0.45); }
.play-badge { display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 18px; border-radius: 14px; background: #000; border: 1.5px solid #a6a6a6; transition: transform 0.2s, border-color 0.2s; direction: ltr; text-align: left; }
.play-badge:hover { transform: translateY(-2px); border-color: #fff; }
.play-badge svg { width: 30px; height: 32px; }
.play-badge small { display: block; font-size: 11px; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; color: #e5e5e5; font-weight: 600; }
.play-badge strong { display: block; font-size: 23px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 36px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--primary-soft); border: 1px solid rgba(139, 92, 246, 0.4); color: #cdb8ff; font-weight: 700; font-size: 14px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 61, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0); } }
.hero h1 { margin: 18px 0 14px; font-weight: 900; line-height: 1.25; font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -0.01em; }
.hero h1 .ar { display: block; background: linear-gradient(90deg, #ffd84d, #ff9a3d 55%, #ff6fa8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--text-dim); font-size: clamp(17px, 2vw, 20px); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.stat { padding: 12px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); min-width: 120px; }
.stat b { display: block; font-size: 26px; font-weight: 900; line-height: 1.2; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.hero-visual { position: relative; display: flex; justify-content: center; min-height: 560px; }
.hero-visual::before { content: ''; position: absolute; inset: 8% 4% 4%; border-radius: 50%; background: radial-gradient(circle, rgba(236, 72, 153, 0.45), rgba(139, 92, 246, 0.3) 45%, transparent 70%); filter: blur(30px); }
.hero-visual .phone { position: absolute; }
.hero-visual .phone.front { width: 262px; z-index: 2; inset-block-start: 0; inset-inline-start: 50%; margin-inline-start: -60px; transform: rotate(4deg); }
.hero-visual .phone.back { width: 238px; z-index: 1; inset-block-start: 56px; inset-inline-start: 50%; margin-inline-start: -250px; transform: rotate(-5deg); opacity: 0.95; }
[dir='rtl'] .hero-visual .phone.front { margin-inline-start: -202px; transform: rotate(-4deg); }
[dir='rtl'] .hero-visual .phone.back { margin-inline-start: 12px; transform: rotate(5deg); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 520px; order: -1; }
}
@media (max-width: 520px) { .hero-visual { min-height: 460px; } .hero-visual .phone.front { width: 220px; margin-inline-start: -50px; } .hero-visual .phone.back { width: 196px; margin-inline-start: -190px; } [dir='rtl'] .hero-visual .phone.front { margin-inline-start: -170px; } [dir='rtl'] .hero-visual .phone.back { margin-inline-start: -6px; } }

/* ---------- phone frame ---------- */
.phone { position: relative; border-radius: 40px; padding: 9px; background: linear-gradient(145deg, #3b3b46, #0b0b10 40%, #23232c); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12) inset; }
.phone::after { content: ''; position: absolute; top: 17px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #15151c; z-index: 3; }
.phone img { width: 100%; height: auto; border-radius: 32px; background: #08080d; aspect-ratio: 540 / 1053; object-fit: cover; }

/* ---------- sections ---------- */
section { padding: 84px 0; position: relative; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.04em; font-size: 15px; }
.section-title { font-weight: 900; font-size: clamp(28px, 4vw, 44px); line-height: 1.3; margin: 6px 0 12px; }
.section-sub { color: var(--text-dim); max-width: 680px; font-size: 18px; }
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; }
.card { padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-elevated)); border: 1px solid var(--border); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-6px); border-color: rgba(139, 92, 246, 0.5); box-shadow: 0 24px 50px rgba(139, 92, 246, 0.14); }
.card .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--brand); box-shadow: 0 10px 24px rgba(139, 92, 246, 0.4); margin-bottom: 18px; }
.card .ico svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 16px; }
.card.wide { grid-column: span 2; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } .card.wide { grid-column: auto; } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } .card.wide { grid-column: auto; } section { padding: 60px 0; } }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.chip { padding: 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 15px; color: var(--text-dim); direction: ltr; transition: color 0.2s, border-color 0.2s; }
.chip:hover { color: var(--text); border-color: var(--primary); }
.fine { margin-top: 22px; color: var(--text-mute); font-size: 14px; }

/* ---------- gallery ---------- */
.gallery { display: flex; gap: 26px; overflow-x: auto; padding: 46px 20px 26px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--surface-highest) transparent; }
.gallery figure { flex: 0 0 auto; width: 250px; scroll-snap-align: center; text-align: center; }
.gallery figcaption { margin-top: 16px; font-weight: 700; color: var(--text-dim); }
.gallery .phone { transition: transform 0.3s; }
.gallery figure:hover .phone { transform: translateY(-8px) rotate(-1deg); }
@media (min-width: 1380px) { .gallery { justify-content: center; } }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin: 44px auto 0; display: grid; gap: 12px; }
details { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: border-color 0.2s; }
details[open] { border-color: rgba(139, 92, 246, 0.5); }
summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 26px; font-weight: 400; color: var(--primary); line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details .a { padding: 0 22px 20px; color: var(--text-dim); }
details .a a { color: #cdb8ff; text-decoration: underline; text-underline-offset: 3px; }
.notice { max-width: 820px; margin: 24px auto 0; padding: 18px 22px; border-radius: var(--radius-sm); background: rgba(255, 200, 61, 0.07); border: 1px solid rgba(255, 200, 61, 0.35); color: #ffe7a6; font-size: 15.5px; }
.notice strong { color: var(--gold); }

.cta-band { margin: 0 auto; padding: 56px 28px; border-radius: 32px; text-align: center; background: radial-gradient(500px 260px at 20% 0%, rgba(236, 72, 153, 0.45), transparent 70%), radial-gradient(500px 260px at 80% 100%, rgba(139, 92, 246, 0.5), transparent 70%), var(--surface); border: 1px solid var(--border-strong); }
.cta-band .cta { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 46px 0 40px; background: var(--bg-elevated); font-size: 15px; color: var(--text-dim); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
.foot-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.legal { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-mute); font-size: 13.5px; display: grid; gap: 8px; }

/* ---------- legal documents ---------- */
.doc-head { padding: 56px 0 8px; }
.doc-head h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 900; line-height: 1.25; margin: 8px 0; }
.meta { color: var(--text-mute); font-size: 14.5px; }
.doc { display: none; max-width: 860px; margin: 0 auto; padding-bottom: 80px; }
html[data-lang='ar'] .doc[lang='ar'], html[data-lang='en'] .doc[lang='en'], html[data-lang='fr'] .doc[lang='fr'] { display: block; }
.doc h2 { font-size: 24px; font-weight: 800; margin: 44px 0 10px; padding-top: 10px; scroll-margin-top: 90px; line-height: 1.4; }
.doc h2 .n { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; margin-inline-end: 10px; border-radius: 10px; background: var(--primary-soft); color: #cdb8ff; font-size: 16px; }
.doc h3 { font-size: 18px; font-weight: 700; margin: 24px 0 6px; color: #e5dcff; }
.doc p, .doc li { color: #cfcfe0; }
.doc p { margin: 10px 0; }
.doc ul, .doc ol { margin: 10px 0; padding-inline-start: 26px; display: grid; gap: 6px; }
.doc a { color: #cdb8ff; text-decoration: underline; text-underline-offset: 3px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; border-radius: 12px; overflow: hidden; }
.doc th, .doc td { padding: 10px 14px; text-align: start; border: 1px solid var(--border); vertical-align: top; }
.doc th { background: var(--surface-high); color: var(--text); }
.doc td { background: var(--surface); color: #cfcfe0; }
.table-scroll { overflow-x: auto; }
.summary-box { margin: 22px 0 6px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(139, 92, 246, 0.14), rgba(236, 72, 153, 0.06)); border: 1px solid rgba(139, 92, 246, 0.4); }
.summary-box h2 { margin: 0 0 8px; padding: 0; font-size: 20px; }
.toc { margin: 22px 0; padding: 18px 24px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.toc ol { margin: 8px 0 0; columns: 2; column-gap: 32px; }
.toc a { text-decoration: none; color: var(--text-dim); }
.toc a:hover { color: var(--text); }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.todo { background: rgba(255, 61, 90, 0.18); color: #ffb3c0; padding: 1px 8px; border-radius: 6px; font-weight: 700; direction: ltr; unicode-bidi: embed; }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pill i { animation: none; }
  .card, .btn, .play-badge, .gallery .phone { transition: none; }
}
@media print { body { background: #fff; color: #000; } .site-header, footer, .lang { display: none; } .doc p, .doc li, .doc td { color: #000; } .doc { display: none; } html[data-lang='en'] .doc[lang='en'] { display: block; } }

/* ---------- language visibility (all three languages live in the HTML so it works without JS and is crawlable) ---------- */
html[data-lang='ar'] [data-l]:not([data-l='ar']),
html[data-lang='en'] [data-l]:not([data-l='en']),
html[data-lang='fr'] [data-l]:not([data-l='fr']) { display: none !important; }

/* ---------- small phones ---------- */
@media (max-width: 520px) {
  .wrap { width: min(100% - 28px, var(--max)); }
  .brand-link span { display: none; }
  .lang button { padding: 5px 11px; font-size: 13px; }
  .hero { padding-top: 36px; }
  .stat { min-width: 0; flex: 1 1 28%; padding: 10px 12px; }
  .cta { gap: 12px; }
  .play-badge strong { font-size: 21px; }
  .gallery figure { width: 220px; }
  .summary-box, .toc { padding: 18px; }
}
