/* Reset + typography + layout primitives. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ────────────────────────────────────────────────────────────────
   Print — readable confirmation slip on paper
   ──────────────────────────────────────────────────────────────── */
@media print {
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  body::before { display: none !important; }
  .nav, .footer, .hero__cue, .toast, .skip-link,
  .confirm__actions, [data-newsletter] {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline;
  }
  /* Make the confirmation slip print on one page nicely */
  .confirm {
    page-break-inside: avoid;
    color: #000 !important;
    border: 1px solid #000 !important;
  }
  .confirm__mark {
    border-color: #000 !important;
    color: #000 !important;
  }
  .confirm__reference,
  .book-summary__total,
  .total span:last-child {
    color: #000 !important;
  }
  /* Hide background images that would otherwise print ugly */
  .hero__bg, .detail-hero__bg, .error-hero::before {
    display: none !important;
  }
}

/* Skip-to-content link — keyboard a11y. Visible only when focused. */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
/* main itself shouldn't show focus outline when targeted by skip-link */
main:focus,
main:focus-visible {
  outline: none;
}

* {
  margin: 0;
  padding: 0;
}

html {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 169, 97, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(140, 58, 46, 0.05), transparent 70%),
    var(--ink);
  overflow-x: hidden;
  position: relative;
}

/* Subtle film grain over the whole site — a single fixed layer, no requests */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 220px 220px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  z-index: 50;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* ---------- Typography ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: var(--ls-mono);
  color: var(--gold);
  font-weight: 500;
}

/* Editorial line + label pattern: hairline gold rule before the text. */
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.7;
}

.eyebrow--plain::before { display: none; }

.eyebrow--dim {
  color: var(--dim-2);
}

/* Big section index — "01" / "02" — sits above the eyebrow. */
.section-index {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.04em;
  margin-bottom: var(--s-3);
  opacity: 0.95;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--bone);
}

.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--bone);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--bone-2);
  max-width: 64ch;
}

.lede {
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  color: var(--bone);
  font-weight: 300;
  letter-spacing: -0.005em;
  max-width: 56ch;
}

.dim     { color: var(--dim); }
.dim-2   { color: var(--dim-2); }
.mute    { color: var(--mute); }

.serif   { font-family: var(--font-display); }
.mono    { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ---------- Layout helpers ---------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--s-9);
}

.section--tight {
  padding-block: var(--s-7);
}

.divider {
  border-top: 1px solid var(--line);
  margin: 0;
  position: relative;
}

/* Hairline section break with a subtle gold rivet in the middle. */
.divider--bullet::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}

.divider-gold {
  width: 48px;
  height: 1px;
  background: var(--gold);
  border: 0;
}

/* Decorative gold rule that sweeps in on view. */
.rule-sweep {
  position: relative;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.rule-sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  transform: translateX(-100%);
  animation: rule-sweep 2400ms var(--ease) 200ms both;
}
@keyframes rule-sweep {
  to { transform: translateX(100%); }
}

/* Grid */
.grid {
  display: grid;
  gap: var(--s-5);
}

@media (min-width: 720px) {
  .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Section heading pattern: index + eyebrow + display title + optional link */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
  flex-wrap: wrap;
  position: relative;
}

.section-head__title h2 {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  margin-top: var(--s-3);
  max-width: 18ch;
}

.section-head__title h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-transform: uppercase;
  letter-spacing: var(--ls-mono);
  color: var(--dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.section-head__link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.section-head__link svg {
  width: 14px;
  height: 14px;
}

/* Loading + empty states */
.skeleton {
  background: var(--ink-2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

.empty-state {
  text-align: center;
  padding: var(--s-9) var(--s-5);
  color: var(--dim);
}
.empty-state h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--s-3);
}

/* Fade-up on scroll (initial state) */
.fx-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.fx-up.is-in {
  opacity: 1;
  transform: none;
}
.fx-up--delay-1 { transition-delay: 80ms; }
.fx-up--delay-2 { transition-delay: 160ms; }
.fx-up--delay-3 { transition-delay: 240ms; }
.fx-up--delay-4 { transition-delay: 320ms; }

/* Curtain reveal: a slow horizontal mask wipe.
   Better than fade for big hero text. */
.fx-curtain {
  display: inline-block;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1200ms var(--ease-in-out);
}
.fx-curtain.is-in {
  clip-path: inset(0 0 0 0);
}

/* Visually hidden but accessible */
.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;
}
