/* ═══════════════════════════════════════════════════════════
   Reelday — Design system + multi-theme variables
   Fonts loaded per-page via Google Fonts
═══════════════════════════════════════════════════════════ */

/* ── Wedding (default theme) ──────────────────────────────── */
:root,
[data-theme="wedding"] {
  --primary:       #3d1f2d;
  --primary-light: #5c3048;
  --accent:        #e8735a;
  --accent-light:  #f2a7a0;
  --accent-deep:   #c95840;
  --bg:            #fdf8f3;
  --bg2:           #f7f0e8;
  --gold:          #d4a853;
  --text:          #1e1010;
  --text-soft:     #6b4a4a;
  --heading-font:  'Playfair Display', serif;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 16px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e8735a' fill-opacity='0.05'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3C/g%3E%3C/svg%3E");

  /* Backward-compat aliases */
  --blush: #f2a7a0;
  --coral: #e8735a;
  --plum:  #3d1f2d;
  --cream: #fdf8f3;
}

/* ── Debut ────────────────────────────────────────────────── */
[data-theme="debut"] {
  --primary:       #4a1259;
  --primary-light: #6b21a8;
  --accent:        #ec4899;
  --accent-light:  #f9a8d4;
  --accent-deep:   #be185d;
  --bg:            #fdf4ff;
  --bg2:           #fae8ff;
  --gold:          #c084fc;
  --text:          #1a0526;
  --text-soft:     #6b4a7a;
  --heading-font:  'Playfair Display', serif;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 20px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ec4899' fill-opacity='0.06'%3E%3Cpath d='M20 5 L23 15 L33 15 L25 22 L28 32 L20 26 L12 32 L15 22 L7 15 L17 15 Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Birthday ─────────────────────────────────────────────── */
[data-theme="birthday"] {
  --primary:       #7c2d12;
  --primary-light: #c2410c;
  --accent:        #f59e0b;
  --accent-light:  #fcd34d;
  --accent-deep:   #d97706;
  --bg:            #fffbeb;
  --bg2:           #fef3c7;
  --gold:          #f59e0b;
  --text:          #1c0a00;
  --text-soft:     #78350f;
  --heading-font:  'Pacifico', cursive;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 24px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f59e0b' fill-opacity='0.08'%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3Ccircle cx='5' cy='5' r='2'/%3E%3Ccircle cx='35' cy='35' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Baptism ──────────────────────────────────────────────── */
[data-theme="baptism"] {
  --primary:       #1e3a5f;
  --primary-light: #1e40af;
  --accent:        #60a5fa;
  --accent-light:  #bfdbfe;
  --accent-deep:   #2563eb;
  --bg:            #f0f9ff;
  --bg2:           #e0f2fe;
  --gold:          #7dd3fc;
  --text:          #0c1a2e;
  --text-soft:     #1e3a5f;
  --heading-font:  'Cormorant Garamond', serif;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 12px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2360a5fa' fill-opacity='0.07'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3Ccircle cx='20' cy='20' r='8' fill='none' stroke='%2360a5fa' stroke-opacity='0.05' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Reunion ──────────────────────────────────────────────── */
[data-theme="reunion"] {
  --primary:       #134e4a;
  --primary-light: #0f766e;
  --accent:        #f97316;
  --accent-light:  #fdba74;
  --accent-deep:   #ea580c;
  --bg:            #f0fdfa;
  --bg2:           #ccfbf1;
  --gold:          #fbbf24;
  --text:          #042f2e;
  --text-soft:     #134e4a;
  --heading-font:  'DM Serif Display', serif;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 16px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23f97316' fill-opacity='0.06'%3E%3Cpath d='M0 20 Q10 10 20 20 Q30 30 40 20' stroke='%23f97316' stroke-opacity='0.06' stroke-width='1' fill='none'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Corporate ────────────────────────────────────────────── */
[data-theme="corporate"] {
  --primary:       #1e293b;
  --primary-light: #334155;
  --accent:        #3b82f6;
  --accent-light:  #93c5fd;
  --accent-deep:   #2563eb;
  --bg:            #f8fafc;
  --bg2:           #f1f5f9;
  --gold:          #f59e0b;
  --text:          #0f172a;
  --text-soft:     #475569;
  --heading-font:  'DM Sans', sans-serif;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 8px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%233b82f6' stroke-opacity='0.05' stroke-width='1'%3E%3Crect x='5' y='5' width='30' height='30'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Memorial ─────────────────────────────────────────────── */
[data-theme="memorial"] {
  --primary:       #1c2b1a;
  --primary-light: #2d4a2a;
  --accent:        #6b8f6b;
  --accent-light:  #a3c4a3;
  --accent-deep:   #4a6b4a;
  --bg:            #f8f6f2;
  --bg2:           #ede9e0;
  --gold:          #c9a96e;
  --text:          #1a1a14;
  --text-soft:     #4a4a3a;
  --heading-font:  'Cormorant Garamond', serif;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 8px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%236b8f6b' fill-opacity='0.05'%3E%3Cpath d='M20 4 C20 4 16 12 16 16 C16 18.2 17.8 20 20 20 C22.2 20 24 18.2 24 16 C24 12 20 4 20 4Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── 7th Birthday ─────────────────────────────────────────── */
[data-theme="seventh_birthday"] {
  --primary:       #4c1d95;
  --primary-light: #6d28d9;
  --accent:        #10b981;
  --accent-light:  #6ee7b7;
  --accent-deep:   #059669;
  --bg:            #faf5ff;
  --bg2:           #ede9fe;
  --gold:          #fbbf24;
  --text:          #1e1030;
  --text-soft:     #4c1d95;
  --heading-font:  'Pacifico', cursive;
  --body-font:     'DM Sans', sans-serif;
  --border-radius: 28px;
  --pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2310b981' fill-opacity='0.07'%3E%3Ccircle cx='10' cy='10' r='3'/%3E%3Ccircle cx='30' cy='10' r='2'/%3E%3Ccircle cx='20' cy='30' r='3'/%3E%3Ccircle cx='35' cy='28' r='1.5'/%3E%3Ccircle cx='5' cy='28' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════════════════════
   Reset + base
══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, button, textarea, select { font-family: inherit; font-size: inherit; }

/* ══════════════════════════════════════════════════════════
   Themed utilities — use these across all pages
══════════════════════════════════════════════════════════ */

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  border-radius: var(--border-radius);
  padding: 1rem 2rem;
  font-family: var(--body-font);
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  width: 100%;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.btn-primary:active  { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-outline-themed {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--border-radius);
  padding: .75rem 1.5rem;
  font-family: var(--body-font);
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  font-size: .95rem;
}

.btn-outline-themed:hover {
  background: var(--accent);
  color: #fff;
}

.btn-ghost-themed {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: var(--border-radius);
  padding: .6rem 1.25rem;
  font-family: var(--body-font);
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  min-height: 44px;
  white-space: nowrap;
}

.btn-ghost-themed:hover { background: rgba(255,255,255,.25); }

/* Card */
.card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.card-sm {
  background: #fff;
  border-radius: calc(var(--border-radius) * .75);
  padding: 1rem;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

/* Badges */
.badge {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge-accent  { background: var(--accent);       color: #fff; }
.badge-gold    { background: var(--gold);          color: var(--primary); }
.badge-surface { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.badge-muted   { background: var(--bg2);           color: var(--text-soft); }

/* Plan badges */
.badge-libre       { background: var(--bg2);   color: var(--text-soft); }
.badge-selebrasyon { background: var(--gold);   color: var(--primary); }
.badge-pro         { background: var(--accent); color: #fff; }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container-sm {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Typography helpers */
.serif      { font-family: var(--heading-font); }
.text-accent { color: var(--accent); }
.text-soft  { color: var(--text-soft); }
.text-sm    { font-size: .875rem; }
.text-xs    { font-size: .75rem; }
.text-center { text-align: center; }
.font-600   { font-weight: 600; }

/* Divider */
.divider { width: 100%; height: 1px; background: var(--bg2); margin: 1.5rem 0; }

/* Tab bar */
.tab-bar {
  display: flex;
  gap: .25rem;
  background: var(--bg2);
  border-radius: calc(var(--border-radius) * .75);
  padding: .25rem;
}

.tab-btn {
  flex: 1;
  padding: .55rem 1rem;
  border: none;
  border-radius: calc(var(--border-radius) * .6);
  background: transparent;
  color: var(--text-soft);
  font-family: var(--body-font);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.tab-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--primary);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 24px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .25s ease;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
}

.toast.show  { transform: translateX(-50%) translateY(0); }
.toast.error { background: #b91c1c; }
.toast.success { background: #15803d; }

/* Responsive helpers */
@media (max-width: 480px) {
  .container    { padding-inline: 1rem; }
  .container-sm { padding-inline: 1rem; }
  .btn-primary  { min-height: 52px; }
}
