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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.035;
  mix-blend-mode: multiply;
}

::selection {
  background: var(--color-blue);
  color: var(--color-white);
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: var(--color-blue);
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 em,
h2 em {
  color: var(--color-gold-deep);
}

p {
  margin: 0;
}

em {
  font-style: normal;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

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

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

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

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

/* Scalloped "stamp" edge — top and bottom, MYKA-style photo frame */
.stamp-frame {
  --scallop-r: 12px;
  -webkit-mask:
    radial-gradient(circle at var(--scallop-r) var(--scallop-r), transparent calc(var(--scallop-r) - 0.5px), #000 var(--scallop-r)) 0 0 / calc(var(--scallop-r) * 2) var(--scallop-r) repeat-x,
    radial-gradient(circle at var(--scallop-r) 0, transparent calc(var(--scallop-r) - 0.5px), #000 var(--scallop-r)) 0 100% / calc(var(--scallop-r) * 2) var(--scallop-r) repeat-x,
    linear-gradient(#000, #000) 0 var(--scallop-r) / 100% calc(100% - (var(--scallop-r) * 2)) no-repeat;
  mask:
    radial-gradient(circle at var(--scallop-r) var(--scallop-r), transparent calc(var(--scallop-r) - 0.5px), #000 var(--scallop-r)) 0 0 / calc(var(--scallop-r) * 2) var(--scallop-r) repeat-x,
    radial-gradient(circle at var(--scallop-r) 0, transparent calc(var(--scallop-r) - 0.5px), #000 var(--scallop-r)) 0 100% / calc(var(--scallop-r) * 2) var(--scallop-r) repeat-x,
    linear-gradient(#000, #000) 0 var(--scallop-r) / 100% calc(100% - (var(--scallop-r) * 2)) no-repeat;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-blue-hover);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.eyebrow__index {
  font-family: var(--font-display);
  font-size: 0.95em;
  opacity: 0.6;
}

.eyebrow--light {
  color: var(--color-gold);
}

/* Section number rail — editorial page-marker */
.section-mark {
  position: absolute;
  top: var(--space-lg);
  right: clamp(1.25rem, 4vw, 3rem);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  opacity: 0.5;
  writing-mode: vertical-rl;
}

.section-mark--light {
  color: var(--color-white);
  opacity: 0.35;
}

/* Marquee ticker */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee__track--reverse {
  animation-direction: reverse;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out-soft),
    transform var(--duration-slow) var(--ease-out-soft);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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