/* Betaqtak site (/apps/betaqtak). White page, the app's lapis accent, RTL-first.
   Independent of assets/apps/app.css: this app has its own layout. */

:root {
  --accent: #2F5BEA;          /* AccentColor, light */
  --accent-deep: #1F3FB8;
  --accent-tint: #EEF2FE;
  --accent-line: #D6DFFB;
  --text: #121521;
  --text-soft: #5A6072;
  --line: #E7E9F0;
  --bg: #ffffff;
  --redaction: #333338;       /* ShareRenderer.redactionColor */
  --maxw: 1120px;
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body.bq {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "IBM Plex Sans Arabic", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body.bq { line-height: 1.75; }

.bq img { max-width: 100%; display: block; }
.bq a { color: var(--accent); text-decoration: none; }
.bq a:hover { text-decoration: underline; text-underline-offset: 3px; }
:where(.bq) :is(h1, h2, h3) { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
html[lang="ar"] .bq h1, html[lang="ar"] .bq h2, html[lang="ar"] .bq h3 { letter-spacing: 0; line-height: 1.35; }
:where(.bq) p { margin: 0; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; text-align: center; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: var(--maxw); margin-inline: auto; padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none !important; }
.brand img { border-radius: 23%; }
/* The wordmark from the app repo's tools/wordmark: IBM Plex Sans Arabic outlines and a lapis bar. */
.brand img.wordmark { border-radius: 0; width: auto; height: 26px; }
.bar-nav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.bar-nav a { color: var(--text-soft); }
.bar-nav .lang {
  color: var(--accent); font-weight: 600;
  padding: 5px 14px; border-radius: 999px; background: var(--accent-tint);
}
.bar-nav .lang:hover { text-decoration: none; background: var(--accent-line); }

/* ---------- App Store badge (Apple's own artwork), plus a QR code on wide screens ---------- */
.get-app { display: inline-flex; align-items: center; gap: 20px; }
.badge { display: inline-flex; line-height: 0; flex: none; }
.badge img { height: 50px; width: auto; }
.qr { display: none; align-items: center; gap: 12px; padding-inline-start: 20px; border-inline-start: 1px solid var(--line); }
.qr img { width: 76px; height: 76px; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.qr span { text-align: start; font-size: .82rem; font-weight: 500; line-height: 1.35; color: var(--text-soft); max-width: 11ch; }
@media (min-width: 900px) and (hover: hover) { .qr { display: flex; } }
.note { color: var(--text-soft); font-size: .92rem; }

/* ---------- Screens: the capture itself, no device bezel ---------- */
.screen {
  margin: 0; overflow: hidden; background: #fff;
  border-radius: 12% / 5.5%;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(31,63,184,.45), 0 2px 8px rgba(18,21,33,.06);
}
.screen img { width: 100%; height: auto; }

/* ---------- Hero ---------- */
.hero {
  display: grid; gap: 48px; align-items: center; overflow-x: clip;
  padding-block: clamp(40px, 8vw, 96px) clamp(56px, 8vw, 112px);
}
.kicker {
  display: inline-block; color: var(--accent); font-weight: 600; font-size: .92rem;
  padding: 4px 12px; border-radius: 999px; background: var(--accent-tint); margin-block-end: 18px;
}
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.2rem); font-weight: 800; }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.28rem); color: var(--text-soft); margin-block-start: 20px; max-width: 34em; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-block-start: 32px; }

.hero-media { position: relative; justify-self: center; width: min(320px, 78vw); }
.hero-media::before {
  content: ""; position: absolute; inset: 8% -30% -4%; z-index: -1;
  background: radial-gradient(closest-side, rgba(47,91,234,.16), rgba(47,91,234,0));
}
.toast {
  position: absolute; inset-block-start: 15%; inset-inline-end: -6%;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: #fff; color: var(--accent); font-weight: 600; font-size: .92rem; white-space: nowrap;
  box-shadow: 0 14px 34px -10px rgba(18,21,33,.28), 0 0 0 1px var(--line);
  animation: toast 5s 1s ease-in-out infinite both;
}
.toast span { color: var(--text); }
@keyframes toast {
  0%, 100% { opacity: 0; transform: translateY(8px) scale(.96); }
  10%, 70% { opacity: 1; transform: none; }
  80% { opacity: 0; transform: translateY(-6px); }
}

/* ---------- Tour: a sticky screen that changes as the steps scroll by ---------- */
.tour { padding-block: clamp(56px, 8vw, 96px); background: linear-gradient(var(--bg), var(--accent-tint) 30%, var(--accent-tint) 70%, var(--bg)); }
.tour-grid { margin-block-start: 40px; }
.tour-stage { display: none; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 64px; }
.step { max-width: 30em; margin-inline: auto; text-align: center; }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; margin-block-end: 14px;
}
.step h3 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 700; }
.step p { color: var(--text-soft); font-size: 1.08rem; margin-block-start: 10px; }
.screen-inline { width: min(280px, 72vw); margin: 28px auto 0; }

/* ---------- Watermark demo ---------- */
.demo { display: grid; gap: 40px; align-items: center; padding-block: clamp(64px, 9vw, 120px); }
.demo-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
.demo-copy p { color: var(--text-soft); font-size: 1.08rem; margin-block-start: 14px; max-width: 30em; }
.demo-copy .hint { color: var(--accent); font-weight: 600; font-size: .95rem; }

.card-demo {
  position: relative; container-type: inline-size; overflow: hidden;
  border-radius: 3.4cqw; aspect-ratio: 1712 / 1080;
  box-shadow: 0 40px 70px -36px rgba(31,63,184,.5), 0 0 0 1px var(--line);
  color: #1b1b1b; font-family: "IBM Plex Sans Arabic", "SF Arabic", -apple-system, sans-serif; font-weight: 600;
  user-select: none;
}
.card-demo > img { width: 100%; height: 100%; object-fit: cover; }
/* The card art carries the app's own rendering (fastlane screenshot sample, SyntheticCard). The address
   cover sits over the two address lines' boxes, padded like Redactions.padded. */
.card-addr {
  position: absolute; left: 68.5%; top: 51%; width: 28.5%; height: 20%;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: .5cqw; outline: 1.5px dashed transparent; outline-offset: 2px; transition: outline-color .2s;
}
.card-addr:hover, .card-addr:focus-visible { outline-color: var(--accent); }
.card-addr.hidden { background: var(--redaction); }
.wm {
  position: absolute; inset: -40% -30%; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center; gap: 4.5cqw;
  transform: rotate(-16deg);
  color: rgba(18,21,33,.36); font-size: 2.3cqw; font-weight: 600; white-space: nowrap;
}
.wm p { display: flex; gap: 6cqw; justify-content: center; }
.wm p:nth-child(even) { transform: translateX(-18cqw); }

/* ---------- Privacy ---------- */
.privacy { padding-block: clamp(56px, 8vw, 96px); border-block-start: 1px solid var(--line); }
.points { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 20px; }
.points li { padding: 26px; border-radius: 22px; border: 1px solid var(--line); }
.point-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-tint); color: var(--accent); margin-block-end: 16px;
}
.points h3 { font-size: 1.15rem; font-weight: 700; }
.points p { color: var(--text-soft); margin-block-start: 6px; }
.more { text-align: center; margin-block-start: 28px; font-weight: 600; }

/* ---------- Plans ---------- */
.plans { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.plan-grid { display: grid; gap: 20px; margin-block-start: 40px; max-width: 820px; margin-inline: auto; }
.plan { padding: 30px; border-radius: 22px; border: 1px solid var(--line); }
.plan h3 { font-size: 1.25rem; font-weight: 700; }
.plan-price { color: var(--accent); font-weight: 600; margin-block: 4px 12px !important; }
.plan p:last-child { color: var(--text-soft); }
.plan-plus { border-color: var(--accent-line); background: var(--accent-tint); }

/* ---------- Closing ---------- */
.closing { text-align: center; padding-block: clamp(56px, 8vw, 104px); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.closing > img { border-radius: 23%; box-shadow: 0 18px 40px -16px rgba(31,63,184,.5); }
.closing h2 { font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 800; max-width: 16em; }

/* ---------- Footer ---------- */
.foot { border-block-start: 1px solid var(--line); padding-block: 28px; font-size: .9rem; color: var(--text-soft); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: var(--text-soft); }

/* ---------- Policy page ---------- */
.doc { padding-block: clamp(40px, 7vw, 80px); padding-inline: var(--gutter); }
.doc-body { max-width: 720px; margin-inline: auto; font-size: 1.04rem; }
.doc-body h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; }
.doc-date { color: var(--text-soft); margin-block: 10px 32px !important; }
.doc-body h2 { font-size: 1.3rem; font-weight: 700; margin-block: 40px 12px; padding-block-start: 28px; border-block-start: 1px solid var(--line); }
.doc-body p, .doc-body ul, .doc-body ol { margin-block: 0 14px; }
.doc-body ul, .doc-body ol { padding-inline-start: 1.3em; }
.doc-body li { margin-block-end: 8px; }
.doc-body li::marker { color: var(--accent); }
.doc-body strong { font-weight: 650; }
.doc-body .summary { margin-block-end: 28px; padding: 22px 24px; border-radius: 18px; background: var(--accent-tint); border: 1px solid var(--accent-line); }
.doc-body .summary p:last-child { margin: 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .points { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr .85fr; }
  .hero-media { width: 330px; }
  .toast { inset-inline-end: -18%; }

  .tour-grid { display: grid; grid-template-columns: 360px 1fr; gap: 72px; align-items: start; }
  .tour-stage { display: block; position: sticky; top: calc(50vh - 340px); }
  .tour-stage .screen { position: relative; width: 320px; aspect-ratio: 760 / 1651; }
  .tour-stage img { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
  .tour-stage img.on { opacity: 1; }
  .tour-steps { gap: 0; }
  .step {
    min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
    margin: 0; text-align: start; opacity: .3; transition: opacity .35s;
  }
  .step.on { opacity: 1; }
  .step:first-child { min-height: 64vh; }
  .step .screen-inline { display: none; }
  .step .step-num { align-self: flex-start; }

  .demo { grid-template-columns: .8fr 1.2fr; gap: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; opacity: 1; }
  .tour-stage img, .step { transition: none; }
}
