/* ================================================================
   MAIN.CSS — Public invitation page
================================================================ */

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

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

body {
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background .4s, color .4s;
}

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

.hidden { display: none !important; }
.pos-rel { position: relative; z-index: 1; }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  text-align: center;
  color: var(--text);
  margin-bottom: .6rem;
  letter-spacing: .04em;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--primary);
  margin: .8rem auto 2.4rem;
}

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

/* ── Container ────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section spacing ──────────────────────────────────────────── */
.section {
  padding: 6rem 0;
}

.section.bg-alt {
  background: var(--bg-alt);
  position: relative;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: .85rem 2.4rem;
  background: var(--primary);
  color: var(--text-inv);
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, transform .2s, box-shadow .25s;
  border-radius: 2px;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb),.3);
}

.btn-outline {
  display: inline-block;
  padding: .7rem 1.8rem;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  font-family: 'Montserrat', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s;
  border-radius: 2px;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-inv);
}

/* ── Navigation ───────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: .9rem 1.5rem;
  transition: background .35s, box-shadow .35s, padding .35s;
}

#nav.scrolled {
  background: var(--bg);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  padding: .6rem 1.5rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--hero-text);
  letter-spacing: .06em;
  transition: color .35s;
}

#nav.scrolled .nav-brand { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  color: var(--hero-text);
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  padding: .3rem .7rem;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color .3s, color .3s, background .3s;
}

#nav.scrolled .lang-toggle {
  border-color: var(--border);
  color: var(--text);
}

.lang-toggle:hover { background: var(--primary); border-color: var(--primary); color: var(--text-inv); }

.theme-dots { display: flex; gap: .45rem; }

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  cursor: pointer;
  transition: transform .2s, border-color .2s;
  padding: 0;
}

.theme-dot:hover, .theme-dot.active { transform: scale(1.25); border-color: #fff; }

#nav.scrolled .theme-dot { border-color: var(--border); }
#nav.scrolled .theme-dot.active { border-color: var(--primary); }

/* ── Hero ─────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--hero-text);
  padding: 0 1.5rem;
  animation: heroFadeIn 1.6s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-super {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .35em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 1.2rem;
}

.hero-ornament {
  font-size: 1.2rem;
  opacity: .5;
  margin-bottom: 1rem;
  animation: heroFadeIn 2s ease both;
}

.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: .02em;
  line-height: 1.1;
  color: #fff;
  animation: heroFadeIn 2s .2s ease both;
}

.hero-amp {
  display: inline-block;
  font-size: .65em;
  opacity: .7;
  margin: 0 .3em;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: 1.4rem 0 1rem;
  animation: heroFadeIn 2s .4s ease both;
}

.hero-divider span:first-child,
.hero-divider span:last-child {
  display: block;
  width: 60px;
  height: 1px;
  background: rgba(255,255,255,.35);
}

.hero-divider-diamond {
  font-size: .7rem;
  color: var(--primary);
  opacity: .9;
}

.hero-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  letter-spacing: .25em;
  opacity: .85;
  margin-bottom: .8rem;
  animation: heroFadeIn 2s .6s ease both;
}

.hero-tagline {
  font-size: clamp(.8rem, 1.8vw, 1rem);
  font-weight: 300;
  letter-spacing: .08em;
  opacity: .7;
  max-width: 500px;
  margin: 0 auto;
  animation: heroFadeIn 2s .8s ease both;
}

/* ── Slideshow ────────────────────────────────────────────────── */
#slideshow-section {
  background: #000;
  position: relative;
}

.slideshow-wrap {
  position: relative;
  height: 70vh;
  max-height: 800px;
  overflow: hidden;
}

.slideshow {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .9s ease;
}

.slide.active {
  opacity: 1;
  animation: kenburns 8s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.1) translate(-2%, -1.5%); }
}

.slide[data-kb="2"].active { animation-name: kenburns2; }
.slide[data-kb="3"].active { animation-name: kenburns3; }

@keyframes kenburns2 {
  from { transform: scale(1.08) translate(1.5%, 0); }
  to   { transform: scale(1) translate(-1%, 1.5%); }
}

@keyframes kenburns3 {
  from { transform: scale(1) translate(0, 1.5%); }
  to   { transform: scale(1.1) translate(2%, -1%); }
}

.slide-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--primary);
  font-size: 4rem;
  opacity: .3;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: background .25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-arrow:hover { background: rgba(0,0,0,.65); }
.slide-prev { left: 1.2rem; }
.slide-next { right: 1.2rem; }

.slide-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 2;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  transition: background .25s, transform .25s;
  padding: 0;
}

.dot.active { background: #fff; transform: scale(1.25); }

/* ── Countdown ────────────────────────────────────────────────── */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.cd-unit {
  text-align: center;
  min-width: 80px;
}

.cd-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 300;
  color: var(--primary);
  line-height: 1;
}

.cd-label {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: .3rem;
}

.cd-sep {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--primary);
  opacity: .4;
  line-height: 1;
  padding-bottom: 1.4rem;
}

.countdown-done {
  font-size: 2rem;
  text-align: center;
  color: var(--primary);
}

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 2.5rem 3.5rem 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 3.5rem 2.5rem;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: .2rem;
  right: -7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item:nth-child(even) .timeline-dot {
  right: auto;
  left: -7px;
}

.timeline-date {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .4rem;
}

.timeline-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.45;
}

.timeline-photo {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 2px;
  margin-top: .8rem;
  filter: brightness(.95);
}

.timeline-item { margin-left: auto; }
.timeline-item:nth-child(even) { margin-left: 50%; }

/* Mobile timeline */
@media (max-width: 640px) {
  .timeline::before { left: 12px; }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 2.5rem 2.4rem;
    text-align: left;
  }

  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 6px;
    right: auto;
  }
}

/* ── Event Details ────────────────────────────────────────────── */
#event-section {
  position: relative;
  overflow: hidden;
}

.event-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  background-size: cover;
  background-position: center;
  opacity: .12;
}

.event-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-alt);
  opacity: .88;
}

.event-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.event-info {
  text-align: center;
}

.event-icon {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: .7;
}

.event-venue {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: .6rem;
}

.event-address {
  color: var(--text-light);
  font-size: .9rem;
  letter-spacing: .05em;
  margin-bottom: .5rem;
}

.event-datetime {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--primary);
  margin-top: .8rem;
}

.event-map iframe {
  width: 100%;
  height: 340px;
  border: none;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .event-layout { grid-template-columns: 1fr; }
  .event-map iframe { height: 240px; }
}

/* ── RSVP ─────────────────────────────────────────────────────── */
.rsvp-form {
  max-width: 540px;
  margin: 0 auto;
}

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

.form-label {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: .6rem;
}

.form-input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: .9rem;
  border-radius: 2px;
  transition: border-color .25s, box-shadow .25s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12);
}

.form-input--sm { max-width: 120px; }

.rsvp-choices { display: flex; gap: 1rem; flex-wrap: wrap; }

.choice-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  font-size: .85rem;
  transition: border-color .25s, background .25s, color .25s;
  color: var(--text);
  background: var(--card-bg);
}

.choice-btn input { display: none; }

.choice-btn:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-inv);
}

.rsvp-success {
  margin-top: 1.2rem;
  padding: .8rem 1.2rem;
  background: rgba(var(--accent-rgb),.1);
  border-left: 3px solid var(--primary);
  color: var(--text);
  font-size: .9rem;
  border-radius: 0 2px 2px 0;
}

/* ── QR / Share ───────────────────────────────────────────────── */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.qr-box {
  padding: 1rem;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow);
  display: inline-block;
}

.qr-box img, .qr-box canvas { display: block; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-ornament {
  font-size: .8rem;
  color: var(--primary);
  letter-spacing: .4em;
  margin-bottom: .8rem;
  opacity: .6;
}

.footer p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-light);
}

/* ── Scroll Animations ────────────────────────────────────────── */
.anim-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}

.anim-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for siblings */
.anim-up:nth-child(2) { transition-delay: .12s; }
.anim-up:nth-child(3) { transition-delay: .24s; }
.anim-up:nth-child(4) { transition-delay: .36s; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .section { padding: 4rem 0; }
  .hero-names { font-size: clamp(2.4rem, 10vw, 4rem); }
  .countdown { gap: .2rem; }
  .cd-unit { min-width: 60px; }
  .cd-val { font-size: 2.5rem; }
  .slide-arrow { display: none; }
}

@media (max-width: 768px) {
  .nav-inner { gap: .8rem; }
  .theme-dots { display: none; }
}
