/* ============================================================
   BASE — reset, typography, layout primitives, utilities,
   reveal system, accessibility
   ============================================================ */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  color: var(--tx-light-1);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

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

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

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
}
h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
}
h4 {
  font-size: var(--fs-h4);
  line-height: 1.28;
}

p {
  max-width: 68ch;
  text-wrap: pretty;
}

::selection {
  background: var(--gold-deep);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 1px;
  box-shadow: 0 0 0 4px var(--focus-halo);
}

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

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

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

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

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

.section--dark {
  background: var(--ink);
  color: var(--tx-dark-1);
}

.section--ink2 {
  background: var(--ink-2);
  color: var(--tx-dark-1);
}

.section--paper {
  background: var(--paper);
  color: var(--tx-light-1);
}

.section--paper2 {
  background: var(--paper-2);
  color: var(--tx-light-1);
}

.section--flush {
  padding-block: 0;
}

/* ---- Typography utilities ---- */
.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--tx-light-2);
}

.section--dark .lead,
.section--ink2 .lead {
  color: var(--tx-dark-2);
}

.small {
  font-size: var(--fs-small);
}

.muted {
  color: var(--tx-light-2);
}

.section--dark .muted,
.section--ink2 .muted {
  color: var(--tx-dark-2);
}

.italic {
  font-style: italic;
}

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

.section--dark .gold,
.section--ink2 .gold {
  color: var(--gold);
}

/* Editorial micro label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--gold-text);
}

.section--dark .eyebrow,
.section--ink2 .eyebrow {
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow--bare::before {
  display: none;
}

/* Faceted diamond marker (from the bottle-cap motif) */
.diamond {
  display: inline-block;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold-deep);
  transform: rotate(45deg);
  flex: none;
}

.section--dark .diamond,
.section--ink2 .diamond {
  border-color: var(--gold);
}

.ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  background: var(--line-light);
  flex: 1;
}

.section--dark .ornament::before,
.section--dark .ornament::after,
.section--ink2 .ornament::before,
.section--ink2 .ornament::after {
  background: var(--line-dark);
}

/* Section intro block */
.sec-intro {
  display: grid;
  gap: var(--s5);
  margin-bottom: clamp(40px, 5vw, 72px);
}

.sec-intro .lead {
  max-width: 56ch;
}

.sec-intro--split {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: var(--s8);
}

@media (max-width: 900px) {
  .sec-intro--split {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ---- Links ---- */
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: gap var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}

.section--dark .link,
.section--ink2 .link {
  color: var(--gold);
}

.link:hover {
  gap: 14px;
  color: var(--gold-deep);
}

.link:active {
  color: var(--gold-deep);
}

.section--dark .link:hover,
.section--ink2 .link:hover {
  color: var(--gold-bright);
}

/* ---- Inline content links (Step 08): refined underline, no browser default ---- */
.link-inline {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease-out);
}

.link-inline:hover {
  color: var(--gold-text);
  text-decoration-color: var(--gold-text);
}

.section--dark .link-inline:hover,
.section--ink2 .link-inline:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .link:hover {
    gap: 10px;
  }
}

/* ---- Reveal system ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 70ms;
}
.reveal-delay-2 {
  transition-delay: 140ms;
}
.reveal-delay-3 {
  transition-delay: 210ms;
}
.reveal-delay-4 {
  transition-delay: 280ms;
}
.reveal-delay-5 {
  transition-delay: 350ms;
}

/* Hero entrance */
.hero-enter {
  opacity: 0;
  transform: translateY(26px);
  animation: hero-in var(--t-cinematic) var(--ease-out) forwards;
}

.hero-enter--d1 {
  animation-delay: 120ms;
}
.hero-enter--d2 {
  animation-delay: 240ms;
}
.hero-enter--d3 {
  animation-delay: 360ms;
}
.hero-enter--d4 {
  animation-delay: 480ms;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Skip link (a11y) ---- */
#main {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Programmatic route-focus targets only — interactive focus styles untouched */
main h1[tabindex='-1']:focus,
h1[tabindex='-1']:focus,
h2[tabindex='-1']:focus,
h3[tabindex='-1']:focus,
#main[tabindex='-1']:focus {
  outline: none;
  box-shadow: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-toast);
  padding: 12px 20px;
  background: var(--gold);
  color: var(--ink);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-enter {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---- Screen-reader only ---- */
.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;
}

