/* Sahrati site. Colours are the app's tokens (replica/design/tokens.json, palette "evening").
   The idea: the page is the guide for one evening. Every section is a programme with a start time,
   the clock in the top bar follows the programme on screen, and the sky darkens as the night goes on. */
:root {
  --bg: #0A0C16;
  --surface: #141727;
  --surface-2: #1C2034;
  --border: #2E3350;
  --text: #F4F5FA;
  --text-muted: #A6AAC0;
  --accent: #F5B13D;
  --accent-soft: rgba(245, 177, 61, .14);
  --on-accent: #17130A;
  --danger: #FF8A80;
  --ok: #7FDBA6;
  --radius: 16px;
  --max: 1120px;
  --night: 0; /* 0 = dusk, 1 = late night; set by site.js while scrolling */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.75 system-ui, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.center { margin-inline: auto; }

/* The sky: dusk at the top of the page, night further down. */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 115%, rgba(245, 120, 61, calc(.30 * (1 - var(--night)))), transparent 60%),
    linear-gradient(180deg, #0A0C16 0%, color-mix(in srgb, #2A1F45 calc(100% * (1 - var(--night))), #0A0C16) 100%);
}
.stars { position: absolute; inset: 0; opacity: calc(.15 + .85 * var(--night)); }
.moon {
  position: absolute; top: 120px; inset-inline-end: 7vw; width: 64px; height: 64px; border-radius: 50%;
  box-shadow: inset -14px 8px 0 0 #F7E7C6; opacity: calc(.35 + .65 * var(--night));
  transform: translateY(calc(40px * (1 - var(--night))));
}

/* Top bar: brand, the guide clock with the programme's progress, languages. */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 12, 22, .78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 21px; }
.brand img { width: 38px; }
.now { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.now .clock { color: var(--accent); font-weight: 700; font-size: 15px; }
.now .title { color: var(--text-muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .bar { flex: 1; max-width: 220px; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.now .bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.topbar nav a { color: var(--text-muted); text-decoration: none; margin-inline-start: 18px; font-size: 15px; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--text); }

/* A programme: the slot line (time + name) above the content. */
.programme { padding: 72px 0; border-top: 1px solid var(--border); }
.programme:first-of-type { border-top: 0; }
.slot { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--text-muted); font-size: 15px; }
.slot time { color: var(--accent); font-weight: 700; background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; }
.slot::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, transparent, var(--border)); }
[dir="ltr"] .slot::after { background: linear-gradient(to right, var(--border), transparent); }
.programme h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.3; margin: 0 0 20px; }
.lead { color: var(--text-muted); max-width: 720px; font-size: 19px; }

/* 20:00 — the opening: a TV in a dark room, its light on the wall behind it. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: center; padding-top: 40px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--text-muted); font-size: 19px; margin: 0 0 26px; }
.tv { position: relative; }
.tv::before {
  content: ""; position: absolute; inset: -12% -8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 177, 61, .35), rgba(120, 90, 255, .12) 60%, transparent);
  filter: blur(30px); animation: glow 7s ease-in-out infinite alternate;
}
.tv img { border-radius: 14px; border: 10px solid #05060C; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.tv .stand { width: 22%; height: 10px; margin: 0 auto; background: #05060C; border-radius: 0 0 8px 8px; }
@keyframes glow { from { opacity: .7; transform: scale(.97); } to { opacity: 1; transform: scale(1.03); } }

.button {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; border: 0;
  font: inherit; font-weight: 700; cursor: pointer;
}
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.button:disabled { opacity: .6; cursor: default; }
.note { display: block; color: var(--text-muted); font-size: 14px; margin-top: 10px; }

/* The waitlist: one line, like a reminder you set on a programme. */
.remind { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.remind input, .field input {
  flex: 1 1 220px; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit;
}
.remind input:focus, .field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.status { min-height: 1.75em; margin: 8px 0 0; font-size: 15px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }

/* 21:00 — three steps, drawn as a single strip of the guide. */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 0; margin: 0; list-style: none;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.strip li { padding: 24px; background: var(--surface); border-inline-start: 1px solid var(--border); }
.strip li:first-child { border-inline-start: 0; background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.strip .when { display: block; color: var(--accent); font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.strip strong { display: block; font-size: 19px; margin-bottom: 4px; }
.strip p { margin: 0; color: var(--text-muted); }

/* 21:30 — the features are channels. Arrow keys move between them, like a remote. */
.channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.channel {
  position: relative; background: var(--surface); border: 2px solid transparent; border-radius: 14px; padding: 18px 18px 20px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease; cursor: default;
}
.channel:focus, .channel:hover { outline: none; transform: scale(1.04); border-color: var(--accent); background: var(--surface-2); z-index: 1; }
.channel .no { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .08em; }
.channel h3 { margin: 4px 0 6px; font-size: 18px; line-height: 1.4; }
.channel p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.hint { color: var(--text-muted); font-size: 14px; margin-top: 16px; }
.hint kbd { display: inline-block; min-width: 26px; padding: 0 6px; border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 6px; text-align: center; font: inherit; color: var(--text); }
.also { color: var(--text-muted); margin-top: 8px; }
.pair { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 40px; }
.pair img { border-radius: 14px; border: 1px solid var(--border); }
.pair .phone { max-width: 260px; justify-self: center; }

/* 22:00 — the price, as the rest of your month on a timeline. */
.timeline { display: grid; grid-template-columns: 7fr 23fr; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 20px; }
.timeline div { padding: 18px 20px; }
.timeline .free { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); border-inline-end: 2px dashed var(--accent); }
.timeline .paid { background: var(--surface); }
.timeline b { display: block; font-size: 20px; }
.timeline span { color: var(--text-muted); font-size: 15px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { background: var(--surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.plan.main { border-color: var(--accent); }
.plan h3 { margin: 0; font-size: 20px; }
.plan .who { color: var(--text-muted); margin: 2px 0 12px; font-size: 15px; }
.price { font-size: 34px; font-weight: 700; }
.price small { font-size: 15px; color: var(--text-muted); font-weight: 400; }
.fine { color: var(--text-muted); font-size: 15px; margin-top: 20px; }

/* 22:30 — questions. */
details { background: var(--surface); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; border: 1px solid transparent; }
details[open] { border-color: var(--border); }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--text-muted); margin: 10px 0 0; }

/* 23:00 — good night. */
.goodnight { text-align: center; }
.goodnight .remind { margin: 24px auto 0; }
.goodnight h2 { font-size: clamp(32px, 5vw, 56px); }

footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--text-muted); font-size: 15px; }
footer p { margin: 4px 0; }
footer nav a { color: var(--text-muted); margin-inline-end: 18px; }

/* Documents: privacy, terms, account deletion, TV help. */
.doc { max-width: 760px; padding-block: 48px 72px; }
.doc h1 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.3; margin: 0 0 8px; }
.doc .updated { color: var(--text-muted); margin: 0 0 32px; }
.doc h2 { font-size: 23px; margin: 40px 0 10px; }
.doc p, .doc li { color: #D9DBE7; }
.doc ul { padding-inline-start: 22px; }
.doc table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { color: var(--text-muted); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.card h2 { margin-top: 0; }
.field { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.code-big { font-size: clamp(40px, 10vw, 64px); font-weight: 700; color: var(--accent); letter-spacing: .12em; margin: 8px 0; }
.lang-alt { color: var(--text-muted); font-size: 15px; }

@media (max-width: 960px) {
  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero, .pair, .strip, .plans { grid-template-columns: minmax(0, 1fr); }
  .strip li { border-inline-start: 0; border-top: 1px solid var(--border); }
  .strip li:first-child { border-top: 0; }
  .topbar nav .sections, .now .bar { display: none; }
  .programme { padding: 56px 0; }
  .hero { padding-top: 16px; }
  .timeline { grid-template-columns: 1fr; }
  .timeline .free { border-inline-end: 0; border-bottom: 2px dashed var(--accent); }
  .moon { width: 44px; height: 44px; box-shadow: inset -10px 6px 0 0 #F7E7C6; }
}
@media (max-width: 420px) {
  .channels { grid-template-columns: minmax(0, 1fr); }
  .now .title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tv::before { animation: none; }
  .channel { transition: none; }
}
