/* ==========================================================================
   Base — reset, document defaults, shared layout primitives & utilities
   Loaded after variables.css. Everything here is global and reusable.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* --- Layout primitives --------------------------------------------------- */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-padding);
}

.section--white {
  background-color: var(--color-white);
}

.section--accent {
  background-color: var(--color-bg-accent);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(var(--rgb-primary), 0.12) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(var(--rgb-secondary), 0.08) 0%, transparent 40%);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
  background-image:
    radial-gradient(ellipse 60% 50% at 0% 50%, rgba(var(--rgb-primary), 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 100% 80%, rgba(var(--rgb-secondary), 0.08) 0%, transparent 50%);
}

.section--dark .section__title {
  color: var(--color-white);
}

.section--dark .section__subtitle {
  color: rgba(var(--rgb-white), 0.72);
}

.section--pattern {
  background-image:
    radial-gradient(rgba(var(--rgb-primary), 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.section--elevated {
  position: relative;
}

.section--elevated::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--container-max));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--rgb-primary), 0.25), transparent);
}

/* --- Section header / typography helpers --------------------------------- */
.section__label {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-section-title);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section__title em {
  font-style: italic;
  color: var(--color-primary);
}

.section__subtitle {
  font-size: var(--fs-subtitle);
  color: var(--color-muted);
  max-width: 36rem;
}

.section__header {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__subtitle {
  margin-inline: auto;
}

/* --- Scroll reveal animations -------------------------------------------- */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal {
  transform: translateY(28px);
}

.reveal-left {
  transform: translateX(-36px);
}

.reveal-right {
  transform: translateX(36px);
}

.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Brand marks --------------------------------------------------------- */
.header__logo-img {
  display: block;
  height: 3.25rem;
  width: auto;
  max-width: min(11rem, 42vw);
  object-fit: contain;
  object-position: left center;
}

.footer__logo-img {
  display: block;
  width: min(12rem, 70vw);
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: var(--space-4);
}

/* --- Utilities ----------------------------------------------------------- */
.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;
}
