/* katos.app. Colours, type and glass follow design/tokens (see tv-web/src/generated/tokens.css). */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500 600; font-display: swap; src: url(/static/fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/static/fonts/inter-700.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 800 900; font-display: swap; src: url(/static/fonts/inter-800.woff2) format("woff2"); }
@font-face { font-family: Teko; font-weight: 700; font-display: block; src: url(/static/fonts/teko.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #050507;
  --surface: #1a1a1e;
  --tile: #17181d;
  --text: #f5f5f7;
  --text2: rgba(235, 235, 245, .64);
  --text3: rgba(235, 235, 245, .40);
  --hairline: rgba(255, 255, 255, .10);
  --glass: rgba(255, 255, 255, .08);
  --glass-strong: rgba(30, 30, 36, .62);
  --rim: linear-gradient(135deg, rgba(255,255,255,.70) 0%, rgba(255,255,255,.14) 26%, rgba(255,255,255,0) 50%, rgba(255,255,255,.10) 74%, rgba(255,255,255,.45) 100%);
  --live: #ff453a;
  --link: #8ab4ff;
  --radius: 18px;
  --gutter: clamp(16px, 5vw, 56px);
  --font: Inter, "Noto Sans Arabic", "Geeza Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: #b3cdff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

/* Liquid Glass: blurred fill, gradient rim, top sheen. Only on controls and small surfaces. */
.glass { position: relative; background: var(--glass-strong); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); }
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; padding: 14px var(--gutter) 0; }
.bar {
  max-width: 1180px; margin: 0 auto; height: 60px; border-radius: 30px; padding: 0 10px 0 18px;
  display: flex; align-items: center; gap: 12px;
}
[dir="rtl"] .bar { padding: 0 18px 0 10px; }
.brand { direction: ltr; display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-inline-end: auto; }
.brand img { width: 28px; height: 28px; object-fit: contain; }
.wordmark { font: 700 31px/1 Teko, sans-serif; letter-spacing: 0; padding-top: .16em; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--text2); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 20px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.16); }
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--text2);
  font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 20px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--text); background: rgba(255,255,255,.08); }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); margin: 0; padding: 6px; list-style: none; min-width: 180px;
  border-radius: 18px; display: grid; gap: 2px;
}
.lang li a { display: block; padding: 8px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-size: 15px; }
.lang li a:hover { background: rgba(255,255,255,.10); }
.lang li a[aria-current="true"] { background: rgba(255,255,255,.16); font-weight: 600; }

@media (max-width: 760px) {
  .bar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 8px 8px 14px; border-radius: 26px; row-gap: 4px; }
  [dir="rtl"] .bar { padding: 8px 14px 8px 8px; }
  .nav { order: 3; width: 100%; justify-content: space-between; overflow-x: auto; scrollbar-width: none; }
  .nav a { font-size: 14px; padding: 7px 10px; }
  .wordmark { font-size: 28px; }
}

/* ---------- Home ---------- */
main { display: block; }
.hero { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--gutter) 0; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text2); margin: 0 0 14px; }
[lang="ar"] .eyebrow { letter-spacing: 0; }
h1, h2, h3 { margin: 0; color: var(--text); }
.hero h1 { font-size: clamp(40px, 7.4vw, 84px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; max-width: 14ch; margin: 0 auto; }
[lang="ar"] .hero h1, [lang="ar"] h2 { letter-spacing: 0; line-height: 1.25; }
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--text2); max-width: 640px; margin: 22px auto 0; }

.screen { position: relative; max-width: 1080px; margin: clamp(40px, 7vw, 72px) auto 0; padding: 0 var(--gutter); }
.screen::before {
  content: ""; position: absolute; inset: 8% 6% -6%; z-index: -1; filter: blur(60px); opacity: .55;
  background: radial-gradient(60% 60% at 30% 40%, #3a5a8c, transparent 70%), radial-gradient(50% 60% at 75% 60%, #7a2a3a, transparent 70%);
}
.screen img { width: 100%; height: auto; border-radius: clamp(12px, 2vw, 22px); box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 40px 80px rgba(0,0,0,.6); }
.caption { font-size: 13px; color: var(--text3); text-align: center; margin: 14px auto 0; max-width: 640px; padding: 0 var(--gutter); }

.notice { max-width: 860px; margin: clamp(48px, 8vw, 88px) auto 0; padding: 0 var(--gutter); }
.notice .card { border-radius: 24px; padding: 26px 28px; display: flex; gap: 18px; align-items: flex-start; }
.notice svg { flex: 0 0 auto; margin-top: 2px; }
.notice h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.notice p { margin: 6px 0 0; color: var(--text2); }

.section { max-width: 1180px; margin: clamp(64px, 10vw, 120px) auto 0; padding: 0 var(--gutter); }
.section > h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; text-align: center; max-width: 18ch; margin: 0 auto; }
.features { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.features li { background: var(--tile); border: 1px solid var(--hairline); border-radius: 22px; padding: 24px; }
.features h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.features p { margin: 8px 0 0; color: var(--text2); font-size: 15.5px; line-height: 1.55; }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 44px; }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
@media (max-width: 640px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

.platforms { list-style: none; padding: 0; margin: 36px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.platforms li { font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--hairline); }

/* ---------- Documents ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter) 0; }
.doc h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
[lang="ar"] .doc h1 { letter-spacing: 0; line-height: 1.3; }
.doc .updated { color: var(--text3); font-size: 14px; margin: 12px 0 0; }
.doc .intro { font-size: 19px; line-height: 1.55; color: var(--text); margin: 28px 0 0; }
.doc h2 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 44px 0 0; padding-top: 4px; }
.doc p, .doc li { color: rgba(235, 235, 245, .80); }
.doc p { margin: 12px 0 0; }
.doc ul { margin: 12px 0 0; padding-inline-start: 22px; }
.doc li { margin: 8px 0 0; padding-inline-start: 4px; }
.doc li::marker { color: var(--text3); }
.doc .contact { margin-top: 48px; padding: 20px 22px; border-radius: 18px; background: var(--tile); border: 1px solid var(--hairline); color: var(--text); }
.faq { margin-top: 20px; display: grid; gap: 10px; }
.faq details { background: var(--tile); border: 1px solid var(--hairline); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text3); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; }
.faq code, .doc code { font: 600 .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255,255,255,.10); padding: 1px 6px; border-radius: 6px; color: var(--text); }

/* ---------- Footer ---------- */
footer { max-width: 1180px; margin: clamp(80px, 12vw, 140px) auto 0; padding: 32px var(--gutter) 48px; border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; color: var(--text3); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer a { color: var(--text2); text-decoration: none; }
footer a:hover { color: var(--text); }
footer p { margin: 0; }
