/* Layout: white page, one column of reading width, sections divided by space and thin rules.
   The only dark surface is the game screen, because that is where the translation lives. */
:root {
  --paper: #ffffff;
  --tint: #f5f7fb;          /* quiet bands, a cool grey leaning toward the brand blue */
  --line: #e3e7ef;
  --ink: #111a33;           /* text: the icon's navy */
  --ink-soft: #4a5572;
  --ink-faint: #6b7590;
  --blue: #2f55e4;          /* the one accent, from the icon */
  --blue-deep: #2443bd;
  --blue-wash: #eef2fe;
  --screen: #0d1424;
  --ok: #0f7a52;
  --warn: #9a6400;
  --error: #b42318;
  --text: -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.85; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .6rem; font-weight: 700; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }
.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.narrow { width: min(760px, 100%); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; z-index: 10; background: var(--paper); padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* Header */
.header { position: sticky; top: 0; z-index: 5; background: #ffffffeb; backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand img { border-radius: 9px; }
.nav { display: flex; align-items: center; gap: .15rem; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: .4rem .7rem; border-radius: 8px; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.nav a.button { color: #fff; margin-inline-start: .6rem; box-shadow: none; border-radius: 8px; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .6rem; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--blue); color: #fff; text-decoration: none; padding: .75rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--blue); font: inherit; font-weight: 600; cursor: pointer; line-height: 1.4; }
.button:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.button.small { padding: .4rem .85rem; font-size: .93rem; }
.button.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--ink-faint); background: var(--paper); color: var(--ink); }
.button[aria-disabled="true"] { background: var(--tint); color: var(--ink-faint); border-color: var(--line); pointer-events: none; }
.buttons { display: flex; flex-wrap: wrap; gap: .7rem; }

/* Sections */
.section { padding-block: 5rem; }
.section.alt { background: var(--tint); border-block: 1px solid var(--line); }
.eyebrow { color: var(--blue); font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.page-head { padding-block: 3.5rem 2.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; background: var(--tint); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-head .muted { font-size: 1.1rem; max-width: 40rem; }

/* Hero */
.hero { padding-block: 4.5rem 4rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); margin-bottom: 1.1rem; line-height: 1.25; }
.hero h1 .grad { color: var(--blue); }
.hero .lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 33rem; margin-bottom: 1.75rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: 1.75rem; color: var(--ink-faint); font-size: .92rem; }
.badge::before { content: "✓"; color: var(--ok); margin-inline-end: .4rem; font-weight: 700; }

/* The game screen: subtitle in the game, translation on top, as the TV app shows it */
.demo { margin: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; background: var(--screen); border: 10px solid #1b2133; box-shadow: 0 1px 0 #ffffff inset, 0 24px 48px -24px #111a3366; }
.scene { position: absolute; inset: 0; background:
  linear-gradient(180deg, #0d142400 55%, #0d1424cc 100%),
  linear-gradient(170deg, #2a3a55 0%, #3b4560 35%, #5b4a43 62%, #2b2c35 100%); }
.scene::after { content: ""; position: absolute; inset: auto 0 22% 0; height: 30%; background: linear-gradient(180deg, transparent, #1b2133aa); }
.overlay { position: absolute; inset-inline: 7%; top: 9%; background: #ffffff; color: var(--ink); border-radius: 8px; padding: .6rem .9rem; font-weight: 600; font-size: clamp(.82rem, 1.7vw, 1.02rem); line-height: 1.6; box-shadow: 0 8px 24px #00000040; }
.subtitle { position: absolute; inset-inline: 10%; bottom: 9%; text-align: center; direction: ltr; color: #fff; font-weight: 600; text-shadow: 0 1px 4px #000; font-size: clamp(.72rem, 1.5vw, .92rem); line-height: 1.5; }
.demo-caption { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-faint); font-size: .88rem; margin-top: .85rem; }
.stand { width: 26%; height: 10px; margin: 0 auto; background: #c9cfdb; border-radius: 0 0 6px 6px; }

/* Lists of features: rows divided by rules, not boxes */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; }
.feature { display: grid; grid-template-columns: 2.4rem 1fr; gap: .25rem 1rem; padding-block: 1.6rem; border-top: 1px solid var(--line); }
.feature svg { width: 26px; height: 26px; color: var(--blue); margin-top: .3rem; }
.feature h3 { font-size: 1.12rem; margin: 0; }
.feature p { grid-column: 2; margin: 0; color: var(--ink-soft); }

/* Cards: only where an item stands on its own */
.grid { display: grid; gap: 1rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; min-width: 0; }
.card h3 { font-size: 1.08rem; }
.card p:last-child { margin-bottom: 0; }

/* Steps: a real sequence */
.steps { counter-reset: step; display: grid; gap: 2rem; grid-template-columns: repeat(3, 1fr); }
.step { position: relative; padding-top: 3.25rem; background: none; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding-inline: 0; }
.step::before { counter-increment: step; content: counter(step, arabic-indic); position: absolute; top: .9rem; inset-inline-start: 0; font-size: 1.5rem; font-weight: 700; color: var(--blue); line-height: 1; }
ol.list { padding-inline-start: 1.4rem; margin: 0 0 1.25rem; }
ol.list li, ul.list li { margin: .5rem 0; }
ul.list { padding-inline-start: 1.25rem; margin: 0 0 1.25rem; }

/* Privacy band */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: .85rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .75rem; }
.checks li:first-child { border-top: 1px solid var(--line); }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; }

/* Download */
.download { display: grid; grid-template-columns: auto 1fr auto; gap: 1.75rem; align-items: center; padding: 2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.download img { border-radius: 18px; }
.download h2 { margin-bottom: .25rem; font-size: 1.6rem; }
.download p { margin: 0; }
.store { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.25; padding-block: .55rem; }
.store small { font-weight: 400; font-size: .78rem; opacity: .85; }

/* Notes and code */
.note { background: #fff8eb; border: 1px solid #f3dfb5; padding: 1rem 1.2rem; border-radius: var(--radius); margin: 1.5rem 0; }
.note.good { background: #ecf7f1; border-color: #c4e6d4; }
.note ul { margin: .4rem 0 0; }
code, .ltr { direction: ltr; unicode-bidi: isolate; }
code { background: var(--tint); border: 1px solid var(--line); padding: .05rem .4rem; border-radius: 5px; font-size: .93em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.address { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--blue-wash); border: 1px solid #d6dffb; border-radius: 12px; padding: 1.25rem 1.5rem; margin: 0 0 2rem; }
.address strong { font-size: 1.6rem; direction: ltr; font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: -.01em; }

/* Prose pages */
.prose { padding-bottom: 5rem; }
.prose > h2, .prose h2 { font-size: 1.35rem; margin-top: 2.75rem; scroll-margin-top: 88px; }
.prose h3 { font-size: 1.08rem; margin-top: 1.25rem; }
.prose small { color: var(--ink-faint); }
.toc { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: 1.25rem 0 0; font-size: .95rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding-block: 1.05rem; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.35rem; line-height: 1.2; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .6rem 0 0; color: var(--ink-soft); }

/* Forms */
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 1px solid #cfd5e1; border-radius: 8px; padding: .7rem .85rem; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue); outline: 3px solid #2f55e426; outline-offset: 0; }
.form textarea { min-height: 170px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form .hp { position: absolute; inset-inline-start: -9999px; }
.status { padding: .8rem 1rem; border-radius: 8px; margin: 0; }
.status.ok { background: #ecf7f1; color: var(--ok); }
.status.error { background: #fdeceb; color: var(--error); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 3rem 1.5rem; background: var(--tint); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer h2 { font-size: .95rem; margin-bottom: .7rem; color: var(--ink); }
.footer-grid a:not(.brand) { display: block; color: var(--ink-soft); text-decoration: none; margin: .3rem 0; font-size: .97rem; }
.footer-grid a:hover { color: var(--blue); }
.footer-grid p { margin-top: .8rem; font-size: .95rem; max-width: 24rem; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; font-size: .86rem; }

/* The full menu needs room for seven links. */
@media (max-width: 1080px) {
  .menu-toggle { display: grid; gap: 5px; }
  .menu-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  .nav { display: none; }
  .menu.open .nav { display: flex; flex-direction: column; align-items: stretch; position: absolute; inset-inline: 0; top: 68px; background: var(--paper); border-bottom: 1px solid var(--line); padding: .75rem max(20px, env(safe-area-inset-right, 0px)) 1.25rem max(20px, env(safe-area-inset-left, 0px)); gap: .1rem; box-shadow: 0 12px 24px -16px #111a3340; }
  .menu.open .nav a[aria-current="page"] { box-shadow: none; background: var(--tint); border-radius: 8px; }
  .menu.open .nav a.button { margin: .6rem 0 0; }
}
@media (max-width: 900px) {
  .hero-grid, .grid.three, .grid.two, .steps, .footer-grid, .features, .split { grid-template-columns: 1fr; }
  .hero { padding-block: 2.5rem 3rem; }
  .section { padding-block: 3.5rem; }
  .download { grid-template-columns: 1fr; text-align: start; }
  .form .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
