/* ============================================================
   BASE — Design tokens, reset, type scale, layout utilities
   ============================================================ */

/* ---- Fonts ---- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-300italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-400italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}

/* ---- Design Tokens ---- */
:root {
  /* Palette */
  --color-bg:        #F9F7F4;
  --color-ink:       #1A1A18;
  --color-ink-muted: #6B6860;
  --color-ink-faint: #A8A49E;
  --color-accent:    #C8A882;
  --color-surface:   #FFFFFF;
  --color-border:    #E4E0DA;
  --color-brand:     var(--color-accent);

  /* Typography */
  --font-serif:       'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:        'Inter', system-ui, -apple-system, sans-serif;
  --font-size-xs:     0.75rem;
  --font-size-sm:     0.875rem;
  --font-size-base:   1rem;
  --font-size-lg:     1.25rem;
  --font-size-xl:     1.5rem;
  --font-size-2xl:    2.25rem;
  --font-size-3xl:    3.5rem;
  --font-size-4xl:    5rem;
  --line-height:      1.65;
  --line-height-tight: 1.2;
  --letter-spacing-wide: 0.12em;
  --letter-spacing-wider: 0.18em;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;
  --space-2xl: 12rem;

  /* Layout */
  --content-width:   1160px;
  --content-narrow:  720px;
  --content-wide:    1400px;
  --radius-sm:       2px;
  --radius-md:       4px;

  /* Motion */
  --transition-base: 240ms ease;
  --transition-slow: 480ms ease;
  --transition-fast: 120ms ease;

  /* Z-index */
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

/* ---- Type Scale ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: var(--line-height-tight);
  color: var(--color-ink);
}

h1 { font-size: clamp(2.5rem, 6vw, var(--font-size-4xl)); }
h2 { font-size: clamp(1.75rem, 4vw, var(--font-size-3xl)); }
h3 { font-size: clamp(1.25rem, 2.5vw, var(--font-size-2xl)); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); font-family: var(--font-sans); font-weight: 500; }

p {
  max-width: 68ch;
  margin-bottom: var(--space-sm);
}
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--color-ink-muted);
}

/* ---- Layout Utilities ---- */
.container {
  width: min(100% - 3rem, var(--content-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 3rem, var(--content-narrow));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 3rem, var(--content-wide));
  margin-inline: auto;
}

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

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

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.text-center { text-align: center; }
.text-center p { margin-inline: auto; }

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

/* ---- Divider ---- */
.divider {
  width: 40px;
  height: 1px;
  background: var(--color-brand);
  margin-block: var(--space-md);
  position: relative;
  overflow: hidden;
}

/* Iridescent heartbeat — a wave passes through every ~11s. The room transmitting. */
.divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #C8A882 30%,
    #1E6B5C 50%,
    #5C3A7A 70%,
    transparent 100%
  );
  transform: translateX(-100%);
  opacity: 0;
  animation: bh-freq-divider-sweep 11s ease-in-out infinite;
  animation-delay: 4s;
  pointer-events: none;
}

.divider--center {
  margin-inline: auto;
}
