/* widgety.app — v5. One sheet for the landing page and the legal pages.
   Ink on obsidian, gold for what matters; the widgets are the only pictures. */

:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --bg-3: #19191c;
  --line: #ffffff14;
  --ink: #f2efe8;
  --ink-2: #b4b0a6;
  --ink-3: #7d7a72;
  --gold: #d6b25e;
  --gold-hi: #f1dca6;
  --gold-lo: #a88a37;
  --green: #1d6a4a;
  --radius: 22px;
  --wrap: 1160px;
  --ar: "Cairo", system-ui, sans-serif;
  --en: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ar);
  line-height: 1.65;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--en); line-height: 1.6; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--gold); color: #1a1408; }

/* One language at a time: every text exists in both, the page shows one. */
html[lang="ar"] [data-l="en"], html[lang="en"] [data-l="ar"] { display: none !important; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.num { font-feature-settings: "tnum"; }

/* ── Header ───────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  background: #0b0b0cc8;
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 600; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.lang {
  text-decoration: none;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 99px; padding: 6px 12px; font: 600 13px var(--en); cursor: pointer;
}
.lang:hover { border-color: var(--gold); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #17120a; text-decoration: none;
  border-radius: 99px; padding: 12px 22px; font-weight: 800; font-size: 16px;
  box-shadow: 0 10px 30px #d6b25e33; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px #d6b25e55; }
.btn svg { width: 20px; height: 20px; }
.btn.small { padding: 8px 16px; font-size: 14px; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
@media (max-width: 860px) { .nav { display: none; } .top .wrap { gap: 10px; } .top .lang { margin-inline-start: auto; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 70px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 900px; z-index: -1;
  background:
    radial-gradient(600px 380px at 70% 30%, #d6b25e26, transparent 70%),
    radial-gradient(520px 420px at 20% 60%, #1d6a4a40, transparent 70%);
}
.hero .split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold); font-weight: 700; font-size: 14px;
  border: 1px solid #d6b25e44; background: #d6b25e12; border-radius: 99px; padding: 5px 14px;
}
h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.15; margin: 18px 0 16px; font-weight: 900; letter-spacing: -.01em; }
html[lang="en"] h1 { letter-spacing: -.03em; line-height: 1.05; }
h1 .gold, h2 .gold {
  background: linear-gradient(120deg, var(--gold-hi), var(--gold) 50%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--ink-2); font-size: clamp(17px, 1.6vw, 20px); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.cta small { color: var(--ink-3); font-size: 13.5px; }
.stage { position: relative; height: 640px; }
@media (max-width: 960px) {
  .hero .split { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .stage { height: 600px; }
}

/* ── The phone: a 16 Pro, 402 × 874 points; widgets placed on its grid ── */
.phone {
  --pw: 300px;
  position: relative; width: var(--pw); aspect-ratio: 402 / 874;
  border-radius: calc(var(--pw) * .15); padding: calc(var(--pw) * .028);
  background: linear-gradient(145deg, #3a3a3e, #121214 40%, #2a2a2e);
  box-shadow: 0 40px 90px #000c, inset 0 0 0 1px #ffffff1c;
}
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--pw) * .125); background: #000 center / cover no-repeat;
  container-type: inline-size;
}
.screen .island {
  position: absolute; top: 2.4%; left: 50%; width: 31%; height: 4.1%;
  transform: translateX(-50%); background: #000; border-radius: 99px; z-index: 5;
}
.screen .bar {
  position: absolute; top: 2.6%; inset-inline: 8%; display: flex; justify-content: space-between;
  font: 700 4.2cqw var(--en); color: #fff; z-index: 4; direction: ltr;
}
.screen .bar.dark { color: #111; }
/* A widget image carries 30 pt of transparent margin for its shadow. */
.w {
  position: absolute;
  left: calc((var(--x) - 30) / 402 * 100%);
  top: calc((var(--y) - 30) / 874 * 100%);
  width: calc((var(--w) + 60) / 402 * 100%);
  max-width: none;
}
.tiles { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 7.9%; }
.tiles i { width: 15.9%; aspect-ratio: 1; border-radius: 23%; background: #ffffff30; }
.screen.light .tiles i { background: #00000018; }
.dock {
  position: absolute; left: 3%; right: 3%; bottom: 1.6%; height: 10.5%;
  border-radius: 9cqw; background: #ffffff26; backdrop-filter: blur(10px);
  display: flex; justify-content: space-around; align-items: center; padding: 0 3%;
}
.dock i { width: 15.9cqw; aspect-ratio: 1; border-radius: 23%; background: #ffffff38; }
.screen.light .dock { background: #0000000f; }
.screen.light .dock i { background: #00000018; }

.hero .phone { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); --pw: 290px; z-index: 2; }
.float {
  position: absolute; z-index: 3; filter: drop-shadow(0 30px 40px #0009);
  height: auto; /* the width/height attributes only reserve the shape */
  animation: bob 7s ease-in-out infinite;
}
.float.a { width: 250px; inset-inline-end: -70px; top: 30px; animation-delay: -1s; z-index: 1; opacity: .92; }
.float.b { width: 270px; inset-inline-start: -50px; top: 330px; animation-delay: -3s; }
.float.c { width: 150px; inset-inline-end: -10px; top: 430px; animation-delay: -5s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(var(--r, 0deg)); } }
@media (max-width: 1100px) { .float.a { inset-inline-end: -10px; } .float.b { inset-inline-start: -10px; } }
@media (max-width: 960px) { .float { display: none; } }

/* Widgets arrive one by one on the hero screen. */
.hero .screen .w { opacity: 0; transform: translateY(18px) scale(.96); animation: land .8s cubic-bezier(.2,.8,.2,1) forwards; }
.hero .screen .w:nth-of-type(1) { animation-delay: .25s; }
.hero .screen .w:nth-of-type(2) { animation-delay: .45s; }
.hero .screen .w:nth-of-type(3) { animation-delay: .65s; }
.hero .screen .w:nth-of-type(4) { animation-delay: .85s; }
@keyframes land { to { opacity: 1; transform: none; } }

/* ── Numbers ──────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); margin-top: 30px; }
.stats div { padding: 22px 18px; text-align: center; border-inline-start: 1px solid var(--line); }
.stats div:first-child { border-inline-start: 0; }
.stats b { display: block; font-size: 34px; font-weight: 900; color: var(--gold-hi); line-height: 1.2; }
.stats span { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(3) { border-inline-start: 0; } .stats div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ── The ribbon of designs ───────────────────────────────────────────── */
.ribbon { margin: 70px 0 10px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); direction: ltr; }
.ribbon .track { display: flex; align-items: center; gap: 0; width: max-content; animation: slide 60s linear infinite; }
.ribbon img { height: 220px; width: auto; margin-inline: -14px; }
.ribbon img.s { height: 170px; }
.ribbon:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ── Sections ─────────────────────────────────────────────────────────── */
section { padding: 90px 0; scroll-margin-top: 60px; }
.head { max-width: 44em; margin-bottom: 40px; }
.head.center { text-align: center; margin-inline: auto; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.2; margin: 14px 0 12px; font-weight: 900; }
html[lang="en"] h2 { letter-spacing: -.02em; }
.head p { color: var(--ink-2); font-size: 18px; margin: 0; }

.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; padding: 50px 0; border-top: 1px solid var(--line); }
.feature:nth-of-type(even) .art { order: -1; }
.feature h3 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.25; margin: 12px 0; font-weight: 800; }
.feature p { color: var(--ink-2); font-size: 17px; margin: 0 0 16px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-inline-start: 28px; color: var(--ink); font-size: 15.5px; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0 3px, transparent 4px), #d6b25e22;
}
.art { position: relative; min-height: 380px; }
.art img { position: absolute; max-width: none; filter: drop-shadow(0 26px 34px #0008); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.art img:hover { transform: translateY(-6px) scale(1.02); }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-of-type(even) .art { order: 0; }
  .art { min-height: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
  .art img { position: static; width: auto !important; height: 190px; margin: -12px; }
  .art img.l { height: 300px; }
}

/* ── Families ─────────────────────────────────────────────────────────── */
.families { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.fam-list { display: grid; gap: 10px; }
.fam {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; text-align: start;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  color: var(--ink); cursor: pointer; font: inherit; transition: border-color .25s, background .25s;
}
.fam:hover { border-color: #ffffff30; }
.fam[aria-selected="true"] { border-color: var(--gold); background: #d6b25e10; }
.fam .sw { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #ffffff22; background-size: cover; background-position: center; }
.fam b { display: block; font-size: 17px; }
.fam span { color: var(--ink-2); font-size: 14px; }
.fam-stage { display: grid; place-items: center; }
.fam-stage .phone { --pw: 300px; }
.fam-stage .screen { transition: background-image .6s; }
.fam-stage .layer { position: absolute; inset: 0; transition: opacity .6s ease; }
.fam-stage .layer:not(.on) { opacity: 0; }
@media (max-width: 900px) { .families { grid-template-columns: 1fr; } .fam-stage { order: -1; } }

/* ── Lock screen ──────────────────────────────────────────────────────── */
.lock { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.lock .phone { --pw: 300px; margin-inline: auto; }
.lockface { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; color: #f3e3b7; direction: rtl; }
.lockface .date { margin-top: 15%; font: 600 4.8cqw var(--ar); color: #fff; opacity: .9; }
.lockface .clock { font: 800 26cqw/1 var(--ar); letter-spacing: -.02em; margin-top: 1%; }
.lockface .row { display: flex; gap: 2.5%; align-items: center; margin-top: 4%; padding: 0 5%; }
.lockface .row { gap: 0; }
/* 76 pt widgets plus their 6 pt margin, on a 402 pt screen. */
.lockface .row img { height: 21.9cqw; width: auto; }
@media (max-width: 900px) { .lock { grid-template-columns: 1fr; } }

/* ── The film ─────────────────────────────────────────────────────────── */
.film { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.film .phone { --pw: 280px; margin-inline: auto; }
.film video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 16.5px; }
.steps li::before {
  content: counter(s, arabic-indic); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: #1a1408; font-weight: 800; font-size: 15px;
}
html[lang="en"] .steps li::before { content: counter(s); }
@media (max-width: 900px) { .film { grid-template-columns: 1fr; } }

/* ── Pro ──────────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 900px; margin-inline: auto; }
.plan { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan.pro { border-color: #d6b25e66; background: linear-gradient(170deg, #241d0e, var(--bg-2) 60%); position: relative; overflow: hidden; }
.plan.pro::after { content: ""; position: absolute; inset: -40% -40% auto auto; width: 300px; height: 300px; background: radial-gradient(circle, #d6b25e30, transparent 70%); }
.plan h3 { margin: 0 0 4px; font-size: 24px; }
.plan .sub { color: var(--ink-2); margin: 0 0 18px; }
.plan .ticks li { font-size: 15px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ── Promise / FAQ ────────────────────────────────────────────────────── */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promise div { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.promise b { display: block; font-size: 19px; margin-bottom: 6px; }
.promise span { color: var(--ink-2); font-size: 15px; }
.promise svg { width: 28px; height: 28px; color: var(--gold); margin-bottom: 12px; }
@media (max-width: 800px) { .promise { grid-template-columns: 1fr; } }

.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; font-size: 17.5px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 24px; line-height: 1; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 0 0 18px; font-size: 16px; }

.final { text-align: center; padding: 100px 0 120px; position: relative; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 300px at 50% 60%, #d6b25e22, transparent 70%); }
.final img.icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; box-shadow: 0 20px 50px #0009; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-inline-start: auto; }
footer a { text-decoration: none; color: var(--ink-2); }
footer a:hover { color: var(--ink); }

/* ── Reveal on scroll ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero .screen .w { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── Legal pages ──────────────────────────────────────────────────────── */
.doc { padding: 60px 0 90px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 6px; }
.doc .date { color: var(--ink-3); margin: 0 0 30px; }
.doc .card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 30px; }
.doc .card b { color: var(--gold-hi); }
.doc h2 { font-size: 23px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16.5px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.doc a { color: var(--gold); }
