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

:root {
  --cream: #F2EDE6;
  --olive: #4A7F8B;
  --olive-light: #5E99A6;
  --terracotta: #5E8A62;
  --terracotta-light: #8BB68F;
  --brown: #3A4840;
  --brown-light: #5A6B5E;
  --text: #3A3630;
  --text-light: #6B6358;
  --white: #FFFFFF;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(74, 127, 139, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(94, 138, 98, 0.04) 0%, transparent 50%);
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ornament-line {
  width: 60px;
  height: 2px;
  background: var(--terracotta);
  margin: 1rem auto 2rem;
  border-radius: 2px;
}

.section-text {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ===== PASSWORD OVERLAY ===== */
#password-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--cream) 0%, #EBE6DF 50%, #E5E0D8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#password-overlay[hidden] {
  display: none;
}

.password-box {
  text-align: center;
  padding: 3rem 2.5rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(58, 72, 64, 0.1);
  max-width: 400px;
  width: 90%;
}

.password-ornament {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.password-box h1 {
  font-size: 1.6rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.password-box p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

#password-form input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--terracotta-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--cream);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

#password-form input:focus {
  border-color: var(--olive);
}

#password-form button {
  margin-top: 1rem;
  width: 100%;
  padding: 0.8rem;
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s;
}

#password-form button:hover {
  background: var(--olive-light);
}

.error-msg {
  color: var(--terracotta);
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* ===== NAV ===== */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(242, 237, 230, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  box-shadow: 0 1px 8px rgba(58, 72, 64, 0.08);
}

#main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}

#main-nav a {
  text-decoration: none;
  color: var(--brown);
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}

#main-nav a:hover {
  background: var(--olive);
  color: var(--white);
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(74, 127, 139, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(94, 138, 98, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 182, 143, 0.05) 0%, transparent 70%),
    linear-gradient(180deg, var(--cream) 0%, #EBE6DF 100%);
  padding: 2rem 1.5rem;
}

.hero-subtitle {
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--brown);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-date {
  font-size: 1.2rem;
  color: var(--terracotta);
  letter-spacing: 0.15em;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.countdown-item span {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--brown);
  line-height: 1;
}

.countdown-item small {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ===== CEREMONY ===== */
#ceremony {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse at 80% 80%, rgba(74, 127, 139, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--white) 0%, #EDE8E2 100%);
}

#ceremony h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--brown);
}

.ceremony-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.detail-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(74, 127, 139, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
  box-shadow: 0 4px 16px rgba(58, 72, 64, 0.06);
}

.detail-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.detail-card h3 {
  font-size: 1.3rem;
  color: var(--olive);
  margin-bottom: 0.5rem;
}

.detail-time {
  color: var(--terracotta);
  font-size: 0.95rem;
}

.detail-place {
  color: var(--text-light);
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.detail-link {
  margin-top: 1rem;
}

.detail-link a {
  color: var(--olive);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.detail-link a:hover {
  color: var(--olive-light);
}

/* ===== PROGRAM ===== */
#program {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(94, 138, 98, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #EDE8E2 0%, var(--white) 100%);
}

#program h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--brown);
}

.program-timeline {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.program-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-left: 3px solid var(--olive);
  background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 12px rgba(58, 72, 64, 0.06);
}

.program-time {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--terracotta);
  white-space: nowrap;
  min-width: 110px;
  font-weight: 700;
}

.program-desc h3 {
  font-size: 1.15rem;
  color: var(--olive);
  margin-bottom: 0.3rem;
}

.program-desc p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== CONTACT PHONES ===== */
.contact-phones {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}

.contact-phones p {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.contact-phones a {
  color: var(--olive);
  text-decoration: none;
  font-weight: 700;
}

.contact-phones a:hover {
  color: var(--olive-light);
}

/* ===== DIRECTIONS ===== */
#directions {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(74, 127, 139, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #EDE8E2 0%, var(--cream) 50%, #EBE6DF 100%);
}

#directions h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--brown);
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(58, 72, 64, 0.1);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 300px;
}

/* ===== GALLERY ===== */
#gallery {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse at 70% 70%, rgba(94, 138, 98, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--white) 0%, #F2EDE6 50%, #EDE8E2 100%);
}

#gallery h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--brown);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  aspect-ratio: 1;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(58, 72, 64, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream), #E5E0D8);
  font-size: 3rem;
  border: 1px dashed var(--terracotta-light);
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: pointer;
}

#lightbox[hidden] {
  display: none;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  cursor: default;
}

#lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ===== RSVP ===== */
#rsvp {
  padding: 5rem 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(74, 127, 139, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(94, 138, 98, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--cream) 0%, #EBE6DF 100%);
}

#rsvp h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--brown);
}

#rsvp .container {
  max-width: 560px;
  background: var(--white);
  border: 1px solid rgba(74, 127, 139, 0.2);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 0 6px 24px rgba(58, 72, 64, 0.08);
}

.form-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  font-style: italic;
}

#rsvp-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label:not(.radio-label) {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brown);
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--terracotta-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

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

.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.4rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}

.radio-label input[type="radio"] {
  accent-color: var(--olive);
}

#rsvp-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 0.5rem;
}

#rsvp-submit:hover {
  background: var(--olive-light);
}

#rsvp-submit:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}

#rsvp-success {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

#rsvp-success h3 {
  font-size: 1.5rem;
  color: var(--olive);
  margin-bottom: 0.5rem;
}

#rsvp-error {
  text-align: center;
  color: var(--terracotta);
  padding: 1rem;
  margin-top: 1rem;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, #3A4840 0%, #2C3834 100%);
  color: var(--cream);
}

footer .ornament-line {
  background: var(--terracotta-light);
  margin-bottom: 1.5rem;
}

footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-heart {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  opacity: 1 !important;
  color: var(--terracotta);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  #main-nav ul {
    gap: 0.2rem;
  }

  #main-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .countdown-item span {
    font-size: 1.8rem;
  }

  #countdown {
    gap: 1rem;
  }

  .ceremony-details {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
