/*
 * Mahdiyyah USA visual refinement layer
 * Loaded after each page's original styles so the existing layouts and
 * content remain intact while the visual system stays consistent site-wide.
 */
:root{
  --ink:#f7f2e7;
  --ink-dim:#d6d0c2;
  --ink-soft:#aaa79d;
  --bg:#061b18;
  --bg-2:#0a2924;
  --teal-950:#061b18;
  --teal-900:#0a2924;
  --teal-800:#103b34;
  --teal-700:#175047;
  --teal-600:#21665a;
  --teal-500:#347f70;
  --teal-400:#63a797;
  --gold-600:#a77a34;
  --gold-500:#c69647;
  --gold-400:#ddb66f;
  --gold-300:#ebcf96;
  --gold-200:#f3dfb5;
  --azure-500:#4d837b;
  --azure-400:#72a79e;
  --azure-300:#a6c9c1;
  --ruby-500:#a66256;
  --ruby-400:#c98677;
  --ruby-300:#e1aa9d;
  --plum-500:#77617a;
  --plum-400:#a18aa4;
  --copper-500:#aa7045;
  --copper-400:#c58d61;
  --copper-300:#dfb38d;
  --emerald-500:#348b6c;
  --emerald-400:#64aa8c;
  --emerald-300:#99ccb5;
  --saffron-500:#bd8946;
  --saffron-400:#d8ab68;
  --saffron-300:#e8cb96;
  --turq-500:#4d8c88;
  --turq-400:#75aca6;
  --turq-300:#a8cfca;
  --rose-500:#a66a72;
  --rose-400:#c78d94;
  --rose-300:#dfb2b7;
  --line:rgba(235,207,150,.13);
  --line-strong:rgba(235,207,150,.25);
  --serif:"Cormorant Garamond",Georgia,serif;
  --sans:"DM Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --shadow:0 24px 70px rgba(0,0,0,.24);
  --shadow-soft:0 16px 45px rgba(0,0,0,.16);
}

html{scroll-padding-top:92px}
body{
  font-family:var(--sans);
  font-size:16px;
  line-height:1.7;
  letter-spacing:-.005em;
  text-rendering:optimizeLegibility;
}
::selection{background:var(--gold-400);color:var(--teal-950)}
:focus-visible{outline:2px solid var(--gold-300);outline-offset:4px}

.aura{
  background:
    radial-gradient(900px 560px at 12% -5%,rgba(39,105,91,.34),transparent 66%),
    radial-gradient(800px 520px at 94% 12%,rgba(198,150,71,.10),transparent 64%),
    radial-gradient(850px 650px at 72% 92%,rgba(47,105,92,.13),transparent 68%),
    linear-gradient(180deg,#071d19 0%,#061914 48%,#04110e 100%);
}
.grain{opacity:.025}
.particles{opacity:.5}

.hero-pattern{
  inset:-8% -5% -26vh !important;
  opacity:.11 !important;
}
.hero-pattern img{
  width:min(88vw,920px);
  height:auto;
  object-fit:contain;
  filter:sepia(.18) saturate(.72) drop-shadow(0 0 70px rgba(221,182,111,.22));
}

.nav{
  padding:16px 36px;
  border-bottom:1px solid rgba(235,207,150,.06);
}
.nav.scrolled{
  padding:11px 36px;
  background:rgba(5,25,21,.86);
  border-bottom-color:var(--line);
  box-shadow:0 12px 40px rgba(0,0,0,.16);
}
.brand-full{height:42px}
.brand-qh{
  min-height:44px;
  padding:5px 14px 5px 9px;
  gap:7px;
  background:rgba(255,255,255,.025);
  border-color:rgba(235,207,150,.16);
}
.brand-qh-mark{width:26px;height:26px}
.brand-qh-mark img{
  width:34px;
  height:34px;
  max-width:none;
}
.brand-qh-text{gap:3px}
.brand-qh-text .l1{font-size:11px}
.brand-qh-text .l2{font-size:8.5px;letter-spacing:.2em}
.nav-links{gap:2px}
.nav-links a{font-size:13px;font-weight:550;letter-spacing:.025em;padding:10px 14px}
.nav-links a::after{left:14px;right:14px;bottom:5px}
.nav-cta{font-size:11.5px;letter-spacing:.11em;padding:10px 18px}
.nav-cta-primary{box-shadow:0 8px 22px rgba(0,0,0,.14)}
.cta-label-short{display:none}

h1,h2,h3,h4{
  font-family:var(--sans);
  font-weight:600;
  text-wrap:balance;
}
h1 em,h2 em,h3 em,h4 em,
.hero-title .accent{
  display:inline-block;
  padding-right:.16em;
  margin-right:-.16em;
  font-family:inherit;
  font-style:normal;
  font-weight:inherit;
}
.hero-title{
  font-family:var(--sans) !important;
  font-weight:550 !important;
  letter-spacing:-.045em !important;
  line-height:1.03 !important;
}
p{text-wrap:pretty}
.section-label{
  margin-bottom:18px;
  font-size:10.5px;
  letter-spacing:.28em;
  color:var(--gold-400) !important;
}
.section-label::before{background:var(--gold-500) !important}
.section-title{
  font-family:var(--sans) !important;
  font-weight:550 !important;
  letter-spacing:-.035em !important;
  line-height:1.08 !important;
}
.section-title em{font-family:inherit;font-style:normal;font-weight:inherit;color:var(--gold-300)}

section{padding-top:72px;padding-bottom:72px}
.container{max-width:1200px}

.btn{
  min-height:52px;
  padding:14px 25px;
  font-size:13px;
  font-weight:650;
  letter-spacing:.045em;
}
.btn-primary{box-shadow:0 12px 32px rgba(0,0,0,.18)}
.btn-ghost{background:rgba(255,255,255,.018)}

.page-hero{padding-top:170px;padding-bottom:92px}
.page-hero .inner{max-width:920px}
.page-hero .eyebrow{
  padding:8px 16px;
  margin-bottom:24px;
  background:rgba(5,25,21,.58);
  border-color:rgba(235,207,150,.21);
  letter-spacing:.25em;
}
.page-hero h1{
  font-family:var(--sans) !important;
  font-weight:550 !important;
  font-size:clamp(46px,6.2vw,82px);
  line-height:1.02;
  letter-spacing:-.045em;
}
.page-hero h1 em{
  font-family:inherit;
  font-style:normal;
  font-weight:inherit;
  background:none !important;
  -webkit-text-fill-color:var(--gold-300);
  color:var(--gold-300) !important;
}
.page-hero p.lead{max-width:700px;color:var(--ink-dim);font-size:17px}

.card,.article-card,.cat-card,.track,.how-card,.course-details,.external-cta,.classes-visual,.feature{
  border-radius:14px !important;
  border-color:rgba(235,207,150,.15) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.025) inset;
}
.card,.article-card,.cat-card,.track,.how-card{
  background:linear-gradient(155deg,rgba(18,58,50,.72),rgba(5,27,23,.76)) !important;
}
.card:hover,.article-card:hover,.cat-card:hover,.track:hover,.how-card:hover{
  border-color:rgba(221,182,111,.38) !important;
  box-shadow:var(--shadow-soft) !important;
}
.card::after,.article-card::before{background:linear-gradient(90deg,var(--gold-500),var(--gold-300)) !important}
.card .art{height:260px}
.card .art::after{background:linear-gradient(180deg,transparent 28%,rgba(5,25,21,.9))}
.card .body{padding:30px 30px 32px}
.card h3{
  font-family:var(--sans);
  font-weight:600;
  font-size:26px;
  line-height:1.24;
  letter-spacing:-.025em;
}
.card p{color:var(--ink-dim);line-height:1.68}
.card .tag{color:var(--gold-400) !important;letter-spacing:.26em}
.card .links a,.card .links span.lnk{color:var(--gold-300) !important}

.article-card{padding:34px 36px 34px 40px}
.article-card h3{
  font-family:var(--sans);
  font-weight:600;
  font-size:21px;
  line-height:1.35;
  letter-spacing:-.018em;
}
.topic-pill{letter-spacing:.14em}
.filter-bar button,.filter-btn{background:rgba(255,255,255,.018);letter-spacing:.055em}
.filter-bar button.active,.filter-btn.active{
  background:var(--gold-500) !important;
  border-color:var(--gold-500) !important;
  color:var(--teal-950) !important;
}

.article-body{max-width:760px;font-size:18px;line-height:1.82}
.article-body p{color:#e8e3d8}
.article-body h2{
  font-family:var(--sans);
  font-weight:650;
  font-size:30px;
  line-height:1.25;
  letter-spacing:-.025em;
}
.article-body h3{
  font-family:var(--sans);
  font-weight:650;
  line-height:1.35;
}
.article-body blockquote{border-radius:0 10px 10px 0;padding:14px 22px;background:rgba(235,207,150,.045)}

.feature{
  background:linear-gradient(135deg,rgba(12,50,43,.95),rgba(8,36,31,.9)) !important;
  box-shadow:var(--shadow-soft);
}
.feature-body{padding:68px 60px}
.feature-body h3{
  font-family:var(--sans);
  font-weight:550;
  line-height:1.12;
  letter-spacing:-.035em;
}
.feature-body h3 em{font-family:inherit;font-style:normal;font-weight:inherit}
.book-stack .chip{
  animation-name:chipDrift !important;
  animation-duration:6.5s !important;
  animation-timing-function:ease-in-out !important;
  animation-iteration-count:infinite !important;
  will-change:transform;
}
@keyframes chipDrift{
  0%,100%{transform:translate3d(0,0,0)}
  35%{transform:translate3d(2px,-5px,0)}
  70%{transform:translate3d(-2px,2px,0)}
}
.feature-body .kicker{
  min-height:42px;
  padding:4px 14px 4px 8px;
  gap:7px;
}
.feature-body .kicker::before{display:none}
.feature-body .kicker img{
  width:34px;
  height:34px;
  max-width:none;
  object-fit:contain;
  filter:drop-shadow(0 3px 8px rgba(198,150,71,.3));
}
.qh-feature-logo{
  width:132px;
  height:132px;
  max-width:none;
  object-fit:contain;
  filter:drop-shadow(0 8px 18px rgba(198,150,71,.34));
}
.classes-visual{background:linear-gradient(155deg,rgba(17,57,49,.78),rgba(6,30,25,.72)) !important}
.cities .city-centered{
  grid-column:1 / -1;
  width:calc((100% - 18px) / 2);
  justify-self:center;
  justify-content:center;
}
.cities .city-centered::before{
  position:static;
  flex:0 0 auto;
  margin-right:-4px;
  transform:none;
}
.classes-visual h4,
.track h3,
.course-details h2,
.how-card h4,
.cta-row h2,
.sh-cta h2,
.source-card h4,
.resp h3,
.cat-header h2,
.book-card h3,
.cat-head h2,
.cat-card h3{
  font-family:var(--sans) !important;
  font-weight:600 !important;
  line-height:1.25 !important;
  letter-spacing:-.025em !important;
}
body[data-page="courses"] section h2,
body[data-page="shaban"] section h2{
  font-family:var(--sans) !important;
  font-weight:600 !important;
  line-height:1.2 !important;
  letter-spacing:-.03em !important;
}

footer{
  margin-top:64px;
  padding-top:42px;
  border-top-color:rgba(235,207,150,.14);
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.1));
}
.footer-logo{
  width:clamp(190px,22vw,260px);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 4px 14px rgba(198,150,71,.18));
}

@media(max-width:960px){
  .nav,.nav.scrolled{padding-left:20px;padding-right:20px}
  section{padding-top:58px;padding-bottom:58px}
  .page-hero{padding-top:142px;padding-bottom:64px}
  .feature-body{padding:44px 30px}
}
@media(max-width:1100px){
  .brand-qh{
    width:42px;
    height:42px;
    min-height:0;
    flex:0 0 42px;
    display:grid;
    place-items:center;
    padding:0;
    gap:0;
    box-sizing:border-box;
  }
  .brand-qh-mark{width:30px;height:30px;display:grid;place-items:center}
  .brand-qh-mark img{width:30px;height:30px;margin:auto}
  .nav{min-height:68px}
  .nav-left{min-width:0}
  .nav-right{flex:none}
}
@media(max-width:720px){
  body[data-page="articles"] .page-hero{
    min-height:auto;
    padding:116px 20px 48px;
  }
  body[data-page="articles"] > section{padding-top:22px}
  body[data-page="articles"] .filter-bar{margin-top:12px;margin-bottom:30px}

  body[data-page="article"] .page-hero{
    min-height:auto;
    padding:108px 20px 22px;
  }
  body[data-page="article"] .back-link{margin-bottom:18px}
  body[data-page="article"] .article-meta{margin-top:14px}
  body[data-page="article"] > section{padding-top:0;padding-bottom:36px}
  body[data-page="article"] .article-body{padding-top:24px;padding-bottom:72px}
  body[data-page="article"] .article-body > :first-child{margin-top:0}
  body[data-page="article"] .article-body h2{margin-top:36px}
  body[data-page="article"] .article-body h2:first-child{margin-top:0}
}
@media(max-width:560px){
  body{font-size:15.5px}
  h1.hero-title{
    max-width:100%;
    margin-inline:auto;
    padding-inline:6px;
    font-size:clamp(40px,12vw,56px) !important;
    letter-spacing:-.035em !important;
  }
  .hero-title .accent{
    display:inline-block;
    max-width:100%;
    padding-right:.12em;
  }
  .nav,.nav.scrolled{
    min-height:58px;
    padding:8px 12px;
  }
  .nav-left{gap:6px}
  .nav-right{gap:6px}
  .brand-full{height:28px;max-width:106px}
  .brand-qh{width:38px;height:38px;flex-basis:38px;padding:0}
  .brand-qh-mark{width:28px;height:28px}
  .brand-qh-mark img{width:28px;height:28px}
  .nav-cta-primary{
    min-height:38px;
    padding:8px 13px;
    font-size:10.5px;
    letter-spacing:.08em;
    display:inline-flex;
    align-items:center;
  }
  .cta-label-full{display:none}
  .cta-label-short{display:inline}
  .nav-burger{width:38px;height:38px;flex:none}
  .hero-pattern{opacity:.09 !important;inset:2% -12% -18vh !important}
  .hero-pattern img{width:min(112vw,620px)}
  .feature-visual{min-height:420px}
  .book-stack{width:min(82vw,330px)}
  .book-stack .chip{padding:6px 10px;font-size:14px}
  .book-stack .chip.en{font-size:12.5px}
  .book-stack .center-orb{width:108px;height:108px}
  .book-stack .qh-feature-logo{width:102px;height:102px}
  .page-hero h1{font-size:clamp(40px,12vw,58px)}
  .page-hero p.lead{font-size:15.5px}
  .card .body{padding:25px 23px 28px}
  .article-card{padding:28px 26px 28px 30px}
  .article-body{font-size:16.5px;padding-left:22px;padding-right:22px}
  .footer-logo{width:230px;margin:0 auto 8px}
}
@media(max-width:380px){
  h1.hero-title{font-size:clamp(36px,11.5vw,44px) !important}
  .nav,.nav.scrolled{min-height:54px;padding:7px 9px}
  .nav-left{gap:4px}
  .nav-right{gap:5px}
  .brand-full{height:25px;max-width:94px}
  .brand-qh{width:36px;height:36px;flex-basis:36px;padding:0}
  .brand-qh-mark{width:26px;height:26px}
  .brand-qh-mark img{width:26px;height:26px}
  .nav-cta-primary{min-height:36px;padding:7px 11px;font-size:10px}
  .nav-burger{width:36px;height:36px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .book-stack .chip{animation:none !important}
}
