/* المعجم السريع — same palette as the app (lib/ui/theme.dart). */
@font-face { font-family: "Cairo"; src: url("fonts/Cairo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("fonts/Cairo-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --brand-deep: #0e1f45;
  --brand: #1f3b70;
  --brand-light: #2d5aa6;
  --bolt: #f5b301;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1b2233;
  --muted: #5a6378;
  --line: rgba(31, 59, 112, 0.12);
  --primary: #2d4f8f;
  --raed: #3c67d1;
  --wasit: #0e8c76;
  --ghani: #c46a0a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --card: #151d30;
    --ink: #e6e9f2;
    --muted: #9aa3b8;
    --line: rgba(255, 255, 255, 0.08);
    --primary: #a9c1ff;
    --raed: #8fb2ff;
    --wasit: #5fd8be;
    --ghani: #ffb86b;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Header ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 60%, var(--brand-light) 100%);
  border-radius: 0 0 40px 40px;
}
.hero .bolt-mark {
  position: absolute;
  inset-inline-end: -40px;
  top: -30px;
  width: 340px;
  opacity: 0.07;
  transform: rotate(14deg);
  pointer-events: none;
}

.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.topbar img { width: 44px; height: 44px; }
.topbar .name { font-weight: 700; font-size: 1.25rem; color: #fff; }
.topbar nav { margin-inline-start: auto; display: flex; gap: 8px; }
.topbar nav a {
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}
.topbar nav a:hover, .topbar nav a.active { background: rgba(255, 255, 255, 0.22); text-decoration: none; }

.hero-body { display: flex; align-items: center; gap: 40px; padding: 30px 0 64px; }
.hero-body .text { flex: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.3; margin: 0 0 8px; }
.hero h1 .underline {
  display: block;
  width: 120px;
  height: 5px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--bolt);
  box-shadow: 0 0 14px rgba(245, 179, 1, 0.6);
}
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.8); margin: 14px 0 26px; }
.hero .logo-big {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  filter: drop-shadow(0 0 40px rgba(245, 179, 1, 0.35));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }

.hero.compact .hero-body { padding: 12px 0 44px; }
.hero.compact h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn svg { width: 22px; height: 22px; }
.btn-primary { background: var(--bolt); color: #2b1d00; box-shadow: 0 8px 24px rgba(245, 179, 1, 0.35); }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Sections -------------------------------------------------------------- */

main { padding: 40px 0 20px; }
section { margin-bottom: 48px; }
h2 { font-size: 1.6rem; margin: 0 0 18px; }
h2 .bolt { color: var(--bolt); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 24px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.feature .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(45, 90, 166, 0.12);
  color: var(--primary);
  margin-bottom: 10px;
}
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 4px; font-size: 1.1rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.sources { display: flex; flex-wrap: wrap; gap: 12px; }
.source { flex: 1 1 min(200px, 100%); display: flex; align-items: center; gap: 12px; }
.source .dot { width: 12px; height: 12px; border-radius: 50%; }
.source b { font-size: 1.1rem; }
.source span { color: var(--muted); }

.word-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #fff1c7, #ffe08a);
  color: #4a3300;
}
@media (prefers-color-scheme: dark) {
  .word-card { background: linear-gradient(135deg, #3b2e0a, #2a2210); color: #ffe3a3; }
}
.word-card .tag {
  display: inline-block;
  padding: 0 12px;
  border-radius: 10px;
  background: currentColor;
  font-size: 0.85rem;
  font-weight: 700;
}
.word-card .tag span { color: #fff; }
@media (prefers-color-scheme: dark) { .word-card .tag span { color: #000; } }
.word-card .word { font-size: 2.2rem; font-weight: 700; margin: 6px 0 0; }
.word-card p { margin: 0; opacity: 0.9; }

/* FAQ */
details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px 22px;
  margin-bottom: 10px;
}
details[open] { padding-bottom: 14px; }
summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  margin-inline-start: auto;
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p, details ol, details ul { margin: 0 0 6px; color: var(--muted); }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  border: none;
}
.contact p { margin: 0; color: rgba(255, 255, 255, 0.8); }
.contact .btn { margin-inline-start: auto; }

/* Privacy policy */
.policy h2 { font-size: 1.15rem; margin: 22px 0 4px; color: var(--primary); }
.policy p, .policy li { color: var(--ink); }
.policy .muted { color: var(--muted); font-size: 0.9rem; }
.lang-switch { display: flex; gap: 8px; margin-bottom: 18px; }
.lang-switch a {
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

footer {
  padding: 28px 0 36px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer .ltr { direction: ltr; unicode-bidi: isolate; letter-spacing: 0.06em; }

@media (max-width: 720px) {
  .hero-body { flex-direction: column-reverse; text-align: center; gap: 18px; }
  .hero h1 .underline { margin-inline: auto; }
  .buttons { justify-content: center; }
  .hero .logo-big { width: 150px; height: 150px; }
  .topbar nav a { padding: 4px 10px; font-size: 0.85rem; }
  .contact .btn { margin-inline-start: 0; }
}
