/* ===========================================================
   معالي المستشار — Marketing site
   Design system mirrored from the Flutter app (gold / bronze / dark)
   =========================================================== */

:root {
  --bg: #1A0A02;
  --surface: #2C1A0E;
  --elevated: #3D2410;
  --bronze: #8B5A2B;
  --bronze-light: #A0522D;
  --gold: #D4AF37;
  --gold-bright: #FFD700;
  --gold-dim: #C8960C;
  --text: #F5E6C8;
  --text-2: #D4C4A0;
  --success: #4CAF79;
  --maxw: 1140px;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Cairo', system-ui, 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(212,175,55,.07), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(139,90,43,.10), transparent 55%);
}

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

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

h1,h2,h3,h4 { font-weight: 800; line-height: 1.3; color: var(--text); }
.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }

.eyebrow {
  display: inline-block; color: var(--gold);
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  padding: 6px 14px; border: 1px solid rgba(212,175,55,.35);
  border-radius: 30px; background: rgba(212,175,55,.06); margin-bottom: 18px;
}
.section-title { font-size: clamp(26px, 4vw, 40px); margin-bottom: 14px; }
.section-sub { color: var(--text-2); font-size: 17px; max-width: 640px; }
.center { text-align: center; }
.center .section-sub { margin: 0 auto; }
.gold { color: var(--gold); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-weight: 700; font-size: 16px;
  padding: 14px 26px; border-radius: 40px; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1A0A02; box-shadow: 0 12px 30px rgba(212,175,55,.28);
}
.btn-gold:hover { box-shadow: 0 16px 38px rgba(212,175,55,.42); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--gold); }
.btn-outline:hover { background: rgba(212,175,55,.10); }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26,10,2,.78); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(139,90,43,.35);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand b { font-size: 20px; font-weight: 800; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a { color: var(--text-2); font-weight: 600; font-size: 15px; transition: color .2s; }
.nav-links > a:hover, .nav-links > a.active { color: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: 0; color: var(--gold); font-size: 26px; cursor: pointer; }
.nav-menu-cta { display: none; } /* shown only inside the mobile dropdown menu */

/* ── Hero ──────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 110px 0 90px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url('/images/hero-bg.jpg') center/cover no-repeat;
  opacity: .42;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(26,10,2,.55), rgba(26,10,2,.85) 60%, var(--bg));
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5.2vw, 56px); margin-bottom: 18px; }
.hero h1 .gold { display: block; }
.hero p.lead { font-size: 19px; color: var(--text-2); margin-bottom: 30px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 22px; margin-top: 28px; color: var(--text-2); font-size: 14px; flex-wrap: wrap; }
.hero-badges span { display: flex; align-items: center; gap: 7px; }
.hero-art { display: flex; justify-content: center; }
.hero-art .logo-glow {
  width: min(330px, 80%); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(212,175,55,.16), transparent 65%);
}
.hero-art img { width: 88%; filter: drop-shadow(0 20px 40px rgba(212,175,55,.25)); }

/* ── Feature cards ─────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface), #241406);
  border: 1px solid rgba(139,90,43,.55); border-radius: var(--radius);
  padding: 26px; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(212,175,55,.12); color: var(--gold); font-size: 24px; margin-bottom: 16px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 15px; }

/* ── Stats strip ───────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat { text-align: center; background: var(--surface); border: 1px solid rgba(139,90,43,.4);
  border-radius: var(--radius); padding: 26px 14px; }
.stat b { display: block; font-size: 34px; color: var(--gold); }
.stat span { color: var(--text-2); font-size: 14px; }

/* ── Pricing ───────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan {
  position: relative; background: var(--surface); border: 1px solid rgba(139,90,43,.5);
  border-radius: var(--radius); padding: 28px 22px; display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.plan .tag {
  position: absolute; top: -12px; inset-inline-start: 22px; background: var(--gold);
  color: #1A0A02; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 20px;
}
.plan h3 { font-size: 22px; margin-bottom: 6px; }
.plan .price { font-size: 38px; font-weight: 800; color: var(--gold); margin: 6px 0; }
.plan .price small { font-size: 15px; color: var(--text-2); font-weight: 600; }
.plan ul { margin: 18px 0 22px; display: grid; gap: 11px; }
.plan li { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-size: 15px; }
.plan li .ok { color: var(--success); font-weight: 800; }
.plan li .no { color: #7a5a3a; }
.plan .btn { margin-top: auto; }

/* ── CTA band ──────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, rgba(212,175,55,.12), rgba(139,90,43,.10));
  border: 1px solid rgba(212,175,55,.3); border-radius: 26px; padding: 50px;
  text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 3.5vw, 34px); margin-bottom: 12px; }
.cta-band p { color: var(--text-2); margin-bottom: 24px; }

/* ── Legal / prose pages ───────────────────────────────────── */
.page-head { padding: 70px 0 30px; border-bottom: 1px solid rgba(139,90,43,.3); }
.page-head h1 { font-size: clamp(28px, 4.5vw, 44px); }
.page-head p { color: var(--text-2); margin-top: 10px; }
.prose { max-width: 820px; margin: 0 auto; padding: 46px 0 80px; }
.prose h2 { font-size: 24px; color: var(--gold); margin: 36px 0 12px; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; }
.prose p { color: var(--text-2); margin-bottom: 14px; }
.prose ul { list-style: disc; padding-inline-start: 24px; margin-bottom: 16px; color: var(--text-2); }
.prose li { margin-bottom: 8px; }
.prose .updated { color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.prose strong { color: var(--text); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: #160803; border-top: 1px solid rgba(139,90,43,.4); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; margin-bottom: 34px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-2); font-size: 15px; max-width: 360px; }
.footer-col h4 { font-size: 15px; color: var(--gold); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(139,90,43,.3); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 14px; flex-wrap: wrap; gap: 10px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; }
  .hero p.lead, .hero-actions, .hero-badges { margin-inline: auto; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 74px; inset-inline: 0;
    background: rgba(26,10,2,.97); padding: 18px 22px; gap: 16px; border-bottom: 1px solid rgba(139,90,43,.4);
  }
  /* Keep the top bar to just brand + hamburger: the action buttons move into the menu. */
  .nav-cta .btn, .nav-cta .lang-switch { display: none; }
  .nav-menu-cta {
    display: flex; flex-direction: column; gap: 12px; width: 100%;
    margin-top: 4px; padding-top: 16px; border-top: 1px solid rgba(139,90,43,.3);
  }
  .nav-menu-cta .btn { width: 100%; text-align: center; }
  .nav-menu-cta .lang-switch { align-self: flex-start; }
  .grid-4, .grid-3, .pricing, .stats, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .cta-band { padding: 34px 20px; }
}

/* ===========================================================
   v2 — animations, app showcase, forms, i18n
   =========================================================== */

/* Scroll reveal (only hide when JS is active, for SEO/no-JS) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .grid .reveal:nth-child(2){transition-delay:.06s} .js .grid .reveal:nth-child(3){transition-delay:.12s}
.js .grid .reveal:nth-child(4){transition-delay:.18s} .js .pricing .reveal:nth-child(3){transition-delay:.08s}

/* Language switch + flash */
.lang-switch { color: var(--text-2); border: 1px solid var(--bronze); border-radius: 30px; padding: 7px 13px; font-size: 13px; font-weight: 700; }
.lang-switch:hover { color: var(--gold); border-color: var(--gold); }
.flash { padding: 13px 0; font-weight: 700; text-align: center; }
.flash-success { background: rgba(76,175,121,.14); color: var(--success); border-bottom: 1px solid rgba(76,175,121,.4); }
.flash-error { background: rgba(207,102,121,.14); color: var(--error); border-bottom: 1px solid rgba(207,102,121,.4); }

/* Trial pill */
.trial-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(76,175,121,.14); color: var(--success); border: 1px solid rgba(76,175,121,.4); padding: 8px 18px; border-radius: 30px; font-weight: 800; font-size: 14px; }

/* Showcase rows + ticks */
.showcase-row { display: grid; grid-template-columns: 340px 1fr; gap: 54px; align-items: center; margin-bottom: 66px; }
.showcase-row.flip { grid-template-columns: 1fr 340px; }
.showcase-row.flip .showcase-art { order: 2; }
.showcase-art { display: flex; justify-content: center; }
.showcase-text h3 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 12px; }
.showcase-text p { color: var(--text-2); font-size: 16px; margin-bottom: 16px; }
.ticks li { display: flex; align-items: center; gap: 9px; color: var(--text); margin-bottom: 9px; }
.ticks li span { color: var(--gold); font-weight: 800; }

/* Phone mockup */
.phone { width: 300px; max-width: 78vw; aspect-ratio: 9/18.5; background: #0c0400; border: 10px solid #2a1809; border-radius: 44px; box-shadow: var(--shadow), 0 0 0 1px rgba(212,175,55,.15); position: relative; overflow: hidden; }
.phone-notch { position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: #2a1809; border-radius: 0 0 16px 16px; z-index: 3; }
.phone-screen { position: absolute; inset: 0; background: var(--bg); padding: 32px 12px 14px; overflow: hidden; }
.ph-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.ph-greet { font-weight: 800; color: var(--text); font-size: 15px; }
.ph-month { color: var(--text-2); font-size: 11px; }
.ph-ava { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ph-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ph-stat { background: var(--surface); border: 1px solid rgba(139,90,43,.5); border-radius: 11px; padding: 9px 11px; }
.ph-stat b { color: var(--gold); font-size: 19px; display: block; line-height: 1.2; }
.ph-stat span { color: var(--text-2); font-size: 10px; }
.ph-h { color: var(--text); font-weight: 700; font-size: 13px; margin: 6px 2px 8px; }
.ph-card { background: var(--surface); border: 1px solid rgba(139,90,43,.5); border-radius: 11px; padding: 9px 11px; margin-bottom: 8px; display: flex; align-items: center; gap: 9px; }
.ph-card.str { border-inline-start: 3px solid var(--gold); }
.ph-l { flex: 1; min-width: 0; }
.ph-l b { color: var(--text); display: block; font-size: 12px; }
.ph-l i { color: var(--text-2); font-style: normal; font-size: 10px; }
.ph-badge { font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 11px; white-space: nowrap; }
.ph-badge.gold { background: var(--gold); color: var(--bg); }
.ph-badge.blue { background: #3B82F6; color: #fff; }
.ph-badge.green { background: var(--success); color: var(--bg); }
.ph-badge.red { background: var(--error); color: #fff; }
.ph-search { background: var(--elevated); border-radius: 9px; padding: 8px 11px; color: var(--text-2); font-size: 11px; margin-bottom: 9px; }
.ph-chips { display: flex; gap: 5px; margin-bottom: 9px; flex-wrap: wrap; }
.ph-chips span { background: var(--elevated); color: var(--text-2); padding: 3px 9px; border-radius: 11px; font-size: 10px; }
.ph-chips span.on { background: var(--gold); color: var(--bg); font-weight: 700; }
.ph-week { display: flex; gap: 4px; margin-bottom: 11px; }
.ph-week span { flex: 1; text-align: center; background: var(--surface); border: 1px solid rgba(139,90,43,.4); border-radius: 9px; padding: 5px 0 9px; color: var(--text-2); font-size: 9px; position: relative; }
.ph-week span b { display: block; color: var(--text); font-size: 14px; }
.ph-week span.on { background: var(--gold); color: var(--bg); }
.ph-week span.on b { color: var(--bg); }
.ph-week span i { position: absolute; bottom: 4px; inset-inline-start: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.ph-week span.on i { background: var(--bg); }
.ph-card .ph-ico { font-size: 19px; }

/* Forms */
.form-card { max-width: 640px; margin: 44px auto 84px; background: var(--surface); border: 1px solid rgba(139,90,43,.55); border-radius: 22px; padding: 36px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 7px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; background: var(--elevated); border: 1px solid var(--bronze); border-radius: 12px; padding: 13px 15px; color: var(--text); font-family: inherit; font-size: 15px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
.field textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.err { color: var(--error); font-size: 13px; margin-top: 5px; display: block; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 14px; margin: 10px 0 6px; cursor: pointer; line-height: 1.6; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; }
.form-foot { text-align: center; color: var(--text-2); margin-top: 18px; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── User guide page ──────────────────────────────────────── */
.guide-sec { margin-bottom: 18px; }
.guide-sec h3 { font-size: 20px; color: var(--gold-bright); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.guide-sec h3 span { font-size: 24px; line-height: 1; }
.guide-steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 10px; }
.guide-steps li { color: var(--text-2); line-height: 1.9; font-size: 15px; }
.guide-steps li::marker { color: var(--gold); font-weight: 800; }
.faq-item { border: 1px solid rgba(139,90,43,.34); border-radius: 14px; margin-bottom: 12px; background: rgba(212,175,55,.035); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--text); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; inset-inline-end: 20px; color: var(--gold); font-weight: 800; font-size: 20px; }
.faq-item[open] summary { color: var(--gold-bright); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 20px 16px; margin: 0; color: var(--text-2); line-height: 1.9; font-size: 14.5px; }

@media (max-width: 860px) {
  .showcase-row, .showcase-row.flip { grid-template-columns: 1fr; gap: 28px; text-align: center; justify-items: center; }
  .showcase-row.flip .showcase-art { order: -1; }
  .ticks { display: inline-block; text-align: start; }
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .form-card { padding: 24px 18px; }
}
