/* CraftAppz.com — shared styles. Themes: .theme-craft (company), .theme-yalla (يلا دايت), .theme-prayer (مواقيت الصلاة والأذان). */
@font-face {
  font-family: "Cairo";
  src: url("/assets/fonts/cairo.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --radius: 20px;
  --max: 1080px;
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

.theme-craft {
  --bg: #0b0b1a; --surface: #14142a; --line: #ffffff1f;
  --fg: #eef0ff; --muted: #a3a8c7; --a: #7c5cff; --b: #22d3ee; --on-a: #fff;
}
.theme-yalla {
  --bg: #fbf8f1; --surface: #ffffff; --line: #1b242014;
  --fg: #1b2420; --muted: #5b6660; --a: #2e7d5b; --b: #ffb547; --on-a: #fff;
  --tint: #e6f4ec;
}
.theme-prayer {
  --bg: #0b1430; --surface: #131f45; --line: #ffffff1f;
  --fg: #eef2ff; --muted: #a9b4d6; --a: #f5c25b; --b: #6f9bff; --on-a: #0b1430;
}
@media (prefers-color-scheme: dark) {
  .theme-yalla {
    --bg: #121815; --surface: #1c2420; --line: #ffffff1a;
    --fg: #e6ece8; --muted: #a9b5ae; --a: #8fd3b0; --on-a: #121815; --tint: #1f3b2e;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--fg);
  line-height: 1.75; font-size: 17px; -webkit-font-smoothing: antialiased;
}
a { color: var(--a); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem;
  color: var(--fg); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand .lite { font-weight: 500; }
.brand { white-space: nowrap; flex: none; }
@media (max-width: 560px) {
  .nav { gap: 12px; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { font-size: .85rem; white-space: nowrap; }
  .nav .wide-only { display: none; }
}
.nav { margin-inline-start: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-inline-start: auto; }
.site-footer a { color: var(--muted); }

/* building blocks */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.2; font-weight: 900; letter-spacing: -.01em; }
.hero p.lead { margin-top: 16px; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.grad { background: linear-gradient(90deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--surface); }
.btn.primary { background: var(--a); color: var(--on-a); border-color: transparent; }
.btn svg { width: 20px; height: 20px; }
section { padding: 40px 0; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.3; font-weight: 800; margin-bottom: 12px; }
h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 1.3rem; margin-bottom: 12px; }
.pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: color-mix(in srgb, var(--a) 14%, transparent); color: var(--a); }

/* app card on the company home */
.app-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.app-card img.icon { width: 96px; height: 96px; border-radius: 24px; }
@media (max-width: 560px) { .app-card { grid-template-columns: 1fr; } }

/* screenshots */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 16px; scroll-snap-type: x mandatory; }
/* height:auto keeps the 9:16 ratio; without it the HTML height attribute stretches the image. */
.shots img { width: 240px; height: auto; aspect-ratio: 9 / 16; flex: none; border-radius: 22px; scroll-snap-align: start;
  box-shadow: 0 10px 30px #0000001f; }

/* landscape TV screenshots (Roku apps) */
.shots.tv img { width: 520px; max-width: 86vw; aspect-ratio: 16 / 9; border-radius: 14px; }

/* long-form documents (privacy, terms) */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.25; font-weight: 900; margin: 48px 0 8px; }
.doc h2 { font-size: 1.35rem; margin: 32px 0 8px; }
.doc p, .doc ul { margin: 10px 0; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 4px 0; }
.doc .updated { color: var(--muted); font-size: .95rem; }
.doc .lang-switch { margin-top: 12px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.note { background: color-mix(in srgb, var(--b) 18%, transparent); border-radius: 16px; padding: 14px 18px; margin: 16px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; vertical-align: top; }
.doc th { background: var(--surface); }
.doc .table-wrap { overflow-x: auto; }
.en { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 700; }
details p { margin-top: 8px; color: var(--muted); }

/* ---- Multi-app, multi-platform, multi-language layout (v6) ---- */
.theme-craft { --c1: #22d3ee; --c2: #7c5cff; --c3: #ff4fd8; --c4: #ffb547; }
html[lang="en"] body { font-size: 16.5px; }

/* language switch in the header: links to the same page in the other language */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.lang-btn:hover { border-color: var(--a); }
.lang-btn svg { width: 16px; height: 16px; }

/* company home */
body { overflow-x: clip; } /* the hero glow is wider than the page; never let it add a horizontal scroll */
.home-hero { padding: 80px 0 32px; position: relative; }
.home-hero::before { content: ""; position: absolute; inset: -40px -10% auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 260px at 20% 30%, color-mix(in srgb, var(--c2) 30%, transparent), transparent 70%),
              radial-gradient(520px 240px at 80% 20%, color-mix(in srgb, var(--c3) 20%, transparent), transparent 70%),
              radial-gradient(480px 220px at 60% 80%, color-mix(in srgb, var(--c1) 18%, transparent), transparent 70%); }
.grad-4 { background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }
.stats div { color: var(--muted); font-size: .95rem; line-height: 1.3; }
.stats b { display: block; color: var(--fg); font-size: 1.8rem; font-weight: 900; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.chip { font: inherit; font-size: .9rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--a); border-color: var(--a); color: var(--on-a); }

.apps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.app-tile { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; transition: border-color .15s, transform .15s; }
.app-tile:hover { border-color: color-mix(in srgb, var(--a) 60%, transparent); transform: translateY(-2px); }
.app-tile[hidden] { display: none; }
.app-tile .top { display: flex; gap: 14px; align-items: center; }
.app-tile .top img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.app-tile h3 { margin: 0; font-size: 1.2rem; }
.app-tile p { color: var(--muted); font-size: .95rem; }
.app-tile .btns { margin-top: auto; }
.app-tile.next { border-style: dashed; opacity: .8; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 8px; white-space: nowrap;
  background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }
.badge.soon { background: color-mix(in srgb, var(--c3, var(--b)) 22%, transparent); }
.badge.plan { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.badge.lang { background: color-mix(in srgb, var(--c1, var(--b)) 18%, transparent); }

.platforms { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.platform { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.platform svg { width: 34px; height: 34px; color: var(--a); margin-bottom: 8px; }
.platform h3 { font-size: 1.05rem; margin: 0 0 2px; }
.platform p { color: var(--muted); font-size: .88rem; line-height: 1.5; margin-bottom: 8px; }

.lang-strip { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.lang-strip b { font-size: 1.15rem; }
.cta { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 22px; }
.cta .btns { justify-content: center; }

/* "where to get it" block on app pages */
.avail { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.avail .row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 16px; color: var(--fg); text-decoration: none; }
.avail .row svg { width: 28px; height: 28px; flex: none; color: var(--a); }
.avail .row small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.avail a.row:hover { border-color: var(--a); }

@media (max-width: 560px) {
  .home-hero { padding-top: 48px; }
  /* phones: logo and language button on the first row, menu on its own row under them */
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; row-gap: 4px; }
  .site-header .lang-btn { margin-inline-start: auto; padding: 3px 10px; }
  .site-header .nav { order: 3; width: 100%; margin-inline-start: 0; gap: 18px; scrollbar-width: none; }
  .site-header .nav::-webkit-scrollbar { display: none; }
}
