/* Ekal public website: the shell every page extending base.html shares (2026-10-28, the approved
   design; docs/WEBSITE.md) — tokens, the floating glass header, the "Legal services" and "Who it's
   for" panels, the phone menu sheet and the footer. Ported from the design preview
   (~/ekal-local/website-design/src/site.css + nav.css).

   Linked at the TOP OF <body> (base.html), after tailwind.css: Tailwind's preflight gives
   [type="button"]/[type="submit"] a transparent background at a class's specificity, and as
   the later sheet these rules win the tie. Old pages (about, pricing, sign-in...) load this
   too, so every rule here is scoped to the shell's own containers (.hdr, .mega, .sheet,
   .foot) or names nothing an old page uses; page styles live in ek-site-pages.css.
   Logical properties only: the Arabic (RTL) page mirrors itself. */
:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #5b6678; --faint: #94a3b8;
  --navy: #2a306e; --navy-2: #3b45b0; --navy-3: #4a55c8; --night: #12153b; --night-2: #1b1f52;
  --seal: #0e7a55; --seal-soft: #e3f4ec; --line: rgba(15, 23, 42, .08); --line-2: rgba(15, 23, 42, .14);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .7));
  --glass-shadow: 0 24px 60px rgba(34, 40, 110, .13), 0 2px 8px rgba(34, 40, 110, .05);
  --spring: cubic-bezier(.2, .9, .25, 1.12); --ease: cubic-bezier(.2, .8, .2, 1);
  --spring-1: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 20.5%, 1.043 24.5%, 1.035 28.4%, 1.007 36%, .997 41.3%, 1.003 53.4%, 1);
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --wrap: 1200px; --gut: 24px;
  /* the page font is base.html's (--ekal-font-sans: Inter, or IBM Plex Sans Arabic on Arabic pages) */
  --font: var(--ekal-font-sans, ui-sans-serif, system-ui, sans-serif);
  --fs-body: 17px; --lh-body: 1.65; --lh-head: 1.08; --track-head: -.025em;
}
:root:lang(ar) { --fs-body: 17.5px; --lh-body: 1.85; --lh-head: 1.3; --track-head: 0; }
/* the sticky header covers the top of the page: an anchor lands below it */
html { scroll-padding-top: 96px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.i { width: 1em; height: 1em; flex: none; fill: currentColor; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px;
  font-weight: 700; font-size: 15px; }
.skip:focus { top: 12px; }
.flip { transform: scaleX(1); }
[dir="rtl"] .flip { transform: scaleX(-1); }
.hdr :focus-visible, .mega :focus-visible, .sheet :focus-visible, .foot :focus-visible, .skip:focus-visible {
  outline: 2px solid var(--navy-2); outline-offset: 3px; border-radius: 8px; }
.foot :focus-visible { outline-color: #c7cdff; }

/* ---------- buttons (the shell's; the pages reuse them) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding-inline: 24px; border-radius: 16px; border: 0;
  font-weight: 700; font-size: 16px; line-height: 1.2; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform .45s var(--spring), box-shadow .3s var(--ease), background-color .2s; }
.btn .i { font-size: 20px; }
.btn:active { transition-duration: 0s; transform: scale(.965); }
.btn-navy { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; box-shadow: 0 10px 24px rgba(42, 48, 110, .28), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-navy:hover { color: #fff; box-shadow: 0 14px 30px rgba(42, 48, 110, .36), inset 0 1px 0 rgba(255, 255, 255, .18); transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--navy); box-shadow: 0 12px 30px rgba(5, 8, 40, .35); }
.btn-white:hover { transform: translateY(-1px); }
.btn-glass { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .32);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); }
.btn-line { background: rgba(255, 255, 255, .7); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-line:hover { background: #fff; }
.btn-sm { height: 40px; padding-inline: 16px; border-radius: 12px; font-size: 14.5px; }

/* ---------- header: a floating glass capsule ----------
   In the page's flow (the old pages' content starts below it); pages with a night hero
   (home, the audience pages) pull it over the hero: .hdr.is-over. */
.hdr { position: sticky; top: 12px; z-index: 50; margin-block: 12px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.hdr.is-over { margin-block-end: -76px; }
/* B20's offer bar is first in the home's content, under the navigation: while it shows, no overlap */
body:has(main > .ekp:not([hidden])) .hdr.is-over { margin-block-end: 12px; }
.hdr-in { width: min(var(--wrap), 100% - 24px); margin-inline: auto; height: 64px; display: flex; align-items: center; gap: 6px; padding-inline: 16px 8px;
  border-radius: 22px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 #fff, 0 10px 34px rgba(5, 8, 40, .16); transition: background-color .3s, box-shadow .3s; }
.hdr:not(.is-over) .hdr-in, body:has(main > .ekp:not([hidden])) .hdr-in { box-shadow: inset 0 1px 0 #fff, 0 6px 24px rgba(34, 40, 110, .1); border-color: rgba(42, 48, 110, .08); }
.hdr.is-scrolled .hdr-in { background: rgba(255, 255, 255, .9); box-shadow: inset 0 1px 0 #fff, var(--glass-shadow); }
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @keyframes hdr-solid { to { background: rgba(255, 255, 255, .9); box-shadow: inset 0 1px 0 #fff, var(--glass-shadow); } }
  .hdr-in { animation: hdr-solid linear both; animation-timeline: scroll(block root); animation-range: 0px 140px; }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .hdr-in, .mega, .sheet { background: #fff; } }
.hdr .logo { display: flex; align-items: center; flex: none; height: 44px; padding-inline: 2px; }
.hdr .logo img { height: 34px; width: auto; }
/* base.html keeps `nav { min-height: 4rem }` for the old pages' own <nav>s; not these */
.hdr .nav, .sheet nav { min-height: 0; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 18px; }
.nav a, .nav button { height: 40px; display: inline-flex; align-items: center; gap: 6px; padding-inline: 13px; border-radius: 12px; border: 0; background: none;
  font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.nav a:hover, .nav button:hover, .nav button[aria-expanded="true"] { background: rgba(42, 48, 110, .07); color: var(--navy); }
.nav a[aria-current="page"] { color: var(--navy); background: rgba(42, 48, 110, .07); }
.nav .i { font-size: 14px; transition: transform .35s var(--spring); }
.nav button[aria-expanded="true"] .i { transform: rotate(180deg); }
.hdr-end { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.hdr-end a { white-space: nowrap; text-decoration: none; }
.hdr .lang { height: 40px; display: inline-flex; align-items: center; gap: 7px; padding-inline: 12px; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--navy); }
.hdr .lang:hover { background: rgba(42, 48, 110, .07); }
.hdr .lang .i { font-size: 18px; }
.hdr .signin { height: 40px; display: inline-flex; align-items: center; padding-inline: 14px; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.hdr .signin:hover { background: rgba(42, 48, 110, .07); color: var(--navy); }
.hdr .menu-btn { display: none; width: 44px; height: 44px; border-radius: 13px; border: 0; background: rgba(42, 48, 110, .07); color: var(--navy); place-items: center; cursor: pointer; }
.hdr .menu-btn .i { font-size: 22px; }

/* ---------- the panels under the header (popover): legal services, who it's for ---------- */
.mega { position: fixed; inset: auto; top: var(--mega-top, 96px); inset-inline: 0; margin-inline: auto; width: min(840px, 100vw - 24px);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 26px; padding: 14px; color: var(--ink); font-size: 16px; line-height: 1.5;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .84));
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 #fff, 0 30px 80px rgba(20, 24, 70, .22);
  opacity: 0; transform: translateY(-8px) scale(.985); transform-origin: top center;
  transition: opacity .2s var(--ease), transform .45s var(--spring), display .45s allow-discrete, overlay .45s allow-discrete; }
.mega:popover-open { opacity: 1; transform: none; }
@starting-style { .mega:popover-open { opacity: 0; transform: translateY(-8px) scale(.985); } }
/* a browser without popovers never shows the panels (their buttons then follow data-href: ek-site.js) */
@supports not selector(:popover-open) { .mega { display: none; } }
.mega-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px 12px; }
.mega-h strong { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(42, 48, 110, .05); color: var(--ink-2); font-size: 14.5px; }
.mega-foot > .i { font-size: 18px; color: #d98a00; }
.mega-foot a { color: var(--navy); font-weight: 700; margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mega-foot a .i { font-size: 16px; }
/* glass that materialises: blur grows with the scale */
@keyframes materialise { from { opacity: 0; transform: translateY(-8px) scale(.97); -webkit-backdrop-filter: blur(0) saturate(100%); backdrop-filter: blur(0) saturate(100%); } }
.mega:popover-open { animation: materialise .5s var(--spring-1); }

/* a practice-area row (the panel, and the home's areas section) */
.area { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none;
  transition: background-color .25s, box-shadow .25s; }
.area > .i { font-size: 26px; color: var(--navy); grid-row: span 2; }
.area b { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.area span { grid-column: 2; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.area .go { grid-row: 1 / span 2; grid-column: 3; font-size: 16px; color: var(--faint); transition: transform .35s var(--spring), color .2s; }
.area:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .7)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 8px 22px rgba(34, 40, 110, .1); }
.area:hover .go { color: var(--navy); transform: translateX(3px); }
[dir="rtl"] .area:hover .go { transform: scaleX(-1) translateX(3px); }
.area:active { transition-duration: 0s; }

/* "Who it's for": the same glass, placed under its own button (ek-site.js) */
.mega.aud { inset-inline: auto; left: var(--aud-x, 50%); margin: 0; width: min(560px, 100vw - 24px); transform-origin: var(--aud-ox, 50%) top; }
.aud-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.aud-i { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none;
  transition: background-color .25s, box-shadow .25s; }
.aud-i .ai { grid-row: span 2; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--navy);
  background: rgba(59, 69, 176, .08); box-shadow: inset 0 0 0 1px rgba(59, 69, 176, .1); transition: background-color .25s, color .25s; }
.aud-i .ai .i { font-size: 22px; }
.aud-i b { font-size: 16px; font-weight: 700; align-self: end; }
.aud-i > span:not(.ai) { font-size: 13.5px; color: var(--muted); line-height: 1.45; align-self: start; }
.aud-i:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .7)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 8px 22px rgba(34, 40, 110, .1); }
.aud-i:hover .ai { background: rgba(59, 69, 176, .14); }
.aud-i[aria-current="page"] { background: rgba(59, 69, 176, .06); box-shadow: inset 0 0 0 1px rgba(59, 69, 176, .16); }
.aud-i[aria-current="page"] .ai { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; }
.aud-i:active { transition-duration: 0s; transform: scale(.985); }

/* ---------- phone menu: a bottom sheet (<dialog>: Escape closes it, focus stays inside) ---------- */
.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 88dvh; border: 0; padding: 10px 16px 22px; border-radius: 28px 28px 0 0; color: var(--ink);
  font-size: 16px; line-height: 1.5;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .9));
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: 0 -20px 60px rgba(20, 24, 70, .25);
  transform: translateY(100%); transition: transform .5s var(--spring), display .5s allow-discrete, overlay .5s allow-discrete; overflow-y: auto; overscroll-behavior: contain; }
.sheet[open] { transform: none; }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::backdrop { background: rgba(15, 23, 42, .38); opacity: 0; transition: opacity .3s, display .5s allow-discrete, overlay .5s allow-discrete; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-grab { width: 44px; height: 5px; border-radius: 9px; background: rgba(15, 23, 42, .18); margin: 2px auto 12px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-top img { height: 30px; width: auto; }
.sheet-x { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(42, 48, 110, .07); display: grid; place-items: center; color: var(--navy); cursor: pointer; }
.sheet-x .i { font-size: 20px; }
.sheet nav { display: grid; gap: 2px; }
.sheet nav > a { height: 52px; display: flex; align-items: center; padding-inline: 14px; border-radius: 14px; font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.sheet nav > a:hover, .sheet nav > a[aria-current="page"] { background: rgba(42, 48, 110, .06); }
.sheet .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sheet .acts .btn { width: 100%; }
.sheet-aud { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sheet-aud > b { display: block; font-size: 13px; font-weight: 700; color: var(--muted); padding-inline: 14px; margin-bottom: 8px; }
.sheet-aud-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sa-i { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 15px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none;
  background: rgba(42, 48, 110, .05); }
.sa-i .ai { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--navy); background: #fff; box-shadow: 0 2px 6px rgba(34, 40, 110, .1); }
.sa-i .ai .i { font-size: 18px; }
.sa-i[aria-current="page"] { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; }
.sa-i:active { transition-duration: 0s; transform: scale(.97); }

/* ---------- footer ---------- */
.foot { margin: 0 12px 12px; border-radius: 40px; color: rgba(220, 225, 255, .78); padding-block: 72px 28px; font-size: 15px; line-height: 1.6;
  background: radial-gradient(800px 420px at 90% 0%, rgba(99, 112, 255, .28), transparent 60%), linear-gradient(180deg, #171b4b, #0f1233); }
main + .foot { margin-top: 0; }
.foot a { color: inherit; text-decoration: none; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(5, minmax(0, 1fr)); gap: 40px 32px; }
.foot-brand img { height: 44px; width: auto; }
.foot-brand p { margin: 18px 0 0; line-height: 1.75; max-width: 30em; }
.foot-contact { display: grid; justify-items: start; gap: 8px; margin-top: 22px; }
.foot-contact a, .foot-contact span { display: inline-flex; align-items: center; gap: 10px; color: #e7eaff; }
.foot-contact .i { font-size: 18px; color: #9aa6ff; }
.foot h2 { font-size: 14.5px; font-weight: 700; color: #fff; margin: 0 0 16px; line-height: 1.4; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.foot ul a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot ul a[aria-current="page"] { color: #fff; font-weight: 700; }
.foot-mid { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; margin-top: 52px; padding-block: 26px; border-block: 1px solid rgba(255, 255, 255, .1); }
.foot-mid .grp { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.foot-mid .grp > b { font-size: 13.5px; color: rgba(220, 225, 255, .7); font-weight: 600; }
.soc { display: flex; gap: 8px; }
.soc a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #fff; transition: background-color .2s; }
.soc a:hover { background: rgba(255, 255, 255, .16); }
.soc .i { font-size: 19px; }
.pay { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pay img { height: 26px; width: auto; padding: 5px 8px; border-radius: 7px; background: #fff; box-shadow: 0 2px 8px rgba(5, 8, 40, .25); }
.foot .pay img { height: 30px; box-shadow: none; }
.foot-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 13.5px; }
.foot-bot a { color: #e7eaff; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.foot-bot .i { font-size: 17px; }

/* ---------- compact desktops (a 1920x1080 laptop at 125-150 %: 1536x730, 1280x600) ---------- */
@media (min-width: 1024px) and (max-width: 1239.98px) {
  .nav { margin-inline-start: 6px; }
  .nav a, .nav button { padding-inline: 9px; font-size: 15px; }
  .nav .nav-about { display: none; }
  .hdr .lang { padding-inline: 8px; }
  .foot-top { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .foot-brand p { max-width: 46em; }
}

/* ---------- tablets and phones ---------- */
@media (max-width: 1023.98px) {
  .nav, .hdr-end .signin, .hdr-end .btn { display: none; }
  .hdr .menu-btn { display: grid; }
  .foot { margin-inline: 0; border-radius: 28px; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 639.98px) {
  :root { --gut: 16px; }
  .hdr-in { padding-inline: 12px 6px; }
  .hdr .logo img { height: 30px; }
  .hdr .lang { padding-inline: 8px; }
  .btn { height: 48px; padding-inline: 18px; }
  .btn-sm { height: 40px; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .hdr *, .mega, .mega *, .sheet, .sheet *, .sheet::backdrop, .foot * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* when the visitor asks for less: frostier glass, stronger borders */
@media (prefers-reduced-transparency: reduce) {
  .hdr-in, .mega, .sheet { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff !important; }
}
@media (prefers-contrast: more) {
  .hdr-in, .area { box-shadow: 0 0 0 1.5px var(--ink) !important; }
  .aud-i > span:not(.ai), .area span { color: var(--ink-2) !important; }
}
