/* =========================================================
   SHAHD ACADEMY — Design System v2
   Warm editorial: mocha (#92715e) + sage (#c6d6d5) on cream.
   Shared across every page.
   ========================================================= */
:root {
  --ink: #2b211c; /* espresso — replaces pure black */
  --ink-2: #5c5049;
  --brand: #92715e; /* mocha — the logo colour, primary accent */
  --brand-deep: #6f5545;
  --brand-soft: #b79a89;
  --sage: #c6d6d5;
  --sage-2: #dbe7e4;
  --sage-tint: #eef3f1;
  --paper: #f6f2ec;
  --paper-2: #fbf8f3;
  --white: #fff;
  --smoke: #928a82;
  --line: rgba(43, 33, 28, 0.14);
  --line-soft: rgba(43, 33, 28, 0.08);
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --ar-serif: "El Messiri", Georgia, serif;
  --ar-sans: "Tajawal", "Inter", system-ui, sans-serif;
}
html[lang="ar"] {
  --serif: var(--ar-serif);
  --sans: var(--ar-sans);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[dir="rtl"] body {
  font-size: 17.5px;
  line-height: 1.8;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
em {
  font-style: italic;
}
[dir="rtl"] em {
  font-style: normal;
  font-weight: 600;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
  width: 100%;
}
.skip {
  position: fixed;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 500;
}
.skip:focus {
  left: 8px;
  top: 8px;
}
::selection {
  background: var(--brand);
  color: var(--paper);
}

/* preloader — only ever shown while JS is healthy enough to dismiss it.
   html.js is set by an inline script and removed again if any script throws,
   so a broken build shows the page rather than a permanent cover. */
html:not(.js) .preloader {
  display: none;
}
.preloader {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--paper);
  display: grid;
  place-items: center;
  transition:
    opacity 0.55s var(--ease),
    visibility 0.55s var(--ease);
}
.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.pre-mark {
  height: 46px;
  width: auto;
  animation: preFloat 1.6s var(--ease) infinite;
}
.pre-bar {
  position: relative;
  width: 150px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
  border-radius: 2px;
}
.pre-bar i {
  position: absolute;
  inset: 0;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 2px;
}
.pre-bar i.fill {
  animation: preFill 0.62s var(--ease) forwards;
}
[dir="rtl"] .pre-bar i {
  transform-origin: right;
}
@keyframes preFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes preFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-4px);
    opacity: 0.72;
  }
}
@media (prefers-reduced-motion: reduce) {
  .preloader {
    display: none;
  }
}

#grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 150;
  opacity: 0.03;
  mix-blend-mode: multiply;
}

/* type */
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-size: clamp(2.9rem, 7.5vw, 5.8rem);
  margin: 0;
  font-optical-sizing: auto;
}
.display em {
  font-weight: 400;
  color: var(--brand);
}
.display.sm {
  font-size: clamp(2.4rem, 6vw, 4rem);
}
[dir="rtl"] .display {
  line-height: 1.14;
  letter-spacing: 0;
}
.h-lg {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  margin: 0;
}
.h-lg em {
  color: var(--brand);
  font-weight: 400;
}
[dir="rtl"] .h-lg {
  line-height: 1.35;
  letter-spacing: 0;
}
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.eyebrow,
.label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
[dir="rtl"] .eyebrow,
[dir="rtl"] .label {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}
.label .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--brand);
}
[dir="rtl"] .label .num {
  font-style: normal;
}
.label {
  margin: 0 0 22px;
}
.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 40ch;
}
.prose p {
  margin: 0 0 1em;
  color: var(--ink-2);
}
.prose p:last-child {
  margin-bottom: 0;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px solid var(--brand);
  transition: 0.35s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
[dir="rtl"] .btn {
  letter-spacing: 0;
}
.btn-dark {
  background: var(--brand);
  color: var(--paper);
  border-color: var(--brand);
}
.btn-dark:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}
.btn-line {
  background: transparent;
  color: var(--brand);
}
.btn-line:hover {
  background: var(--brand);
  color: var(--paper);
}
.btn.full {
  width: 100%;
  justify-content: center;
}
.btn.lg {
  padding: 16px 32px;
  font-size: 0.92rem;
}

/* header + nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  transition: 0.4s var(--ease);
}
.site-header.solid {
  background: rgba(246, 242, 236, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
}
.brand-sub {
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
  white-space: nowrap;
}
[dir="rtl"] .brand-sub {
  letter-spacing: 0;
}
.nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav a,
.nav .navlink {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
[dir="rtl"] .nav a,
[dir="rtl"] .nav .navlink {
  letter-spacing: 0;
  font-size: 0.82rem;
}
.nav a.current {
  color: var(--brand);
}
.nav a::after,
.nav .navlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--brand);
  transition: width 0.4s var(--ease);
}
[dir="rtl"] .nav a::after,
[dir="rtl"] .nav .navlink::after {
  left: auto;
  right: 0;
}
.nav a:hover::after,
.nav a.current::after,
.nav .navlink:hover::after {
  width: 100%;
}
/* tools dropdown */
.has-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.navlink .caret {
  display: inline-block;
  margin-inline-start: 5px;
  transition: transform 0.3s var(--ease);
  font-size: 0.9em;
  line-height: 1;
}
.has-menu[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}
.tools-menu {
  position: absolute;
  top: calc(100% + 14px);
  inset-inline-start: -14px;
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 20px 50px rgba(43, 33, 28, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.3s var(--ease);
  z-index: 10;
}
.has-menu[aria-expanded="true"] .tools-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.tools-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 14px;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.25s var(--ease);
}
.tools-menu a::after {
  display: none;
}
.tools-menu a:hover {
  background: var(--sage-tint);
}
.tools-menu .tm-t {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.tools-menu .tm-d {
  font-size: 0.72rem;
  color: var(--smoke);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.header-actions .btn {
  padding: 11px 20px;
  font-size: 0.78rem;
}
.lang {
  background: none;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 13px;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
}
.lang:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.burger span {
  width: 22px;
  height: 1.6px;
  background: var(--ink);
  transition: 0.3s var(--ease);
}
.burger[aria-expanded="true"] span:first-child {
  transform: translateY(3.3px) rotate(45deg);
}
.burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3.3px) rotate(-45deg);
}
.drawer {
  position: fixed;
  inset: 0;
  width: 100%;
  background: var(--paper);
  z-index: 130;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  padding: 26px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
[dir="rtl"] .drawer {
  transform: translateX(-100%);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  margin-bottom: 34px;
}
.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
  padding: 4px;
  margin-inline-start: auto;
}
.drawer .brand-logo {
  height: 28px;
}
.drawer nav {
  display: flex;
  flex-direction: column;
}
.drawer nav a {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 300;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.drawer .dr-sub {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 8px 0 8px 16px;
}
[dir="rtl"] .drawer nav a {
  text-align: right;
}
.drawer .btn {
  margin-top: 22px;
}

/* sections */
.section {
  padding: clamp(60px, 8vw, 108px) 0;
  position: relative;
}
.sec-head {
  margin-bottom: clamp(32px, 5vw, 54px);
  max-width: 900px;
}
.section.sage {
  background: var(--sage-tint);
}
.section.ink {
  background: var(--ink);
  color: var(--paper);
}
.section.ink .label {
  color: var(--sage);
}
.section.ink .h-lg,
.section.ink .display {
  color: var(--paper);
}
.section.ink .h-lg em,
.section.ink .display em {
  color: var(--sage);
}
.section.ink .prose p {
  color: #d9d2ca;
}

/* footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(246, 242, 236, 0.14);
  align-items: start;
}
.foot-logo {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}
.foot-brand p {
  color: var(--sage);
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}
[dir="rtl"] .foot-brand p {
  font-style: normal;
}
.foot-col h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 16px;
}
[dir="rtl"] .foot-col h4 {
  letter-spacing: 0;
}
.foot-col a {
  display: block;
  font-size: 0.92rem;
  color: #d9d2ca;
  padding: 6px 0;
  transition: color 0.25s;
}
.foot-col a:hover {
  color: var(--paper);
}
.foot-social {
  display: flex;
  gap: 11px;
  margin-top: 8px;
}
.foot-base {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: #a89f96;
  flex-wrap: wrap;
  gap: 8px;
}

/* reference / social icons */
.icon-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ic {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: 0.32s var(--ease);
}
.ic svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.ic:hover {
  background: var(--brand);
  color: var(--paper);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.site-footer .ic {
  border-color: rgba(246, 242, 236, 0.24);
  color: var(--paper);
}
.site-footer .ic:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* floating */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 130;
  display: flex;
  align-items: center;
  background: var(--brand);
  color: var(--paper);
  border-radius: 100px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(43, 33, 28, 0.25);
  transition: 0.4s var(--ease);
}
[dir="rtl"] .wa-float {
  right: auto;
  left: 22px;
}
.wa-float:hover {
  background: var(--brand-deep);
}
.wa-float span {
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  font-size: 0.85rem;
  transition: 0.4s var(--ease);
}
.wa-float:hover span {
  max-width: 120px;
  opacity: 1;
  margin: 0 6px 0 10px;
}
.to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 130;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.4s var(--ease);
}
[dir="rtl"] .to-top {
  left: auto;
  right: 22px;
}
.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover {
  background: var(--brand);
  color: var(--paper);
  border-color: var(--brand);
}

/* reveal */
/* scoped to html.js so content stays visible if scripts fail — see preloader note */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* page hero (inner pages) */
.page-hero {
  padding: 130px 0 40px;
  background: var(--sage-tint);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero .eyebrow {
  justify-content: flex-start;
}
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 12px 0 0;
  color: var(--ink);
}
[dir="rtl"] .page-hero h1 {
  line-height: 1.2;
  letter-spacing: 0;
}
.page-hero p {
  margin: 18px 0 0;
  max-width: 56ch;
  color: var(--ink-2);
  font-size: 1.08rem;
}

/* responsive header */
@media (max-width: 1040px) {
  .nav {
    display: none;
  }
  .burger {
    display: flex;
  }
  .header-actions .btn-dark {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  body {
    font-size: 16px;
  }
}

/* highlighted "assess your site" nav item */
.navlink.hot {
  color: var(--brand);
}
.navlink.hot::after {
  display: none;
}
.has-menu:has(.hot) {
  background: var(--sage-tint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 15px;
}
.navlink.hot {
  white-space: nowrap; /*navfix*/
}
.has-menu:has(.hot) .navlink {
  padding: 0;
}
/* tighter spacing — kill dead space */
.section {
  padding: clamp(48px, 6vw, 84px) 0;
}
.sec-head {
  margin-bottom: clamp(26px, 4vw, 42px);
}
.page-hero {
  padding: 120px 0 46px;
}
.cta-band .btn {
  margin-top: 4px;
}
