/* ===== الرحمٰن · alrahman.net — shared design system ===== */
@import url('/assets/fonts.css');

:root{
  --cream:#FDFBF4; --wash:#FBF4DE; --g100:#F4E4B0; --g300:#E3C56B;
  --g600:#C9A227; --g800:#9A7A18; --ink:#3B3220; --ink2:#6B5E3E;
  --line:#EADFBE; --paper:#FFFDF6;
  --shadow:0 8px 26px -10px rgba(154,122,24,.28);
  --shadow-lg:0 24px 60px -24px rgba(154,122,24,.40);
  --radius:18px;
}
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; font-family:'Tajawal',sans-serif; color:var(--ink);
  background:var(--cream); line-height:1.6; -webkit-font-smoothing:antialiased;
}
.font-quran{ font-family:'Amiri Quran','Amiri',serif; }
.material-symbols-outlined{ font-family:'Material Symbols Outlined'; font-weight:normal; font-style:normal;
  font-size:24px; line-height:1; letter-spacing:normal; text-transform:none; display:inline-block;
  white-space:nowrap; word-wrap:normal; direction:ltr; font-variation-settings:'wght' 300; vertical-align:middle; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
:focus-visible{ outline:2px solid var(--g600); outline-offset:3px; border-radius:6px; }

.container{ width:100%; max-width:1180px; margin-inline:auto; padding-inline:24px; }
.muted{ color:var(--ink2); }
.small{ font-size:.82rem; }
.center{ text-align:center; }

/* ornaments */
.ornament{ display:flex; align-items:center; justify-content:center; gap:1rem; color:var(--g600); }
.ornament::before,.ornament::after{ content:''; height:1px; width:72px;
  background:linear-gradient(90deg,transparent,var(--g300)); }
.ornament::after{ background:linear-gradient(270deg,transparent,var(--g300)); }

/* ===== nav ===== */
.nav{ position:sticky; top:0; z-index:50; background:rgba(253,251,244,.9);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.nav-inner{ max-width:1180px; margin-inline:auto; padding:0 24px; height:66px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; }
.brand{ font-family:'Amiri Quran','Amiri',serif; font-size:1.9rem; color:var(--g800);
  line-height:1; letter-spacing:.5px; }
.nav-links{ display:flex; gap:6px; }
.nav-links a{ padding:8px 14px; border-radius:9999px; font-weight:500; color:var(--ink2);
  transition:.18s; }
.nav-links a:hover,.nav-links a.active{ color:var(--ink); background:var(--wash); }
.nav-right{ display:flex; align-items:center; gap:10px; }
.lang{ font-family:'Tajawal'; font-weight:700; font-size:.8rem; color:var(--ink2);
  background:none; border:1px solid var(--line); border-radius:9999px; padding:6px 12px; cursor:pointer; }
.lang:hover{ color:var(--ink); }
.nav-toggle{ display:none; background:none; border:0; cursor:pointer; color:var(--ink); }

/* ===== buttons ===== */
.btn{ display:inline-flex; align-items:center; gap:.5rem; font-family:'Tajawal'; font-weight:700;
  padding:12px 22px; border-radius:14px; border:1px solid transparent; cursor:pointer;
  transition:.18s; font-size:1rem; }
.btn.sm{ padding:8px 16px; font-size:.85rem; border-radius:12px; }
.btn-gold{ background:var(--g600); color:var(--ink); box-shadow:var(--shadow); }
.btn-gold:hover{ background:var(--g300); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-ghost:hover{ background:var(--wash); }

/* ===== hero ===== */
.hero{ position:relative; overflow:hidden; padding:96px 0 80px; text-align:center; }
.hero::before{ content:''; position:absolute; inset:-20% 0 auto 0; height:520px;
  background:radial-gradient(60% 70% at 50% 0%, rgba(227,197,107,.35), transparent 70%); z-index:0; }
.hero > *{ position:relative; z-index:1; }
.eyebrow{ display:inline-block; font-weight:700; letter-spacing:1px; font-size:.8rem;
  color:var(--g800); background:var(--wash); border:1px solid var(--line);
  padding:6px 16px; border-radius:9999px; margin-bottom:24px; }
.display{ font-family:'Amiri Quran','Amiri',serif; color:var(--ink);
  font-size:clamp(2.4rem,6vw,4.4rem); line-height:1.25; margin:0 0 20px; }
.display .gold{ color:var(--g800); }
.lead{ max-width:680px; margin:0 auto 32px; font-size:clamp(1.05rem,2.2vw,1.25rem);
  color:var(--ink2); }
.hero-cta{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.bismillah{ font-family:'Amiri Quran','Amiri',serif; color:var(--g600);
  font-size:clamp(1.6rem,4vw,2.4rem); margin-top:56px; }

/* ===== sections ===== */
.section{ padding:72px 0; }
.section.alt{ background:var(--paper); border-block:1px solid var(--line); }
.section-head{ text-align:center; max-width:680px; margin:0 auto 48px; }
.section-head h2{ font-family:'Amiri Quran','Amiri',serif; color:var(--ink);
  font-size:clamp(1.8rem,4vw,2.6rem); margin:14px 0 12px; }
.section-head p{ color:var(--ink2); margin:0; }

/* grid + cards */
.grid{ display:grid; gap:20px; }
.grid-2{ grid-template-columns:repeat(2,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.card{ background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:28px; box-shadow:var(--shadow); transition:.2s; }
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.card-icon{ width:52px; height:52px; border-radius:14px; display:flex; align-items:center;
  justify-content:center; background:var(--wash); color:var(--g800); margin-bottom:18px; }
.card-icon .material-symbols-outlined{ font-size:28px; }
.card h3{ margin:0 0 8px; font-size:1.25rem; color:var(--ink); }
.card p{ margin:0; color:var(--ink2); }

/* chips / layers */
.chips{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.chip{ display:inline-flex; align-items:center; gap:.4rem; background:var(--paper);
  border:1px solid var(--line); border-radius:9999px; padding:10px 18px; font-weight:500;
  box-shadow:var(--shadow); }
.chip .dot{ width:7px; height:7px; border-radius:50%; background:var(--g600); }
.source-chip{ display:inline-flex; align-items:center; gap:.3rem; background:var(--wash);
  color:var(--g800); border:1px solid var(--line); border-radius:9999px; padding:.2rem .7rem;
  font-size:.74rem; font-weight:700; }

/* rule banner */
.rule{ background:linear-gradient(180deg,var(--wash),var(--paper)); border:1px solid var(--g300);
  border-radius:24px; padding:44px; text-align:center; box-shadow:var(--shadow); }
.rule .seal{ font-family:'Amiri Quran','Amiri',serif; font-size:2.4rem; color:var(--g600); }
.rule h2{ font-family:'Amiri Quran','Amiri',serif; font-size:clamp(1.6rem,3.5vw,2.2rem);
  margin:10px 0; color:var(--ink); }
.rule p{ max-width:620px; margin:0 auto; color:var(--ink2); }

/* CTA band */
.cta-band{ text-align:center; padding:80px 0; }
.cta-band h2{ font-family:'Amiri Quran','Amiri',serif; font-size:clamp(2rem,5vw,3rem);
  color:var(--g800); margin:0 0 24px; }

/* ===== footer ===== */
.footer{ background:var(--ink); color:#E8DEC6; padding:56px 0 32px; }
.footer .brand{ color:var(--g300); }
.footer-grid{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:32px; margin-bottom:32px; }
.footer-links{ display:flex; flex-wrap:wrap; gap:24px; }
.footer-links a{ color:#CDBF9C; }
.footer-links a:hover{ color:var(--g300); }
.footer .muted{ color:#9A8E6F; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.08); padding-top:24px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; }

/* generic page header (inner pages) */
.page-head{ background:var(--paper); border-bottom:1px solid var(--line); padding:56px 0 40px; text-align:center; }
.page-head h1{ font-family:'Amiri Quran','Amiri',serif; font-size:clamp(2rem,5vw,3rem);
  color:var(--ink); margin:0 0 10px; }
.page-head p{ color:var(--ink2); margin:0; }

/* list rows (listen / learn) */
.row{ display:flex; align-items:center; gap:16px; padding:16px 18px; background:var(--paper);
  border:1px solid var(--line); border-radius:14px; margin-bottom:10px; transition:.15s; }
.row:hover{ background:var(--wash); }
.row .num{ width:40px; height:40px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  border-radius:9999px; background:var(--wash); color:var(--g800); font-weight:700;
  border:1px solid var(--line); }
.row .grow{ flex:1; }
.row .ar{ font-family:'Amiri Quran','Amiri',serif; font-size:1.5rem; color:var(--ink); }
.row .play{ width:42px; height:42px; border-radius:9999px; border:0; background:var(--g600);
  color:var(--ink); cursor:pointer; }

/* badge / pill */
.pill{ display:inline-block; font-size:.72rem; font-weight:700; color:var(--g800);
  background:var(--wash); border:1px solid var(--line); border-radius:9999px; padding:3px 12px; }

/* forms (admin / account) */
.field{ margin-bottom:18px; }
.field label{ display:block; font-weight:700; font-size:.85rem; margin-bottom:6px; color:var(--ink); }
.field .req{ color:#B4521A; }
.field input,.field select,.field textarea{ width:100%; font-family:'Tajawal'; font-size:.95rem;
  padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); }
.field input:focus,.field select:focus,.field textarea:focus{ outline:2px solid var(--g600); outline-offset:0; border-color:var(--g600); }
.field textarea{ min-height:120px; resize:vertical; }
.hint{ font-size:.78rem; color:var(--ink2); margin-top:4px; }

/* table */
.table{ width:100%; border-collapse:collapse; background:var(--paper); border:1px solid var(--line);
  border-radius:var(--radius); overflow:hidden; }
.table th,.table td{ text-align:right; padding:14px 16px; border-bottom:1px solid var(--line); font-size:.9rem; }
.table th{ background:var(--wash); color:var(--g800); font-size:.8rem; }
.table tr:last-child td{ border-bottom:0; }
.status{ font-size:.72rem; font-weight:700; padding:3px 10px; border-radius:9999px; }
.status.pending{ background:#FBF0D6; color:#9A7A18; }
.status.approved{ background:#E3F0E4; color:#356B3D; }

/* note box */
.note{ background:var(--wash); border:1px dashed var(--g300); border-radius:14px; padding:16px 18px;
  color:var(--ink2); font-size:.9rem; }

@media (max-width:860px){
  .grid-2,.grid-3,.grid-4{ grid-template-columns:1fr; }
  .nav-links{ display:none; }
  .footer-grid{ flex-direction:column; }
}

/* ===== dark theme (v34) ===== */
:root[data-theme="dark"]{ --cream:#14110A; --wash:#241D0F; --g100:#F4E4B0; --g300:#E3C56B; --g600:#D8B43A; --g800:#E9CE72; --ink:#F1E7CE; --ink2:#C2B188; --line:#392F18; --paper:#1C1810; --shadow:0 8px 26px -10px rgba(0,0,0,.55); --shadow-lg:0 24px 60px -24px rgba(0,0,0,.7); --g50:#241D0F; --g500:#E3C56B; }
[data-theme="dark"] .footer{ background:#0F0D07; }
[data-theme="dark"] .field input,[data-theme="dark"] .field select,[data-theme="dark"] .field textarea{ background:#15120B; color:var(--ink); }
[data-theme="dark"] .card{ background:var(--paper); }
[data-theme="dark"] .nav{ background:rgba(20,17,10,.9); }
[data-theme="dark"] .btn-gold,[data-theme="dark"] .row .play,[data-theme="dark"] .m-share,[data-theme="dark"] .m-play,[data-theme="dark"] .lvl.is-active,[data-theme="dark"] .verse.is-active .ayah-num{ color:#14110A; }

/* ===== shell v36 ===== */
.icon-btn{ display:inline-flex; align-items:center; justify-content:center; padding:8px; border-radius:9999px; background:none; border:0; cursor:pointer; color:var(--ink); transition:background-color .18s; }
.icon-btn:hover{ background:var(--wash); }
.nav-inner .nav-links{ flex:1; justify-content:center; }
body:not(.mushaf){ min-height:100vh; display:flex; flex-direction:column; }
body:not(.mushaf) .footer{ margin-top:auto; }


/* ===== mobile menu (v41) ===== */
@media (max-width:860px){
  .nav-toggle{ display:inline-flex !important; }
}
.nav-toggle{ align-items:center; justify-content:center; padding:8px; border-radius:9999px; }
.nav-toggle:hover{ background:var(--wash); }
.m-menu{ position:fixed; inset:66px 0 0 0; z-index:40; }
.m-menu[hidden]{ display:none; }
.m-menu-bd{ position:absolute; inset:0; background:rgba(0,0,0,.45);
  -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); animation:mFade .2s ease; }
@keyframes mFade{ from{ opacity:0; } to{ opacity:1; } }
.m-menu-panel{ position:absolute; top:0; left:0; right:0; background:var(--cream);
  border-bottom:1px solid var(--line); box-shadow:var(--shadow-lg);
  padding:12px 14px 18px; display:flex; flex-direction:column; gap:2px;
  max-height:100%; overflow-y:auto; transform:translateY(-14px); opacity:0;
  animation:mDrop .22s ease forwards; }
@keyframes mDrop{ to{ transform:translateY(0); opacity:1; } }
.m-menu-panel a{ padding:14px 16px; border-radius:12px; font-family:'Tajawal'; font-weight:600;
  color:var(--ink); font-size:1.06rem; text-align:start; }
.m-menu-panel a:hover,.m-menu-panel a.active{ background:var(--wash); color:var(--g800); }
.m-menu-panel .m-sep{ border:0; border-top:1px solid var(--line); margin:10px 6px; }
body.menu-open{ overflow:hidden; }
