/* Reset, typography and the small shared primitives (container, buttons, image slots). */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* "clip" hides sideways overflow without making <body> a scroll container.
     "hidden" did, which broke the sticky header whenever the menu locked scrolling. */
  overflow-x: hidden;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  text-wrap: balance;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

/* ---------- helpers ---------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: calc(var(--z-drawer) + 1);
  padding: 10px 16px;
  background: var(--c-ink);
  color: var(--c-on-deep);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accent {
  color: var(--c-accent);
}

/* ---------- section scaffolding ---------- */
.section {
  padding-block: var(--section-y);
}

.section--panel {
  background: var(--c-panel);
}

.section-head {
  max-width: 1240px;
  margin-inline: auto;
  text-align: center;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-title--sm {
  font-size: var(--fs-h2-sm);
}

.section-kicker {
  margin-top: 12px;
  color: var(--c-accent);
  font-size: var(--fs-lead);
}

.section-lead {
  margin-top: 20px;
  color: var(--c-ink-2);
  font-size: var(--fs-lead);
  line-height: 1.4;
}

.section-lead--narrow {
  max-width: 62ch;
  margin-inline: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.eyebrow {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--c-ink);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 26px;
  border: 2px solid var(--c-accent);
  border-radius: var(--radius-pill);
  color: var(--c-accent);
  font-size: 1.0625rem;
  line-height: 1.2;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn__dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-on-deep);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn__dot .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.btn:hover {
  background: var(--c-accent);
  color: var(--c-on-deep);
}

.btn:hover .btn__dot {
  background: var(--c-on-deep);
  color: var(--c-accent);
}

.btn:active {
  transform: scale(0.98);
}

.btn--solid {
  background: var(--c-accent);
  color: var(--c-on-deep);
}

.btn--solid .btn__dot {
  background: var(--c-on-deep);
  color: var(--c-accent);
}

.btn--solid:hover {
  background: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
}

.btn--light {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--c-on-deep);
}

.btn--light .btn__dot {
  background: var(--c-on-deep);
  color: var(--c-ink);
}

.btn--light:hover {
  background: var(--c-on-deep);
  color: var(--c-ink);
}

.btn--light:hover .btn__dot {
  background: var(--c-ink);
  color: var(--c-on-deep);
}

.btn--sm {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 0.9375rem;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-on-deep);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.round-btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.round-btn:hover {
  background: var(--c-accent-dark);
}

.round-btn:active {
  transform: scale(0.94);
}

.round-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.round-btn--soft {
  background: var(--c-accent-tint);
  color: var(--c-accent);
}

a:hover > .round-btn--soft,
.round-btn--soft:hover {
  background: var(--c-accent);
  color: var(--c-on-deep);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-accent);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease);
}

a:hover .text-link .icon,
.text-link:hover .icon {
  transform: translateX(4px);
}

/* ---------- image slots ----------
   Each slot shows a labelled placeholder until the real file exists at the
   path in its <img src>. Drop the file in and the placeholder disappears. */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: #ece7e1;
  background-image: repeating-linear-gradient(135deg, rgba(28, 23, 21, 0.045) 0 1px, transparent 1px 14px);
  aspect-ratio: var(--ratio, 4 / 3);
}

.media--dark {
  background-color: #2b2320;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 14px);
}

.media--fill {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: 0;
}

.media.is-missing img {
  display: none;
}

.media__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.media__label b {
  color: var(--c-accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.media--dark .media__label {
  color: var(--c-on-deep-muted);
}

.media--dark .media__label b {
  color: var(--c-gold-light);
}

/* ---------- reveal on scroll (only when JS is running) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
