/* ============================================================
   MAIN.CSS — Design tokens, reset, typography, utilities
   All section-specific styles live in save-the-date.css
   Breakpoints live in responsive.css
============================================================ */

/* ── Design tokens ───────────────────────────────────────── */
:root {
  /* Palette — sea & sand: warm ivory, ocean teal, sandy amber */
  --clr-bg:             #FAF6EE;  /* warm ivory sand */
  --clr-bg-alt:         #F0E6D4;  /* sun-dried sand */
  --clr-surface:        #E4D5C0;  /* dry sand */
  --clr-border:         #C8AA80;  /* warm tan */
  --clr-gold:           #B8835A;  /* driftwood amber */
  --clr-gold-light:     #CCA070;  /* sun-bleached amber */
  --clr-gold-dark:      #9A6040;  /* deep driftwood */
  --clr-text:           #1B4D5C;  /* deep ocean teal */
  --clr-text-secondary: #3D7A88;  /* mid ocean */
  --clr-text-muted:     #7AAAB4;  /* seafoam */
  --clr-white:          #FFFFFF;
  --clr-dark:           #0F3040;  /* deep sea navy */

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 760px;
  --section-py: var(--sp-24);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast: 180ms;
  --dur-base: 360ms;
  --dur-slow: 640ms;
  --dur-xslow: 1000ms;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

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

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

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

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

/* ── Typography ──────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--clr-text);
}

/* Eyebrow label above headings */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: var(--sp-3);
}

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

/* Primary section heading */
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  color: var(--clr-text);
  margin-bottom: var(--sp-12);
  letter-spacing: -0.01em;
}

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

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

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

/* ── Shared badge ────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-gold);
  border: 1px solid var(--clr-gold-light);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 2px;
  margin-top: var(--sp-6);
}

/* ── Shared button ───────────────────────────────────────── */
/* Uncomment and expand when RSVP is added */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--radius-sm);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--clr-gold);
  color: var(--clr-white);
  border: 1px solid var(--clr-gold);
}

.btn--primary:hover {
  background: var(--clr-gold-dark);
  border-color: var(--clr-gold-dark);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--clr-gold);
  border: 1px solid var(--clr-gold);
}

.btn--outline:hover {
  background: var(--clr-gold);
  color: var(--clr-white);
}

/* ── Scroll animation base states ───────────────────────── */
/* Elements start invisible; main.js adds .is-visible via IntersectionObserver */
[data-animate='fade-up'] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

[data-animate='fade-up'].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cascade delays declared in HTML via data-delay="N" (ms) */
[data-delay='100'] {
  transition-delay: 100ms;
}
[data-delay='150'] {
  transition-delay: 150ms;
}
[data-delay='200'] {
  transition-delay: 200ms;
}
[data-delay='250'] {
  transition-delay: 250ms;
}
[data-delay='300'] {
  transition-delay: 300ms;
}
[data-delay='350'] {
  transition-delay: 350ms;
}
[data-delay='400'] {
  transition-delay: 400ms;
}

/* ── Focus styles (accessibility) ───────────────────────── */
:focus-visible {
  outline: 2px solid var(--clr-gold);
  outline-offset: 3px;
}

/* ── Selection color ─────────────────────────────────────── */
::selection {
  background: var(--clr-gold-light);
  color: var(--clr-dark);
}
