/* ==========================================================================
   مِئويّة — website design system (matches the iOS app: navy + gold, RTL).
   Self-contained, no build step. Works on any static host.
   ========================================================================== */

:root {
    /* Navy / surfaces */
    --ink: #0A1424;
    --navy-0: #0A1428;
    --navy-1: #0E1D38;
    --navy-2: #16294A;
    --navy-3: #1F3A5F;

    /* Gold (primary accent) */
    --gold: #E0B84C;
    --gold-2: #C49A2E;
    --gold-soft: #F4D480;

    /* Secondary / semantic */
    --teal: #1FB39A;
    --green: #34C77B;
    --red: #E8615B;

    /* Text */
    --text: #EAF1FB;
    --muted: #9DB0CC;

    /* Glass */
    --glass: rgba(255, 255, 255, 0.06);
    --glass-2: rgba(255, 255, 255, 0.10);
    --line: rgba(255, 255, 255, 0.12);

    --radius: 22px;
    --radius-sm: 14px;
    --maxw: 1120px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "Tajawal", system-ui, -apple-system, sans-serif;
    background: var(--ink);
    color: var(--text);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* App-like background: navy gradient + warm gold / teal glows */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 700px at 85% -5%, rgba(224, 184, 76, 0.13), transparent 60%),
        radial-gradient(900px 700px at 5% 15%, rgba(31, 179, 154, 0.10), transparent 55%),
        linear-gradient(160deg, var(--navy-0), var(--navy-1) 45%, var(--navy-0));
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--gold-soft);
    background: rgba(224, 184, 76, 0.10);
    border: 1px solid rgba(224, 184, 76, 0.28);
    padding: 7px 14px; border-radius: 999px;
}

h1, h2, h3 { font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.gold-text {
    background: linear-gradient(180deg, #fff, var(--gold-soft));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: inherit; font-weight: 800; font-size: 16px;
    padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}
.btn-gold {
    color: #3A2C05;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold-2));
    box-shadow: 0 14px 34px rgba(224, 184, 76, 0.30);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(224, 184, 76, 0.42); }
.btn-ghost { color: var(--text); background: var(--glass-2); border: 1px solid var(--line); }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.14); }

.appstore {
    display: inline-flex; align-items: center; gap: 12px;
    background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.18);
    padding: 11px 22px; border-radius: 14px; transition: transform 0.25s var(--ease);
}
.appstore:hover { transform: translateY(-2px); }
.appstore svg { width: 26px; height: 26px; }
.appstore small { display: block; font-size: 11px; color: #cfd6e2; font-weight: 500; }
.appstore b { display: block; font-size: 18px; font-weight: 800; margin-top: -2px; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(10, 20, 40, 0.55);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand .wordmark { height: 30px; width: auto; display: block; }
footer .brand .wordmark { height: 26px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav .btn { padding: 10px 20px; font-size: 14px; }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 24px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); margin: 18px 0 16px; }
.hero p.lead { font-size: clamp(16px, 2vw, 20px); color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; align-items: center; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* Score ring (the app's signature) */
.ring-stage { position: relative; display: grid; place-items: center; min-height: 380px; }
.ring-stage::before {
    content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(circle, rgba(224,184,76,0.18), transparent 65%); filter: blur(8px);
}
.ring { width: min(360px, 78vw); height: min(360px, 78vw); position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 16; }
.ring .prog {
    fill: none; stroke: url(#goldgrad); stroke-width: 18; stroke-linecap: round;
    stroke-dasharray: 760; stroke-dashoffset: 760;
    animation: draw 2.4s var(--ease) forwards 0.3s;
}
@keyframes draw { to { stroke-dashoffset: 150; } }
.ring .center {
    position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.ring .num { font-size: clamp(60px, 12vw, 104px); font-weight: 900;
    background: linear-gradient(180deg, #fff, var(--gold-soft));
    -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.ring .cap { color: var(--muted); font-size: 15px; margin-top: 8px; font-weight: 700; }
.float { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 50px; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 20px; text-align: center; }
.stat b { display: block; font-size: 28px; font-weight: 900; color: var(--gold-soft); }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
section.block { padding: 76px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 40px); margin: 14px 0 12px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(224,184,76,0.4); background: var(--glass-2); }
.card .ico {
    width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
    font-size: 26px; margin-bottom: 16px;
    background: rgba(224,184,76,0.12); border: 1px solid rgba(224,184,76,0.28);
}
.card.teal .ico { background: rgba(31,179,154,0.12); border-color: rgba(31,179,154,0.3); }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step .n {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    font-weight: 900; font-size: 18px; color: #3A2C05; margin-bottom: 14px;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold-2));
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
details.qa {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 4px 22px; transition: border-color 0.25s;
}
details.qa[open] { border-color: rgba(224,184,76,0.35); }
details.qa summary {
    cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 17px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; color: var(--gold-soft); font-size: 24px; font-weight: 400; transition: transform 0.25s; }
details.qa[open] summary::after { transform: rotate(45deg); }
details.qa p { color: var(--muted); padding: 0 0 20px; font-size: 15px; }

/* CTA band */
.cta-band {
    text-align: center; padding: 64px 30px; border-radius: 28px; margin: 10px 0;
    background:
        radial-gradient(600px 240px at 50% 0%, rgba(224,184,76,0.18), transparent 70%),
        linear-gradient(160deg, var(--navy-2), var(--navy-1));
    border: 1px solid rgba(224,184,76,0.25);
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; font-size: 17px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 46px 0 60px; margin-top: 30px; }
.foot-grid { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-weight: 600; transition: color 0.2s; }
.foot-links a:hover { color: var(--gold-soft); }
.copy { color: var(--muted); font-size: 14px; }

/* ---------- Legal pages ---------- */
.legal { padding: 56px 0 40px; max-width: 820px; margin: 0 auto; }
.legal h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 22px; margin: 34px 0 12px; color: var(--gold-soft); }
.legal p, .legal li { color: #c9d6ea; font-size: 16px; margin-bottom: 12px; }
.legal ul { padding-inline-start: 22px; }
.legal a { color: var(--gold-soft); border-bottom: 1px solid rgba(244,212,128,0.4); }
.legal .box {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 20px 24px; margin: 20px 0;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero p.lead { margin: 0 auto; }
    .hero-cta { justify-content: center; }
    .ring-stage { min-height: 300px; margin-top: 10px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column; gap: 4px;
        position: absolute; top: 68px; inset-inline: 0;
        background: rgba(10, 20, 40, 0.96); backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line); padding: 14px 22px;
    }
    .nav-links.open a { padding: 10px 0; font-size: 16px; }
    .menu-toggle { display: block; }
}
@media (max-width: 520px) {
    .steps { grid-template-columns: 1fr; }
    .foot-grid { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .ring .prog { animation: none; stroke-dashoffset: 150; }
    .float { animation: none; }
    .reveal { transition: none; opacity: 1; transform: none; }
}

/* ---------- App showcase (phone mockups) ---------- */
#showcase { position: relative; }
#showcase::before {
    content: ""; position: absolute; inset: 8% 0 auto; height: 60%;
    background: radial-gradient(700px 320px at 50% 30%, rgba(224,184,76,0.12), transparent 70%);
    z-index: -1; pointer-events: none;
}
.showcase {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 30px; align-items: end; justify-items: center;
}
.shot { margin: 0; max-width: 290px; text-align: center; }
.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 20px; padding: 0 8px; line-height: 1.6; }
.shot.featured { transform: translateY(-26px); }
.shot.featured figcaption { color: var(--text); font-weight: 600; }

.phone {
    position: relative; border-radius: 44px; padding: 9px;
    background: linear-gradient(155deg, #3b4250, #0c0f16);
    box-shadow: 0 36px 80px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.10);
    transition: transform 0.4s var(--ease);
}
.shot.featured .phone {
    box-shadow: 0 46px 96px rgba(0,0,0,0.6), 0 0 0 1px rgba(224,184,76,0.25), 0 22px 64px rgba(224,184,76,0.20);
}
.phone:hover { transform: translateY(-8px); }
.phone img { border-radius: 36px; width: 100%; display: block; }
.phone .island {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    width: 88px; height: 25px; border-radius: 999px; background: #05070c; z-index: 2;
}

@media (max-width: 880px) {
    .showcase { grid-template-columns: 1fr; gap: 42px; max-width: 330px; margin: 0 auto; }
    .shot, .shot.featured { transform: none; max-width: 300px; }
}
