@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Great+Vibes&family=Lato:wght@300;400;700&display=swap");

:root {
  --cream: #fffaf5;
  --cream-2: #fbf2ea;
  --blush: #f3d9d5;
  --blush-2: #e9bfb8;
  --rose: #c98b86;
  --rose-dark: #a86560;
  --gold: #c9a961;
  --gold-light: #e6d3a3;
  --ink: #3d2b2b;
  --ink-soft: #7a6666;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(120, 80, 70, 0.14);
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(243, 217, 213, 0.65), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(230, 211, 163, 0.35), transparent 60%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rose-dark); }

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

.script {
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-weight: 400;
  color: var(--rose-dark);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
}

.muted { color: var(--ink-soft); }

/* ---------- Ornaments ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin: 18px 0 26px;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider svg { width: 26px; height: 26px; }

.floral {
  position: fixed;
  width: min(42vw, 360px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.floral.tl { top: -20px; left: -30px; }
.floral.br { bottom: -20px; right: -30px; transform: rotate(180deg); }

/* ---------- Layout blocks ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 40px 0 10px;
  z-index: 1;
}

.card {
  position: relative;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  z-index: 1;
}
.card + .card { margin-top: 24px; }
.card.center { text-align: center; }
.card.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  position: relative;
  z-index: 1;
}
@media (min-width: 820px) {
  .grid.two { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(168, 101, 96, 0.3);
}
.btn-google {
  background: var(--white);
  color: var(--ink);
  border-color: rgba(61, 43, 43, 0.15);
  box-shadow: 0 8px 22px rgba(120, 80, 70, 0.12);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  padding: 14px 28px;
}
.btn-google svg { width: 20px; height: 20px; }
.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--ink);
}
.btn-outline:hover { background: rgba(201, 169, 97, 0.12); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 14px;
  font-size: 0.75rem;
}
.btn-ghost:hover { color: var(--rose-dark); }

label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 14px 0 6px;
  font-weight: 700;
}
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(201, 169, 97, 0.5);
  background: var(--white);
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}
input[type="text"]:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(201, 139, 134, 0.18);
}

/* ---------- Dashboard ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .script { font-size: 1.9rem; margin: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.user-chip img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold-light); }

.qr-frame {
  display: inline-block;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--gold-light);
  border-radius: 18px;
  background: var(--white);
  box-shadow: inset 0 0 0 6px var(--cream);
}
.qr-frame img { display: block; width: 300px; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.link-box input { flex: 1; font-size: 0.9rem; }

.stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.stat .num {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--rose-dark);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.notice {
  background: rgba(201, 169, 97, 0.14);
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* ---------- Upload page ---------- */
.dropzone {
  margin-top: 8px;
  border: 2px dashed var(--blush-2);
  border-radius: 18px;
  padding: 36px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.dropzone.drag { background: var(--blush); border-color: var(--rose); }
.dropzone svg { width: 46px; height: 46px; color: var(--rose); margin-bottom: 8px; }
.dropzone input { display: none; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream-2);
  border: 1px solid var(--gold-light);
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .status {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 250, 245, 0.85);
  font-size: 1.6rem;
}
.thumb .status.ok { background: rgba(200, 235, 205, 0.85); }
.thumb .status.fail { background: rgba(240, 190, 190, 0.85); }
.thumb .remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(61, 43, 43, 0.7); color: white;
  font-size: 14px; line-height: 22px; cursor: pointer; padding: 0;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--cream-2);
  overflow: hidden;
  margin-top: 18px;
  display: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  transition: width 0.2s ease;
}

.result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  display: none;
}
.result.ok { display: block; background: rgba(200, 235, 205, 0.5); border: 1px solid #a8d5b0; }
.result.fail { display: block; background: rgba(240, 190, 190, 0.5); border: 1px solid #e0a0a0; }

.thanks {
  text-align: center;
  padding: 30px 10px;
}
.thanks .script { font-size: 3.2rem; }

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  position: relative;
  z-index: 1;
}

/* ---------- Steps (landing) ---------- */
.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  margin-top: 30px;
  text-align: left;
}
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(201, 169, 97, 0.3);
}
.step .n {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Language switch ---------- */
.lang-switch {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--gold);
}
.lang-switch:hover { color: var(--rose-dark); }

/* ---------- Guest gallery ---------- */
.gallery {
  position: relative; z-index: 1;
  max-width: 900px; margin: 44px auto 0;
}
.gallery-head { text-align: center; margin-bottom: 18px; }
.gallery-head h2 { margin-bottom: 4px; }
.gallery-head p { margin: 0; font-size: .9rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } }
.g-tile {
  position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--gold-light);
  border-radius: 14px; overflow: hidden; background: var(--cream-2); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.g-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(120, 80, 70, 0.18); }
.g-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-tile.no-thumb img { display: none; }
.g-tile.no-thumb::after {
  content: "✦"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.6rem;
}
.g-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: rgba(61, 43, 43, .65); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .9rem; padding-left: 3px;
}
.gallery-empty {
  text-align: center; padding: 34px 20px; border: 1px dashed var(--blush-2); border-radius: 18px;
  background: rgba(255, 255, 255, .5);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30, 18, 18, .92);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.lb-stage { max-width: 100vw; max-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lb-stage img, .lb-stage video { max-width: calc(100vw - 32px); max-height: calc(100vh - 90px); border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-caption { color: #f3d9d5; font-family: "Cormorant Garamond", serif; font-size: 1.2rem; min-height: 1.6rem; margin-bottom: 14px; }
.lb-btn {
  position: absolute; border: none; background: rgba(255, 250, 245, .12); color: #fff;
  width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 44px; cursor: pointer; padding: 0;
}
.lb-btn:hover { background: rgba(255, 250, 245, .25); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
