/* ==========================================================================
   Base: reset, typography, layout primitives
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0; background: var(--color-page); color: var(--color-text);
  font-family: var(--font-sans); font-size: var(--text-base); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

h1, h2, h3, h4 { margin: 0; color: var(--color-ink); font-family: var(--font-sans); text-wrap: balance; }
h1 { font-size: var(--text-h1); font-weight: 400; line-height: 1.12; letter-spacing: -0.022em; }
h2 { font-size: var(--text-h2); font-weight: 400; line-height: 1.18; letter-spacing: -0.018em; }
h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.008em; }
h4 { font-size: var(--text-h4); font-weight: 600; line-height: 1.35; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--color-action); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--color-action-strong); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
address { font-style: normal; }
::selection { background: rgba(11, 90, 112, 0.16); }

.lead { font-size: var(--text-lead); line-height: 1.6; color: var(--color-text); }
.muted { color: var(--color-muted); }

/* Eyebrow: the short red line the brand uses above titles */
.eyebrow { color: var(--color-brand-text); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.06em; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(860px + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--mist { background: var(--color-mist); }
.stack > * + * { margin-top: var(--space-4); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Panels: the large rounded surfaces from the design */
.panel { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.panel--mist { background: var(--color-mist); }
.panel--sand { background: var(--color-sand); }
.panel--night { background: var(--color-night); color: var(--color-on-night); }
.panel--night h1, .panel--night h2, .panel--night h3 { color: #fff; }

/* Art backgrounds: brand artwork as cover images */
.art { background-color: var(--color-night); background-size: cover; background-position: center; }

/* Accessibility helpers */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 200; padding: var(--space-2) var(--space-4); background: var(--color-ink); color: #fff; border-radius: var(--radius-sm); }
.skip-link:focus { top: var(--space-3); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Right-to-left (Arabic) */
[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", var(--font-sans); }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }
