/* ============ DESIGN TOKENS ============ */
:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1180px;

  --font-display: 'Cormorant', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* ---- Warm cream + Golden Gate terracotta palette ---- */
:root,
[data-theme='light'] {
  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-surface-offset: #f2ede3;
  --color-surface-offset-2: #ece3d3;
  --color-divider: #e6ddc9;
  --color-border: #ddd0b6;

  --color-text: #2b2621;
  --color-text-muted: #7c7263;
  --color-text-faint: #b3a793;
  --color-text-inverse: #faf7f2;

  --color-primary: #a84a2a;
  --color-primary-hover: #8a3b20;
  --color-primary-active: #6f2f19;
  --color-primary-highlight: #f0dccb;

  --shadow-sm: 0 1px 3px oklch(0.2 0.02 40 / 0.08);
  --shadow-md: 0 8px 24px oklch(0.2 0.02 40 / 0.1);
  --shadow-lg: 0 20px 48px oklch(0.2 0.02 40 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #1c1815;
  --color-surface: #221e1a;
  --color-surface-offset: #292420;
  --color-surface-offset-2: #322b25;
  --color-divider: #3a332b;
  --color-border: #453d33;

  --color-text: #ece3d5;
  --color-text-muted: #a89c89;
  --color-text-faint: #6f6455;
  --color-text-inverse: #221e1a;

  --color-primary: #dd8259;
  --color-primary-hover: #e89a75;
  --color-primary-active: #f0af92;
  --color-primary-highlight: #4a3729;

  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg: #1c1815;
    --color-surface: #221e1a;
    --color-surface-offset: #292420;
    --color-surface-offset-2: #322b25;
    --color-divider: #3a332b;
    --color-border: #453d33;
    --color-text: #ece3d5;
    --color-text-muted: #a89c89;
    --color-text-faint: #6f6455;
    --color-text-inverse: #221e1a;
    --color-primary: #dd8259;
    --color-primary-hover: #e89a75;
    --color-primary-active: #f0af92;
    --color-primary-highlight: #4a3729;
  }
}

/* ============ LAYOUT HELPERS ============ */
.wrap {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-12));
}
.wrap--narrow {
  max-width: var(--content-narrow);
}
section {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) clamp(var(--space-5), 5vw, var(--space-12));
  transition:
    background var(--transition-interactive),
    box-shadow var(--transition-interactive),
    color var(--transition-interactive);
  color: #fff;
}
.site-header.is-scrolled {
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

.monogram {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
}
.monogram svg {
  width: 34px;
  height: 34px;
}
.monogram span {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid oklch(from currentColor l c h / 0.25);
  color: inherit;
}
.theme-toggle:hover {
  background: oklch(from currentColor l c h / 0.1);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 14% 0%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(0.15 0.02 40 / 0.72) 0%,
    oklch(0.15 0.02 40 / 0.28) 45%,
    oklch(0.15 0.02 40 / 0.35) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: var(--space-16) clamp(var(--space-5), 5vw, var(--space-12)) var(--space-20);
}
.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: oklch(0.95 0.02 60);
  opacity: 0.9;
  margin-bottom: var(--space-4);
}
.hero__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-hero);
  line-height: 1.05;
  margin-bottom: var(--space-5);
}
.hero__names em {
  font-style: italic;
  font-weight: 400;
  color: oklch(0.88 0.05 55);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-base);
  letter-spacing: 0.03em;
}
.hero__meta .dot {
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: currentColor;
  opacity: 0.6;
}
.hero__scroll {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: #fff;
  opacity: 0.85;
}
.hero__scroll svg {
  width: 16px;
  height: 16px;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* Desktop: anchor hero text to the top (over open sky/bridge) instead of the
   bottom, so it never overlaps the couple lower in the frame. */
@media (min-width: 801px) {
  .hero {
    align-items: flex-start;
  }
  .hero__content {
    padding-top: clamp(7.5rem, 6rem + 4vw, 9.5rem);
    padding-bottom: var(--space-16);
  }
  .hero__overlay {
    background: linear-gradient(
      to bottom,
      oklch(0.15 0.02 40 / 0.62) 0%,
      oklch(0.15 0.02 40 / 0.22) 32%,
      oklch(0.15 0.02 40 / 0.08) 55%,
      oklch(0.15 0.02 40 / 0.32) 100%
    );
  }
}

/* ============ INTRO ============ */
.intro {
  text-align: center;
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}
.intro p {
  margin-inline: auto;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42ch;
}

/* ============ COUNTDOWN ============ */
.countdown {
  background: var(--color-surface-offset);
  text-align: center;
}
.countdown h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}
.countdown .sub {
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  font-size: var(--text-base);
}
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(var(--space-3), 3vw, var(--space-8));
  max-width: 640px;
  margin: 0 auto var(--space-10);
}
.countdown__unit {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(var(--space-4), 3vw, var(--space-6)) var(--space-2);
  box-shadow: var(--shadow-sm);
}
.countdown__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
}
.countdown__label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}
.countdown__place {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}

/* ============ GALLERY ============ */
.gallery__head {
  text-align: center;
  margin-bottom: clamp(var(--space-8), 6vw, var(--space-16));
}
.gallery__head h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-top: var(--space-3);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(220px, 34vw)) minmax(200px, 30vw);
  gap: var(--space-3);
}
.gallery__grid a,
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  display: block;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery__item:hover img {
  transform: scale(1.04);
}
.gallery__item--a {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.gallery__item--b {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}
.gallery__item--c {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}
.gallery__item--d {
  grid-column: 4 / 5;
  grid-row: 2 / 3;
}
.gallery__item--e {
  grid-column: 1 / 3;
  grid-row: 3 / 4;
}
.gallery__item--f {
  grid-column: 3 / 5;
  grid-row: 3 / 4;
}

@media (max-width: 800px) {
  .site-header {
    background: oklch(from var(--color-bg) l c h / 0.92);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
  }
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    height: auto;
    color: var(--color-text);
    background: var(--color-bg);
    overflow: visible;
  }
  .hero__overlay {
    display: none;
  }
  .hero__bg {
    order: 2;
    position: relative;
    inset: auto;
    width: calc(100% - var(--space-10));
    max-width: 420px;
    height: auto;
    object-fit: contain;
    transform: none;
    margin: var(--space-2) auto var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: block;
  }
  .hero__content {
    order: 1;
    position: relative;
    padding: calc(var(--space-16) + var(--space-6)) var(--space-5) 0;
  }
  .hero__eyebrow {
    color: var(--color-primary);
    opacity: 1;
  }
  .hero__names em {
    color: var(--color-primary);
  }
  .hero__meta {
    color: var(--color-text-muted);
  }
  .hero__scroll {
    order: 3;
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    color: var(--color-primary);
    opacity: 1;
    margin: 0 auto var(--space-12);
  }
  .gallery__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: var(--space-5);
  }
  .gallery__item img {
    height: auto;
  }
  .gallery__item--a {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1179 / 1080;
  }
  .gallery__item--b {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1080 / 1834;
  }
  .gallery__item--c {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1080 / 1242;
  }
  .gallery__item--d {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1600 / 1075;
  }
  .gallery__item--e {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1600 / 1045;
  }
  .gallery__item--f {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 1080 / 1804;
  }
}

/* ============ DETAILS ============ */
.details {
  background: var(--color-surface-offset);
}
.details__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: start;
}
.details__card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}
.details__row {
  display: flex;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.details__row:last-child {
  border-bottom: none;
}
.details__row svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.details__row .label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}
.details__row .value {
  font-size: var(--text-base);
}
.details__note {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 5vw, var(--space-10));
  box-shadow: var(--shadow-sm);
}
.details__note h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}
.details__note p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;
  border: 1.5px solid var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 760px) {
  .details__grid {
    grid-template-columns: 1fr;
  }
}

/* ============ FOOTER ============ */
.site-footer {
  text-align: center;
  padding-block: clamp(var(--space-12), 8vw, var(--space-20));
  border-top: 1px solid var(--color-divider);
}
.site-footer .monogram {
  justify-content: center;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.site-footer p {
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  margin-inline: auto;
}

/* ============ ANIMATION: SCROLL REVEAL ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
