@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600&display=swap");

:root {
  --paper: #f7f1e6;
  --paper-dim: #efe6d5;
  --ink: #2b2420;
  --ink-soft: #6b5f54;
  --wine: #7a1f3d;
  --wine-deep: #4a1226;
  --gold: #b08d57;
  --rose-mist: #e4c9c2;
  --card-radius: 18px;
  --shadow: 0 24px 60px -24px rgba(43, 36, 32, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(122, 31, 61, 0.05), transparent 40%),
    radial-gradient(circle at 88% 92%, rgba(122, 31, 61, 0.05), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%237A1F3D' stroke-width='1.3' opacity='0.055'%3E%3Cpath d='M70 18c-10 10-10 22 0 30'/%3E%3Ccircle cx='58' cy='54' r='7'/%3E%3Ccircle cx='72' cy='54' r='7'/%3E%3Ccircle cx='65' cy='64' r='7'/%3E%3Ccircle cx='79' cy='64' r='7'/%3E%3Ccircle cx='58' cy='74' r='7'/%3E%3Ccircle cx='72' cy='74' r='7'/%3E%3Ccircle cx='65' cy='84' r='7'/%3E%3Cpath d='M70 18c6-8 16-9 22-4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat, repeat, repeat;
}

h1, h2, h3 { font-family: "Fraunces", serif; margin: 0; }

button { font-family: inherit; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wine);
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: #fffdf9;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  position: relative;
  border-top: 3px solid var(--gold);
}

.card--wide { max-width: 720px; }

.headline {
  font-size: 30px;
  line-height: 1.2;
  margin: 10px 0 14px;
  color: var(--ink);
}

.body-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  background: var(--wine);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary:hover { background: var(--wine-deep); transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-link {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-link:focus-visible { outline: 2px solid var(--gold); }

.btn-back {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-back:focus-visible { outline: 2px solid var(--gold); }

/* Quiz */
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.progress span {
  height: 4px;
  flex: 1;
  border-radius: 4px;
  background: var(--paper-dim);
}
.progress span.done { background: var(--gold); }

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1.5px solid var(--paper-dim);
  background: #fffdf9;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--rose-mist); background: #fdf6f4; }
.option:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.option.selected { border-color: var(--wine); background: #fdf1ef; }

.option .emoji { font-size: 20px; }

.tick {
  margin-left: auto;
  width: 20px;
  height: 20px;
  flex: none;
}
.tick path {
  fill: none;
  stroke: var(--wine);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: draw 0.35s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Theme cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.theme-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid var(--paper-dim);
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(43,36,32,0.3); }
.theme-card:focus-visible { outline: 3px solid var(--gold); }

.theme-card img { width: 100%; height: 130px; object-fit: cover; display: block; }

.theme-card .body { padding: 14px 16px 18px; }
.theme-card h3 { font-size: 18px; margin-bottom: 6px; }
.theme-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.theme-card .choose {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wine);
  letter-spacing: 0.03em;
}

.ribbon {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wine-deep);
  background: var(--rose-mist);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 28px 0 12px;
}

/* Date picker */
.date-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1.5px solid var(--paper-dim);
  border-radius: 12px;
  background: #fffdf9;
  cursor: pointer;
}
.date-option:hover { border-color: var(--rose-mist); }
.date-option:focus-visible { outline: 3px solid var(--gold); }
.date-option .when { font-weight: 600; font-size: 15px; }
.date-option .where { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.detail-img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }

/* Voucher */
.voucher {
  position: relative;
}
.voucher-eyebrow { text-align: center; margin-bottom: 6px; }
.voucher-greeting {
  text-align: center;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.voucher-title { text-align: center; font-size: 26px; margin-bottom: 4px; }
.voucher-sub { text-align: center; color: var(--ink-soft); font-size: 13.5px; margin-bottom: 20px; }
.voucher img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }

.voucher-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(176,141,87,0.4);
  font-size: 14px;
}
.voucher-row .label { color: var(--ink-soft); }
.voucher-row .value { font-weight: 600; text-align: right; }

.voucher-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 16px 0; }

.voucher-footer {
  text-align: center;
  margin-top: 20px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 16px;
  color: var(--wine);
}
.voucher-signed {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.seal {
  position: absolute;
  top: -26px;
  right: 18px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--wine) 0%, var(--wine-deep) 70%);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.25),
    inset 0 -6px 10px rgba(0,0,0,0.35),
    0 10px 18px -6px rgba(43,36,32,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-10deg);
  animation: stamp 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  animation-delay: 0.25s;
}
.seal svg { width: 30px; height: 30px; opacity: 0.9; }

@keyframes stamp {
  0% { opacity: 0; transform: translateY(-46px) rotate(-30deg) scale(1.6); }
  60% { opacity: 1; transform: translateY(4px) rotate(-6deg) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) rotate(-10deg) scale(1); }
}

/* Page transition */
.page-enter-active { transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22,0.61,0.36,1); }
.page-leave-active { transition: opacity 0.2s ease, transform 0.2s ease; }
.page-enter-from { opacity: 0; transform: translateX(18px); }
.page-leave-to { opacity: 0; transform: translateX(-18px); }

@media (prefers-reduced-motion: reduce) {
  .page-enter-active, .page-leave-active { transition: opacity 0.2s ease; }
  .page-enter-from, .page-leave-to { transform: none; }
  .seal { animation: none; }
  .tick path { animation: none; stroke-dashoffset: 0; }
  .theme-card:hover, .btn-primary:hover { transform: none; }
}

@media (max-width: 480px) {
  .card { padding: 32px 22px; }
  .headline { font-size: 25px; }
}
