/* ===================================
   Global Styles
   =================================== */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---- Film grain overlay ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

p+p {
  margin-top: var(--space-sm);
}

/* Decorative rule — gold accent line */
.rule-gold {
  width: 60px;
  height: 2px;
  background-color: var(--color-gold);
  border: none;
  margin: var(--space-md) auto;
}

/* ---- Links ---- */
a {
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-sage);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.9em 2em;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-primary {
  background-color: var(--color-navy);
  color: var(--color-warm-white);
  box-shadow: 0 2px 8px rgba(22, 35, 64, 0.2);
}

.btn-primary:hover {
  background-color: #1e3158;
  color: var(--color-warm-white);
  box-shadow: 0 4px 20px rgba(22, 35, 64, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}

.btn-outline:hover {
  background-color: var(--color-navy);
  color: var(--color-warm-white);
  transform: translateY(-1px);
}

.btn-sage {
  background-color: var(--color-sage);
  color: var(--color-warm-white);
}

.btn-sage:hover {
  background-color: #6a7b5f;
  color: var(--color-warm-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.container--narrow {
  max-width: var(--max-width-narrow);
}

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

.section--lg {
  padding-block: var(--space-2xl);
}

/* Push content below fixed header on non-hero pages */
main>.section:first-child,
main>.section--lg:first-child {
  padding-top: calc(var(--header-height) + var(--space-2xl));
}

/* ---- Text utilities ---- */
/* ---- Section labels (small uppercase intro) ---- */
.section-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

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

.text-navy {
  color: var(--color-navy);
}

.text-sage {
  color: var(--color-sage);
}

.text-gold {
  color: var(--color-gold);
}

.text-sm {
  font-size: var(--text-sm);
}

/* ---- Section headings ---- */
.section-heading {
  margin-bottom: var(--space-sm);
}

.section-subheading {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-sage);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-lg);
}

/* ---- Skip link for accessibility ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  background: var(--color-navy);
  color: var(--color-warm-white);
  padding: var(--space-xs) var(--space-sm);
  z-index: 10000;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-xs);
}

/* ---- Image placeholder ---- */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #c5bda8;
  color: #fff;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: center;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

/* ===================================
   Scroll Reveal Animations
   =================================== */
@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.is-visible {
  animation: revealUp var(--transition-reveal) forwards;
}

/* Stagger children */
.reveal-stagger.is-visible>*:nth-child(1) {
  animation-delay: 0ms;
}

.reveal-stagger.is-visible>*:nth-child(2) {
  animation-delay: 120ms;
}

.reveal-stagger.is-visible>*:nth-child(3) {
  animation-delay: 240ms;
}

.reveal-stagger.is-visible>*:nth-child(4) {
  animation-delay: 360ms;
}

.reveal-stagger.is-visible>*:nth-child(5) {
  animation-delay: 480ms;
}

.reveal-stagger.is-visible>*:nth-child(6) {
  animation-delay: 600ms;
}

/* For hero: staggered load animation */
@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stagger>*:nth-child(1) {
  animation: heroReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
  opacity: 0;
}

.hero-stagger>*:nth-child(2) {
  animation: heroReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
  opacity: 0;
}

.hero-stagger>*:nth-child(3) {
  animation: heroReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s forwards;
  opacity: 0;
}

.hero-stagger>*:nth-child(4) {
  animation: heroReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s forwards;
  opacity: 0;
}