/* ============================================
   NATALIE & CALVIN — WEDDING WEBSITE
   ============================================ */

:root {
  --color-bg: #FAFAF8;
  --color-text: #1a1a1a;
  --color-text-light: #555;
  --color-accent: #2c2c2c;
  --color-divider: #d4d0c8;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --max-width: 1200px;
  --section-padding: 6rem 2rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   SHARED / UTILITIES
   ============================================ */

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-padding);
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-divider);
  margin: 1rem auto 0;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ============================================
   NAVIGATION
   ============================================ */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

#nav.scrolled {
  background: rgba(250, 250, 248, 0.97);
  box-shadow: 0 1px 0 var(--color-divider);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

#nav:not(.scrolled) .nav-logo {
  color: #fff;
}

.nav-logo:hover {
  opacity: 0.7;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s ease;
}

#nav:not(.scrolled) .nav-toggle span {
  background: #fff;
}

.nav-toggle.active span {
  background: var(--color-text);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav Links — mobile first (hidden by default) */
.nav-links {
  list-style: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(250, 250, 248, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-links.open {
  opacity: 1;
  pointer-events: all;
}

.nav-links li a {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.nav-links li a:hover {
  opacity: 0.6;
}

.nav-rsvp {
  border: 1px solid var(--color-accent) !important;
  padding: 0.5rem 1.5rem !important;
  font-size: 0.85rem !important;
}

.nav-rsvp:hover {
  background: var(--color-accent);
  color: #fff !important;
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    height: auto;
    width: auto;
    background: none;
    flex-direction: row;
    gap: 2.5rem;
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li a {
    font-size: 0.85rem;
  }
}

/* On desktop with side-by-side hero, nav text should always be readable */
@media (min-width: 1024px) {
  #nav:not(.scrolled) .nav-logo {
    color: #fff;
  }

  #nav:not(.scrolled) .nav-links li a {
    color: var(--color-text);
  }

  #nav:not(.scrolled) .nav-rsvp {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
  }

  #nav:not(.scrolled) .nav-rsvp:hover {
    background: var(--color-accent);
    color: #fff !important;
  }
}

/* On smaller screens where hero is stacked, nav overlays the image */
@media (max-width: 1023px) {
  #nav:not(.scrolled) .nav-logo {
    color: #fff;
  }
}

/* ============================================
   HERO
   ============================================ */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #111;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  flex: 1 1 60vh;
  min-height: 50vh;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* Dark overlay for readability when nav overlays the image */
.hero-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  padding: 3rem 2rem 4rem;
  background: var(--color-bg);
}

.hero-names {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.hero-ampersand {
  display: block;
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin: 0.4rem 0;
  font-style: italic;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--color-divider);
  margin: 1.5rem auto;
}

.hero-date {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.4rem;
}

.hero-location {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
}

/* Desktop hero — side by side */
@media (min-width: 1024px) {
  #hero {
    flex-direction: row;
    min-height: 100vh;
  }

  .hero-image-wrapper {
    flex: 1 1 55%;
    min-height: 100vh;
  }

  .hero-content {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
  }

  .hero-names {
    font-size: 2.8rem;
  }

  .hero-ampersand {
    font-size: 1.5rem;
    margin: 0.6rem 0;
  }

  .hero-date {
    font-size: 1.1rem;
  }

  .hero-location {
    font-size: 1rem;
  }
}

/* ============================================
   INVITATION
   ============================================ */

#invitation {
  background: #fff;
}

#invitation .section-container {
  padding: 5rem 2rem;
  max-width: 800px;
}

.invitation-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.8;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 2.5rem;
  font-style: italic;
}

@media (min-width: 768px) {
  .invitation-text {
    font-size: 1.75rem;
    line-height: 1.9;
  }
}

/* ============================================
   PASSCODE GATE
   ============================================ */

#gate {
  background: var(--color-bg);
}

#gate .section-container {
  max-width: 700px;
  padding: 5rem 2rem;
}

.gate-intro {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.gate-form {
  max-width: 480px;
  margin: 0 auto;
}

.gate-input-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.gate-input {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-divider);
  border-radius: 4px;
  background: #fff;
  color: var(--color-text);
  outline: none;
  width: 220px;
  transition: border-color 0.2s;
}

.gate-input:focus {
  border-color: var(--color-accent);
}

.gate-error {
  color: #b44;
  font-size: 0.9rem;
  margin-top: 1rem;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.4s ease;
}

/* Locked state: hide all protected content until the code is entered */
body.locked #details,
body.locked #things-to-do,
body.locked #faq,
body.locked #gallery,
body.locked #registry,
body.locked #rsvp,
body.locked #footer,
body.locked .nav-links,
body.locked .nav-toggle {
  display: none !important;
}

/* Unlocked state: hide the gate section */
body:not(.locked) #gate {
  display: none;
}

/* Locked state: hide the invitation RSVP button too */
body.locked .rsvp-cta {
  display: none !important;
}

/* ============================================
   WEDDING DETAILS
   ============================================ */

#details {
  background: var(--color-bg);
}

.details-photo {
  max-width: 700px;
  margin: 0 auto 3rem;
  overflow: hidden;
  border-radius: 4px;
}

.details-photo img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .details-photo img {
    height: 450px;
  }
}

.details-intro {
  max-width: 650px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .details-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.details-card {
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--color-divider);
  border-radius: 4px;
  background: #fff;
}

.details-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.details-time {
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.details-venue {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.details-address {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.details-address-sub {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ============================================
   DETAILS MAP (walking directions)
   ============================================ */

.details-map {
  max-width: 800px;
  margin: 4rem auto 0;
}

.details-map-caption {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.details-map iframe {
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* ============================================
   THINGS TO DO
   ============================================ */

#things-to-do {
  background: #fff;
}

.things-intro {
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  color: var(--color-text-light);
  line-height: 1.85;
}

.things-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 850px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .things-list {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.thing-card {
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: 4px;
  padding: 1.75rem 1.75rem;
  text-align: left;
}

.thing-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.thing-card p {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--color-text-light);
}

/* ============================================
   FAQ (accordion)
   ============================================ */

#faq {
  background: var(--color-bg);
}

#faq .section-container {
  max-width: 780px;
}

.faq-list {
  margin-top: 1rem;
  text-align: left;
  border-top: 1px solid var(--color-divider);
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}

.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 2rem 1.4rem 0.25rem;
  position: relative;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary:hover {
  color: var(--color-text-light);
}

.faq-item > summary::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
  transform: translateY(-75%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-item[open] > summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq-body {
  padding: 0 0.25rem 1.5rem;
}

.faq-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-light);
  margin-bottom: 0.85rem;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

.faq-body p strong {
  color: var(--color-text);
  font-weight: 500;
}

.faq-subheading {
  font-weight: 500 !important;
  color: var(--color-text) !important;
  margin-top: 0.25rem !important;
  margin-bottom: 0.6rem !important;
}

/* Simple bullet list for multi-point answers */
.faq-bullets {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.9rem;
}

.faq-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-light);
  margin-bottom: 0.55rem;
}

.faq-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 5px;
  height: 1px;
  background: var(--color-text-light);
}

.faq-bullets li strong {
  color: var(--color-text);
  font-weight: 500;
}

/* Accommodation list - named rows with optional link */
.faq-accom {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  display: grid;
  gap: 1rem;
}

.faq-accom li {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--color-divider);
  border-radius: 4px;
}

.faq-accom-name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.faq-accom-desc {
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--color-text-light);
}

.faq-accom-link {
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  word-break: break-word;
}

.faq-accom-link:hover {
  opacity: 0.65;
}

/* ============================================
   GALLERY
   ============================================ */

#gallery {
  background: var(--color-bg);
}

#gallery .section-container {
  padding: 5rem 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    gap: 1rem;
  }
}

.gallery-item {
  overflow: hidden;
  border-radius: 3px;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

@media (min-width: 768px) {
  .gallery-item img {
    height: 300px;
  }
}

@media (min-width: 1024px) {
  .gallery-item img {
    height: 350px;
  }
}

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}


/* ============================================
   REGISTRY / HONEYMOON FUND
   ============================================ */

#registry {
  background: #fff;
}

#registry .section-container {
  max-width: 750px;
}

.registry-photo {
  width: 280px;
  height: 280px;
  margin: 0 auto 2.5rem;
  border-radius: 50%;
  overflow: hidden;
}

.registry-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .registry-photo {
    width: 340px;
    height: 340px;
  }
}

.registry-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 2.5rem;
  font-style: italic;
}

@media (min-width: 768px) {
  .registry-text {
    font-size: 1.35rem;
  }
}

.registry-link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.registry-link:hover,
.registry-link:focus {
  color: var(--color-accent, var(--color-text-light));
}

.registry-signoff {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--color-text-light);
  margin-top: 1.5rem;
}

/* ============================================
   RSVP
   ============================================ */

#rsvp {
  background: var(--color-bg);
}

#rsvp .section-container {
  max-width: 900px;
}

.rsvp-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
}

.rsvp-form-container {
  max-width: 760px;
  margin: 0 auto;
}

.rsvp-form iframe {
  border-radius: 8px;
  display: block;
  width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */

#footer {
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
}

.footer-container {
  text-align: center;
  padding: 3.5rem 2rem;
}

.footer-names {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.footer-date {
  font-size: 0.9rem;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}

.footer-hearts {
  font-size: 0.85rem;
  color: var(--color-divider);
  letter-spacing: 0.25em;
}

/* ============================================
   SECTION DIVIDERS (between sections)
   ============================================ */

#invitation,
#details,
#things-to-do,
#faq,
#gallery,
#registry,
#rsvp {
  position: relative;
}

/* Thin divider between alternating sections */
#details::before,
#things-to-do::before,
#faq::before,
#gallery::before,
#registry::before,
#rsvp::before {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background: var(--color-divider);
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
