/* ===========================================
   FONTS
   =========================================== */
@font-face {
  font-family: 'Abramo';
  src: url('fonts/abramo-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Abramo';
  src: url('fonts/abramo-script.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: block;
}

/* ===========================================
   DESIGN SYSTEM
   =========================================== */
:root {
  --bg:           #0d1e33;
  --bg-surface:   #122540;
  --bg-card:      #1a2e4a;
  --bg-input:     #1e3350;
  --text:         #f0ebe0;
  --text-dim:     #bfb8b0;
  --text-muted:   #666055;
  --accent:       #d4b47a;
  --accent-light: #ecd9b2;
  --accent-dim:   rgba(212,180,122,0.15);
  --border:       rgba(255,255,255,0.07);
  --border-mid:   rgba(255,255,255,0.12);
  --danger:       #e07070;

  --font: 'Pretendard', -apple-system, 'Malgun Gothic', sans-serif;
  --font-display: 'Abramo', Georgia, serif;

  /* Type scale — 4 steps cover the full body range */
  --text-xs:   11px;   /* micro: tags, cal headers, helper text     */
  --text-sm:   13px;   /* secondary: captions, UI labels, metadata  */
  --text-base: 15px;   /* body: prose, descriptions, form labels    */
  --text-lg:   17px;   /* emphasis: CTAs, schedule names            */

  --max-w: 480px;
  --section-pad: 96px 24px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --ease-bounce: cubic-bezier(0.34, 1.2, 0.64, 1); /* pop/spring */
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1); /* fade-up reveals */
}

/* ===========================================
   RESET & BASE
   =========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  /* center the 480px column on desktop */
  display: flex;
  flex-direction: column;
  align-items: center;
}

img { display: block; max-width: 100%; }
ul  { list-style: none; }
a   { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

.hidden { display: none !important; }

/* Column constraint */
#main-content {
  width: 100%;
  max-width: var(--max-w);
}

/* ===========================================
   PRE-HERO ANIMATION
   =========================================== */
#pre-anim {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#pre-anim.active { opacity: 1; }
#pre-anim.done   { opacity: 0; }

#pre-anim-text {
  font-family: var(--font-display);
  font-size: clamp(72px, 18vw, 104px);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0 24px;
  line-height: 1.2;
  transition: opacity 1.2s ease;
  margin-bottom: 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
}


#pre-anim-text.fade-out { opacity: 0; }

/* Character pop-in with echo shadow */
@keyframes charPop {
  0%   { opacity: 0; transform: scale(0.15); }
  55%  { opacity: 1; transform: scale(1.2);  }
  78%  { transform: scale(0.93); }
  100% { opacity: 1; transform: scale(1);    }
}

@keyframes charEcho {
  0%   { opacity: 0.28; transform: translate(-50%, -50%) scale(1);   }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(5); }
}

.char-pop {
  display: inline-block;
  opacity: 0;
  position: relative;
  will-change: transform, opacity;
  animation: charPop 0.55s forwards;
  animation-timing-function: var(--ease-bounce);
}

.char-pop::after {
  content: attr(data-char);
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1em;
  color: inherit;
  pointer-events: none;
  overflow: visible;
  animation: charEcho 0.7s ease-out forwards;
  animation-delay: var(--char-delay, 0ms);
}

.char-space {
  display: inline-block;
  width: 0.28em;
}


/* ===========================================
   INTRO COVER
   =========================================== */
#intro-cover {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

#intro-cover.closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(212,180,122,0.06) 0%, transparent 70%);
}

.intro-content {
  position: relative;
  text-align: center;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Simplified cover: just label + button */
.intro-content--simple {
  gap: 36px;
}

.intro-label {
  font-family: var(--font-display);
  font-size: clamp(72px, 18vw, 104px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.2;
}

.intro-names {
  font-size: clamp(36px, 9vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 20px;
}

.intro-amp {
  color: var(--accent);
  font-weight: 300;
  margin: 0 6px;
}

.intro-date {
  font-size: var(--text-base);
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.intro-venue {
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.intro-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: background var(--transition), color var(--transition);
  animation: pulse-glow 2.5s ease-in-out infinite;
}

.intro-btn:hover, .intro-btn:active {
  background: var(--accent);
  color: var(--bg);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,180,122,0); }
  50%       { box-shadow: 0 0 0 8px rgba(212,180,122,0.12); }
}

/* ===========================================
   SHARED SECTION STYLES
   =========================================== */
.section {
  padding: var(--section-pad);
  width: 100%;
}

/* Alternating section backgrounds — welcome (child 2) starts dark */
#main-content > .section:nth-child(even) { background: var(--bg); }
#main-content > .section:nth-child(odd)  { background: var(--bg-surface); }

.section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* Two-block scroll reveal */
.section-inner > * {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.8s var(--ease-reveal), transform 1.8s var(--ease-reveal);
}
/* Block 1: tag + heading together */
.section-inner > .section-tag,
.section-inner > .section-heading { transition-delay: 0ms; }
/* Block 2: everything else */
.section-inner > *:not(.section-tag):not(.section-heading) { transition-delay: 360ms; }

/* Welcome: no tag/heading — prose is block 1, family is block 2 */
.welcome-section .section-inner > .welcome-prose { transition-delay: 0ms; }
.welcome-section .section-inner > .family-block  { transition-delay: 360ms; }

/* Verse-only section: single block, no delay */
.verse-in-gallery > .verse-block { transition-delay: 0ms; }

.section-inner.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.gallery-clip.visible,
.venue-photo.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-clip,
.venue-photo {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.4s 0.2s var(--ease-reveal),
              transform 1.4s 0.2s var(--ease-reveal);
}

.section-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-heading {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-subheading {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 500px;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
}

.hero-photo img,
.hero-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo img {
  opacity: 0;
  filter: blur(12px);
  transform-origin: center center;
  transition: opacity 1.2s ease, filter 1.8s ease;
}
.hero-photo img.visible {
  opacity: 1;
  filter: blur(0);
}

/* --- Option A: Ken Burns --- */
@keyframes ken-burns {
  0%   { transform: scale(1)    translate(0, 0); }
  100% { transform: scale(1.08) translate(-1.5%, -1%); }
}
.hero-photo img.ken-burns {
  will-change: transform;
  animation: ken-burns 6s ease-in-out forwards;
}


.hero-placeholder-bg {
  background: linear-gradient(160deg, #1e1e1e 0%, #2a2520 50%, #1a1714 100%);
}

/* gradient overlay so text is readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.2) 45%,
    transparent 75%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 28px 60px;
  text-align: center;
  gap: 0;
}

.hero-names {
  font-family: var(--font-display);
  font-size: clamp(60px, 18vw, 110px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0;
}

.hero-name-2 {
  margin-bottom: 16px;
}

.hero-amp {
  font-weight: 300;
  color: var(--accent);
  margin: 0 4px;
}

.hero-label {
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
  min-height: 1em;
}

.hero-venue {
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  min-height: 1em;
}

/* Hero line-by-line fade-up */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-line-hidden { opacity: 0; }
.hero-line-in     { will-change: transform, opacity; animation: heroFadeUp 1.4s forwards; animation-timing-function: var(--ease-reveal); }

/* ===========================================
   WELCOME
   =========================================== */

.welcome-prose {
  font-size: var(--text-base);
  line-height: 2;
  color: var(--text-dim);
  padding: 24px 0;
  margin-bottom: 40px;
}

.family-block {
  display: inline-grid;
  grid-template-columns: max-content max-content max-content;
  align-items: center;
  gap: 12px 12px;
}

.family-sep {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--border-mid);
}

/* Each row's children participate directly in the parent grid */
.family-row {
  display: contents;
}

.family-parents {
  font-size: var(--text-base);
  color: var(--text-dim);
  text-align: center;
}

.family-connector {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.family-name {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0;
  text-align: center;
}

/* ===========================================
   VENUE
   =========================================== */
.venue-section { padding: 96px 0; }
.venue-section .section-inner { padding: 0 24px; }

.venue-carousel {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 32px;
}
.venue-carousel::-webkit-scrollbar { display: none; }

.venue-slide {
  flex-shrink: 0;
  width: 100%;
  scroll-snap-align: start;
  overflow: hidden;
}
.venue-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.venue-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.venue-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-mid);
  transition: background 0.2s ease, transform 0.2s ease;
}
.venue-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ===========================================
   CALENDAR
   =========================================== */
.calendar-wrap {
  width: 100%;
}

.cal-month-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-header {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-bottom: 8px;
}

.cal-day-header.sun { color: #e07070; }
.cal-day-header.sat { color: #7090d0; }

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--text-dim);
  border-radius: 50%;
}

.cal-cell.empty  { pointer-events: none; }
.cal-cell.other  { color: var(--text-muted); opacity: 0.4; }
.cal-cell.sunday { color: #c06060; }
.cal-cell.saturday { color: #6080c0; }

.cal-cell.target {
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  font-size: var(--text-base);
  box-shadow: 0 0 0 4px var(--accent-dim);
  animation: ring-pulse 2.5s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(212,180,122,0.15); }
  50%       { box-shadow: 0 0 0 8px rgba(212,180,122,0.05); }
}

/* ===========================================
   SCHEDULE
   =========================================== */
.schedule-list {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 24px;
  border-left: 1px solid var(--border-mid);
  padding-left: 20px;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}

.schedule-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.schedule-time {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  min-width: 38px;
}

.schedule-name {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}

.schedule-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.03em;
  padding-left: 0;
}

/* ===========================================
   GALLERY GRID
   =========================================== */
.gallery-section {
}


.gallery-clip {
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  overflow: hidden;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gallery-item img.rotate-ccw90 {
  transform: rotate(-90deg) scale(1);
}

.gallery-item:active img {
  transform: scale(0.95);
  opacity: 0.8;
}

.gallery-item:active img.rotate-ccw90 {
  transform: rotate(-90deg) scale(0.95);
}

/* Lightbox rotation for specific photos */
#lightbox-img.rotate-ccw90 {
  transform: rotate(-90deg);
}

.gallery-grid.collapsed .gallery-item:nth-child(n+7) {
  display: none;
}

.gallery-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 18px 24px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  transition: color var(--transition);
}

.gallery-toggle:hover,
.gallery-toggle:active { color: var(--accent); }

.gallery-toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.gallery-toggle[aria-expanded="true"] .gallery-toggle-icon {
  transform: rotate(180deg);
}

/* ===========================================
   LIGHTBOX
   =========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #000;
}

.lightbox-img-wrap {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 480px);
  max-height: 82svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 82svh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

@keyframes lb-slide-right {
  from { transform: translateX(56px); opacity: 0.5; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes lb-slide-left {
  from { transform: translateX(-56px); opacity: 0.5; }
  to   { transform: translateX(0);     opacity: 1; }
}
.lightbox-img-wrap.lb-slide-right { animation: lb-slide-right 0.28s cubic-bezier(0.2,0,0.2,1); }
.lightbox-img-wrap.lb-slide-left  { animation: lb-slide-left  0.28s cubic-bezier(0.2,0,0.2,1); }

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 20px;
  transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-close:active { background: rgba(255,255,255,0.22); }

/* Full-height edge tap zones replace small buttons */
.lightbox-zone {
  position: absolute;
  top: 68px;
  bottom: 0;
  width: 42%;
  z-index: 2;
  background: transparent;
}
.lightbox-zone-prev { left: 0; }
.lightbox-zone-next { right: 0; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

/* ===========================================
   LOCATION
   =========================================== */
.location-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.location-address {
  font-size: var(--text-base);
  color: var(--text-dim);
  line-height: 1.6;
}

.location-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

@media (hover: hover) {
  .location-copy-btn:hover {
    color: var(--accent);
    background: var(--bg-surface);
  }
}
.location-copy-btn:active {
  color: var(--accent);
  background: var(--bg-surface);
}
.location-copy-btn.copied {
  color: var(--accent);
  background: var(--accent-dim);
}

.map-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}

.map-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dim);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  text-align: center;
}

.map-btn:hover, .map-btn:active {
  background: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent);
}

.map-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dim);
}

.transit-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}

.transit-sep {
  width: 100%;
  height: 1px;
  background: var(--border-mid);
  margin: 20px 0;
}

.transit-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.transit-mode {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.transit-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.transit-stop {
  font-size: var(--text-base);
  color: var(--text-dim);
  font-weight: 400;
}

.transit-lines {
  font-size: var(--text-base);
  color: var(--text-dim);
  line-height: 1.7;
}

.transit-muted {
  color: var(--text-dim);
  opacity: 0.6;
}

/* Bus route table */
.bus-table {
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin-top: 4px;
}

.bus-table td {
  padding: 2px 10px 2px 0;
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.7;
}

.bus-label {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 14px !important;
}

/* ===========================================
   BIBLE VERSE
   =========================================== */
.verse-section {
  /* background handled by alternating section rule */
}

.verse-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.verse-in-gallery {
  padding-bottom: 40px;
}

.verse-in-gallery .verse-block::before {
  display: none;
}

.verse-block::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.verse-text {
  font-size: clamp(var(--text-base), 4vw, var(--text-lg));
  line-height: 1.8;
  color: var(--text-dim);
  font-style: normal;
  font-weight: 300;
  text-align: center;
}

.verse-ref {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

/* ===========================================
   RSVP SECTION
   =========================================== */
/* RSVP nudge backdrop */
.rsvp-nudge-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 7999;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.rsvp-nudge-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.rsvp-nudge-backdrop.hidden {
  display: none;
}

/* RSVP nudge floating card */
.rsvp-nudge {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(360px, calc(100% - 48px));
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 40px 28px 36px;
  z-index: 8000;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-reveal);
  text-align: center;
}

.rsvp-nudge.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.rsvp-nudge.hidden {
  display: none;
}

.rsvp-nudge-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rsvp-desc {
  font-size: var(--text-base);
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 32px;
}

.rsvp-open-btn {
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: 100px;
  letter-spacing: 0.06em;
  transition: background var(--transition), color var(--transition);
  animation: pulse-glow 2.5s ease-in-out infinite;
}

.rsvp-open-btn:hover, .rsvp-open-btn:active {
  background: var(--accent);
  color: var(--bg);
}

/* ===========================================
   GIFT ACCOUNTS
   =========================================== */
.gift-desc {
  font-size: var(--text-base);
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 24px;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.account-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
}

.account-header-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.account-role {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.account-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.account-bank-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-num {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  flex: 1;
}

.copy-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dim);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

@media (hover: hover) {
  .copy-btn:hover { background: var(--bg-surface); border-color: var(--accent); color: var(--accent); }
}
.copy-btn:active { background: var(--bg-surface); border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ===========================================
   CLOSING IMAGE
   =========================================== */
.closing-image {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.closing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================================
   FOOTER
   =========================================== */
.site-footer {
  width: 100%;
  padding: 64px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-craft {
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.footer-names {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ===========================================
   MODAL
   =========================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: 88svh;
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border-mid);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: popup-in 0.25s var(--ease-reveal);
}

@keyframes popup-in {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: var(--text-base);
  transition: background var(--transition);
}

.modal-close:hover { background: var(--bg-input); }

/* ===========================================
   FORM ELEMENTS
   =========================================== */
#rsvp-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.req      { color: var(--accent); margin-left: 2px; }
.optional { font-size: var(--text-xs); font-weight: 400; color: var(--text-muted); }

/* Toggle buttons */
.toggle-row {
  display: flex;
  gap: 8px;
}

.guest-count-row {
  flex-wrap: wrap;
}

.toggle-btn {
  flex: 1;
  min-width: 0;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-dim);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.toggle-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Session detail block — subordinate to 참석여부 */
#attend-sessions {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  border-left: 2px solid rgba(212, 180, 122, 0.25);
  padding: 0 0 16px 16px;
  margin-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#attend-sessions.sessions-visible {
  opacity: 1;
  transform: translateY(0);
}

.session-q-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.session-q-label {
  font-size: var(--text-sm);
  color: var(--text-dim);
}
.session-q-label em {
  font-style: normal;
  color: var(--accent);
  font-size: var(--text-xs);
  margin-right: 4px;
}
.session-q-btns {
  display: flex;
  width: 100%;
}
.toggle-btn-sm {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid var(--border-mid);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.toggle-btn-sm + .toggle-btn-sm {
  border-left: none;
}
.toggle-btn-sm:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.toggle-btn-sm:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.toggle-btn-sm:only-child  { border-radius: var(--radius-sm); }
.toggle-btn-sm.active {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
}
/* Restore left border on button following an active one */
.toggle-btn-sm.active + .toggle-btn-sm {
  border-left: 1px solid var(--border-mid);
}

/* Guest group — top-level, conditional on 참석 */
#guest-group {
  flex-direction: column;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#guest-group.guest-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Guest detail — subordinate to 있음 */
#guest-detail {
  flex-direction: column;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  border-left: 2px solid rgba(212, 180, 122, 0.25);
  padding: 8px 0 8px 16px;
  margin-left: 4px;
}
#guest-detail.guest-detail-visible {
  opacity: 1;
  transform: translateY(0);
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.stepper-row + .stepper-row {
  border-top: 1px solid var(--border);
}

.stepper-label {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-weight: 500;
}

.stepper-sublabel {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.stepper-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stepper-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}

.stepper-btn:active:not(:disabled) {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.stepper-count {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dim);
  min-width: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stepper-count.nonzero {
  color: var(--accent);
}

/* Session toggle list */
.session-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.session-row:last-child { border-bottom: none; }

.seg-label {
  font-size: var(--text-base);
  color: var(--text);
}

.seg-label em {
  font-style: normal;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  margin-right: 6px;
  letter-spacing: 0.04em;
}

/* Pill toggle */
.session-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
}

.session-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.session-pill {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  transition: background var(--transition), border-color var(--transition);
}

.session-pill::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--transition), background var(--transition);
}

.session-toggle input:checked + .session-pill {
  background: rgba(180, 220, 160, 0.15);
  border-color: #7ec87e;
}

.session-toggle input:checked + .session-pill::after {
  transform: translateX(20px);
  background: #7ec87e;
}

/* Text inputs */
.form-input {
  width: 100%;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  line-height: 1.5;
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--accent); }

.form-textarea { resize: none; }

/* Privacy checkbox */
.privacy-group { flex-direction: row; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}

.checkbox-custom::after {
  content: '✓';
  font-size: var(--text-sm);
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.checkbox-label input:checked + .checkbox-custom::after {
  opacity: 1;
}

.checkbox-label span:last-child {
  font-size: var(--text-sm);
  color: var(--text-dim);
}

/* Error */
.form-error {
  font-size: var(--text-sm);
  color: var(--danger);
  min-height: 16px;
  display: block;
}

/* Submit */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: var(--bg);
  font-size: var(--text-lg);
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  transition: opacity var(--transition), transform var(--transition);
}

.submit-btn:hover  { opacity: 0.9; }
.submit-btn:active { transform: scale(0.98); }

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Success state */
.form-success {
  padding: 48px 24px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 8px;
}

.success-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.success-body {
  font-size: var(--text-base);
  color: var(--text-dim);
  line-height: 1.8;
}

/* ===========================================
   AOS OVERRIDE — respect dark bg
   =========================================== */
/* will-change applied dynamically by JS; removed after animation completes */

/* ===========================================
   DESKTOP — center column with side gutter
   =========================================== */
@media (min-width: 480px) {
  body { background: #080e18; }

  #intro-cover {
    /* keep it full screen */
    display: flex;
  }

  #main-content {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .modal-sheet {
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .section-inner { opacity: 1; transform: none; }
  .section-inner > * { opacity: 1 !important; transform: none !important; }
}
