/* ==========================================================================
   STEPS CME Academy — theme.css
   Tokens, reset, typography, layout and the components every page shares.

   Brand: STADA deep blue (#1b2f6b family) with the STADA magenta accent.
   Colours are authored in oklch so the ramps stay perceptually even — a
   700 is genuinely one step darker than a 600 rather than accidentally
   jumping. Where a value needs to survive an older engine it is written
   with a hex fallback.

   NOTE ON NAMING: the previous stylesheet called the magenta ramp
   "--green-*". Nothing was green; the names now say what the colours are.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — deep blue */
  --brand-900: oklch(24% 0.11 265);
  --brand-800: oklch(32% 0.14 265);
  --brand-700: oklch(40% 0.17 265);
  --brand-600: oklch(46% 0.19 265);
  --brand-500: oklch(52% 0.19 265);
  --brand-400: oklch(60% 0.15 265);
  --brand-300: oklch(74% 0.08 265);
  --brand-200: oklch(86% 0.05 265);
  --brand-100: oklch(93% 0.03 265);
  --brand-50:  oklch(96% 0.015 265);

  /* Accent — STADA magenta */
  --accent-800: oklch(40% 0.17 345);
  --accent-700: oklch(46% 0.19 345);
  --accent-600: oklch(52% 0.22 345);
  --accent-500: oklch(58% 0.22 345);
  --accent-400: oklch(66% 0.18 345);
  --accent-300: oklch(78% 0.12 345);
  --accent-100: oklch(93% 0.045 345);
  --accent-50:  oklch(96% 0.025 345);

  /* Neutrals */
  --ink-900: oklch(18% 0.01 265);
  --ink-800: oklch(25% 0.008 265);
  --ink-700: oklch(35% 0.008 265);
  --ink-600: oklch(45% 0.006 265);
  --ink-500: oklch(55% 0.005 265);
  --ink-400: oklch(65% 0.004 265);
  --ink-300: oklch(78% 0.003 265);
  --ink-200: oklch(88% 0.003 265);
  --ink-100: oklch(94% 0.003 265);
  --ink-50:  oklch(97% 0.002 265);
  --white:   oklch(99% 0.002 265);

  /* Semantic surfaces */
  --surface: var(--white);
  --surface-muted: var(--ink-50);
  --surface-brand: var(--brand-50);
  --line: oklch(32% 0.14 265 / 0.10);
  --line-strong: oklch(32% 0.14 265 / 0.18);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 52%, var(--brand-600) 100%);
  --grad-accent: linear-gradient(135deg, var(--accent-700) 0%, var(--accent-500) 60%, var(--accent-400) 100%);
  --grad-soft: linear-gradient(140deg, var(--brand-50) 0%, var(--accent-50) 100%);
  --grad-rule: linear-gradient(90deg, transparent, var(--accent-400), var(--brand-400), transparent);

  /* Glass */
  --glass-light: oklch(100% 0 0 / 0.08);
  --glass-line: oklch(100% 0 0 / 0.16);
  --glass-blur: blur(16px);

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --fs-display: clamp(2.4rem, 1.4rem + 3.6vw, 3.9rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 2.6vw, 3.2rem);
  --fs-h2: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
  --fs-h4: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  --fs-lead: clamp(1rem, 0.94rem + 0.4vw, 1.18rem);
  --fs-body: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-full: 999px;

  /* Elevation — brand-tinted, layered rather than one flat drop */
  --shadow-xs: 0 1px 2px oklch(24% 0.11 265 / 0.05);
  --shadow-sm: 0 2px 6px oklch(24% 0.11 265 / 0.05), 0 1px 2px oklch(24% 0.11 265 / 0.04);
  --shadow-md: 0 10px 26px -12px oklch(24% 0.11 265 / 0.22), 0 3px 8px oklch(24% 0.11 265 / 0.05);
  --shadow-lg: 0 24px 52px -22px oklch(24% 0.11 265 / 0.34), 0 6px 16px oklch(24% 0.11 265 / 0.07);
  --shadow-xl: 0 44px 92px -40px oklch(24% 0.11 265 / 0.48), 0 10px 26px oklch(24% 0.11 265 / 0.09);
  --shadow-accent: 0 14px 30px -12px oklch(58% 0.22 345 / 0.5);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 0.18s;
  --t-base: 0.32s;
  --t-slow: 0.6s;

  /* Layout */
  --container: 1200px;
  --container-wide: 1320px;
  --gutter: clamp(1rem, 0.55rem + 2vw, 2rem);
  --section-y: clamp(3.5rem, 2.4rem + 3vw, 6rem);
  --header-h: 92px;          /* re-measured at runtime by site.js */
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--brand-800);
  line-height: 1.18;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 900; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 800; }
h4 { font-size: var(--fs-h4); font-weight: 700; }

p { text-wrap: pretty; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent-100); color: var(--accent-800); }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 2000;
  padding: 12px 20px;
  border-radius: var(--r-xs);
  background: var(--brand-800);
  color: var(--white);
  font-weight: 700;
  transition: top var(--t-base) var(--ease-out);
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }

section { padding-block: var(--section-y); position: relative; }
.section--muted { background: var(--surface-muted); }
.section--brand { background: var(--surface-brand); }

/* A hairline rule that fades at both ends — used between light sections so
   they read as separate without a hard border. */
.section--ruled::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: var(--grad-rule);
  opacity: 0.4;
}

.section-header { margin-bottom: clamp(2.4rem, 1.8rem + 2vw, 3.5rem); max-width: 68ch; }
.section-header.center { text-align: center; margin-inline: auto; }
.section-header.center .section-desc { margin-inline: auto; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  margin-bottom: 16px;
  border-radius: var(--r-full);
  background: var(--accent-50);
  border: 1px solid oklch(58% 0.22 345 / 0.16);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-700);
}
.section-eyebrow svg { color: var(--accent-600); }

.section-title { font-size: var(--fs-h2); font-weight: 800; margin-bottom: 16px; }
.section-title .accent {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-desc { font-size: var(--fs-lead); line-height: 1.72; color: var(--ink-500); max-width: 65ch; }

/* Decorative blurred orbs. Purely presentational, never in the flow. */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.orb--accent { background: var(--accent-500); opacity: 0.1; }
.orb--brand { background: var(--brand-400); opacity: 0.1; }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding-inline: 28px;
  border-radius: var(--r-sm);
  font-family: var(--font-heading);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t-base) var(--ease-out),
              background var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.btn svg { flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* A single sheen sweep on hover — enough to feel considered, not a light show. */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 0%, oklch(100% 0 0 / 0.22) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform var(--t-slow) var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }

.btn--primary { background: var(--accent-600); box-shadow: var(--shadow-accent); }
.btn--primary:hover { background: var(--accent-700); box-shadow: 0 18px 38px -14px oklch(58% 0.22 345 / 0.62); }

.btn--brand { background: var(--brand-800); box-shadow: 0 14px 30px -14px oklch(32% 0.14 265 / 0.6); }
.btn--brand:hover { background: var(--brand-900); }

.btn--outline {
  background: transparent;
  border: 2px solid var(--line-strong);
  color: var(--brand-800);
}
.btn--outline:hover { background: var(--brand-800); border-color: var(--brand-800); color: var(--white); }

.btn--glass {
  background: var(--glass-light);
  border: 1px solid var(--glass-line);
  backdrop-filter: var(--glass-blur);
  color: var(--white);
}
.btn--glass:hover { background: oklch(100% 0 0 / 0.16); border-color: oklch(100% 0 0 / 0.36); }

.btn--sm { min-height: 44px; padding-inline: 20px; font-size: 0.87rem; }
.btn--lg { min-height: 60px; padding-inline: 36px; font-size: 1.04rem; }
.btn--block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: 0.55; pointer-events: none; box-shadow: none; }
.btn.is-busy { opacity: 0.72; cursor: progress; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-700);
}
.link-arrow svg { transition: transform var(--t-base) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   5. Cards & chips
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.card--hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: oklch(58% 0.22 345 / 0.3);
}

/* A soft light that follows the pointer. site.js feeds --mx / --my. */
.card--spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%),
              oklch(58% 0.22 345 / 0.08), transparent 62%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  pointer-events: none;
}
.card--spotlight:hover::before { opacity: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--ink-100);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-600);
}
.chip--accent { background: var(--accent-50); color: var(--accent-700); }
.chip--brand { background: var(--brand-100); color: var(--brand-600); }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1150;
  padding-block: 10px;
  transition: padding var(--t-base) var(--ease-out);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: background var(--t-base) var(--ease-out),
              backdrop-filter var(--t-base) var(--ease-out);
}
.site-header.is-top::before {
  background: linear-gradient(180deg,
              oklch(20% 0.08 265 / 0.55) 0%,
              oklch(20% 0.08 265 / 0.2) 60%,
              oklch(20% 0.08 265 / 0) 100%);
}
.site-header.is-stuck {
  padding-block: 6px;
  box-shadow: 0 1px 3px oklch(24% 0.11 265 / 0.07), 0 8px 28px oklch(24% 0.11 265 / 0.06);
  transition: padding var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.site-header.is-stuck::before {
  background: oklch(99% 0.002 265 / 0.86);
  backdrop-filter: saturate(180%) var(--glass-blur);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* The logo reserves its height up front so the header does not jump while the
   image decodes, and the two brand marks swap as the bar goes solid. */
.logo { display: inline-flex; align-items: center; min-height: 64px; position: relative; flex-shrink: 0; }
.logo img {
  height: 104px;
  width: auto;
  min-width: 132px;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px oklch(0% 0 0 / 0.35));
  transition: height var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              filter var(--t-base) var(--ease-out);
}
.is-stuck .logo img { height: 80px; filter: drop-shadow(0 2px 6px oklch(0% 0 0 / 0.12)); }
.logo:hover img { transform: scale(1.04); }

.logo-scrolled { display: none; }
.is-stuck .logo-top { display: none; }
.is-stuck .logo-scrolled { display: inline-block; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 9px 14px;
  border-radius: var(--r-xs);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.is-top .nav-links a { color: var(--white); }
.is-top .nav-links a:hover { background: oklch(100% 0 0 / 0.12); }
.is-stuck .nav-links a { color: var(--brand-800); }
.is-stuck .nav-links a:hover { color: var(--accent-700); background: var(--accent-50); }
.nav-links .btn::after { display: none; }

.mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 1101;
  flex-shrink: 0;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  position: absolute;
  left: 6px;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-fast), background var(--t-fast);
}
.is-stuck .mobile-toggle span { background: var(--brand-800); }
.mobile-toggle span:nth-child(1) { top: 11px; }
.mobile-toggle span:nth-child(2) { top: 17px; }
.mobile-toggle span:nth-child(3) { top: 23px; }
/* White over the open panel, whatever the header behind it is doing. */
.mobile-toggle.is-open span { background: var(--white); }
.mobile-toggle.is-open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-toggle.is-open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: oklch(0% 0 0 / 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.nav-overlay.is-open { display: block; opacity: 1; }
body.nav-locked { overflow: hidden; }

@media (max-width: 900px) {
  .mobile-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset-block: 0;
    right: 0;
    width: min(80vw, 340px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 112px 24px 32px;
    background: linear-gradient(160deg, var(--brand-900) 0%, var(--brand-700) 100%);
    box-shadow: -8px 0 40px oklch(0% 0 0 / 0.28);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    overflow-y: auto;
    z-index: 1090;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { color: var(--white) !important; font-size: 1.02rem; padding: 14px 16px; border-radius: 10px; }
  .nav-links a:hover { background: oklch(100% 0 0 / 0.1) !important; }
  .nav-links a::after { display: none; }
  .nav-links .btn { margin-top: 14px; }
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  padding: 56px 0 32px;
  background: var(--ink-900);
  color: oklch(70% 0.005 265);
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: var(--grad-rule);
  opacity: 0.6;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid oklch(100% 0 0 / 0.1);
}
.footer-brand p { font-size: 0.88rem; line-height: 1.6; max-width: 35ch; }
.footer-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 10px; }
.footer-marks img { width: auto; max-width: 140px; height: auto; max-height: 56px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 40px; }
.footer-links h5 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(85% 0.005 265);
  margin-bottom: 10px;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: oklch(65% 0.005 265);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--accent-400); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: 0.82rem; color: oklch(50% 0.005 265); }

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xs);
  background: oklch(25% 0.005 265);
  color: oklch(70% 0.005 265);
  transition: background var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out);
}
.social-links a:hover { background: var(--accent-600); color: var(--white); }

@media (max-width: 480px) {
  .footer-marks img { max-width: 110px; max-height: 44px; }
}

/* --------------------------------------------------------------------------
   8. Chrome: scroll progress, back to top
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--grad-accent);
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 26px;
  bottom: 100px;
  z-index: 900;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-800);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out),
              visibility var(--t-base),
              background var(--t-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-600); }

/* --------------------------------------------------------------------------
   9. Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal--left { transform: translateX(-28px); }
.reveal--right { transform: translateX(28px); }
.reveal--zoom { transform: scale(0.96); }

/* --------------------------------------------------------------------------
   10. Modal
   -------------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: clamp(0.75rem, 2vw, 2rem);
  align-items: center;
  justify-content: center;
  background: oklch(18% 0.01 265 / 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.modal.is-open { display: flex; }
.modal.is-visible { opacity: 1; }

.modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: min(90vh, 900px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(18px) scale(0.985);
  transition: transform var(--t-base) var(--ease-out);
}
.modal.is-visible .modal-dialog { transform: none; }
.modal-dialog--wide { width: min(1140px, 100%); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--grad-brand);
}
.modal-head h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; color: var(--white); }

.modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: oklch(100% 0 0 / 0.12);
  color: var(--white);
  transition: background var(--t-fast), transform var(--t-base) var(--ease-out);
}
.modal-close:hover { background: var(--accent-600); transform: rotate(90deg); }

.modal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(1rem, 2vw, 1.75rem); }
.modal-body--flush { padding: 0; }
body.modal-open { overflow: hidden; }

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