@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Marcellus&family=Jost:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:             #0A3D1F;
  --bg-light:       #0f4d27;
  --primary:        #CED9CB;
  --primary-muted:  rgba(206, 217, 203, 0.6);
  --primary-faint:  rgba(206, 217, 203, 0.15);
  --primary-faint2: rgba(206, 217, 203, 0.08);
  --gold:           #C9A84C;
  --gold-muted:     rgba(201, 168, 76, 0.4);
  --border:         rgba(206, 217, 203, 0.18);
  --border-strong:  rgba(206, 217, 203, 0.35);
  --success-bg:     rgba(100, 180, 100, 0.15);
  --success-border: rgba(100, 180, 100, 0.4);
  --success-text:   #a8d9a8;
  --danger-bg:      rgba(220, 80, 80, 0.15);
  --danger-border:  rgba(220, 80, 80, 0.4);
  --danger-text:    #f0a0a0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--bg);
  color: var(--primary);
  min-height: 100vh;
  font-weight: 300;
}

/* ── Password gate ── */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gate-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.gate-names {
  font-family: 'Marcellus', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--gold);
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.gate-date {
  font-family: 'Marcellus', serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--primary-muted);
  text-transform: uppercase;
}

.gate-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-muted) 20%, var(--gold-muted) 80%, transparent);
}

.gate-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-muted);
  margin-bottom: 0.5rem;
}

.gate-input {
  width: 100%;
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--primary);
  background: var(--primary-faint2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
  letter-spacing: 0.1em;
}

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

.gate-btn {
  width: 100%;
  padding: 0.7rem 2rem;
  background: var(--primary-faint);
  color: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-family: 'Marcellus', serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.25s var(--ease-out-soft),
    transform 0.25s var(--ease-out-soft),
    box-shadow 0.25s var(--ease-out-soft);
}

.gate-btn:hover    { background: var(--primary-faint2); }
.gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gate-error {
  font-size: 0.82rem;
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 3px;
  padding: 0.6rem 1rem;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  height: 56px;
  background: rgba(10, 61, 31, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-link {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-muted);
  text-decoration: none;
  padding: 0 0.85rem;
  height: 56px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  border-bottom: 1.5px solid transparent;
  position: relative;
}

.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out-soft), left 0.3s var(--ease-out-soft);
}
.nav-link:hover::after {
  width: calc(100% - 1.0rem);  /* inside the 0.85rem side padding */
  left: 0.5rem;
}
.nav-link.active::after { width: 0; } /* active already has the gold border */

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--primary);
  transition: transform 0.25s, opacity 0.25s;
  will-change: transform;
}

/* Spacer mirrors hamburger width to keep links centered */
.nav-spacer {
  display: none;
  width: 22px;
  flex-shrink: 0;
}

/* ── Mobile overlay ── */
#nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  will-change: opacity;
}

#nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Slide-in drawer ── */
#nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100dvh;
  background: rgba(10, 61, 31, 0.97);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  display: flex;
  flex-direction: column;
  padding: 4rem 0 2rem;
}

#nav-drawer.open {
  transform: translateX(0);
}

#nav-drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--primary-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

#nav-drawer-close:hover { color: var(--primary); }

#nav-drawer nav {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer-link {
  display: block;
  padding: 0.85rem 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.25s var(--ease-out-soft);
  border-left: 2px solid transparent;
}

.drawer-link:hover {
  color: var(--primary);
  background: var(--primary-faint2);
  transform: translateX(4px);
}

.drawer-link.active {
  color: var(--gold);
  border-left-color: var(--gold);
}

.drawer-link.active:hover { transform: none; }

/* ── Sections ── */
.section {
  min-height: 100vh;
  padding: 100px 2rem 5rem;
  max-width: 860px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--primary-muted);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Marcellus', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 2rem;
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-muted) 20%, var(--gold-muted) 80%, transparent);
  margin: 2rem 0;
}

.placeholder-text {
  font-size: 0.9rem;
  color: var(--primary-muted);
  line-height: 1.8;
  font-style: italic;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 2rem 4rem;
}

.hero-names {
  font-family: 'Marcellus', serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--gold);
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-ampersand {
  color: var(--primary-muted);
  font-size: 0.7em;
  display: block;
  margin: 0.1em 0;
}

.hero-date {
  font-family: 'Marcellus', serif;
  font-size: 1rem;
  letter-spacing: 0.25em;
  color: var(--primary-muted);
  text-transform: uppercase;
  margin-bottom: 3rem;
}

/* ── Countdown ── */
.countdown {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.countdown-number {
  font-family: 'Marcellus', serif;
  font-size: clamp(1.75rem, 5vw, 3rem);
  color: var(--primary);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}

.countdown-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-muted);
}

.countdown-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  align-self: center;
}

/* ── Venue ── */
.venue-name {
  font-family: 'Marcellus', serif;
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.venue-address {
  font-size: 0.95rem;
  color: var(--primary-muted);
  letter-spacing: 0.06em;
  line-height: 1.7;
  white-space: pre-line;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--primary-muted);
  text-transform: uppercase;
  font-family: 'Marcellus', serif;
}

/* ── Nav user indicator ── */
.nav-user {
  display: flex;
  align-items: center;
}

.nav-user-signin {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: rgba(201, 168, 76, 0.8);
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.nav-user-signin:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-user-identified {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-user-name { color: rgba(245, 239, 224, 0.75); }
.nav-user-dot  { color: rgba(245, 239, 224, 0.3); }
.nav-user-notYou {
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-user-notYou:hover { opacity: 1; }

/* ── Drawer user footer ── */
.drawer-user-footer {
  margin-top: auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(245, 239, 224, 0.08);
}

/* ── Identify modal ── */
#identify-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.identify-modal-card {
  background: rgba(10, 61, 31, 0.97);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: min(360px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.identify-modal-heading {
  font-family: 'Marcellus', serif;
  font-size: 1.2rem;
  color: var(--primary);
  text-align: center;
  margin: 0;
}

.identify-modal-sub {
  font-size: 13px;
  color: var(--primary-muted);
  text-align: center;
  margin: 0;
}

.identify-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--primary-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}
.identify-modal-close:hover { color: var(--primary); }

.identify-modal-error {
  font-size: 12px;
  color: #e88;
  text-align: center;
  display: none;
}

@media (max-width: 900px) {
  .nav { justify-content: space-between; padding: 0 1.25rem; }
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-user { display: none; }
  .nav-right { display: none; }
}

@media (max-width: 600px) {
  .countdown { gap: 1rem; }
  .countdown-divider { display: none; }
}

/* ── Floral background decorations ── */
.floral-bg {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  opacity: 0.05;
}
.floral-bg img { width: 100%; display: block; }

.floral-topright { top: 0; right: 0; width: 25%; display: block; }
.floral-bottomleft { bottom: 0; left: 0; width: 25%; display: block; }

/* Language toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: absolute;
  right: 2rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nav-link-color, #fff);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  padding: 0;
  opacity: 0.55;
  text-transform: uppercase;
}

.lang-btn.active {
  opacity: 1;
  font-weight: 600;
}

.lang-btn:hover {
  opacity: 0.85;
}

.lang-sep {
  color: var(--nav-link-color, #fff);
  opacity: 0.35;
}

#drawer-lang-toggle {
  margin-bottom: 0.5rem;
}

html[lang="ko"],
html[lang="ko"] * {
  font-family: 'Gowun Dodum', sans-serif !important;
}


#page-content { position: relative; z-index: 1; }

/* ── Shared utility: buttons ── */
.btn {
  padding: 0.7rem 2rem;
  background: var(--primary-faint);
  color: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-family: 'Marcellus', serif;
  font-size: 0.82rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.25s var(--ease-out-soft),
    border-color 0.25s var(--ease-out-soft),
    transform 0.25s var(--ease-out-soft),
    box-shadow 0.25s var(--ease-out-soft);
}
.btn:hover    { background: var(--primary-faint2); border-color: var(--primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn:hover:not(:disabled),
.gate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.btn:active:not(:disabled),
.gate-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.btn-primary       { background: rgba(201,168,76,0.14); color: var(--gold); border-color: var(--gold-muted); }
.btn-primary:hover { background: rgba(201,168,76,0.22); border-color: var(--gold); }
.btn-ghost         { background: transparent; color: var(--primary-muted); border-color: var(--border); }
.btn-ghost:hover   { color: var(--primary); border-color: var(--border-strong); background: transparent; }
.btn-danger        { background: rgba(220,80,80,0.1); color: var(--danger-text); border-color: var(--danger-border); }
.btn-danger:hover  { background: rgba(220,80,80,0.18); }

/* ── Shared utility: alerts ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}
.alert-success { background: var(--success-bg);  border: 1px solid var(--success-border); color: var(--success-text); }
.alert-error   { background: var(--danger-bg);   border: 1px solid var(--danger-border);  color: var(--danger-text); }

/* ── Shared utility: form label ── */
.form-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-muted);
  margin-bottom: 0.4rem;
}

/* ── Shared utility: dropzone ── */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover  { border-color: var(--border-strong); }
.dropzone.active { border-color: var(--gold); background: rgba(201,168,76,0.06); }
.dropzone p      { font-size: 0.8rem; color: var(--primary-muted); letter-spacing: 0.06em; }

/* ── Motion ─────────────────────────────────────────────────────────────────
   Shared motion language. Reveal hidden-state is scoped under html.reveal-ready
   (set by reveal.js) so content is never stuck invisible if JS fails. */
:root {
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
html.reveal-ready [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.7s var(--ease-out-soft),
    transform 0.7s var(--ease-out-soft);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Countdown tick (wedding.js adds/removes .tick on value change) */
.countdown-number.tick { animation: cd-tick 0.5s var(--ease-out-soft); }
@keyframes cd-tick {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Gate → site cross-fade (wedding.js adds .gate-leave on unlock) */
.gate { transition: opacity 0.45s var(--ease-out-soft); }
.gate.gate-leave { opacity: 0; pointer-events: none; }

/* Map pins (guestMaps.js buildPinEl wrapper) */
.map-pin {
  position: relative;
  transform-origin: bottom center;
  transition: transform 0.3s var(--ease-out-soft), filter 0.3s var(--ease-out-soft);
}
.map-pin--active {
  transform: scale(1.4);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.map-pin--drop {
  animation: pin-drop 0.5s var(--ease-spring) both;
  animation-delay: var(--pin-delay, 0ms);
}
@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hover utilities */
.hover-lift { transition: transform 0.3s var(--ease-out-soft); }
.hover-lift:hover { transform: translateY(-3px); }

/* Reduced motion: everything appears instantly, fully visible. Elements with .motion-keep (e.g. loading spinners) keep animating. */
@media (prefers-reduced-motion: reduce) {
  *:not(.motion-keep), *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; }
}