@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=Caveat:wght@500;600&display=swap');

:root {
  --bg: #faf7f2;
  --ink: #2e2a26;
  --accent: #a98467;
  --accent-light: #e9dfd2;
  --line: #d8cdbe;
  --error: #b3413f;
  --heading-font: "Playfair Display", "Georgia", serif;
  --body-font: "Cormorant Garamond", "Georgia", serif;
  --script-font: "Caveat", "Cormorant Garamond", cursive;
}

/* Per-section accent themes — applied via a class on a <section> wrapper.
   CSS variables cascade to all descendants, so existing components (h2, .timeline-dot, etc.) just work. */
.theme-story    { --accent: #b97a7a; --accent-light: #f1dede; }
.theme-photos   { --accent: #c17a4e; --accent-light: #f1ddc9; }
.theme-dress    { --accent: #8a6a93; --accent-light: #e6dbea; }
.theme-travel   { --accent: #6f8f6a; --accent-light: #dbe8d6; }
.theme-things   { --accent: #b8923a; --accent-light: #f0e2bf; }
.theme-qa       { --accent: #5f80a0; --accent-light: #d9e4ed; }
.theme-registry { --accent: #b08a3e; --accent-light: #efe2c2; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 1.15rem;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.content-section {
  max-width: 880px;
  margin: 0 auto;
  padding: 70px 24px 90px;
  scroll-margin-top: 90px;
}

.section-title {
  font-size: 2.1rem;
  text-align: center;
  color: var(--accent);
  margin: 0 0 36px;
}

/* Decorative divider shown at the top of each section */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 8px;
  max-width: 360px;
}

.section-divider .divider-line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-light) 30%, var(--accent-light) 70%, transparent);
}

.section-divider .divider-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.section-divider .divider-icon svg { width: 100%; height: 100%; display: block; }

@keyframes divider-pop {
  from { transform: scale(0.6) rotate(-12deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.content-section:hover .divider-icon svg,
.section-divider .divider-icon svg {
  animation: divider-pop 0.5s ease-out;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.couple-names {
  font-family: var(--heading-font);
  text-align: center;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 0 4px;
}

h2, h3 { font-family: var(--heading-font); }

.subtitle {
  text-align: center;
  color: #6b6258;
  margin: 0 0 40px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}

.login-card { max-width: 420px; margin: 0 auto; }

label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: #54493e; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 18px;
  background: #fff;
}

button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

button:hover { background: #8f6d50; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.error-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: -10px;
  margin-bottom: 16px;
  min-height: 1em;
}

.day-block { margin-bottom: 44px; }

.day-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #c9a079);
  padding: 5px 16px;
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.event-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--accent-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-row:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.event-icon {
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1;
}

.event-time {
  flex: 0 0 78px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--heading-font);
  font-size: 0.9rem;
}

.event-title { font-weight: bold; font-size: 1.1rem; }
.event-location { color: #6b6258; font-size: 0.95rem; }
.event-note { color: #9c8e82; font-size: 0.85rem; margin-top: 4px; line-height: 1.5; }
.event-venue { font-size: 0.95rem; font-weight: 600; color: var(--accent); margin-top: 2px; }
.event-map-link { font-size: 0.78rem; color: var(--accent); text-decoration: none; margin-left: 6px; font-weight: 600; }
.event-map-link:hover { text-decoration: underline; }

.greeting {
  text-align: center;
  margin-bottom: 32px;
  font-style: italic;
}

.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px 24px;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(4px);
  box-sizing: border-box;
}

.nav-wrapper.nav-inset { padding-top: 26px; }

.nav-wrapper a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--heading-font);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-link-icon { font-size: 1rem; }

.nav-wrapper a:hover {
  transform: translateY(-2px) scale(1.04);
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.nav-wrapper a.active {
  background: linear-gradient(135deg, var(--accent), #c9a079);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.45)),
    url("../assets/hero-bg.jpg?v=2"),
    linear-gradient(160deg, #d9c4a8 0%, #c9ad8c 45%, #a98467 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  margin-bottom: 0;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  padding: 24px;
  animation: hero-fade-in 1.1s ease-out;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-banner .couple-names {
  color: #fff;
  font-size: 4rem;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.hero-divider {
  width: 70px;
  height: 1px;
  background: rgba(255,255,255,0.7);
  margin: 18px auto;
}

.hero-banner .wedding-date {
  font-family: var(--heading-font);
  font-size: 1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.hero-banner .venue {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin: 0 0 34px;
}

.hero-banner .cta-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.hero-banner .cta-row a {
  display: inline-block;
  padding: 14px 30px;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-banner .cta-row a.primary { background: #fff; color: var(--accent); border-color: #fff; }
.hero-banner .cta-row a:hover { transform: translateY(-2px); background: rgba(255,255,255,0.15); }
.hero-banner .cta-row a.primary:hover { background: #fff; opacity: 0.9; }

.intro-card {
  max-width: 760px;
  margin: -48px auto 0;
  position: relative;
  z-index: 2;
}

.intro-note {
  max-width: 620px;
  margin: 64px auto 80px;
  padding: 0 24px;
  text-align: center;
}

.intro-note::before {
  content: "❀";
  display: block;
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 18px;
  opacity: 0.8;
}

.intro-note p {
  font-family: var(--script-font);
  font-size: 1.85rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* Timeline (Our Story) */
.timeline {
  position: relative;
  margin: 20px 0 0;
  padding-left: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-light);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: flex;
  width: 100%;
  margin-bottom: 48px;
}

.timeline-item .timeline-photo {
  flex: 0 0 44%;
  align-self: flex-start;
  aspect-ratio: 1/1;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #948a7c;
  font-size: 0.8rem;
  text-align: center;
  overflow: hidden;
}

.timeline-item .timeline-photo.portrait {
  aspect-ratio: 1/1;
}

.timeline-item .timeline-photo.landscape {
  aspect-ratio: 4/3;
}

.timeline-item .timeline-photo.small {
  aspect-ratio: 1/1;
  background: var(--accent-light);
}

.timeline-item .timeline-photo.small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-item .timeline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-item .timeline-photo.timeline-photo-pair {
  gap: 4px;
  background: none;
}

.timeline-item .timeline-photo.timeline-photo-pair img {
  width: 50%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.timeline-item .timeline-photo.timeline-photo-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  background: none;
  padding: 0;
}

.timeline-item .timeline-photo.timeline-photo-quad img {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.timeline-item .timeline-content {
  flex: 0 0 44%;
  padding: 4px 0;
}

.timeline-item .timeline-date {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.timeline-item .timeline-content h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.timeline-item .timeline-content p { margin: 0; }

.timeline-item .timeline-spacer { flex: 0 0 12%; display: flex; justify-content: center; }

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  margin-top: 6px;
}

.timeline-item.reverse { flex-direction: row-reverse; }
.timeline-item.reverse .timeline-content { text-align: right; }

@media (max-width: 640px) {
  .timeline::before { left: 18px; }
  .timeline-item, .timeline-item.reverse { flex-direction: column; padding-left: 40px; }
  .timeline-item .timeline-photo, .timeline-item .timeline-content { flex: 1 1 auto; width: 100%; }
  .timeline-item .timeline-spacer { position: absolute; left: -22px; top: 0; }
  .timeline-item.reverse .timeline-content { text-align: left; }
  .timeline-item .timeline-photo { margin-bottom: 14px; }
}

.story-section { margin-bottom: 28px; }
.story-section h2 { font-size: 1.2rem; color: var(--accent); margin-bottom: 6px; }
.story-section p { margin-top: 0; }

/* Photo gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}

.gallery-grid .photo-placeholder {
  background: var(--accent-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #948a7c;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px;
}

.gallery-grid .photo-placeholder.tall,
.gallery-grid .photo-placeholder.portrait { grid-row: span 2; }
.gallery-grid .photo-placeholder.wide { grid-column: span 2; }
.gallery-grid .photo-placeholder img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .photo-placeholder.wide { grid-column: span 2; }
}

.faq-item { margin-bottom: 22px; }
.faq-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: #4a4138; }

.info-block { margin-bottom: 28px; }
.info-block h2 { font-size: 1.2rem; color: var(--accent); margin-bottom: 8px; }

.dc-day-block { margin-bottom: 52px; }
.dc-event-block {
  margin-bottom: 36px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.dc-event-title {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.dc-gender-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #b09882;
  margin: 28px 0 5px;
  text-transform: uppercase;
  font-weight: 600;
}
.dc-event-title + .dc-gender-label { margin-top: 0; }
.dc-bold {
  font-size: 1rem;
  font-weight: 600;
  margin: 2px 0 3px;
  color: #3a322b;
  line-height: 1.5;
}
.dc-note {
  font-size: 0.92rem;
  color: #5c5148;
  margin: 0 0 10px;
  line-height: 1.6;
}
.dc-photo-wrap {
  margin: 14px 0 8px;
  display: flex;
  justify-content: center;
}
.dc-photo-wrap img {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  display: block;
}

.dresscode-photos {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.dresscode-photo-wrap {
  flex: 1 1 200px;
  max-width: 300px;
  text-align: center;
}
.dresscode-photo-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  display: block;
}
.dresscode-photo-label {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #948a7c;
  font-style: italic;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.registry-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}

.registry-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.logout-link {
  display: block;
  text-align: center;
  margin-top: 32px;
  font-size: 0.8rem;
  color: #948a7c;
  cursor: pointer;
}

.gate-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card { width: 100%; max-width: 420px; }

.site-content.hidden { display: none; }

fieldset { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 20px; padding: 16px; }
legend { padding: 0 8px; font-weight: bold; }

.success-msg { text-align: center; color: #2e6b3e; font-weight: bold; }
