/* Invitino — global styles */
:root {
  --bg: #FFF7F2;
  --bg-2: #F9EBE0;
  --ink: #2D2438;
  --ink-2: #5A4F69;
  --ink-3: #8B7F95;
  --line: rgba(45, 36, 56, 0.08);
  --line-2: rgba(45, 36, 56, 0.14);
  --primary: #FF6B9D;
  --primary-2: #FFB1CC;
  --secondary: #8B7CF8;
  --accent: #FFB84D;
  --green: #4FB890;
  --card: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(45, 36, 56, 0.06), 0 2px 6px rgba(45, 36, 56, 0.04);
  --shadow-md: 0 4px 12px rgba(45, 36, 56, 0.08), 0 12px 32px rgba(45, 36, 56, 0.06);
  --shadow-lg: 0 8px 28px rgba(45, 36, 56, 0.12), 0 24px 64px rgba(45, 36, 56, 0.10);
  --font-ui: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-script: 'Caveat', cursive;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-ui);
  background: #EFE7DF;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input, textarea { font-family: inherit; }

/* App scroll surface inside the iOS device */
.app-shell {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.app-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.app-scroll::-webkit-scrollbar { display: none; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  box-shadow: 0 6px 18px rgba(45, 36, 56, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.35; box-shadow: none; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--ink-2);
  background: transparent;
}

/* Inputs */
.input {
  width: 100%;
  height: 64px;
  padding: 0 22px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-size: 22px; font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.15); }
.input::placeholder { color: var(--ink-3); font-weight: 500; }

/* Headings */
.h-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary);
}
.h-display {
  font-family: var(--font-display);
  font-size: 38px; line-height: 1.05; letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}
.h-section {
  font-size: 28px; line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 800; color: var(--ink);
  text-wrap: balance;
}

/* Step progress dots */
.dots { display: flex; gap: 6px; }
.dot {
  width: 22px; height: 6px; border-radius: 3px;
  background: var(--line-2);
  transition: background 0.2s ease, width 0.2s ease;
}
.dot.active { background: var(--primary); }
.dot.done { background: var(--ink); }

/* Theme card */
.theme-card {
  position: relative;
  aspect-ratio: 1 / 1.2;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  background: #fff;
}
.theme-card:active { transform: scale(0.97); }
.theme-card.selected { border-color: var(--ink); box-shadow: 0 6px 18px rgba(45, 36, 56, 0.18); }
.theme-card .check {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.6);
  transition: all 0.18s ease;
}
.theme-card.selected .check { opacity: 1; transform: scale(1); }

/* Watermark overlay */
.watermark-layer {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -30deg,
    transparent 0,
    transparent 60px,
    rgba(0,0,0,0.04) 60px,
    rgba(0,0,0,0.04) 120px
  );
  pointer-events: none;
}
.watermark-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.watermark-text > div {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: rgba(0,0,0,0.18);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px 60px;
  transform: rotate(-30deg) scale(1.5);
  width: 200%;
  text-align: center;
}

/* Bottom sheet */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 16, 28, 0.5);
  backdrop-filter: blur(2px);
  z-index: 50;
  animation: fadeIn 0.2s ease;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 24px 24px 0 0;
  z-index: 51;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* invitations container — 3:4 cards */
.invite-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.invite-card:active { transform: scale(0.98); }
.invite-card.selected-preview {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Confetti animation */
@keyframes confetti-fall {
  from { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  to { transform: translateY(700px) rotate(720deg); opacity: 0; }
}

/* shimmer for loading */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-bar {
  background: linear-gradient(90deg, var(--bg-2) 0%, #fff 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

/* tag chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-2);
  font-weight: 600; font-size: 13px;
  color: var(--ink-2);
}

.iconbtn {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

/* fade-in transition between steps */
.fade-step {
  animation: fadeStepIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes fadeStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
