/* keyplayads.com — static public site (home, privacy, terms, account deletion, about, FAQ). */

/* Tajawal (SIL Open Font License 1.1, see fonts/OFL.txt), self-hosted. */
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url(fonts/tajawal-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url(fonts/tajawal-500.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url(fonts/tajawal-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url(fonts/tajawal-800.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url(fonts/tajawal-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url(fonts/tajawal-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url(fonts/tajawal-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url(fonts/tajawal-latin-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #2aa6e6;
  --brand-2: #1478c8;
  --brand-ink: #0d6aa8;
  --brand-soft: #e8f5fd;
  --green: #4fa65b;
  --red: #e0353d;
  --ink: #10161f;
  --muted: #5a6474;
  --line: #e3e8ef;
  --soft: #f5f8fb;
  --bg: #ffffff;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16, 22, 31, .05), 0 8px 24px rgba(16, 22, 31, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4bb7f0;
    --brand-2: #1d7fcc;
    --brand-ink: #86cff6;
    --brand-soft: #12283a;
    --ink: #e9edf3;
    --muted: #a3adbb;
    --line: #263041;
    --soft: #131a24;
    --bg: #0c1118;
    --card: #121923;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Tajawal", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.9;
}
img, svg { max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; top: -60px; right: 12px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 10px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 21px; letter-spacing: .2px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.menu a { display: block; padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 16px; font-weight: 500; white-space: nowrap; }
.menu a:hover { color: var(--ink); background: var(--soft); }
.menu a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); font-weight: 700; }

/* Phone menu (no JavaScript: a <details> toggle) */
.mnav { display: none; }
.mnav summary {
  list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--card);
}
.mnav summary::-webkit-details-marker { display: none; }
.mnav, .mnav[open] { border: 0; margin: 0; background: none; border-radius: 0; }
.mnav summary::after, .mnav[open] summary::after { content: none; display: none; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform .2s, opacity .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.mnav[open] .bars { background: transparent; }
.mnav[open] .bars::before { transform: translateY(6px) rotate(45deg); }
.mnav[open] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.mnav nav {
  position: absolute; top: calc(100% + 1px); left: 0; right: 0; z-index: 30;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(16, 22, 31, .12);
  padding: 8px 16px 14px;
}
.mnav ul { list-style: none; margin: 0; padding: 0; }
.mnav li + li { border-top: 1px solid var(--line); }
.mnav a { display: block; padding: 12px 6px; text-decoration: none; color: var(--ink); font-size: 17px; font-weight: 500; }
.mnav a[aria-current="page"] { color: var(--brand-ink); font-weight: 800; }

/* ---------- Home: hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    url(hex.svg) center / 56px 100px repeat,
    linear-gradient(150deg, #36b3ef 0%, #1d8fd6 45%, #0f5fa8 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 32px; padding-top: 56px; }
.hero-text { padding-bottom: 56px; }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.hero h1 { font-size: 54px; line-height: 1.25; margin: 18px 0 14px; font-weight: 800; }
.hero h1 span { color: #ffe066; }
.hero p { font-size: 20px; line-height: 1.85; margin: 0 0 26px; color: rgba(255, 255, 255, .92); max-width: 34em; }
.hero-phone { align-self: end; display: flex; justify-content: center; }
.phone {
  width: 290px; padding: 10px 10px 0; background: #0d1117; border-radius: 42px 42px 0 0;
  box-shadow: 0 30px 60px rgba(4, 30, 60, .45);
}
.phone img { display: block; width: 100%; height: 470px; object-fit: cover; object-position: top; border-radius: 32px 32px 0 0; }

/* Store buttons */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.stores.start { margin-top: 18px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 20px; min-width: 176px;
  background: #0d1117; color: #fff; border-radius: 14px; text-decoration: none; line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, .18); transition: transform .15s ease;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 18px; font-family: -apple-system, "Segoe UI", "Tajawal", sans-serif; }
.store small { font-weight: 500; font-size: 12px; opacity: .8; font-family: "Tajawal", sans-serif; }

/* ---------- Home: features ---------- */
.features { padding: 64px 0 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px 22px; box-shadow: var(--shadow); }
.feature h2 { font-size: 20px; margin: 14px 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.fi { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); }
.fi svg { width: 28px; height: 28px; fill: var(--brand); }
.feature:nth-child(2) .fi { background: color-mix(in srgb, var(--green) 14%, transparent); }
.feature:nth-child(2) .fi svg { fill: var(--green); }
.feature:nth-child(3) .fi { background: color-mix(in srgb, var(--red) 12%, transparent); }
.feature:nth-child(3) .fi svg { fill: var(--red); }
.feature:nth-child(4) .fi { background: color-mix(in srgb, #f2b705 16%, transparent); }
.feature:nth-child(4) .fi svg { fill: #d99a00; }

/* ---------- Home: help ---------- */
.help { padding: 40px 0 72px; }
.help > .wrap > h2 { font-size: 28px; margin: 0 0 16px; }
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.links a {
  display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; color: var(--ink); background: var(--card); transition: border-color .15s, transform .15s;
}
.links a:hover { border-color: var(--brand); transform: translateY(-2px); }
.links b { display: block; font-size: 18px; }
.links small { display: block; color: var(--muted); font-size: 15px; }
.contact {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 26px; border-radius: 20px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.contact b { font-size: 20px; }
.contact p { margin: 0; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 12px;
  background: var(--brand-2); color: #fff; text-decoration: none; font-weight: 700;
}
.btn:hover { filter: brightness(1.08); }

/* ---------- Inner pages ---------- */
.band {
  color: #fff;
  background:
    url(hex.svg) center / 56px 100px repeat,
    linear-gradient(150deg, #36b3ef 0%, #1d8fd6 55%, #1268b3 100%);
  padding: 44px 0 72px;
}
.band h1 { margin: 0; font-size: 40px; line-height: 1.35; font-weight: 800; }
.band .meta { margin: 6px 0 0; color: rgba(255, 255, 255, .85); font-size: 16px; }
.band .meta a { color: #fff; }
.doc {
  position: relative; margin: -44px auto 64px; max-width: 860px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  padding: 32px 40px 36px;
}
.doc h2 { font-size: 23px; margin: 34px 0 8px; padding-top: 4px; }
.doc h2:first-child, .toc + h2, .toc + p { margin-top: 0; }
.doc h3 { font-size: 19px; margin: 22px 0 6px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-inline-start: 26px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--brand); font-weight: 700; }

.toc { background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 28px; }
.toc b { display: block; font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 15px; }
.toc a:hover { border-color: var(--brand); color: var(--brand-ink); }

.table { width: 100%; overflow-x: auto; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.7; }
th, td { padding: 11px 14px; text-align: right; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 700; }
td + td, th + th { border-inline-start: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }

.card { background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: 18px; padding: 20px 24px 8px; margin: 18px 0 22px; }
.card h2:first-child { margin-top: 0; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 16px; margin: 0 0 12px; background: var(--card); transition: border-color .15s; }
details[open] { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 18px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 20px; font-weight: 700; line-height: 1;
}
details[open] summary::after { content: "−"; }
details > p { padding: 0 20px 16px; margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
footer { background: #0d1117; color: #c4ccd8; padding: 44px 0 0; font-size: 16px; }
footer .wrap { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
footer .brand { color: #fff; }
footer p { margin: 10px 0 0; color: #9aa4b3; line-height: 1.8; }
footer a { color: #c4ccd8; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 36px; align-content: start; }
footer .copy { border-top: 1px solid #222b38; margin-top: 32px; padding-top: 16px; padding-bottom: 22px; color: #7d8796; font-size: 14px; }

/* ---------- Motion (subtle; disabled for reduced-motion users) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: no-preference) {
  /* Home hero: text, then buttons, then the phone. */
  .hero-icon { animation: rise .6s ease-out both, floaty 5s ease-in-out 1s infinite; }
  .hero h1 { animation: rise .6s ease-out .08s both; }
  .hero p { animation: rise .6s ease-out .16s both; }
  .hero .stores { animation: rise .6s ease-out .24s both; }
  .phone { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .2s both; }

  /* Inner pages: title band, then the white card. */
  .band h1, .band .meta { animation: rise .5s ease-out both; }
  .doc { animation: rise .6s ease-out .1s both; }

  /* Menu, FAQ answers. */
  .mnav[open] nav { animation: drop .2s ease-out; }
  details[open] > p { animation: fade .3s ease-out; }

  /* Cards appear as they scroll into view (browsers without support just show them). */
  @supports (animation-timeline: view()) {
    .feature, .links a, .contact {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }

  .feature { transition: transform .2s ease, box-shadow .2s ease; }
  .feature:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16, 22, 31, .06), 0 14px 30px rgba(16, 22, 31, .1); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu { overflow-x: auto; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .feature-grid, .links { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 44px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .top .wrap { min-height: 60px; position: relative; }
  .brand { font-size: 20px; }
  .brand img { width: 34px; height: 34px; }
  .menu { display: none; }
  .mnav { display: block; }
  .toc { padding: 12px 14px; }
  .toc a { font-size: 14px; padding: 2px 10px; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 36px; gap: 8px; text-align: center; }
  .hero-text { padding-bottom: 8px; }
  .hero p { margin-inline: auto; font-size: 18px; }
  .hero .stores { justify-content: center; }
  .hero h1 { font-size: 36px; }
  .phone { width: 240px; border-radius: 34px 34px 0 0; }
  .phone img { height: 330px; border-radius: 26px 26px 0 0; }
  .features { padding-top: 40px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 18px; }
  .feature .fi { grid-row: span 2; }
  .feature h2 { margin: 0; font-size: 18px; }
  .links { grid-template-columns: 1fr; }
  .band { padding: 30px 0 60px; }
  .band h1 { font-size: 30px; }
  .doc { margin: -40px 0 40px; padding: 22px 18px 24px; border-radius: 20px; }
  .doc h2 { font-size: 21px; }
  th, td { padding: 9px 10px; font-size: 15px; }
  .contact { padding: 18px; }
  .foot-links { grid-template-columns: 1fr 1fr; gap: 6px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store, .links a { transition: none; }
}
@media print {
  .top, footer, .band, .toc { background: none; color: #000; }
  .doc { box-shadow: none; border: 0; margin: 0; }
}
