/* طريق العقول — styles. Arabic only (RTL), so logical properties keep everything mirrored correctly. */

@font-face {
  font-family: "Lalezar";
  src: url("fonts/Lalezar-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --navy: #1c2a4d;
  --steel: #4a6a99;
  --blue: #2f86e6;
  --blue-d: #1a6ad6;
  --sky-3: #eaf4ff;
  --orange: #f08a3a;
  --orange-d: #c9661a;
  --green-d: #1a8f4c;
  /* the four answer colours from the app */
  --a1: #f9c2c8; --a2: #c9e4ff; --a3: #fdeeb0; --a4: #e0d2fb;
  --shadow: 0 10px 28px rgba(28, 42, 77, .16);
  --shadow-s: 0 4px 12px rgba(28, 42, 77, .14);
  --title: "Lalezar", "Segoe UI", Tahoma, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--navy); line-height: 1.65; background: var(--sky-3); overflow-x: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-d); font-weight: 600; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0 0 .5em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ---- buttons (raised, like the app) ---- */
.btn {
  --c: var(--blue); --cd: var(--blue-d);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .6em 1.3em; border: 0; border-radius: 16px;
  background: var(--c); color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 5px 0 var(--cd), 0 10px 18px rgba(28, 42, 77, .2);
  transition: transform .12s, box-shadow .12s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd), 0 3px 8px rgba(28, 42, 77, .2); }
.btn-orange { --c: var(--orange); --cd: var(--orange-d); }
.btn-white { --c: #fff; --cd: #b9cce6; color: var(--navy); }
.btn-lg { font-size: 1.15rem; padding: .7em 1.5em; }
.btn-sm { font-size: .9rem; padding: .4em 1em; border-radius: 12px; box-shadow: 0 3px 0 var(--cd), 0 6px 12px rgba(28, 42, 77, .18); }

/* ---- header ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(28, 42, 77, .08); }
.nav .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; margin-inline-end: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow-s); }
.brand b { font-family: var(--title); font-weight: 400; font-size: 1.45rem; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: .35em .8em; border-radius: 12px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--sky-3); }
@media (max-width: 760px) { .nav-links { display: none; } }
@media (max-width: 380px) { .nav .btn { display: none; } }

/* ---- sky: clouds drift BEHIND all content; any white text sits on a solid .scrim, so a cloud can never hide it ---- */
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; opacity: .85; animation: drift-rtl linear infinite; }
.cloud.c1 { top: 8%;  width: 190px; inset-inline-start: -220px; animation-duration: 80s; }
.cloud.c2 { top: 52%; width: 140px; inset-inline-start: -170px; animation-duration: 110s; animation-delay: -45s; opacity: .7; }
.cloud.c3 { top: 28%; width: 240px; inset-inline-start: -280px; animation-duration: 130s; animation-delay: -90s; opacity: .55; }
@keyframes drift-rtl { to { transform: translateX(calc(-100vw - 520px)); } }
.scrim { display: inline-block; background: rgba(20, 36, 78, .74); color: #fff; padding: .3em .9em; border-radius: 14px; }

/* ---- hero ---- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(#3b8de8 0%, #6db3f7 60%, #b9dcff 100%); padding: clamp(22px, 4vw, 44px) 0 clamp(96px, 13vw, 150px); }
.ground { position: absolute; inset-inline: 0; bottom: 0; height: clamp(90px, 12vw, 150px); z-index: 1; pointer-events: none; }
/* the app's own hill colours; each hill is one wide ellipse */
.ground .hill { position: absolute; bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.ground .hb1 { inset-inline-start: -14%; width: 70%; height: 78%; background: #80c76b; }
.ground .hb2 { inset-inline-end: -18%; width: 78%; height: 66%; background: #80c76b; }
.ground .hf { inset-inline: -6%; height: 44%; background: #a8e075; }
.ground .tree { position: absolute; width: clamp(24px, 3.6vw, 48px); }
.ground .tree.back { width: clamp(16px, 2.4vw, 30px); }

.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(20px, 4vw, 48px); align-items: center; position: relative; z-index: 2; }
.hero-icon { width: 72px; height: 72px; border-radius: 18px; border: 3px solid #fff; box-shadow: 0 8px 20px rgba(28, 42, 77, .3); margin-bottom: 10px; animation: wiggle 6s ease-in-out infinite; }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-7deg); } 94% { transform: rotate(6deg); } 97% { transform: rotate(-3deg); } }
.hero h1 { font-family: var(--title); font-weight: 400; font-size: clamp(3rem, 8vw, 5rem); color: var(--navy); text-shadow: 0 3px 0 rgba(255, 255, 255, .85), 0 10px 22px rgba(28, 42, 77, .22); }
.hero .tag { font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 700; margin: 10px 0 18px; max-width: 26ch; line-height: 1.5; padding: .5em 1em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

.stage { position: relative; padding-bottom: 6%; }
.tv { position: relative; border: clamp(6px, 1vw, 9px) solid #14203d; border-radius: 14px; background: #14203d; box-shadow: var(--shadow), 0 26px 44px rgba(28, 42, 77, .25); }
.tv::after { content: ""; position: absolute; top: 100%; left: 50%; translate: -50% 0; width: 22%; height: 14px; background: linear-gradient(#2b3a63, #14203d); border-radius: 0 0 12px 12px; }
.tv-screen, .phone-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 5px; background: #a9d5ff; }
.phone { position: absolute; bottom: 0; inset-inline-start: -3%; width: 26%; min-width: 92px; border: clamp(4px, .6vw, 6px) solid #14203d; border-radius: clamp(14px, 2.4vw, 26px); background: #14203d; box-shadow: var(--shadow), 0 20px 34px rgba(28, 42, 77, .3); animation: bob 6s ease-in-out infinite; padding: 0; cursor: pointer; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.phone-screen { aspect-ratio: 600 / 1238; border-radius: clamp(10px, 1.8vw, 20px); }
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.slide.on { opacity: 1; }
.hint { position: absolute; bottom: -2px; inset-inline-end: 0; background: #fff; border-radius: 999px; padding: .15em .9em; font-weight: 800; font-size: .82rem; box-shadow: var(--shadow-s); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .tag { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-icon { margin-inline: auto; }
  .stage { max-width: 500px; margin-inline: auto; width: 100%; }
}

/* ---- sections (kept tight) ---- */
.section { padding: clamp(28px, 5vw, 52px) 0; }
.section h2 { font-family: var(--title); font-weight: 400; font-size: clamp(1.8rem, 4.2vw, 2.5rem); margin-bottom: 18px; text-align: center; }
.card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 22px; }

.stats { margin-top: -44px; position: relative; z-index: 5; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 10px 8px; text-align: center; border-bottom: 5px solid var(--c); }
.stat b { display: block; font-family: var(--title); font-weight: 400; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.15; color: var(--c); }
.stat span { font-weight: 700; color: var(--steel); font-size: .88rem; }
@media (max-width: 600px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; padding: 16px 18px; }
.step .emoji { grid-row: span 2; position: relative; font-size: 2.4rem; line-height: 1; transition: transform .3s; }
.step .emoji b { position: absolute; top: -8px; inset-inline-end: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; font-family: var(--title); font-weight: 400; font-size: .95rem; display: grid; place-items: center; border: 2px solid #fff; }
.step:hover .emoji { transform: scale(1.15) rotate(-6deg); }
.step h3 { font-size: 1.1rem; align-self: end; }
.step p { margin: 0; color: var(--steel); font-size: .93rem; line-height: 1.5; }
.solo { margin: 14px auto 0; background: #fff8dc; border: 2px dashed #f6b93b; border-radius: 16px; padding: 8px 16px; max-width: 620px; text-align: center; font-weight: 700; font-size: .95rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* features */
.features { background: #fff; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.feat { display: flex; gap: 14px; align-items: flex-start; background: var(--sky-3); border-radius: 18px; padding: 14px 16px; transition: transform .2s, box-shadow .2s, background .2s; }
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: #fff; }
.feat .ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--c); }
.feat h3 { font-size: 1.05rem; margin-bottom: 2px; }
.feat p { margin: 0; color: var(--steel); font-size: .92rem; line-height: 1.5; }

/* packs */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pack { background: var(--c, var(--a2)); border-radius: 999px; padding: .3em 1em .3em .8em; font-weight: 800; box-shadow: var(--shadow-s); transition: transform .2s; }
.pack:hover { transform: translateY(-3px) rotate(-2deg); }
.pack:nth-child(4n+1) { --c: var(--a1); } .pack:nth-child(4n+2) { --c: var(--a2); } .pack:nth-child(4n+3) { --c: var(--a3); } .pack:nth-child(4n+4) { --c: var(--a4); }
.pack.mine { background: #fff; border: 2px dashed var(--blue); }

/* screenshots */
.track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 22px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: thin; }
.shot { flex: none; scroll-snap-align: center; margin: 0; text-align: center; }
.shot .frame { border: 7px solid #14203d; border-radius: 30px; background: #14203d; box-shadow: var(--shadow); overflow: hidden; width: 200px; }
.shot .frame img { width: 100%; border-radius: 23px; }
.shot figcaption { margin: 10px auto 0; font-weight: 800; max-width: 22ch; font-size: .9rem; line-height: 1.4; }

/* closing call to action */
.cta { position: relative; text-align: center; overflow: hidden; isolation: isolate; background: linear-gradient(#3b8de8, #6db3f7 80%); padding: clamp(32px, 6vw, 56px) 0 clamp(100px, 14vw, 160px); }
.cta h2 { font-family: var(--title); font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); color: var(--navy); text-shadow: 0 3px 0 rgba(255, 255, 255, .8); }
.cta .scrim { margin: 10px 0 18px; font-weight: 700; }
.cta .wrap { position: relative; z-index: 2; }
.promise { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.promise span { background: #fff; border-radius: 999px; padding: .15em .9em; font-weight: 800; font-size: .92rem; box-shadow: var(--shadow-s); }
.cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.foot { background: #4f9a3f; color: #fff; padding: 20px 0 26px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; justify-content: space-between; }
.foot a { color: #fff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot small { opacity: .92; }

/* ---- reveal on scroll ---- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s, transform .55s; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- inner pages (privacy, support) ---- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(#3b8de8, #6db3f7); padding: clamp(24px, 4vw, 40px) 0 clamp(56px, 8vw, 80px); text-align: center; }
.page-hero h1 { font-family: var(--title); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--navy); text-shadow: 0 3px 0 rgba(255, 255, 255, .8); }
.page-hero .scrim { margin-top: 8px; font-weight: 700; }
.page-main { margin-top: -40px; position: relative; z-index: 3; padding-bottom: 40px; }
.doc { max-width: 780px; margin-inline: auto; display: grid; gap: 16px; }
.doc .card h2 { font-family: var(--title); font-weight: 400; font-size: 1.6rem; margin-bottom: 8px; }
.doc .card h3 { font-size: 1.05rem; margin: 16px 0 2px; color: var(--steel); }
.doc .card h3:first-of-type { margin-top: 0; }
.doc .updated { color: var(--steel); font-weight: 700; font-size: .92rem; }

.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 12px; }
.glance div { background: var(--sky-3); border-radius: 16px; padding: 10px 8px; text-align: center; font-weight: 800; line-height: 1.4; }
.glance div span { display: block; font-size: 1.6rem; }
.glance div small { display: block; font-weight: 600; color: var(--steel); }

details { background: var(--sky-3); border-radius: 16px; margin: 8px 0; }
details[open] { background: #fff; outline: 2px solid #a9d5ff; }
summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; margin-inline-start: auto; font-size: 1.2rem; color: var(--blue); transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 0 16px 14px; color: #33456b; }
details ol { padding-inline-start: 22px; margin: 4px 0 6px; }
details p { margin: 0 0 .4em; }

.contact { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: linear-gradient(135deg, #fff, #eaf4ff); }
.contact h2 { margin-bottom: 4px; }
@media (max-width: 600px) { .contact { grid-template-columns: 1fr; } }
.specs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.spec { background: #fff; border-radius: 999px; padding: .15em .9em; font-weight: 800; font-size: .88rem; box-shadow: var(--shadow-s); }

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