/* ================================================================
   Dawaa — Luxury Purple/Gold Design System
   ================================================================ */

@font-face {
  font-family: "Tajawal";
  src: url("/static/fonts/Tajawal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("/static/fonts/Tajawal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Brand colors */
  --purple-900: #2a1a3e;
  --purple-800: #3d2654;
  --purple-700: #4f3168;
  --purple-600: #5b2d7a;
  --purple-500: #6d3d8f;
  --purple-400: #8b5fa8;
  --purple-300: #b291c7;
  --purple-200: #d8c7e3;
  --purple-100: #ede5f3;
  --purple-50:  #f7f3fa;

  --gold-700: #a8895a;
  --gold-600: #c9a875;
  --gold-500: #d4b582;
  --gold-400: #e0c89a;
  --gold-300: #ecdbb6;
  --gold-100: #f7eed7;
  --gold-50:  #fcf8ec;

  --cream-100: #faf8f2;
  --cream-200: #f5f0e8;
  --cream-300: #e8e2d8;

  --ink-900: #1f1530;
  --ink-700: #4a3a5e;
  --ink-500: #6b5a7f;
  --ink-300: #a092b0;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #2563eb;
  --info-bg: #dbeafe;

  /* Surfaces */
  --bg: #faf7f1;
  --bg-pattern: radial-gradient(ellipse at top right, rgba(201, 168, 117, 0.06), transparent 50%),
                radial-gradient(ellipse at bottom left, rgba(91, 45, 122, 0.04), transparent 50%);
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --border: #ece4d4;
  --border-strong: #d9cdb6;

  /* Effects */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(42, 26, 62, 0.04);
  --shadow: 0 4px 14px rgba(42, 26, 62, 0.06);
  --shadow-lg: 0 12px 32px rgba(42, 26, 62, 0.08);
  --shadow-purple: 0 8px 20px rgba(91, 45, 122, 0.18);

  --grad-primary: linear-gradient(135deg, #6d3d8f 0%, #4f2675 100%);
  --grad-gold: linear-gradient(135deg, #d4b582 0%, #b8915a 100%);
  --grad-soft: linear-gradient(180deg, #ffffff 0%, #faf7f1 100%);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Tajawal", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.6;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--purple-600); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--purple-700); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { color: var(--ink-900); line-height: 1.3; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

/* ---------- Layout ---------- */
.container { max-width: 1320px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }
.app-main { padding: 1.75rem 0 4rem; min-height: calc(100vh - 80px); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.flex { display: flex; align-items: center; gap: 0.75rem; }
.flex-col { display: flex; flex-direction: column; gap: 0.75rem; }
.flex-between { justify-content: space-between; }
.flex-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; } .gap-4 { gap: 2rem; }

/* ---------- Navbar ---------- */
.app-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky; top: 0;
  z-index: 50;
}
.app-navbar .container {
  display: flex; align-items: center; gap: 2rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}
.navbar-brand img {
  width: 48px; height: 48px;
  object-fit: contain;
}
.navbar-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.navbar-brand-name {
  font-size: 1.15rem; font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.navbar-brand-tagline {
  font-size: 0.72rem;
  color: var(--gold-700);
  letter-spacing: 0.04em;
}

.navbar-nav {
  display: flex; align-items: center; gap: 0.25rem;
  margin: 0 auto;
}
.navbar-link {
  position: relative;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.navbar-link:hover {
  color: var(--purple-600);
  background: var(--purple-50);
}
.navbar-link.is-active {
  color: var(--purple-600);
  font-weight: 700;
}
.navbar-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -0.95rem; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--purple-600);
  border-radius: 3px;
}

.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.navbar-iconbtn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--purple-50);
  color: var(--purple-600);
  display: grid; place-items: center;
  transition: background 0.15s;
  position: relative;
}
.navbar-iconbtn:hover { background: var(--purple-100); }
.navbar-iconbtn .dot {
  position: absolute; top: 8px; left: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-600);
  border: 2px solid white;
}

.user-chip {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.5rem 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s;
}
.user-chip:hover { border-color: var(--purple-300); }
.user-chip-info { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-chip-name { font-size: 0.88rem; font-weight: 700; color: var(--ink-900); }
.user-chip-badge {
  font-size: 0.7rem;
  color: var(--gold-700);
  display: flex; align-items: center; gap: 0.2rem;
}
.user-chip-badge::before { content: "★"; font-size: 0.65rem; }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.95rem;
}

.navbar-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--purple-50);
  color: var(--purple-600);
  font-weight: 700; font-size: 0.9rem;
  transition: background 0.15s;
}
.navbar-cta:hover { background: var(--purple-100); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: var(--shadow-purple);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(91, 45, 122, 0.24);
  color: white;
}
.btn-secondary {
  background: white;
  color: var(--ink-700);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--purple-300); color: var(--purple-700); }

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}
.btn-ghost:hover { background: var(--purple-50); color: var(--purple-600); }

.btn-gold { background: var(--grad-gold); color: white; }
.btn-gold:hover { transform: translateY(-1px); color: white; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.card-header h3 {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 1.08rem;
}
.card-header .link {
  font-size: 0.88rem;
  color: var(--purple-600);
  font-weight: 600;
  display: flex; align-items: center; gap: 0.25rem;
}
.card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--purple-50);
  color: var(--purple-600);
  display: grid; place-items: center;
}
.card-icon.is-gold { background: var(--gold-50); color: var(--gold-700); }

/* Hero card (welcome + envelope) */
.hero-welcome {
  position: relative;
  overflow: hidden;
  padding: 2rem 2rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: center;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 90% 50%, rgba(212, 181, 130, 0.10), transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(91, 45, 122, 0.06), transparent 50%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-welcome-visual {
  position: relative;
  height: 220px;
  display: grid; place-items: center;
}
.hero-welcome-text { text-align: center; }
.hero-welcome-greeting {
  font-size: 0.95rem;
  color: var(--ink-500);
  margin-bottom: 0.4rem;
  display: inline-flex; gap: 0.3rem;
}
.hero-welcome-text h1 {
  font-size: 1.9rem;
  margin-bottom: 0.7rem;
  color: var(--ink-900);
  line-height: 1.35;
}
.hero-welcome-text p {
  color: var(--ink-500);
  font-size: 0.98rem;
  max-width: 460px;
  margin: 0 auto 1.3rem;
}
.hero-welcome-actions {
  display: flex; gap: 0.7rem; justify-content: center;
  flex-wrap: wrap;
}

.hero-create-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.3rem;
  background: var(--grad-primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 700;
  box-shadow: var(--shadow-purple);
}
.hero-create-btn:hover { color: white; transform: translateY(-1px); }

.envelope-illustration {
  position: relative;
  width: 280px; height: 200px;
}
.envelope-illustration::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--purple-600) 0%, var(--purple-800) 100%);
  border-radius: 12px;
  transform: rotate(-6deg);
  box-shadow: var(--shadow-lg);
}
.envelope-illustration::after {
  content: "";
  position: absolute;
  top: 10%; right: 8%;
  width: 75%; height: 80%;
  background: var(--surface);
  border-radius: 8px;
  transform: rotate(4deg);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.envelope-illustration .badge-leaf {
  position: absolute;
  font-size: 2.5rem;
  z-index: 2;
}
.envelope-letter {
  position: absolute;
  top: 22%; right: 14%;
  width: 66%; height: 70%;
  background: var(--surface);
  border-radius: 8px;
  transform: rotate(4deg);
  display: grid; place-items: center;
  z-index: 2;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.envelope-letter img {
  width: 56%; opacity: 0.95;
}

/* Stats card */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.stat-cell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem;
  padding: 0.95rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.stat-cell-info { display: flex; flex-direction: column; line-height: 1.2; }
.stat-cell-label { font-size: 0.78rem; color: var(--ink-500); margin-bottom: 0.2rem; }
.stat-cell-value { font-size: 1.4rem; font-weight: 700; color: var(--ink-900); }
.stat-cell-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple-100);
  color: var(--purple-600);
  flex-shrink: 0;
}
.stat-cell-icon.is-gold { background: var(--gold-100); color: var(--gold-700); }

/* Template / design cards */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.template-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.18s;
  cursor: pointer;
  position: relative;
  display: flex; flex-direction: column;
}
.template-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-300);
}
.template-card.is-selected {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px var(--purple-100);
}
.template-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 0.6rem; left: 0.6rem;
  width: 26px; height: 26px;
  background: var(--purple-600);
  color: white;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  z-index: 2;
}
.template-card-img {
  aspect-ratio: 3/4;
  background: var(--cream-200);
  display: grid; place-items: center;
  overflow: hidden;
}
.template-card-img img { width: 100%; height: 100%; object-fit: cover; }
.template-card-body { padding: 0.7rem 0.9rem; text-align: center; }
.template-card-name { font-weight: 700; font-size: 0.95rem; color: var(--ink-900); margin-bottom: 0.15rem; }
.template-card-cat { font-size: 0.78rem; color: var(--ink-500); }

/* Preview card (invitation preview) */
.preview-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.preview-invitation {
  background:
    radial-gradient(ellipse at top right, rgba(212, 181, 130, 0.18), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(212, 181, 130, 0.12), transparent 45%),
    #faf5ed;
  border: 1px solid var(--gold-300);
  border-radius: var(--radius);
  padding: 2.2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.preview-invitation::before,
.preview-invitation::after {
  content: "";
  position: absolute;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--purple-200), var(--purple-300));
  opacity: 0.35;
  border-radius: 50%;
  filter: blur(20px);
}
.preview-invitation::before { top: 10px; right: 10px; }
.preview-invitation::after { bottom: 10px; left: 10px; }
.preview-invitation > * { position: relative; z-index: 1; }
.preview-intro { color: var(--ink-700); font-size: 0.85rem; margin-bottom: 0.3rem; }
.preview-subintro { color: var(--ink-500); font-size: 0.8rem; margin-bottom: 1rem; }
.preview-names {
  font-size: 2rem;
  font-weight: 700;
  color: var(--purple-700);
  margin: 0.75rem 0 1rem;
  line-height: 1.2;
}
.preview-names .amp { color: var(--gold-600); margin: 0 0.4rem; font-weight: 400; }
.preview-divider {
  width: 60%; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-400), transparent);
  margin: 0.9rem auto;
}
.preview-date {
  font-size: 1rem;
  color: var(--ink-700);
  margin: 0.4rem 0;
}
.preview-location { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 0.6rem; }
.preview-closing { color: var(--ink-500); font-size: 0.85rem; }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.table {
  width: 100%; border-collapse: collapse;
}
.table th, .table td {
  padding: 0.85rem 1.1rem;
  text-align: right;
  vertical-align: middle;
  border-bottom: 1px solid var(--cream-200);
  font-size: 0.92rem;
}
.table th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-500);
  text-transform: none;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--purple-50); }
.table .thumb {
  width: 42px; height: 56px;
  border-radius: 6px;
  background: var(--cream-200);
  object-fit: cover;
}
.table-actions { display: flex; gap: 0.35rem; justify-content: flex-end; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.badge-active, .badge-paid, .badge-confirmed_by_user, .badge-published, .badge-success { background: var(--success-bg); color: #166534; }
.badge-pending, .badge-attempted, .badge-awaiting_payment, .badge-draft { background: var(--warning-bg); color: #92400e; }
.badge-failed, .badge-canceled, .badge-blocked, .badge-revoked { background: var(--danger-bg); color: #991b1b; }
.badge-closed, .badge-not_sent, .badge-expired { background: #e5e7eb; color: #4b5563; }
.badge-info, .badge-other { background: var(--info-bg); color: #1e40af; }
.badge-purple { background: var(--purple-100); color: var(--purple-700); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); }
.badge::before { display: none; }
.badge.has-dot::before { display: inline-block; }

/* ---------- Forms ---------- */
.form-section { margin-bottom: 2rem; }
.form-section-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple-700);
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.form-section-title::before {
  content: "";
  width: 4px; height: 18px;
  background: var(--grad-primary);
  border-radius: 2px;
}

.form-grid { display: grid; gap: 1rem; }
.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
  display: flex; align-items: center; gap: 0.25rem;
}
.form-label .req { color: var(--danger); font-weight: 700; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.95rem;
  color: var(--ink-900);
  font-family: inherit;
  transition: all 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-100);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-300); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: 0.8rem; color: var(--ink-500); margin-top: 0.2rem; }
.form-error { font-size: 0.82rem; color: var(--danger); margin-top: 0.2rem; }

.form-field-icon { position: relative; }
.form-field-icon .icon {
  position: absolute;
  top: 50%; left: 0.85rem;
  transform: translateY(-50%);
  color: var(--ink-300);
  pointer-events: none;
}
.form-field-icon input { padding-left: 2.4rem; }

/* Style chips (e.g. design style: kalasiki, fakher...) */
.chip-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: white;
  color: var(--ink-700);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--purple-300); color: var(--purple-700); }
.chip.is-active {
  background: var(--purple-50);
  border-color: var(--purple-500);
  color: var(--purple-700);
}
.chip.is-active::before { content: "👑"; font-size: 0.85rem; }

/* Color swatches */
.swatch-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.swatch {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.swatch:hover { transform: scale(1.07); }
.swatch.is-active {
  border-color: var(--purple-700);
  box-shadow: 0 0 0 2px white inset;
}
.swatch.is-active::after {
  content: "✓";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.15s;
}
.upload-zone:hover { border-color: var(--purple-400); background: var(--purple-50); }
.upload-zone-icon {
  font-size: 1.6rem;
  color: var(--purple-500);
  margin-bottom: 0.5rem;
}
.upload-zone-title { font-weight: 600; color: var(--ink-700); margin-bottom: 0.2rem; }
.upload-zone-divider {
  margin: 0.75rem 0;
  color: var(--ink-300);
  font-size: 0.85rem;
  position: relative;
}
.upload-zone .btn { margin: 0.5rem auto 0; }

/* ---------- Stepper ---------- */
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.step {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  position: relative;
}
.step-num {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--cream-200);
  color: var(--ink-300);
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.95rem;
  border: 2px solid var(--border);
  transition: all 0.2s;
  z-index: 2; position: relative;
  background-color: white;
}
.step-label {
  font-size: 0.88rem;
  color: var(--ink-500);
  font-weight: 600;
}
.step.is-active .step-num {
  background: var(--grad-primary);
  color: white;
  border-color: var(--purple-600);
  box-shadow: 0 0 0 4px var(--purple-100);
}
.step.is-active .step-label { color: var(--purple-700); }
.step.is-done .step-num {
  background: var(--purple-50);
  color: var(--purple-600);
  border-color: var(--purple-400);
}
.step.is-done .step-num::before { content: "✓"; }
.step.is-done .step-label { color: var(--purple-600); }
.step.is-done .step-num > span { display: none; }

.step + .step::after {
  content: "";
  position: absolute;
  top: 19px; right: 50%;
  width: 100%; height: 2px;
  background: var(--border);
  z-index: 1;
}
.step.is-done + .step::after,
.step.is-active + .step::after { background: var(--purple-200); }

/* ---------- Sidebar info cards ---------- */
.sidebar-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}
.sidebar-card-title {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.85rem;
}
.sidebar-card-title .icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--purple-50);
  color: var(--purple-600);
  display: grid; place-items: center;
  font-size: 0.85rem;
}
.sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card li {
  padding: 0.35rem 0;
  font-size: 0.88rem;
  color: var(--ink-700);
  display: flex; align-items: center; gap: 0.45rem;
}
.sidebar-card li::before {
  content: "•";
  color: var(--purple-400);
  font-weight: 700;
}
.sidebar-card .summary-row {
  display: flex; justify-content: space-between;
  padding: 0.45rem 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--cream-200);
}
.sidebar-card .summary-row:last-child { border-bottom: none; }
.sidebar-card .summary-label { color: var(--ink-500); }
.sidebar-card .summary-value { color: var(--ink-900); font-weight: 600; }
.sidebar-card li.checklist::before { content: "○"; color: var(--ink-300); }
.sidebar-card li.checklist.done::before { content: "✓"; color: var(--success); }
.sidebar-card .more-link {
  display: inline-flex; align-items: center; gap: 0.2rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--purple-600);
  font-weight: 600;
}

.sidebar-cta {
  background: linear-gradient(135deg, var(--purple-50), var(--gold-50));
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  border: 1px solid var(--gold-300);
  display: flex; align-items: center; gap: 0.75rem;
}
.sidebar-cta-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.sidebar-cta-text { font-size: 0.85rem; }
.sidebar-cta-text strong { display: block; color: var(--ink-900); }
.sidebar-cta-text span { color: var(--ink-500); }

/* ---------- Wizard layout (3 columns) ---------- */
.wizard-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
.wizard-main { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 1.5rem 1.75rem; box-shadow: var(--shadow-sm); }
.wizard-side { display: flex; flex-direction: column; gap: 1rem; }
.wizard-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.5rem; margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-500);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--purple-600); }
.breadcrumbs .sep { color: var(--ink-300); }
.breadcrumbs .current { color: var(--ink-900); font-weight: 600; }

/* ---------- Side wizard header (right pane header for wizard) ---------- */
.wizard-side-header {
  background: var(--grad-primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-purple);
}
.wizard-side-header h2 { color: white; font-size: 1.15rem; margin: 0; }
.wizard-side-header .icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid; place-items: center;
  font-size: 1.2rem;
}

.preview-toolbar {
  display: flex; gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
.preview-toolbar .btn { flex: 1; font-size: 0.82rem; padding: 0.5rem; }

/* ---------- Alerts ---------- */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid;
  font-size: 0.92rem;
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.alert-info { background: var(--info-bg); color: #1e40af; border-color: #bfdbfe; }
.alert-success { background: var(--success-bg); color: #166534; border-color: #bbf7d0; }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: #fde68a; }
.alert-danger { background: var(--danger-bg); color: #991b1b; border-color: #fecaca; }

/* ---------- Admin sidebar layout ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.admin-sidebar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1rem;
  position: sticky; top: 90px;
}
.admin-sidebar h4 {
  font-size: 0.78rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  transition: all 0.15s;
}
.admin-sidebar a:hover { background: var(--purple-50); color: var(--purple-600); text-decoration: none; }
.admin-sidebar a.active {
  background: var(--purple-50);
  color: var(--purple-600);
  font-weight: 700;
}
.admin-sidebar a .icon { width: 16px; text-align: center; }

/* ---------- Page header ---------- */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; margin-bottom: 1.5rem;
}
.page-header h1 { margin: 0; }
.page-subtitle { color: var(--ink-500); font-size: 0.95rem; margin-top: 0.2rem; }

/* ---------- Footer ---------- */
.app-footer {
  padding: 2.5rem 0 2rem;
  text-align: center;
  color: var(--ink-500);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.app-footer a { color: var(--ink-500); margin: 0 0.5rem; }
.app-footer a:hover { color: var(--purple-600); }

/* ---------- Utilities ---------- */
.text-muted { color: var(--ink-500); }
.text-purple { color: var(--purple-600); }
.text-gold { color: var(--gold-700); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.4rem; font-weight: 700; }

.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }

.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--ink-500);
}
.empty-state-icon {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 0.75rem;
}
.empty-state-title { color: var(--ink-700); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }

/* ---------- Carousel (featured designs) ---------- */
.carousel {
  position: relative;
}
.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.25rem 0.25rem 0.75rem;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * {
  scroll-snap-align: start;
  flex: 0 0 200px;
}
.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  color: var(--purple-600);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 2;
}
.carousel-btn.prev { right: -10px; }
.carousel-btn.next { left: -10px; }

/* ---------- Floating action bar / tabs at bottom of form ---------- */
.form-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 0.7rem;
  padding-top: 1.5rem; margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.form-actions .right-actions { display: flex; gap: 0.5rem; }

/* Wizard navigation (prev + next at bottom of each step) */
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 0.7rem;
  padding-top: 1.75rem; margin-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.wizard-nav .btn { min-width: 140px; padding: 0.85rem 1.4rem; font-size: 1rem; }

/* Send hub — published invitation send list */
.send-banner {
  background: linear-gradient(135deg, var(--success-bg), var(--gold-50));
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.send-banner .icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.send-banner h3 { color: #14532d; margin-bottom: 0.15rem; }
.send-banner p { margin: 0; color: #166534; font-size: 0.95rem; }

.send-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  transition: border-color 0.15s, background 0.15s;
}
.send-card:hover { border-color: var(--purple-300); }
.send-card.is-sent { background: var(--success-bg); border-color: #86efac; }
.send-card-info { display: flex; flex-direction: column; gap: 0.15rem; }
.send-card-name { font-weight: 700; font-size: 1.02rem; color: var(--ink-900); }
.send-card-meta { color: var(--ink-500); font-size: 0.85rem; display: flex; gap: 0.75rem; align-items: center; }
.send-card-meta code { color: var(--ink-700); }
.send-card-status { min-width: 110px; text-align: center; }
.send-card .wa-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  background: #25d366;
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}
.send-card .wa-btn:hover { background: #1ea857; color: white; transform: translateY(-1px); }
.send-card .wa-btn.is-sent { background: var(--purple-50); color: var(--purple-700); }
.send-card .wa-btn.is-sent:hover { background: var(--purple-100); transform: none; }

.send-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.send-progress-bar {
  height: 10px;
  background: var(--cream-200);
  border-radius: 5px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.send-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, #16a34a 100%);
  transition: width 0.4s ease;
}

.disabled-link, .btn.disabled-link { opacity: 0.5; pointer-events: none; cursor: not-allowed; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .wizard-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .hero-welcome { grid-template-columns: 1fr; padding: 1.5rem; }
  .hero-welcome-visual { display: none; }
}
@media (max-width: 900px) {
  .navbar-nav { display: none; }
  .user-chip-info { display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .stepper { overflow-x: auto; }
  .step-label { font-size: 0.78rem; }
  h1 { font-size: 1.4rem; }
  .page-header { flex-direction: column; align-items: stretch; }
}

/* ================================================================
   HOMEPAGE V2 — Multi-purpose landing
   ================================================================ */

/* ---------- Shared section primitives ---------- */
.section-block { margin: 4rem 0; }
.section-block:first-of-type { margin-top: 2.5rem; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.section-head-center { justify-content: center; text-align: center; }
.section-head-center > div { max-width: 640px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-700);
  background: var(--gold-50);
  border: 1px solid var(--gold-300);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}
.section-sub {
  font-size: 1.02rem;
  color: var(--ink-500);
  line-height: 1.7;
  margin: 0;
  max-width: 620px;
}

/* ---------- 1. Hero V2 ---------- */
.hero-v2 {
  background:
    radial-gradient(ellipse at top right, rgba(212, 181, 130, 0.20), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(91, 45, 122, 0.16), transparent 55%),
    linear-gradient(135deg, #ffffff 0%, #faf5ed 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem 3rem 3.5rem;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}
.hero-v2::before {
  content: "";
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  background: linear-gradient(135deg, var(--purple-300), var(--purple-500));
  filter: blur(60px);
  opacity: 0.18;
  border-radius: 50%;
  pointer-events: none;
}
.hero-v2::after {
  content: "";
  position: absolute;
  bottom: -60px; right: -60px;
  width: 260px; height: 260px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  filter: blur(70px);
  opacity: 0.16;
  border-radius: 50%;
  pointer-events: none;
}
.hero-v2-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
}
.hero-v2-text { max-width: 600px; }

.hero-v2-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-700);
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--purple-200);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(6px);
}
.hero-v2-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(109, 61, 143, 0.18);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(109, 61, 143, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(109, 61, 143, 0); }
}

.hero-v2-title {
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-900);
  margin: 0 0 1rem;
  letter-spacing: 0;
}
.hero-v2-rotator {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--purple-700);
}
.hero-v2-prefix { color: var(--ink-700); }
.hero-v2-words {
  position: relative;
  display: inline-block;
  height: 1.2em;
  vertical-align: bottom;
  overflow: hidden;
  min-width: 7.5ch;
}
.hero-v2-words > span {
  display: block;
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  white-space: nowrap;
  color: var(--purple-700);
  background: linear-gradient(135deg, var(--purple-600), var(--gold-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: word-cycle 12s infinite;
  opacity: 0;
}
.hero-v2-words > span:nth-child(1) { animation-delay:  0s; }
.hero-v2-words > span:nth-child(2) { animation-delay:  2.4s; }
.hero-v2-words > span:nth-child(3) { animation-delay:  4.8s; }
.hero-v2-words > span:nth-child(4) { animation-delay:  7.2s; }
.hero-v2-words > span:nth-child(5) { animation-delay:  9.6s; }
@keyframes word-cycle {
  0%, 16% { opacity: 0; transform: translateY(20%); }
  3%, 13% { opacity: 1; transform: translateY(0); }
  20%, 100% { opacity: 0; transform: translateY(-20%); }
}

.hero-v2-lead {
  font-size: 1.08rem;
  color: var(--ink-700);
  line-height: 1.8;
  margin: 0 0 1.75rem;
}
.hero-v2-lead strong { color: var(--purple-700); }

.hero-v2-actions {
  display: flex; flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.btn-lg {
  padding: 0.85rem 1.6rem !important;
  font-size: 1rem !important;
  border-radius: 12px !important;
}
.hero-v2-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--ink-500);
  font-weight: 600;
  font-size: 0.95rem;
  margin-inline-start: 0.3rem;
  transition: color 0.15s;
}
.hero-v2-link:hover { color: var(--purple-700); }

.hero-v2-trust {
  display: flex; flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border);
}
.hero-v2-trust-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-700);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
.hero-v2-trust-item i { color: var(--purple-600); }

/* Hero image gallery */
.hero-v2-carousel {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-v2-image-gallery {
  position: relative;
  width: 100%;
  max-width: 500px;
  min-height: 470px;
}
.hero-v2-image-card {
  position: absolute;
  width: clamp(128px, 13vw, 172px);
  aspect-ratio: 470 / 836;
  margin: 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 22px 42px rgba(91, 45, 122, 0.18);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-v2-image-card:hover {
  transform: translateY(-6px) rotate(var(--tilt, 0deg));
  box-shadow: 0 28px 50px rgba(91, 45, 122, 0.24);
}
.hero-v2-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}
.hero-v2-image-card figcaption {
  position: absolute;
  inset-block-end: 16px;
  inset-inline-start: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  color: var(--ink-900);
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}
.hero-v2-image-wedding {
  --tilt: -2deg;
  width: clamp(148px, 15vw, 190px);
  inset-block-start: 1%;
  inset-inline-end: 29%;
  z-index: 4;
  transform: rotate(var(--tilt));
}
.hero-v2-image-graduation {
  --tilt: 5deg;
  inset-block-end: 2%;
  inset-inline-start: 0;
  z-index: 3;
  transform: rotate(var(--tilt));
}
.hero-v2-image-opening {
  --tilt: -7deg;
  inset-block-end: 1%;
  inset-inline-end: 7%;
  z-index: 2;
  transform: rotate(var(--tilt));
}
.hero-v2-image-birthday {
  --tilt: -8deg;
  width: clamp(120px, 12vw, 154px);
  inset-block-start: 7%;
  inset-inline-end: 0;
  z-index: 1;
  transform: rotate(var(--tilt));
}

/* ---------- 2. Event Types Gallery ---------- */
.event-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.event-type-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.event-type-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, var(--surface-2) 100%);
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.event-type-card:hover {
  transform: translateY(-3px);
  border-color: var(--purple-300);
  box-shadow: var(--shadow-lg);
}
.event-type-card:hover::before { opacity: 1; }
.event-type-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.event-type-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.event-type-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.18rem;
}
.event-type-desc {
  font-size: 0.85rem;
  color: var(--ink-500);
  line-height: 1.5;
}
.event-type-arrow {
  color: var(--ink-300);
  transition: transform 0.18s, color 0.18s;
  position: relative; z-index: 1;
}
.event-type-card:hover .event-type-arrow {
  color: var(--purple-600);
  transform: translateX(4px);
}

/* Accent colors */
.accent-purple { background: var(--purple-100); color: var(--purple-700); }
.accent-gold   { background: var(--gold-100);   color: var(--gold-700); }
.accent-rose   { background: #ffe4e6; color: #be123c; }
.accent-blue   { background: #dbeafe; color: #1d4ed8; }
.accent-amber  { background: #fef3c7; color: #b45309; }
.accent-pink   { background: #fce7f3; color: #be185d; }
.accent-indigo { background: #e0e7ff; color: #4338ca; }
.accent-green  { background: #d1fae5; color: #047857; }

/* ---------- 3. How It Works ---------- */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
}
.how-it-works-line {
  position: absolute;
  top: 28px;
  inset-inline-start: 12%;
  inset-inline-end: 12%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--gold-300) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.how-step {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.2rem 1.3rem;
  text-align: center;
  transition: all 0.18s;
}
.how-step:hover {
  transform: translateY(-3px);
  border-color: var(--purple-300);
  box-shadow: var(--shadow-lg);
}
.how-step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: grid; place-items: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: -42px auto 0.75rem;
  box-shadow: var(--shadow-purple);
  border: 3px solid var(--surface);
}
.how-step-icon {
  width: 44px; height: 44px;
  margin: 0 auto 0.75rem;
  background: var(--gold-50);
  color: var(--gold-700);
  border-radius: 12px;
  display: grid; place-items: center;
}
.how-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.3rem;
}
.how-step-desc {
  font-size: 0.88rem;
  color: var(--ink-500);
  line-height: 1.55;
}

/* ---------- 4. Features Grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  transition: all 0.18s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--purple-300);
  box-shadow: var(--shadow-lg);
}
.feature-card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 0.9rem;
}
.feature-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.35rem;
}
.feature-card-desc {
  font-size: 0.92rem;
  color: var(--ink-500);
  line-height: 1.6;
}

/* ---------- 5. Samples Strip ---------- */
.samples-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.sample-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all 0.18s;
  overflow: hidden;
}
.sample-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-300);
}
.sample-tag {
  position: absolute;
  top: 0.7rem;
  inset-inline-end: 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--purple-600);
  color: white;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
}
.preview-invitation-sm {
  padding: 1.5rem 1rem !important;
  font-size: 0.92rem;
}
.preview-invitation-sm .preview-names { font-size: 1.3rem; }
.preview-invitation-sm .preview-intro,
.preview-invitation-sm .preview-subintro { font-size: 0.72rem; }
.preview-invitation-sm .preview-date { font-size: 0.85rem; }
.preview-invitation-sm .preview-location,
.preview-invitation-sm .preview-closing { font-size: 0.78rem; }

.sample-wedding    .sample-tag { background: #be123c; }
.sample-graduation .sample-tag { background: #1d4ed8; }
.sample-birthday   .sample-tag { background: #be185d; }
.sample-opening    .sample-tag { background: #b45309; }

.samples-templates {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
}
.samples-templates-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: 0.9rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.samples-templates-title::before {
  content: "";
  width: 4px; height: 14px;
  background: var(--grad-gold);
  border-radius: 2px;
}
.samples-templates-row {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}
.sample-template-thumb {
  flex-shrink: 0;
  width: 120px;
  background: var(--cream-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s;
}
.sample-template-thumb:hover { transform: translateY(-3px); }
.sample-template-thumb img {
  width: 100%; height: 160px; object-fit: cover;
  display: block;
}
.sample-template-meta {
  padding: 0.5rem 0.65rem;
  display: flex; flex-direction: column; gap: 0.1rem;
}
.sample-template-name { font-size: 0.82rem; font-weight: 700; color: var(--ink-900); }
.sample-template-cat { font-size: 0.7rem; color: var(--ink-500); }

/* ---------- 6. Packages ---------- */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.package-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.5rem;
  position: relative;
  transition: all 0.18s;
  display: flex; flex-direction: column;
}
.package-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.package-card.is-featured {
  border: 2px solid var(--purple-600);
  background: linear-gradient(180deg, var(--purple-50) 0%, white 30%);
  transform: scale(1.02);
  box-shadow: var(--shadow-purple);
}
.package-badge {
  position: absolute;
  top: -12px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--grad-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-purple);
}
.package-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink-900);
}
.package-price {
  display: flex; align-items: baseline; gap: 0.35rem;
  margin: 0.3rem 0 1.2rem;
}
.package-price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--purple-700);
  letter-spacing: -0.02em;
}
.package-price-currency {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-500);
}
.package-features {
  list-style: none;
  padding: 0; margin: 0 0 1.2rem;
  display: flex; flex-direction: column; gap: 0.55rem;
  flex: 1;
}
.package-features li {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--ink-700);
}
.package-features li i {
  color: var(--success);
  background: var(--success-bg);
  border-radius: 50%;
  padding: 3px;
  flex-shrink: 0;
}

/* ---------- 7. Trust Strip ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--purple-900) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}
.trust-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(212, 181, 130, 0.16), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(212, 181, 130, 0.10), transparent 60%);
  pointer-events: none;
}
.trust-pill {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.4rem 1.1rem;
  position: relative;
  z-index: 1;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
}
.trust-strip > .trust-pill:last-child { border-inline-end: none; }
.trust-pill-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(212, 181, 130, 0.16);
  color: var(--gold-400);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.trust-pill-body { display: flex; flex-direction: column; min-width: 0; }
.trust-pill-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}
.trust-pill-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.15rem;
}

/* ---------- 8. FAQ ---------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.faq-item[open] {
  border-color: var(--purple-300);
  box-shadow: var(--shadow);
}
.faq-q {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.3rem;
  font-weight: 700;
  color: var(--ink-900);
  font-size: 0.98rem;
  transition: background 0.15s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { background: var(--purple-50); }
.faq-item[open] .faq-q { background: var(--purple-50); color: var(--purple-700); }
.faq-icon {
  color: var(--purple-600);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a {
  padding: 0 1.3rem 1.2rem;
  font-size: 0.93rem;
  color: var(--ink-700);
  line-height: 1.75;
  border-top: 1px solid var(--cream-200);
  padding-top: 1rem;
}
.faq-a code {
  background: var(--cream-200);
  color: var(--purple-700);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---------- 9. Final CTA Banner ---------- */
.cta-banner {
  position: relative;
  margin: 4rem 0 2rem;
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  background: var(--grad-primary);
  overflow: hidden;
  text-align: center;
  color: white;
  isolation: isolate;
}
.cta-banner-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(212, 181, 130, 0.32), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(255, 255, 255, 0.18), transparent 55%);
  z-index: -1;
}
.cta-banner-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: white;
  margin: 0 0 0.7rem;
  letter-spacing: -0.01em;
}
.cta-banner-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 1.75rem;
  max-width: 540px;
}
.cta-banner-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-700) 100%);
  color: white;
  border: none;
  box-shadow: 0 6px 18px rgba(168, 137, 90, 0.4);
}
.btn-gold:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(168, 137, 90, 0.5);
  color: white;
}
.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}
.cta-banner-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  margin-inline-start: 0.5rem;
}
.cta-banner-link:hover { color: white; }

/* ---------- Homepage V2 Responsive ---------- */
@media (max-width: 1100px) {
  .hero-v2 { padding: 2.5rem 2rem; }
  .hero-v2-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-v2-carousel { min-height: 430px; max-width: 460px; margin: 0 auto; }
  .hero-v2-image-gallery { max-width: 460px; min-height: 430px; }
  .event-type-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-it-works { grid-template-columns: repeat(2, 1fr); }
  .how-it-works-line { display: none; }
  .package-card.is-featured { transform: none; }
  .samples-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .trust-pill { border-inline-end: none; }
}
@media (max-width: 700px) {
  .section-block { margin: 3rem 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .section-title { font-size: 1.5rem; }
  .hero-v2 { padding: 2rem 1.25rem; border-radius: var(--radius-lg); }
  .hero-v2-actions { flex-direction: column; align-items: stretch; }
  .hero-v2-actions .btn { justify-content: center; }
  .hero-v2-link { margin: 0.3rem 0; justify-content: center; }
  .hero-v2-carousel { min-height: auto; margin-top: 0.75rem; }
  .hero-v2-image-gallery {
    position: relative;
    display: block;
    width: min(72vw, 280px);
    min-height: 445px;
    margin: 0 auto;
    perspective: 900px;
  }
  .hero-v2-image-card,
  .hero-v2-image-wedding,
  .hero-v2-image-graduation,
  .hero-v2-image-opening,
  .hero-v2-image-birthday {
    position: absolute;
    inset-block: auto;
    inset-inline: auto;
    top: 0;
    right: auto;
    bottom: auto;
    left: 50%;
    width: 100%;
    max-width: 250px;
    transform: none;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transform-origin: 50% 84%;
    animation: hero-mobile-card-cycle 16s cubic-bezier(0.2, 0.86, 0.32, 1) infinite;
    will-change: opacity, transform, filter;
    backface-visibility: hidden;
  }
  .hero-v2-image-opening {
    --mobile-enter-x: 92%;
    --mobile-exit-x: -84%;
    --mobile-enter-rotate: 13deg;
    --mobile-exit-rotate: -15deg;
    --mobile-rest-rotate: -4deg;
    animation-delay: 0s;
  }
  .hero-v2-image-graduation {
    --mobile-enter-x: -92%;
    --mobile-exit-x: 84%;
    --mobile-enter-rotate: -13deg;
    --mobile-exit-rotate: 14deg;
    --mobile-rest-rotate: 4deg;
    animation-delay: 4s;
  }
  .hero-v2-image-birthday {
    --mobile-enter-x: 76%;
    --mobile-exit-x: -70%;
    --mobile-enter-rotate: 18deg;
    --mobile-exit-rotate: -20deg;
    --mobile-rest-rotate: -3deg;
    animation-delay: 8s;
  }
  .hero-v2-image-wedding {
    --mobile-enter-x: -76%;
    --mobile-exit-x: 70%;
    --mobile-enter-rotate: -18deg;
    --mobile-exit-rotate: 20deg;
    --mobile-rest-rotate: 3deg;
    animation-delay: 12s;
  }
  .hero-v2-image-card:hover { box-shadow: 0 28px 50px rgba(91, 45, 122, 0.24); }
  .hero-v2-image-card img { border-radius: 11px; }
  .hero-v2-image-card figcaption {
    inset-block-end: 12px;
    inset-inline-start: 12px;
    min-height: 24px;
    font-size: 0.72rem;
  }
  @keyframes hero-mobile-card-cycle {
    0% {
      opacity: 0;
      transform:
        translateX(calc(-50% + var(--mobile-enter-x)))
        translateY(56px)
        rotate(var(--mobile-enter-rotate))
        rotateY(-20deg)
        scale(0.78);
      filter: blur(10px) saturate(0.88);
    }
    7% {
      opacity: 1;
      transform:
        translateX(-50%)
        translateY(-8px)
        rotate(var(--mobile-rest-rotate))
        rotateY(0deg)
        scale(1.03);
      filter: blur(0) saturate(1.03);
    }
    17% {
      opacity: 1;
      transform:
        translateX(-50%)
        translateY(0)
        rotate(var(--mobile-rest-rotate))
        rotateY(0deg)
        scale(1);
      filter: blur(0) saturate(1);
    }
    25% {
      opacity: 0;
      transform:
        translateX(calc(-50% + var(--mobile-exit-x)))
        translateY(-58px)
        rotate(var(--mobile-exit-rotate))
        rotateY(18deg)
        scale(0.86);
      filter: blur(7px) saturate(0.94);
    }
    26%, 100% {
      opacity: 0;
      transform:
        translateX(calc(-50% + var(--mobile-exit-x)))
        translateY(-58px)
        rotate(var(--mobile-exit-rotate))
        rotateY(18deg)
        scale(0.86);
      filter: blur(7px) saturate(0.94);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-v2-image-gallery {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.75rem;
      width: min(100%, 340px);
      min-height: 0;
      perspective: none;
    }
    .hero-v2-image-card,
    .hero-v2-image-wedding,
    .hero-v2-image-graduation,
    .hero-v2-image-opening,
    .hero-v2-image-birthday {
      position: relative;
      inset: auto;
      width: 100%;
      opacity: 1;
      transform: none;
      animation: none;
      pointer-events: auto;
      filter: none;
    }
  }
  .event-type-grid, .feature-grid,
  .how-it-works, .samples-strip,
  .package-grid { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr; }
  .cta-banner { padding: 2.5rem 1.25rem; border-radius: var(--radius-lg); }
  .cta-banner-actions { flex-direction: column; width: 100%; }
  .cta-banner-actions .btn { width: 100%; justify-content: center; }
}
