/* Page frame: header, mobile menu, sections, aura backgrounds, inner-page hero, footer. */

/* ================= header ================= */
.site-header { position: fixed; inset: 0 0 auto; z-index: 60; padding: 12px 12px 0; pointer-events: none; }
.bar {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: calc(var(--w) + 40px); min-height: var(--header-h);
  margin-inline: auto; padding-inline: 28px;
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.6), var(--sh-sm);
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { display: block; width: auto; height: 42px; }
.logo--full img { height: 64px; }
.logo .logo-dark { display: none; }
.nav { display: flex; align-items: center; gap: 2px; font-weight: 600; font-size: 0.97rem; }
.nav > a:not(.btn), .nav summary {
  display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: var(--pill);
  color: var(--ink-2); cursor: pointer; list-style: none; transition: background-color 0.2s, color 0.2s;
}
.nav > a:not(.btn):hover, .nav summary:hover, .nav a[aria-current] { color: var(--blue); background: var(--tint-sky); }
.nav summary::-webkit-details-marker { display: none; }
.nav summary .i { width: 16px; height: 16px; transition: transform 0.2s; }
.dd[open] summary .i { transform: rotate(180deg); }
.dd { position: relative; }
.dd-menu {
  position: absolute; inset-inline-start: 0; top: calc(100% + 12px); min-width: 260px;
  padding: 8px; border-radius: var(--r); background: #fff; box-shadow: var(--sh-lg);
}
.dd-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); }
.dd-menu a:hover { background: var(--tint-sky); color: var(--blue); }
.dd-menu .i { width: 20px; height: 20px; color: var(--blue); }
.nav-cta { margin-inline-start: 10px; }
.menu-btn {
  display: none; place-items: center; width: 46px; height: 46px;
  border: 0; border-radius: 14px; background: var(--tint-sky); color: var(--navy); cursor: pointer;
}
.menu-btn .i { width: 22px; height: 22px; }
.menu-btn .i-close, .menu-open .menu-btn .i-menu { display: none; }
.menu-open .menu-btn .i-close { display: block; }

/* home: the header sits on the navy hero until the page scrolls */
.home .site-header:not(.is-stuck) .bar { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.home .site-header:not(.is-stuck) .logo-light { display: none; }
.home .site-header:not(.is-stuck) .logo-dark { display: block; }
.home .site-header:not(.is-stuck) .nav > a:not(.btn),
.home .site-header:not(.is-stuck) .nav summary { color: #fff; }
.home .site-header:not(.is-stuck) .nav > a:not(.btn):hover,
.home .site-header:not(.is-stuck) .nav summary:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
.home .site-header:not(.is-stuck) .menu-btn { background: rgb(255 255 255 / 0.1); color: #fff; }
.site-header.is-stuck .bar { background: rgb(255 255 255 / 0.88); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7), var(--sh); }

@media (max-width: 1024px) {
  .bar { padding-inline: 14px 10px; min-height: 64px; border-radius: 20px; }
  .logo img { height: 36px; }
  .menu-btn { display: grid; }
  .nav {
    display: none; position: fixed; inset: 88px 12px auto; max-height: calc(100dvh - 100px); overflow: auto;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px;
    border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-lg); font-size: 1.1rem;
  }
  .menu-open .nav { display: flex; }
  /* dim + lock the page behind the open menu; site.js closes the menu on a click on this backdrop */
  .menu-open, .menu-open body { overflow: hidden; }
  .menu-open .site-header::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: auto; background: rgb(10 20 53 / 0.45); }
  .menu-open .site-header .bar { background: #fff !important; box-shadow: var(--sh) !important; }
  .menu-open .site-header .logo-light { display: block !important; }
  .menu-open .site-header .logo-dark { display: none !important; }
  .menu-open .site-header .menu-btn { background: var(--tint-sky) !important; color: var(--navy) !important; }
  .home .site-header .nav > a:not(.btn), .home .site-header .nav summary { color: var(--ink-2) !important; }
  .nav > a:not(.btn), .nav summary { padding: 12px 14px; border-radius: var(--r-sm); }
  .dd-menu { position: static; box-shadow: none; padding: 0 8px 8px; min-width: 0; }
  .nav-cta { margin: 10px 0 0; }
}

/* ================= sections ================= */
main { display: block; }
.section { position: relative; padding-block: var(--s6); isolation: isolate; }
.section--tight { padding-block: var(--s5); }
.sec-head { max-width: 680px; margin: 0 auto var(--s4); text-align: center; }
.sec-head .h2 { margin-bottom: 0.3em; }
.sec-head--start { margin-inline: 0; text-align: start; }
.sec-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.sec-head-row .sec-head { margin: 0; text-align: start; }

/* ---- aura: soft blurred colour blobs behind a section (pure gradients, no images, no blur filter) ----
   Pick a variant per section so the colour moves around the page: .aura--1 … .aura--5, .aura--faint. */
/* Blob sizes are % of the section, and every centre stays 32–68% down, so a blob always fades out
   before the section's top/bottom edge (otherwise it shows a hard line). Left/right edges are the
   viewport edges, so blobs may run off there. */
.aura::before {
  content: ""; position: absolute; inset: -12% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(var(--a1-size, 40% 30%) at var(--a1-at, 90% 36%), var(--a1, var(--aura-sky)), transparent),
    radial-gradient(var(--a2-size, 36% 28%) at var(--a2-at, 6% 64%), var(--a2, var(--aura-lilac)), transparent),
    radial-gradient(var(--a3-size, 30% 24%) at var(--a3-at, 55% 66%), var(--a3, transparent), transparent);
}
.aura--1 { --a1-at: 94% 34%; --a2-at: 4% 60%; --a3: var(--aura-teal); --a3-at: 50% 68%; }
.aura--2 { --a1-at: 4% 36%; --a1: var(--aura-teal); --a2-at: 96% 64%; --a2: var(--aura-sky); }
.aura--3 { --a1-at: 50% 34%; --a1-size: 50% 26%; --a2-at: 100% 66%; --a2: var(--aura-blue); --a3: var(--aura-lilac); --a3-at: 0% 50%; }
.aura--4 { --a1-at: 100% 50%; --a1: var(--aura-lilac); --a2-at: 0% 34%; --a2: var(--aura-sky); }
.aura--5 { --a1-at: 16% 34%; --a1: var(--aura-sky); --a2-at: 88% 64%; --a2: var(--aura-teal); }
.aura--faint::before { opacity: 0.5; }
@media (max-width: 720px) { .aura::before { --a1-size: 80% 22%; --a2-size: 70% 20%; --a3-size: 60% 18%; } }

/* sparkles next to headings */
.spark { position: absolute; z-index: 0; color: var(--sky); width: 20px; height: 20px; animation: twinkle 3.6s ease-in-out infinite; pointer-events: none; }
.spark--blue { color: var(--blue); width: 14px; height: 14px; animation-delay: -1.2s; }
.spark--lilac { color: #a08cff; width: 16px; height: 16px; animation-delay: -2.4s; }
@keyframes twinkle { 50% { transform: scale(0.6) rotate(20deg); opacity: 0.5; } }

/* ================= inner page hero ================= */
.page-hero { position: relative; isolation: isolate; padding: calc(var(--header-h) + 84px) 0 var(--s5); text-align: center; }
.page-hero .h1 { font-size: clamp(var(--h1-mob), 4vw, calc(var(--h1) * 0.86));  /* inner pages: a bit smaller than home */ margin: 0 auto 0.3em; max-width: 20ch; }
.page-hero .lead { margin-inline: auto; }
/* every crumb (link, separator, current page) is the same 44 px tall flex item, so they sit on one line */
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 8px; margin: 0 0 var(--s2); font-size: 0.9rem; line-height: 1.6; color: var(--muted); }
.crumbs > * { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.page-hero .spark { inset-block-start: 46%; inset-inline-start: 14%; }
.page-hero .spark--blue { inset-block-start: 30%; inset-inline-start: auto; inset-inline-end: 16%; }

/* ================= footer ================= */
.site-footer { position: relative; isolation: isolate; padding: var(--s5) 0 var(--s3); margin-top: var(--s4); }
.foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: var(--s4); padding: var(--s4); border-radius: var(--r-xl); background: var(--card); box-shadow: var(--sh-sm); }
.foot-brand p { color: var(--ink-2); font-size: 0.95rem; max-width: 34ch; }
.foot-brand .logo { margin-bottom: var(--s2); }
.site-footer h3 { font-size: 1rem; margin-bottom: var(--s2); }
.foot-links a { display: block; padding: 3px 0; color: var(--ink-2); font-size: 0.95rem; }
.foot-links a:hover { color: var(--blue); }
.foot-contact { display: grid; gap: 10px; font-size: 0.95rem; color: var(--ink-2); }
.foot-contact a, .foot-contact span { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); }
.foot-contact .i { color: var(--blue); margin-top: 4px; }
.foot-phone { font-size: 1.25rem; font-weight: 800; color: var(--navy) !important; }
.socials { display: flex; gap: 8px; margin-top: var(--s2); }
.socials a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--tint-sky); color: var(--blue); }
.socials a:hover { background: var(--blue); color: #fff; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: var(--s3) 8px 0; color: var(--muted); font-size: 0.88rem; }
.foot-bottom a { color: var(--muted); }
@media (max-width: 1024px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  /* the two link lists sit side by side; links get 44 px tap height */
  .foot-top { grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s2); padding: var(--s3); }
  .foot-brand, .foot-contact { grid-column: 1 / -1; }
  .foot-links a { padding: 9px 0; }
  .foot-contact a { min-height: 44px; align-items: center; }
  .foot-contact .i { margin-top: 0; }
  .foot-bottom a { display: inline-block; padding: 10px 4px; }
}

/* ================= mobile call bar (core/partials/_callbar.html) ================= */
.callbar { display: none; }
@media (max-width: 720px) {
  .callbar {
    position: fixed; inset: auto 12px calc(10px + env(safe-area-inset-bottom)); z-index: 55;
    display: flex; gap: 8px; padding: 6px; border-radius: var(--pill);
    background: rgb(255 255 255 / 0.92); box-shadow: var(--sh-lg);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }
  .callbar .btn { flex: 1; min-height: 48px; }
  .callbar .callbar-tg { flex: none; width: 48px; padding: 0; color: #229ed9; }
  /* with JS it appears after the first screen (the hero has its own call button) */
  html:not(.no-js):not(.scrolled) .callbar, .menu-open .callbar { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .site-footer { padding-bottom: calc(var(--s3) + 76px); }
}

/* sparkle positions inside a section */
.spark.p1 { inset-block-start: 14%; inset-inline-start: 10%; }
.spark.p2 { inset-block-start: 20%; inset-inline-end: 12%; }
.spark.p3 { inset-block-end: 18%; inset-inline-start: 6%; }
.spark.p4 { inset-block-end: 10%; inset-inline-end: 20%; }
/* e-namad: only our wrapper gets layout; its own <a>/<img> keep e-namad's code untouched (see _enamad.html) */
.enamad-seal { margin-top: var(--s2); }
