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

:root {
  --cloud: #F0EAE7;
  --cloud-light: #F7F3F0;
  --cloud-warm: #E8DDD5;
  --blush: #F2D7D5;
  --sage: #D5DDD2;
  --heart: #E8B4B8;
  --text: #3C3632;
  --text-sub: #8A7E76;
  --text-light: #B5AAA1;
  --accent: #C4B5A7;
  --white: #FFFFFF;
}

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

body {
  font-family: 'Gowun Batang', 'Nanum Myeongjo', 'Batang', serif;
  background: var(--cloud);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.lang-el { font-family: 'Noto Serif', serif; }

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

.lang-ko .el { display: none; }
.lang-el .ko { display: none; }

/* ── Language Toggle ── */
.lang-toggle {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 4px;
  box-shadow: 0 2px 16px rgba(60,54,50,0.08);
}

.lang-btn {
  padding: 12px 18px;
  border: none;
  background: transparent;
  border-radius: 24px;
  font-family: 'Noto Serif', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.35s ease;
  white-space: nowrap;
}

.lang-btn.active {
  background: var(--blush);
  color: var(--text);
}

/* ── Floating Hearts ── */
.hearts-container {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.float-heart {
  position: absolute;
  color: var(--heart);
  opacity: 0;
  will-change: transform, opacity;
  animation: heartFloat linear infinite;
}

@keyframes heartFloat {
  0%   { transform: translateY(105vh) translateX(0) rotate(0deg) scale(1); opacity: 0; }
  8%   { opacity: 0.5; }
  50%  { transform: translateY(50vh) translateX(20px) rotate(180deg) scale(0.8); opacity: 0.35; }
  92%  { opacity: 0.2; }
  100% { transform: translateY(-5vh) translateX(-15px) rotate(360deg) scale(0.6); opacity: 0; }
}

/* ── Cover ── */
.cover {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 36px 60px;
  position: relative;
}

.cover-deco {
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

.cover-label {
  font-family: 'Noto Serif', serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--text-light);
  opacity: 0;
  animation: fadeUp 1s ease-out 0.6s forwards;
}

.cover-heading {
  font-family: 'Gowun Batang', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 20px;
  opacity: 0;
  animation: fadeUp 1s ease-out 0.9s forwards;
}

body.lang-el .cover-heading {
  font-family: 'Noto Serif', serif;
  font-style: normal;
  font-weight: 600;
  font-size: 20px;
}

.cover-names {
  font-family: 'Noto Serif', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 1.2s ease-out 1.2s forwards;
}

.lang-ko .cover-names {
  font-family: 'Gowun Batang', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
}

.cover-amp {
  color: var(--heart);
  font-family: 'Noto Serif', serif;
  font-size: 24px;
  font-weight: 300;
  display: block;
  margin: 4px 0;
}

.cover-bride-sub {
  display: block;
  font-size: 0.75em;
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 2px;
  color: var(--text-sub);
}

.cover-date {
  font-family: 'Noto Serif', serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--text-sub);
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp 1s ease-out 1.6s forwards;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease-out 2.4s forwards;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--text-light));
  margin: 0 auto;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,100% { transform: translateY(0); opacity: 0.3; }
  50%     { transform: translateY(8px); opacity: 1; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Polaroid ── */
.polaroid-section {
  padding: 48px 36px;
  display: flex;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

.polaroid {
  padding: 10px 10px 42px 10px;
  background: var(--white);
  box-shadow: 0 3px 18px rgba(60,54,50,0.09);
  position: relative;
  transition: transform 0.5s ease;
  max-width: 300px;
  width: 80%;
}

.polaroid img {
  width: 100%;
  display: block;
}

.polaroid-caption {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Noto Serif', serif;
  font-size: 15px;
  color: var(--text-light);
}

.tilt-l  { transform: rotate(-2.5deg); }
.tilt-r  { transform: rotate(2deg); }
.tilt-sl { transform: rotate(-0.8deg); }

.polaroid-section.in-view .tilt-l  { transform: rotate(-2.5deg) scale(1); }
.polaroid-section.in-view .tilt-r  { transform: rotate(2deg) scale(1); }

/* ── Text Sections ── */
.section-text {
  padding: 64px 36px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Noto Serif', serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.dot-divider {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
}

.dot-divider span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.invitation-text {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text);
  word-break: keep-all;
}

body.lang-el .invitation-text {
  font-family: 'Noto Serif', serif;
  font-size: 15px;
  line-height: 2;
}

/* ── Couple ── */
.couple-section {
  padding: 64px 36px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.couple-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.couple-side { flex: 1; text-align: center; }

.couple-role {
  font-family: 'Noto Serif', serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.couple-parents {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 12px;
}

body.lang-el .couple-parents {
  font-family: 'Noto Serif', serif;
  font-size: 12px;
}

.couple-name {
  font-family: 'Gowun Batang', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 4px;
}

body.lang-el .couple-name {
  font-family: 'Noto Serif', serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1px;
}

.couple-name-en {
  font-family: 'Noto Serif', serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text-sub);
  margin-top: 4px;
}

.couple-heart {
  flex-shrink: 0;
  margin-top: 48px;
  animation: heartPulse 2s ease-in-out infinite;
  color: var(--heart);
  font-size: 18px;
  line-height: 1;
}

@keyframes heartPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.2); }
}

/* ── Calendar & Countdown ── */
.calendar-section {
  padding: 64px 36px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.calendar-month {
  font-family: 'Noto Serif', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin: 24px auto;
  max-width: 300px;
}

.cal-h {
  font-family: 'Noto Serif', serif;
  font-size: 12px;
  color: var(--text-light);
  padding: 6px 0;
  text-align: center;
}

.cal-h.sun { color: #C48B7A; }
.cal-h.sat { color: #7A9CC4; }

.cal-d {
  font-family: 'Noto Serif', serif;
  font-size: 15px;
  padding: 7px 0;
  text-align: center;
  color: var(--text-sub);
  position: relative;
}

.cal-d.sun { color: #C48B7A; }
.cal-d.sat { color: #7A9CC4; }
.cal-d.empty { visibility: hidden; }

.cal-d.wedding {
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.cal-d.wedding::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 30px; height: 30px;
  background: var(--blush);
  border-radius: 50%;
  z-index: -1;
}

.calendar-info {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-top: 8px;
}

body.lang-el .calendar-info {
  font-family: 'Noto Serif', serif;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.cd-item { text-align: center; }

.cd-num {
  font-family: 'Noto Serif', serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.cd-label {
  font-family: 'Noto Serif', serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-light);
  margin-top: 4px;
}

.cd-dot {
  font-family: 'Noto Serif', serif;
  font-size: 24px;
  color: var(--heart);
  align-self: flex-start;
  margin-top: 6px;
}

/* ── Location ── */
.location-section {
  padding: 64px 36px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.location-name {
  font-family: 'Gowun Batang', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

body.lang-el .location-name {
  font-family: 'Noto Serif', serif;
  font-weight: 600;
}

.location-detail {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
}

body.lang-el .location-detail {
  font-family: 'Noto Serif', serif;
}

/* ── Gallery ── */
.gallery-section {
  padding: 64px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.gallery-section .section-label { text-align: center; }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.gallery-polaroid {
  padding: 8px 8px 34px 8px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(60,54,50,0.07);
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

.gallery-polaroid:active { transform: scale(0.97) !important; }

.gallery-polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.gallery-polaroid:nth-child(1) { transform: rotate(-1.5deg); }
.gallery-polaroid:nth-child(2) { transform: rotate(2deg); margin-top: 20px; }
.gallery-polaroid:nth-child(3) { transform: rotate(1deg); }
.gallery-polaroid:nth-child(4) { transform: rotate(-2deg); margin-top: 20px; }
.gallery-polaroid:nth-child(5) { transform: rotate(-0.5deg); }
.gallery-polaroid:nth-child(6) { transform: rotate(1.8deg); margin-top: 20px; }

/* ── Accounts ── */
.accounts-section {
  padding: 64px 36px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.account-group { margin-top: 24px; }

.account-toggle {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--cloud-warm);
  border-radius: 28px;
  font-family: 'Gowun Batang', serif;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 6px;
}

body.lang-el .account-toggle {
  font-family: 'Noto Serif', serif;
  font-size: 13px;
}

.account-toggle:active { background: rgba(255,255,255,0.9); }

.account-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.account-details.open { max-height: 300px; }

.account-card {
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-info { text-align: left; }
.account-bank { font-size: 11px; color: var(--text-light); }

.account-number {
  font-family: 'Noto Serif', serif;
  font-size: 15px;
  color: var(--text);
  margin: 2px 0;
}

.account-holder { font-size: 12px; color: var(--text-sub); }

.copy-btn {
  padding: 12px 16px;
  border: 1px solid var(--blush);
  border-radius: 20px;
  background: transparent;
  font-family: 'Noto Serif', serif;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn.copied {
  background: var(--blush);
  color: var(--text);
  border-color: var(--blush);
}

/* ── Footer ── */
.footer-section {
  padding: 64px 36px 100px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.footer-msg {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 2;
}

body.lang-el .footer-msg {
  font-family: 'Noto Serif', serif;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 12px 28px;
  border: 1px solid var(--blush);
  border-radius: 28px;
  background: transparent;
  font-family: 'Noto Serif', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-btn:active {
  background: var(--blush);
}

.footer-names {
  margin-top: 40px;
  font-family: 'Noto Serif', serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--text-light);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(26,26,26,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.lightbox.active { display: flex; opacity: 1; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
}

.lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border: none; background: transparent; cursor: pointer;
}

.lb-close::before, .lb-close::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 20px; height: 1px;
  background: rgba(255,255,255,0.7);
}

.lb-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.lb-close::after  { transform: translate(-50%,-50%) rotate(-45deg); }

/* ── Scroll Reveal ── */
/* Only hide elements when JS is confirmed loaded */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.js-ready .reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 36px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 24px;
  font-family: 'Noto Serif', serif;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 300;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 320px narrow screens ── */
@media (max-width: 360px) {
  .couple-row { flex-direction: column; gap: 32px; }
  .couple-heart { margin-top: 0; }
  .couple-section { padding: 64px 24px; }
  .section-text { padding: 64px 24px; }
  .calendar-section { padding: 64px 24px; }
  .accounts-section { padding: 64px 24px; }
  .cover { padding: 80px 24px 60px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .float-heart { display: none; }
  .js-ready .reveal { opacity: 1; transform: none; transition: none; }
  .cover-deco, .cover-label, .cover-heading, .cover-names, .cover-date, .scroll-hint {
    opacity: 1; animation: none;
  }
  .couple-heart { animation: none; }
  .scroll-hint span { animation: none; }
}
