/* =====================================================================
   Al Jenaan — corrections, loaded after everything else.
   The production token block redefines :root below the dark-mode rules,
   which switched dark mode off. Everything here restates the theme in
   the right order and fixes the contrast that went with it.
   ===================================================================== */

/* ---------- light theme, stated last so it actually applies ---------- */
:root[data-theme="light"], :root:not([data-theme="dark"]){
  --aj-cream:#FBF9F5;
  --aj-cream-low:#F7F2EA;
  --aj-cream-mid:#F1E9DE;
  --aj-cream-high:#EAE0D2;
  --aj-card:#FFFFFF;
  --aj-ink:#201D1A;
  --aj-ink-2:#5C544C;
  --aj-outline:#81786F;
  --aj-outline-2:#DDD4CA;
  --aj-gold:#8A6B12;
  --aj-gold-soft:#C29B38;
  --aj-gold-hover:#6E5410;
  --aj-green:#4E5A3C;
}

/* ---------- dark theme: brown-black, brand warm, never grey ---------- */
:root[data-theme="dark"]{
  --aj-cream:#14110D;          /* page */
  --aj-cream-low:#1B1712;      /* raised */
  --aj-cream-mid:#241F18;      /* cards */
  --aj-cream-high:#2E271E;     /* hover */
  --aj-card:#1B1712;
  --aj-ink:#F7F1E6;
  --aj-ink-2:#C9BFB0;
  --aj-outline:#8D8274;
  --aj-outline-2:#3A322A;
  --aj-gold:#E3C169;
  --aj-gold-soft:#D2B15B;
  --aj-gold-hover:#F0D98A;
  --aj-green:#A8BE90;
}
:root[data-theme="dark"] html,
:root[data-theme="dark"] body{background:var(--aj-cream)!important;color:var(--aj-ink)!important}

/* every surface follows the theme, in both directions */
.bg-surface,.bg-background,.bg-surface-bright,
.site-header,.site-footer,main,section{background-color:transparent}
body{background:var(--aj-cream)!important;color:var(--aj-ink)!important}
.bg-surface-container-lowest,.bg-surface-container-low,.aj-card,
.card,[class*="rounded-xl"].bg-surface-container-lowest{background-color:var(--aj-card)!important}
.bg-surface-container,.bg-surface-variant{background-color:var(--aj-cream-mid)!important}
.bg-surface-container-high,.bg-surface-container-highest{background-color:var(--aj-cream-high)!important}
:root[data-theme="dark"] .site-header{background:var(--aj-cream)!important}
:root[data-theme="dark"] .site-footer,:root[data-theme="dark"] footer{background:var(--aj-cream-low)!important}

/* ---------- text: always readable, in both themes ---------- */
body,p,li,dd,dt,td,th,label,span,small,figcaption,summary{color:var(--aj-ink)}
h1,h2,h3,h4,h5,h6,.aj-h2,.aj-h3,.aj-h4{color:var(--aj-ink)!important}
.text-on-surface,.text-main{color:var(--aj-ink)!important}
.text-on-surface-variant,.text-muted,.aj-h2-sub,.count{color:var(--aj-ink-2)!important}
.text-outline,.text-outline-variant{color:var(--aj-outline)!important}
.text-primary,.aj-eyebrow{color:var(--aj-gold)!important}
.text-secondary{color:var(--aj-green)!important}
a{color:inherit}
input,textarea,select{background:var(--aj-card)!important;color:var(--aj-ink)!important;
  border:1px solid var(--aj-outline-2)!important}
input::placeholder,textarea::placeholder{color:var(--aj-outline)!important}

/* the banner sits on a photograph, so its text stays light in both themes */
.aj-hero h1,.aj-hero p,.aj-hero span{color:#fff!important}
.aj-hero .aj-eyebrow{color:#E3C169!important}

/* ---------- nothing translucent, anywhere ---------- */
*{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.site-header{background:var(--aj-cream)!important;border-bottom:1px solid var(--aj-outline-2)!important}

/* ---------- icons ---------- */
.aj-ico{width:18px;height:18px;flex:0 0 auto;display:inline-block;vertical-align:-3px;color:var(--aj-gold)}
.aj-chip .aj-ico,.aj-feature .aj-ico{color:var(--aj-gold)}
.aj-hero .aj-ico{color:#E3C169}

/* ---------- the menu ---------- */
.aj-catnav{position:sticky;top:72px;z-index:40;background:var(--aj-cream)!important;
  border-bottom:1px solid var(--aj-outline-2);padding:10px 0}
.aj-catnav .in{max-width:1180px;margin:0 auto;padding:0 20px;display:flex;gap:8px;overflow-x:auto}
.aj-catnav a{flex:0 0 auto;padding:9px 15px;border-radius:999px;border:1px solid var(--aj-outline-2);
  background:var(--aj-card);color:var(--aj-ink)!important;text-decoration:none;font-size:13.5px;
  font-weight:600;white-space:nowrap}
.aj-catnav a:hover{border-color:var(--aj-gold-soft);color:var(--aj-gold)!important}
.aj-cat-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;
  padding-bottom:10px;border-bottom:1px solid var(--aj-outline-2);margin:0 0 22px;scroll-margin-top:150px}
.aj-menu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:20px}
.aj-menu-grid > div{background:var(--aj-card)!important;border:1px solid var(--aj-outline-2);
  border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
.aj-menu-grid img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.aj-menu-grid [data-add]{background:var(--aj-gold-soft)!important;color:#1F1B11!important;
  border:0;border-radius:999px;padding:9px 16px;font-weight:700;cursor:pointer}
.aj-menu-grid [data-add]:hover{background:var(--aj-gold-hover)!important}
.aj-menu-grid output{color:var(--aj-ink)!important}


/* ---------- the v19 header and footer, on the v20 palette ---------- */
header.fixed,header[class*="fixed"]{background:var(--aj-cream)!important;
  border-bottom:1px solid var(--aj-outline-2)!important;box-shadow:none!important}
:root[data-theme="dark"] header.fixed,
:root[data-theme="dark"] header[class*="fixed"]{background:var(--aj-cream)!important}
header a,header button{color:var(--aj-ink)!important}
header a:hover{color:var(--aj-gold)!important}
header .bg-primary-container{background:var(--aj-gold-soft)!important;color:#1F1B11!important}

footer,footer.bg-inverse-surface{background:var(--aj-cream-mid)!important;color:var(--aj-ink)!important}
footer *{color:var(--aj-ink-2)!important}
footer h4,footer strong,footer b{color:var(--aj-ink)!important}
footer a:hover{color:var(--aj-gold)!important}
footer .text-primary-fixed,footer .text-primary-fixed-dim{color:var(--aj-gold)!important}
:root[data-theme="dark"] footer{background:var(--aj-cream-low)!important}

/* the boxes from v19, on the v20 surfaces */
.bg-surface-container-lowest,[class*="rounded-xl"],[class*="rounded-2xl"]{
  background-color:var(--aj-card)!important;border-color:var(--aj-outline-2)!important}
:root[data-theme="dark"] .bg-surface-container-lowest{background-color:var(--aj-cream-mid)!important}
.shadow-sm,.shadow-md,.shadow-xl{box-shadow:0 4px 20px -2px rgba(44,30,15,.05),0 12px 32px -4px rgba(44,30,15,.06)!important}
:root[data-theme="dark"] .shadow-sm,:root[data-theme="dark"] .shadow-md,
:root[data-theme="dark"] .shadow-xl{box-shadow:0 6px 24px -6px rgba(0,0,0,.5)!important}


/* ---------- the homepage hero: a scrim, so text reads in both themes ---------- */
main > div > section.relative:first-child,
main > section.relative:first-child{position:relative}
main > div > section.relative:first-child::after,
main > section.relative:first-child::after{content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg,rgba(20,18,15,.42) 0%,rgba(20,18,15,.64) 55%,rgba(20,18,15,.86) 100%);
  pointer-events:none}
main > div > section.relative:first-child > *:not(.absolute),
main > section.relative:first-child > *:not(.absolute){position:relative;z-index:2}
main > div > section.relative:first-child h1,
main > div > section.relative:first-child h2,
main > div > section.relative:first-child p,
main > div > section.relative:first-child span:not(.aj-chip span){color:#fff!important}
main > div > section.relative:first-child .text-primary,
main > div > section.relative:first-child em{color:#E3C169!important}
main > div > section.relative:first-child .aj-chip{background:rgba(20,18,15,.72)!important;
  border-color:rgba(246,241,232,.28)!important}
main > div > section.relative:first-child .aj-chip span{color:#F6F1E8!important}
main > div > section.relative:first-child .aj-chip svg{color:#E3C169!important}

/* ---------- contact: map on the right, details on the left ---------- */
.aj-map-side{width:100%}
.aj-map-side iframe.aj-map{width:100%;min-height:420px;border-radius:16px;border:1px solid var(--aj-outline-2)}
@media(max-width:1023px){.aj-map-side iframe.aj-map{min-height:300px}}


/* ---------- navigation with dropdowns ---------- */
.aj-nav{display:none;align-items:center;gap:6px;flex:1 1 auto;justify-content:center;min-width:0}
@media (min-width:1100px){.aj-nav{display:flex}.aj-burger{display:none!important}}
.aj-nav-item{position:relative}
.aj-nav-link{display:inline-flex;align-items:center;gap:6px;padding:9px 12px;border:0;background:none;
  cursor:pointer;font-family:var(--aj-sans);font-size:12.5px;font-weight:600;letter-spacing:.09em;
  text-transform:uppercase;color:var(--aj-ink)!important;text-decoration:none;border-radius:8px;white-space:nowrap}
.aj-nav-link:hover,.aj-nav-toggle[aria-expanded="true"]{color:var(--aj-gold)!important;background:var(--aj-cream-mid)}
.aj-chev{transition:transform .18s ease}
.aj-nav-toggle[aria-expanded="true"] .aj-chev{transform:rotate(180deg)}
.aj-menu{position:absolute;inset-inline-start:0;top:calc(100% + 8px);min-width:232px;margin:0;padding:8px;
  list-style:none;background:var(--aj-card);border:1px solid var(--aj-outline-2);border-radius:14px;
  box-shadow:0 18px 40px -12px rgba(31,27,17,.28);opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s;z-index:80}
.aj-nav-item:hover .aj-menu,.aj-nav-item:focus-within .aj-menu,
.aj-nav-toggle[aria-expanded="true"] + .aj-menu{opacity:1;visibility:visible;transform:none}
.aj-menu li a{display:block;padding:10px 12px;border-radius:9px;text-decoration:none;
  font-family:var(--aj-sans);font-size:14px;font-weight:500;color:var(--aj-ink)!important;white-space:nowrap}
.aj-menu li a:hover{background:var(--aj-cream-mid);color:var(--aj-gold)!important}
[dir=rtl] .aj-menu{inset-inline-start:auto;inset-inline-end:0}
:root[data-theme="dark"] .aj-menu{background:var(--aj-cream-mid);border-color:var(--aj-outline-2)}

/* the drawer mirrors the same grouping */
#aj-drawer .aj-dw-head{margin:18px 0 4px;font-size:11.5px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--aj-gold);font-weight:700;border-bottom:0}
#aj-drawer a.sub{font-family:var(--aj-sans);font-size:16px;padding:11px 4px 11px 14px}
[dir=rtl] #aj-drawer a.sub{padding:11px 14px 11px 4px}
#aj-drawer a.aj-dw-home{font-weight:700}


/* ---------- the dropdown must not be clipped by the header ---------- */
header,header > div,.site-header,.site-header__inner{overflow:visible!important}
.aj-nav,.aj-nav-item{overflow:visible}
.aj-menu{z-index:120}

/* the parent label is a link; the chevron only hints there is more */
a.aj-nav-toggle{text-decoration:none}
.aj-nav-item:hover .aj-nav-link,.aj-nav-item:focus-within .aj-nav-link{color:var(--aj-gold)!important}

/* ---------- the pill above the headline ---------- */
.aj-hero-pill,main section:first-child .rounded-full.inline-flex{
  background:rgba(20,18,15,.72)!important;border:1px solid rgba(227,193,105,.45)!important;
  color:#F6F1E8!important;backdrop-filter:none!important}
main section:first-child .rounded-full.inline-flex span,
main section:first-child .rounded-full.inline-flex{color:#F6F1E8!important;letter-spacing:.12em}
main section:first-child .rounded-full.inline-flex svg,
main section:first-child .rounded-full.inline-flex .text-primary{color:#E3C169!important}
