/* ==========================================================================
   Mobisat — Base / reset / typography
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  color: var(--ink-navy);
  font-weight: var(--fw-bold);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-900); font-weight: var(--fw-extra); }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }

p { text-wrap: pretty; }

a { color: var(--brand-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-blue-deep); }

img, svg, video, picture { display: block; max-width: 100%; height: auto; }
/* Only content photos get a placeholder tint; brand/logo/transparent art must stay clean. */
img.ph { background: var(--surface-soft); }

/* Default icon sizing — any inline icon that isn't given an explicit size by a
   more specific rule (buttons, cards, mega menu, etc.) falls back to this so it
   can never balloon to the SVG default replaced-element size. */
.ic { width: 1.4em; height: 1.4em; flex: none; }

ul, ol { padding-inline-start: 1.15em; }
li { margin-block: 0.2em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

strong, b { font-weight: var(--fw-semibold); }

:target { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

/* Focus visibility (WCAG 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--brand-blue); color: #fff; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: var(--z-toast);
  background: var(--brand-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-md);
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Visually hidden but available to assistive tech */
.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;
}

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

[hidden] { display: none !important; }

/* RTL groundwork — logical properties do most of the work; a few flips: */
[dir="rtl"] .u-flip { transform: scaleX(-1); }
