/* ===== Base / Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
:target { scroll-margin-top: 96px; }
@media (max-width: 700px) {
  html { scroll-padding-top: 72px; }
  :target { scroll-margin-top: 72px; }
}

/* ===== Corporate scrollbar ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
  transition: background .2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}
::-webkit-scrollbar-corner { background: transparent; }
[data-theme='dark'] {
  scrollbar-color: #2A4D78 transparent;
}
[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: #2A4D78;
  border-color: var(--bg);
}
[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
img { font-style: italic; background-repeat: no-repeat; background-size: cover; }

/* Global fade-in for "plain" images as they finish loading.
 * Containers that drive opacity themselves (sliders, lightbox, marquees,
 * tile crossfades, CTA backdrop) are explicitly excluded so we don't
 * collide with their existing opacity transitions. */
.js img.img-fade {
  opacity: 0;
  transition: opacity .55s cubic-bezier(.4, 0, .2, 1);
}
.js img.img-fade.is-loaded { opacity: 1; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent); }

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700; letter-spacing: -.025em; }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p { max-width: 70ch; }

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

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.container-wide { max-width: var(--container-wide); }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-tight { padding-block: clamp(2rem, 5vw, 4rem); }

.grid { display: grid; gap: var(--s-6); }
.flex { display: flex; gap: var(--s-4); }
.between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .95rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: .35rem 0;
  position: relative;
}
.eyebrow::before {
  content: '';
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
@media (max-width: 600px) {
  .eyebrow { font-size: .8rem; letter-spacing: .18em; gap: var(--s-2); }
  .eyebrow::before { width: 28px; height: 2px; }
}

.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }

@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) {
  .hide-desktop { display: none !important; }
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: var(--on-brand);
  padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
