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

:root {
  --blue: #7AAFC4;
  --blue-deep: #4A7A94;
  --blue-pale: #B8D6E3;
  --cream: #FAF7F2;
  --blush: #F0EBE3;
  --white: #FFFFFF;
  --charcoal: #2C2C2C;
  --text: #4A4A4A;
  --border-white: rgba(255, 255, 255, 0.72);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  padding: 1rem 1.5rem;
  background: rgba(74, 122, 148, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

nav a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.25s;
}
nav a:hover { opacity: 1; }

@media (max-width: 480px) {
  nav { gap: 1.2rem; font-size: 0.6rem; letter-spacing: 0.15em; }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  background: var(--blue);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0.12;
  filter: grayscale(100%);
}

.hero-frame {
  position: relative;
  width: min(500px, 88vw);
  padding: 3.5rem 2.5rem 3rem;
  text-align: center;
  color: var(--white);
}

.hero-frame::before,
.hero-frame::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.hero-frame::before {
  inset: 0;
  border: 2.5px solid var(--border-white);
}
.hero-frame::after {
  inset: 9px;
  border: 1px solid var(--border-white);
}

.hero-name {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(4.2rem, 16vw, 7rem);
  line-height: 0.9;
  font-weight: 400;
}

.hero-and {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin: 0.7rem 0 0.5rem;
  opacity: 0.88;
}

.hero-tagline {
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  opacity: 0.8;
}

.hero-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  margin-top: 2rem;
}

.hero-location {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(1.2rem, 3.8vw, 1.6rem);
  margin-top: 0.4rem;
  opacity: 0.88;
}

/* ── PHOTO BAND ── */
.photo-band {
  width: 100%;
  height: clamp(280px, 50vw, 480px);
  overflow: hidden;
}

.photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* ── SECTIONS ── */
.section {
  padding: 5rem 2rem;
  text-align: center;
}

.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section--blue { background: var(--blue); }

.section-eyebrow {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--charcoal);
  margin-bottom: 2.5rem;
}

.section--blue .section-eyebrow { color: rgba(255, 255, 255, 0.65); }
.section--blue .section-title { color: var(--white); }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  color: var(--blue-pale);
}
.divider::before,
.divider::after {
  content: '';
  width: 60px;
  height: 1px;
  background: currentColor;
}

/* ── COUNTDOWN ── */
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.countdown-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--blue);
  min-width: 2.5ch;
  text-align: center;
}

.countdown-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue-deep);
  opacity: 0.6;
}

/* ── DETAILS ── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto;
}

.detail-card {
  padding: 2.2rem 1.8rem;
  border-top: 2px solid var(--blue);
  background: var(--white);
}

.section--white .detail-card {
  background: var(--cream);
}

.detail-type {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 0.8rem;
}

.detail-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.detail-info {
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text);
}

.detail-info em {
  color: var(--blue-deep);
  font-style: italic;
}

/* ── GALLERY ── */
.gallery-masonry {
  max-width: 1000px;
  margin: 0 auto;
  columns: 3;
  column-gap: 0.6rem;
}

.gallery-photo {
  break-inside: avoid;
  margin-bottom: 0.6rem;
  overflow: hidden;
  cursor: pointer;
  border-radius: 1px;
}

.gallery-photo img {
  width: 100%;
  height: auto;
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.gallery-photo:hover img {
  transform: scale(1.03);
  opacity: 0.92;
}

@media (max-width: 800px) {
  .gallery-masonry { columns: 2; }
}

@media (max-width: 480px) {
  .gallery-masonry { columns: 2; column-gap: 0.4rem; }
  .gallery-photo { margin-bottom: 0.4rem; }
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}
.lightbox-close:hover { color: white; }

/* ── RSVP ── */
.rsvp-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--charcoal);
  border: none;
  border-bottom: 1.5px solid var(--blue-pale);
  background: transparent;
  padding: 0.6rem 0.2rem;
  outline: none;
  border-radius: 0;
  transition: border-color 0.25s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--blue);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #C0B8AE;
}

.form-group select {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237AAFC4'/%3E%3C/svg%3E") no-repeat right 0.4rem center;
  background-size: 10px;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.6rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  border: 1.5px solid var(--blue-pale);
  padding: 0.6rem 0.6rem;
  border-radius: 2px;
}
.form-group textarea:focus {
  border-color: var(--blue);
}

.btn-submit {
  font-family: 'Raleway', sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  border: none;
  padding: 0.95rem 2.5rem;
  cursor: pointer;
  transition: background 0.25s;
  align-self: center;
  margin-top: 0.5rem;
}
.btn-submit:hover { background: var(--blue-deep); }

.rsvp-note {
  text-align: center;
  font-size: 0.75rem;
  color: #B0A898;
  margin-top: 0.3rem;
  font-style: italic;
}

.form-message {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.form-message p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--blue-deep);
}

.form-message.visible { display: block; }

/* ── FOOTER ── */
footer {
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 3rem 2rem;
}

.footer-names {
  font-family: 'Pinyon Script', cursive;
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

footer p {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── FADE-IN ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
