/* ==========================================================================
   UP AL — Base / Reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-base);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Focus ---------- */

:focus {
  outline: none;
}

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

/* ---------- Selection ---------- */

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

/* ---------- Layout helpers ---------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  inset-inline-start: var(--space-4);
  top: var(--space-4);
  z-index: 100;
  transform: translateY(-150%);
  background-color: var(--color-text-primary);
  color: var(--color-bg);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: transform var(--duration-base) var(--ease-premium);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 3px;
}

/* ---------- Visually hidden (screen-reader only) ---------- */

.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;
}

/* ---------- Scroll reveal (shared sitewide) ----------
   Elements marked [data-reveal] fade/rise in once as they enter the
   viewport (see js/main.js's IntersectionObserver). Used across every
   section, so it lives here rather than in a single section's file.
   Duration uses the same --duration-slow token as the rest of the
   site's motion system (560ms) instead of a separate hardcoded 700ms,
   which reads as noticeably snappier while keeping the same easing
   curve. will-change hints the browser to promote this to its own
   compositor layer only while it's still due to animate — js/main.js
   clears it back to `auto` the moment the transition finishes, so nothing
   stays needlessly promoted after it's done. */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-premium), transform var(--duration-slow) var(--ease-premium);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* ---------- Background orbs (shared sitewide) ----------
   Large, very softly blurred light sources placed behind section content
   for ambient depth — never a shape with a visible edge. Every section
   that uses one keeps its own position/size/tint (via a modifier class),
   but the blur/shape/inertness is defined once here. Purely decorative:
   aria-hidden in markup, never intercepts pointer events. */

.bg-orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
