/* Product-specific public page layout; colors, type, radii and motion come from the brand theme. */
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: hsl(var(--background)); color: hsl(var(--foreground)); font-family: var(--app-font-sans); }
html[dir="rtl"] body { font-family: var(--app-font-arabic); }
*, *::before, *::after { box-sizing: border-box; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
:focus-visible { outline: var(--state-focus-width) solid hsl(var(--ring)); outline-offset: var(--state-focus-width); }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid hsl(var(--border) / .6); background: hsl(var(--background) / .92); }
.site-nav { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; min-height: 48px; flex-shrink: 0; }
.brand-wordmark { width: 148px; height: 40px; object-fit: contain; }
html.dark .brand-light, html:not(.dark) .brand-dark { display: none; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.nav-link { color: hsl(var(--muted-foreground)); font-size: 14px; font-weight: 700; text-decoration: none; }
.nav-link:hover { color: hsl(var(--foreground)); }
.site-controls { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.site-toggle { min-height: 44px; min-width: 68px; padding: 7px 12px; border: 1px solid hsl(var(--border)); border-radius: var(--app-radius-xl); color: hsl(var(--foreground)); background: hsl(var(--card)); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.site-toggle:hover { border-color: hsl(var(--primary)); }
.site-footer { padding: 32px 0; border-top: 1px solid hsl(var(--border) / .6); background: hsl(var(--card) / .45); color: hsl(var(--muted-foreground)); font-size: 13px; }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: hsl(var(--foreground)); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: hsl(var(--primary)); text-decoration: underline; }
.site-footer p { margin: 0; }
/* One brand surface for every public page (landing hero, support, policies): brand navy that deepens
   toward the bottom, lit by a soft brand-cyan glow from the logo side. Tokens only, no new colours. */
:root { --hero: var(--foreground); --on-hero: 0 0% 100%; --glow-x: 100%; }
.dark { --hero: var(--card); }
html[dir="rtl"] { --glow-x: 0%; }
.brand-surface {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: hsl(var(--on-hero));
  background: hsl(var(--hero));
  background:
    radial-gradient(70% 110% at var(--glow-x) 0%, hsl(var(--primary) / .26), transparent 62%),
    linear-gradient(170deg, hsl(var(--hero)) 0%, color-mix(in oklab, hsl(var(--hero)), hsl(var(--primary-foreground)) 50%) 100%);
}
/* The Nafithah symbol, large and faint, on the same side as the glow. */
.brand-motif::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -160px;
  top: -140px;
  width: 760px;
  aspect-ratio: 1;
  opacity: .07;
  pointer-events: none;
  background: url("/api/public-assets/brand/nafithah-symbol-mono-white.svg") center / contain no-repeat;
}
.public-main { min-height: 65vh; }
.public-hero { padding: 72px 0 112px; }
.public-eyebrow { margin: 0 0 16px; color: hsl(var(--primary)); font-size: 13px; font-weight: 800; }
.public-hero h1 { max-width: 780px; margin: 0 0 18px; font-size: clamp(36px, 6vw, 64px); line-height: 1.2; }
.public-hero p:last-child { max-width: 700px; margin: 0; color: hsl(var(--on-hero) / .82); font-size: 17px; line-height: 1.8; }
/* Policy pages: a slim decorative band; the document card carries the title. */
.public-band { height: 176px; }
.public-content { padding: 48px 0 90px; }
/* Content cards rise over the lower edge of the band so the page reads as one surface. */
.public-hero + .public-content, .public-band + .public-content { position: relative; margin-top: -64px; padding-top: 0; }
.public-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); align-items: start; gap: 24px; }
.public-card { padding: clamp(22px, 4vw, 40px); border: 1px solid hsl(var(--border)); border-radius: var(--app-radius-xl); background: hsl(var(--card)); box-shadow: var(--elevation-sm); }
.public-card h2 { margin: 0 0 18px; font-size: 25px; }
.public-card h3 { margin: 0 0 9px; font-size: 18px; }
.public-card p { margin: 0 0 18px; color: hsl(var(--muted-foreground)); line-height: 1.8; }
.public-card a { color: hsl(var(--accent-foreground)); text-underline-offset: 3px; }
.faq-item { padding: 22px 0; border-top: 1px solid hsl(var(--border)); }
.faq-item:first-of-type { border-top: 0; padding-top: 0; }
.faq-item:last-child { padding-bottom: 0; }
.contact-link { display: inline-block; overflow-wrap: anywhere; font-weight: 800; }
.legal-card { max-width: 850px; margin-inline: auto; overflow-wrap: anywhere; }
.legal-card h1 { margin-top: 0; font-size: clamp(28px, 4vw, 42px); }
.legal-card h2 { margin-top: 30px; }
.legal-card p { color: hsl(var(--foreground)); }
.legal-meta { margin-top: 40px !important; color: hsl(var(--muted-foreground)) !important; font-size: 13px; }
@media (max-width: 700px) {
  .container { width: min(560px, calc(100% - 36px)); }
  .nav-links { display: none; }
  .site-nav { min-height: 68px; gap: 8px; }
  .brand-wordmark { width: 112px; height: 34px; }
  .site-toggle { min-width: 55px; padding: 6px 8px; font-size: 12px; }
  .public-grid { grid-template-columns: 1fr; }
  .public-hero { padding: 48px 0 88px; }
  .public-band { height: 128px; }
  .brand-motif::before { width: 520px; inset-inline-end: -200px; top: -120px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: var(--motion-reduced) !important; transition-duration: var(--motion-reduced) !important; }
}