/* ===================== PASSWORD GATE ===================== */
@keyframes gateIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===================== RESET & VARIABLES ===================== */
:root {
  --rose:  #C18987;
  --gold:  #C6BC74;
  --blush: #DFB3B7;
  --cream: #FFF8EE;
  --bark:  #4a3728;
  --mist:  #f5ebe0;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Crimson Pro', serif;
  background: var(--cream);
  color: var(--bark);
  overflow-x: hidden;
}

/* ===================== NAVBAR ===================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(255,248,238,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  height: 62px;
  gap: 0;
}
.nav-brand {
  font-family: 'Pinyon Script', cursive;
  font-size: 1.9rem;
  color: var(--rose);
  text-decoration: none;
  margin-right: 36px;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-family: 'Crimson Pro', serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bark);
  text-decoration: none;
  transition: color .25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transition: transform .25s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--rose); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* ===================== SHARED SECTION ===================== */
section {
  padding: 110px 40px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}
.eyebrow {
  font-family: 'Crimson Pro', serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  color: var(--bark);
  text-align: center;
  margin-bottom: 10px;
}
.ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px auto 48px;
  color: var(--gold);
  font-size: 0.55rem;
}
.ornament::before, .ornament::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
}

/* ===================== HERO ===================== */
#hero {
  padding: 82px 40px 60px;
  min-height: 100vh;
  background: var(--cream);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  pointer-events: none;
  z-index: 1;
  transform: rotate(7deg) scale(1.18);
}
.mq-row { overflow: visible; width: 100%; padding: 0.45em 0; }
.mq-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}
.mq-1 { animation: mqRight 16s linear infinite; }
.mq-2 { animation: mqRight 24s linear infinite -9s; }
.mq-3 { animation: mqRight 13s linear infinite -4s; }
@keyframes mqRight {
  from { transform: translateX(-25%); }
  to   { transform: translateX(0); }
}
.hero-phrase {
  font-family: 'Pinyon Script', cursive;
  font-size: var(--mq-size, 14vw);
  color: rgba(193,137,135, 0.17);
  white-space: nowrap;
  line-height: 1.15;
  padding-right: 0.18em;
}
.hero-photo-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(5deg);
}
.hero-img {
  display: block;
  max-height: 78vh;
  max-width: min(700px, 90vw);
  width: auto;
  height: auto;
  box-shadow: 0 24px 64px rgba(74,55,40,.22), 0 6px 20px rgba(74,55,40,.1);
}
.scroll-cue {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: rgba(193,137,135,.5);
  font-size: 1.3rem;
  animation: cue 2.2s ease-in-out infinite;
  z-index: 2;
}
@keyframes cue {
  0%,100% { transform: translateX(-50%) translateY(0); opacity:.5; }
  50%      { transform: translateX(-50%) translateY(9px); opacity:.9; }
}

/* ===================== INFO / ENVELOPE ===================== */
#info {
  background: var(--mist);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(198,188,116,.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(193,137,135,.12) 0%, transparent 50%);
  padding-top: 80px;
  padding-bottom: 40px;
  min-height: unset;
}
.env-seq {
  max-width: min(520px, 90vw);
  width: 100%;
  height: auto;
  display: block;
  transform: rotate(-6deg);
}

/* ===================== TIMELINE ===================== */
#timeline { background: var(--cream); overflow: hidden; }

.locket-wrap {
  position: relative;
  display: inline-block;
  max-width: 520px;
  width: 100%;
  overflow: visible;
}
.cake-img {
  position: absolute;
  bottom: -48%;
  right: -12%;
  width: auto;
  height: 150%;
  z-index: 0;
  opacity: 0.3;
  pointer-events: none;
}
.locket-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity .7s ease, transform .7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.locket-img.vis { opacity: 1; transform: scale(1); }

.dresscode-img {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .5s ease, transform .5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dresscode-img.vis { opacity: 1; transform: scale(1); }

.timeline-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 960px;
}
@media (max-width: 700px) {
  .timeline-wrap { flex-direction: column; flex-wrap: wrap; }
}
.timeline {
  position: relative;
  max-width: 560px;
  width: 100%;
  padding: 12px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 108px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--blush) 15%, var(--blush) 85%, transparent 100%);
}
.tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 52px;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity .65s ease, transform .65s ease;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item.vis { opacity: 1; transform: none; }
.tl-time {
  width: 96px;
  text-align: right;
  padding-right: 28px;
  font-family: 'Pinyon Script', cursive;
  font-size: 2rem;
  color: var(--rose);
  line-height: 1;
  flex-shrink: 0;
}
.tl-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--rose);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 2px var(--blush);
  flex-shrink: 0;
  margin-top: 5px;
  position: relative;
  left: -6px;
}
.tl-body { padding-left: 22px; }
.tl-event {
  font-family: 'Crimson Pro', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--bark);
}
.tl-note {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: #9a7f6a;
  margin-top: 2px;
}

/* ===================== MENU ===================== */
#menu { background: var(--mist); padding-top: 60px; padding-bottom: 60px; min-height: unset; }
.platter-wrap {
  position: relative;
  display: inline-block;
  max-width: min(620px, 90vw);
}
.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity .7s ease, transform .7s ease;
}
.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity .7s ease, transform .7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.slide-left.vis, .slide-right.vis {
  opacity: 1;
  transform: none;
}
.platter-img {
  display: block;
  width: 100%;
  height: auto;
}
.platter-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 55%;
}
.menu-heading {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  color: #3a2e22;
  margin-bottom: 12px;
}
.menu-item {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: #3a2e22;
  padding: 7px 0;
  border-bottom: 1px solid rgba(120,100,80,.2);
  letter-spacing: 0.04em;
}
.menu-item:last-child { border-bottom: none; }

/* ===================== ATTIRE ===================== */
#attire { background: var(--cream); }
#attire::before {
  content: '';
  position: absolute;
  top: -200px; left: 0; right: 0; bottom: 0;
  background: url('assets/pearls.png') center center / cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
#attire .eyebrow,
#attire .section-title {
  position: relative;
  z-index: 1;
}
.attire-body {
  max-width: 600px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.attire-intro {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.08rem;
  color: #7a6050;
  line-height: 1.85;
  margin-bottom: 36px;
}
.do-tags {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.do-tag {
  background: var(--blush);
  color: var(--bark);
  padding: 12px 28px;
  font-family: 'Crimson Pro', serif;
  font-size: 1.08rem;
  border-radius: 2px;
}
.avoid-label {
  font-family: 'Crimson Pro', serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #b08878;
  margin-bottom: 14px;
}
.no-tags {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.no-tag {
  position: relative;
  border: 1.5px solid #c0a0a0;
  color: #a06060;
  padding: 12px 32px;
  font-family: 'Crimson Pro', serif;
  font-size: 1.08rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  overflow: hidden;
}
.no-tag::after {
  content: '';
  position: absolute;
  top: 50%; left: -4px; right: -4px;
  height: 1.5px;
  background: #c09090;
  transform: rotate(-5deg);
}
.attire-closer {
  margin-top: 32px;
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  color: #9a7f6a;
  font-size: 1rem;
}

/* ===================== REGISTRY ===================== */
#registry {
  background: none;
  position: relative;
  padding-top: 60px;
  padding-bottom: 60px;
  min-height: unset;
}
.tissue-frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}
#registry::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 248, 238, 0.35);
  pointer-events: none;
  z-index: 1;
}
#registry .section-title,
#registry .registry-card {
  position: relative;
  z-index: 2;
}
.registry-card {
  max-width: 500px;
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--blush);
  padding: 52px 48px;
  text-align: center;
  position: relative;
}
.registry-card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(198,188,116,.45);
  pointer-events: none;
}
.registry-prose {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.08rem;
  color: #7a6050;
  line-height: 1.85;
  margin-bottom: 36px;
}
.btn-primary {
  display: inline-block;
  padding: 14px 44px;
  background: var(--rose);
  color: var(--cream);
  text-decoration: none;
  font-family: 'Crimson Pro', serif;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background .3s, transform .2s;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: #b07470; transform: translateY(-2px); }

/* ===================== RSVP ===================== */
#rsvp { background: var(--mist); }
.rsvp-deadline {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  color: #9a7f6a;
  font-size: 0.95rem;
  margin-top: -30px;
  margin-bottom: 44px;
}
.rsvp-card {
  max-width: 580px;
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--blush);
  padding: 52px 48px;
  position: relative;
}
.rsvp-card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(198,188,116,.35);
  pointer-events: none;
}
.form-group { margin-bottom: 26px; }
.f-label {
  display: block;
  font-family: 'Crimson Pro', serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 8px;
}
.f-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--blush);
  background: #fffdf8;
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  color: var(--bark);
  outline: none;
  transition: border-color .25s;
  -webkit-appearance: none;
}
.f-input:focus { border-color: var(--rose); }
textarea.f-input { resize: vertical; min-height: 100px; line-height: 1.6; }
.radio-row { display: flex; gap: 28px; flex-wrap: wrap; }
.r-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Crimson Pro', serif;
  font-size: 1.05rem;
  color: var(--bark);
  cursor: pointer;
}
.r-label input[type="radio"] { accent-color: var(--rose); width: 16px; height: 16px; }
.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--rose);
  color: var(--cream);
  border: none;
  font-family: 'Crimson Pro', serif;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s, transform .2s;
}
.submit-btn:hover:not(:disabled) { background: #b07470; transform: translateY(-1px); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.form-msg {
  text-align: center;
  padding: 14px;
  margin-top: 18px;
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1rem;
  display: none;
}
.form-msg.ok  { color: #6a8a60; display: block; }
.form-msg.err { color: #a06060; display: block; }

/* ===================== FOOTER ===================== */
footer {
  background: var(--bark);
  color: var(--cream);
  text-align: center;
  padding: 50px 40px;
}
.footer-names {
  font-family: 'Pinyon Script', cursive;
  font-size: 2.8rem;
  color: var(--blush);
  margin-bottom: 8px;
}
.footer-date {
  font-family: 'Crimson Pro', serif;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .8;
}

/* ===================== SETUP BANNER ===================== */
#setup-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #3a2a1c;
  color: var(--cream);
  padding: 11px 24px;
  font-family: 'Crimson Pro', serif;
  font-size: 0.88rem;
  text-align: center;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
#setup-banner a { color: var(--gold); cursor: pointer; }
#setup-banner button {
  background: transparent;
  border: 1px solid rgba(223,179,183,.5);
  color: var(--blush);
  padding: 4px 14px;
  font-family: 'Crimson Pro', serif;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ===================== SETUP MODAL ===================== */
#setup-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(74,55,40,.65);
  z-index: 9998;
  overflow-y: auto;
}
.setup-inner {
  background: var(--cream);
  max-width: 580px;
  margin: 60px auto 40px;
  padding: 48px;
  position: relative;
  border: 1px solid var(--blush);
}
.setup-close {
  position: absolute; top: 16px; right: 20px;
  background: transparent; border: none;
  font-size: 1.5rem; cursor: pointer; color: var(--bark);
}
.setup-inner h3 {
  font-family: 'Pinyon Script', cursive;
  font-size: 2.1rem; color: var(--rose);
  margin-bottom: 16px;
}
.setup-inner p {
  font-family: 'Crimson Pro', serif;
  font-style: italic; color: #7a6050;
  margin-bottom: 22px; line-height: 1.8;
}
.setup-inner ol {
  font-family: 'Crimson Pro', serif;
  font-size: 1.02rem;
  line-height: 2; color: var(--bark);
  padding-left: 20px;
}
.setup-inner a { color: var(--rose); }
code {
  background: #f0e8dc;
  padding: 2px 6px;
  font-size: .88rem;
  font-family: monospace;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 700px) {
  nav { height: auto; padding: 10px 20px; flex-wrap: wrap; }
  .nav-brand { margin-right: 0; margin-bottom: 4px; }
  .nav-links { gap: 14px; flex-wrap: wrap; justify-content: center; }
  section { padding: 90px 22px 70px; }
  .env-seq { max-width: 94vw; }
  .platter-wrap { max-width: 94vw; }
  .platter-wrap[style*="margin-right"] { margin-right: 0 !important; margin-bottom: -40px; }
  .rsvp-card, .registry-card { padding: 36px 22px; }
}

/* ===================== HEART FLUTTER ===================== */
.heart-particle {
  position: fixed;
  pointer-events: none;
  font-size: 1.4rem;
  animation: heartFloat linear forwards;
  z-index: 99998;
}
@keyframes heartFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 1; }
  50%  { transform: translateY(-45vh) translateX(var(--drift)) scale(1.15); opacity: 0.8; }
  100% { transform: translateY(-90vh) translateX(calc(var(--drift) * 1.6)) scale(0.6); opacity: 0; }
}
