/* ostora.online
   One stylesheet serves both scripts: every box uses logical properties, so flipping
   <html dir> mirrors the page without a second rule anywhere. */

:root {
  --navy:     #0B0E17;   /* app BackgroundDark — must match, it is the window colour too */
  --panel:    #161B28;   /* app SurfaceDark */
  --raise:    #1D2434;
  --cyan:     #5FD9FF;
  --violet:   #B08CFF;
  --signal:   #FF3B30;   /* the live dot, and nothing else */
  --phosphor: #E8F4FF;   /* near-white with a cyan cast, not #FFF */
  --dim:      #8895AA;
  --line:     rgba(95, 217, 255, .14);

  --sans: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--phosphor);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  /* A faint cyan bloom top-centre: the glow off a screen in a dark room. */
  background-image:
    radial-gradient(900px 520px at 50% -220px, rgba(95, 217, 255, .10), transparent 70%),
    radial-gradient(680px 420px at 88% 8%, rgba(176, 140, 255, .07), transparent 70%);
  background-repeat: no-repeat;
}

/* Language. Arabic is the default and shows without JS. */
html[lang="ar"] .en { display: none; }
html[lang="en"] .ar { display: none; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration-color: rgba(95, 217, 255, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

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

.skip {
  position: absolute; inset-inline-start: -9999px; top: 8px;
  background: var(--cyan); color: #04121A; padding: 10px 16px;
  border-radius: 8px; font-weight: 600; z-index: 100;
}
.skip:focus { inset-inline-start: 12px; }

/* ── Bar ─────────────────────────────────────────────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad);
  background: rgba(11, 14, 23, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 32px; height: 32px; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand-name b { color: var(--cyan); font-weight: 700; }
.bar-end { display: flex; align-items: center; gap: 10px; }

.lang {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  min-width: 44px; height: 36px; padding-inline: 10px;
  background: transparent; color: var(--dim);
  border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: color .18s, border-color .18s;
}
.lang:hover { color: var(--phosphor); border-color: rgba(95, 217, 255, .4); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; text-decoration: none;
  background: var(--cyan); color: #04121A;
  border: 0; border-radius: 10px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s;
}
.btn:hover { background: #7FE2FF; transform: translateY(-1px); box-shadow: 0 8px 26px rgba(95, 217, 255, .28); }
.btn:active { transform: translateY(0); }
.btn-sm { height: 36px; padding-inline: 16px; font-size: 14px; }
.btn-lg { height: 54px; padding-inline: 28px; font-size: 17px; }
.btn svg { flex: none; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 8vw, 100px) var(--pad) clamp(40px, 6vw, 72px);
  display: grid; gap: clamp(36px, 6vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 920px) { .hero { grid-template-columns: 1.15fr .85fr; } }

h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 7.4vw, 74px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -.035em;
}
html[lang="ar"] h1 { letter-spacing: -.01em; line-height: 1.22; }
h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(96deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text;
}

.lede { margin: 0 0 30px; color: var(--dim); font-size: clamp(16px, 2vw, 19px); max-width: 46ch; font-weight: 300; }

.cta { scroll-margin-top: 80px; }
.meta {
  margin: 14px 0 0; font-family: var(--mono); font-size: 13px; color: var(--dim);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.meta .sep { opacity: .45; }
.note { margin: 18px 0 0; font-size: 14px; color: var(--dim); max-width: 44ch; }

/* ── Signature: the channel OSD ──────────────────────────────────────────── */
.osd-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.osd { display: flex; align-items: stretch; gap: 12px; width: 100%; max-width: 420px; }

.osd-screen {
  position: relative; flex: 1; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel);
  min-height: 210px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* Per-channel art, set from JS. */
.osd-art { position: absolute; inset: 0; opacity: .85; transition: background .5s ease; }
.osd-screen::after {          /* keeps the type legible over any art */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11, 14, 23, .94) 30%, rgba(11, 14, 23, .25) 75%, transparent);
}

/* The risk, contained to this one element: scanlines and a slow signal drift. */
.scan {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .045) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  animation: drift 7s linear infinite;
}
@keyframes drift { to { transform: translateY(3px); } }

.osd-body { position: relative; z-index: 4; padding: 18px 20px 20px; }
.osd-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.osd-num { font-family: var(--mono); font-size: 26px; font-weight: 500; color: var(--cyan); letter-spacing: -.02em; }
.osd-num .osd-total { font-size: 15px; color: var(--dim); }

.osd-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--dim);
}
.osd-live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--dim);
}
/* Only a genuinely live channel gets the signal colour and the pulse. */
.osd-live.is-live i {
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(255, 59, 48, .6); animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.osd-name { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.osd-sub  { font-size: 13.5px; color: var(--dim); margin-top: 3px; }

.rocker {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.rocker button {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; color: var(--phosphor);
  border: 0; border-radius: 10px; cursor: pointer;
  transition: background .15s, color .15s;
}
.rocker button:hover { background: rgba(95, 217, 255, .14); color: var(--cyan); }
.rocker button:active { background: rgba(95, 217, 255, .26); }
.rocker-label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--dim); }

.osd-hint { margin: 0; font-size: 13.5px; color: var(--dim); text-align: center; }

/* ── Count strip ─────────────────────────────────────────────────────────── */
.strip {
  max-width: var(--maxw); margin: 0 auto;
  padding: 26px var(--pad);
  border-block: 1px solid var(--line);
  display: grid; gap: 22px 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.strip div { display: flex; flex-direction: column; gap: 2px; }
.strip b {
  font-family: var(--mono); font-size: clamp(24px, 3.4vw, 32px); font-weight: 500;
  color: var(--cyan); letter-spacing: -.02em; line-height: 1.1;
}
.strip span { font-size: 13.5px; color: var(--dim); }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 9vw, 108px) var(--pad) 0;
  scroll-margin-top: 76px;
}
.head { margin-bottom: clamp(28px, 4vw, 44px); }
.eyebrow {
  margin: 0 0 10px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--violet);
}
.section h2 {
  margin: 0; font-size: clamp(28px, 4.4vw, 42px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.15;
}
html[lang="ar"] .section h2 { letter-spacing: -.01em; line-height: 1.3; }

/* ── Channel list ────────────────────────────────────────────────────────── */
.chans, .steps { list-style: none; margin: 0; padding: 0; }
.chans li, .steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.chans li:last-child, .steps li:last-child { border-bottom: 1px solid var(--line); }
.ch {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  color: var(--cyan); opacity: .55; padding-top: 5px;
  font-variant-numeric: tabular-nums;
}
.chans h3, .steps h3 { margin: 0 0 5px; font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.chans h3 span { color: var(--dim); font-weight: 400; }
.chans p, .steps p { margin: 0; color: var(--dim); max-width: 64ch; font-size: 15.5px; }

/* ── Screens ─────────────────────────────────────────────────────────────── */
.shots { display: grid; gap: clamp(18px, 3vw, 30px); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.shots figure { margin: 0; }
.shots img {
  width: 100%; border-radius: 20px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .06);
}
figcaption { margin-top: 12px; font-size: 13.5px; color: var(--dim); text-align: center; }

.wide { margin: clamp(24px, 4vw, 40px) 0 0; }
.wide img {
  width: 100%; border-radius: 16px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .06);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.cards article {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .2s, transform .2s;
}
.cards article:hover { border-color: rgba(95, 217, 255, .34); transform: translateY(-2px); }
.cards h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 600; letter-spacing: -.01em; }
.cards p { margin: 0; color: var(--dim); font-size: 15px; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 17px;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--mono); font-size: 21px; color: var(--cyan);
  flex: none; transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 22px; color: var(--dim); max-width: 68ch; font-size: 15.5px; }

/* ── Close ───────────────────────────────────────────────────────────────── */
.close {
  max-width: var(--maxw); margin: clamp(64px, 10vw, 120px) auto 0;
  padding: clamp(48px, 7vw, 80px) var(--pad);
  text-align: center;
}
.close h2 { margin: 0 0 26px; font-size: clamp(30px, 5vw, 46px); font-weight: 700; letter-spacing: -.03em; }
.close .meta { justify-content: center; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--pad) 56px;
  display: grid; gap: 18px; justify-items: center; text-align: center;
}
.foot-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.foot-brand b { color: var(--cyan); }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
footer nav a { font-size: 14.5px; color: var(--dim); text-decoration: none; }
footer nav a:hover { color: var(--cyan); }
.disclaimer { margin: 0; font-size: 13px; color: var(--dim); opacity: .75; max-width: 66ch; }

/* ── Reveal ──────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Privacy page ────────────────────────────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 76px) var(--pad) 80px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 8px; }
.doc .updated { font-family: var(--mono); font-size: 13px; color: var(--dim); margin: 0 0 36px; }
.doc h2 { font-size: 20px; font-weight: 600; margin: 38px 0 10px; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--dim); font-size: 15.5px; }
.doc ul { padding-inline-start: 20px; }
.doc li { margin-bottom: 7px; }
.doc strong { color: var(--phosphor); font-weight: 600; }
