/* ============================================================
   BASE — reset, fonts, typography, forms, focus, motion
   ============================================================ */

/* --- Self-hosted font hooks ---------------------------------
   Font binaries are NOT bundled (none were supplied and licensing
   must be respected). The site renders with a strong fallback stack
   today. To activate the intended typography, drop subset .woff2
   files into /assets/fonts/ and uncomment the @font-face block below.
   See DEPLOYMENT.md > Fonts.

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/assets/fonts/noto-kufi-arabic.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-sm));
  font-family: var(--font-body);
  font-synthesis: none; /* never synthesise condensed/bold faces */
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
/* Content photos get a neutral loading tint; logos/transparent marks must not. */
.media-tint { background-color: var(--bg-inset); }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p, li { max-width: var(--measure); }
ul, ol { padding-left: 1.2em; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-stretch: normal;
  line-height: var(--leading-snug);
  color: var(--text-strong);
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--step-4); line-height: var(--leading-tight); text-wrap: pretty; }
h2 { font-size: var(--step-3); line-height: 1.12; }
h3 { font-size: var(--step-2); font-weight: 700; }
h4 { font-size: var(--step-1); font-weight: 700; }
body, button, input, select, textarea { font-stretch: normal; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--psm-yellow-deep); }

strong, b { font-weight: 700; color: var(--text-strong); }

/* Uppercase label device (restrained), inspired by the logo lettering */
.eyebrow {
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2em 0.5em;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.eyebrow--ondark { color: var(--psm-yellow); }

/* Tabular numerals for pricing / durations / comparison */
.tnum { font-variant-numeric: tabular-nums; }

/* ---- Focus: visible, high-contrast, everywhere ---- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.on-dark :focus-visible,
[data-theme="dark"] :focus-visible { outline-color: var(--psm-yellow); }

/* ---- Skip link ---- */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-sm);
  z-index: var(--z-skiplink);
  background: var(--psm-black);
  color: var(--psm-white);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: calc(var(--space-sm) + var(--safe-top)); }

/* ---- Selection ---- */
::selection { background: var(--psm-yellow); color: var(--psm-black); }

/* ---- Visually hidden (screen-reader only) ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Forms ---- */
label { font-weight: 600; color: var(--text-strong); font-size: var(--step--1); }
input, select, textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  background: var(--psm-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--focus-ring);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--psm-error);
}
.field-error { color: var(--psm-error); font-size: var(--step--1); font-weight: 600; }
.field-hint { color: var(--text-muted); font-size: var(--step--1); font-weight: 400; }
.req { color: var(--psm-error); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Print handled in print.css ---- */
