:root {
  color-scheme: light;
  --text-color: #ffffff;
  --scrim-top: rgba(0, 0, 0, 0.15);
  --scrim-bottom: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: var(--text-color);
  overflow: hidden;
}

/* Background image layers. .bg-base paints immediately with a single
   fallback photo (fast first paint, and what's shown if JS fails or no
   images are configured for the current orientation). .bg-picked sits on
   top and crossfades in once js/background-picker.js has chosen and
   preloaded an orientation-matched photo from js/backgrounds.js. */
.bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.bg-base {
  background-image: url("/assets/background.jpg");
}

.bg-picked {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.bg-picked.is-visible {
  opacity: 1;
}

/* Gentle gradient so text stays legible over any photo */
.scrim {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--scrim-top) 0%,
    transparent 35%,
    transparent 60%,
    var(--scrim-bottom) 100%
  );
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.9;
}

.names {
  margin: 0;
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.date {
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  letter-spacing: 0.08em;
  font-weight: 400;
}

.tagline {
  margin: 0.5rem 0 0;
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  font-weight: 400;
  opacity: 0.85;
  max-width: 32ch;
}

.footer {
  position: fixed;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.footer p {
  margin: 0;
}

/* Loading state: fields start empty (see index.html) and fade in once
   main.js populates them, avoiding a flash of unstyled/empty text. */
[data-field] {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.is-ready [data-field] {
  opacity: 1;
  transform: translateY(0);
}
