/* ==========================================================================
   global.css — Base typography, layout primitives, utilities
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-secondary);
}

/* --------------------------------------------------------------- Typography */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--color-primary);
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
}

p {
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

em {
  font-style: italic;
}

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

/* ------------------------------------------------------------ Layout shells */

.container {
  width: 100%;
  max-width: calc(var(--container-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

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

.section--tight {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

/* Theme surfaces --------------------------------------------------------- */

.surface-dark {
  background-color: var(--color-primary);
  color: var(--color-text-invert);
}

.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4 {
  color: var(--color-secondary);
}

.surface-dark p {
  color: var(--color-text-invert-muted);
}

.surface-light {
  background-color: var(--color-secondary);
}

.surface-light-alt {
  background-color: var(--color-secondary-alt);
}

/* ---------------------------------------------------------- Section headers */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-md);
}

.surface-dark .eyebrow {
  color: var(--color-accent);
}

.eyebrow::before {
  content: "";
  width: clamp(28px, 4vw, 52px);
  height: 1px;
  background: currentColor;
  opacity: 0.65;
  flex: none;
}

.eyebrow--center::after {
  content: "";
  width: clamp(28px, 4vw, 52px);
  height: 1px;
  background: currentColor;
  opacity: 0.65;
  flex: none;
}

.section-title {
  max-width: 20ch;
}

.section-title--wide {
  max-width: 26ch;
}

.section-intro {
  font-size: var(--fs-body-lg);
  max-width: 56ch;
  margin-top: var(--space-md);
}

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

.text-center .eyebrow,
.text-center .section-title,
.text-center .section-intro {
  margin-inline: auto;
}

/* Gold italic accent inside display headings */
.accent-italic {
  font-style: italic;
  color: var(--color-accent);
}

.surface-dark .accent-italic {
  color: var(--color-accent-light);
}

/* ------------------------------------------------------------------ Rules */

.rule {
  height: 1px;
  background: var(--color-line);
  border: 0;
}

.surface-dark .rule {
  background: var(--color-line-invert);
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: var(--z-overlay);
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.75rem 1.5rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ------------------------------------------------- Scroll reveal animation */

/* Only hide reveal elements when JS is running (the .has-js class is set by an
   inline script in <head>), so content is never lost if JS fails to load. */
.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--delay-1 { transition-delay: 90ms; }
.reveal--delay-2 { transition-delay: 180ms; }
.reveal--delay-3 { transition-delay: 270ms; }
.reveal--delay-4 { transition-delay: 360ms; }

.reveal--fade {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .has-js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------- Media wrappers */

.media {
  position: relative;
  overflow: hidden;
  background: var(--color-primary-800);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

.media--zoom:hover img {
  transform: scale(1.05);
}

.media--portrait { aspect-ratio: 4 / 5; }
.media--tall { aspect-ratio: 3 / 4; }
.media--landscape { aspect-ratio: 16 / 10; }
.media--wide { aspect-ratio: 21 / 9; }
