/* ============================================================
   CODE YOUR STORY — Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --accent: #7c6af7;
  --accent-glow: #7c6af755;

  /* Dark Theme (default) */
  --bg: #080c14;
  --bg2: #0d1220;
  --bg3: #111827;
  --card: #0f1623;
  --card-border: #1e2a3a;
  --text: #e8edf5;
  --text2: #8a9ab5;
  --text3: #5a6a85;
  --header-bg: rgba(8,12,20,0.92);
  --shadow: 0 8px 40px rgba(0,0,0,0.5);
  --input-bg: #111827;
}

[data-theme="light"] {
  --bg: #f5f7fc;
  --bg2: #edf0f8;
  --bg3: #e4e8f2;
  --card: #ffffff;
  --card-border: #dde3f0;
  --text: #0d1220;
  --text2: #4a5568;
  --text3: #718096;
  --header-bg: rgba(245,247,252,0.95);
  --shadow: 0 8px 40px rgba(0,0,0,0.1);
  --input-bg: #edf0f8;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, select, input { font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.2; }

/* ── Fade-in Animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeUp 0.65s ease both; }
.fade-in-2 { animation: fadeUp 0.65s 0.15s ease both; }
.fade-in-3 { animation: fadeUp 0.65s 0.3s ease both; }
.fade-in-4 { animation: fadeUp 0.65s 0.45s ease both; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.3s;
}
.site-header .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}
.site-header nav { display: flex; align-items: center; gap: 1.5rem; }
.site-header nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
  transition: color 0.2s;
}
.site-header nav a:hover,
.site-header nav a.active { color: var(--text); }

.header-controls { display: flex; align-items: center; gap: 0.75rem; }

.currency-select {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  color: var(--text2);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.currency-select:hover { border-color: var(--accent); }

/* Accent picker */
.accent-wrap {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--card-border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.accent-wrap:hover { border-color: var(--accent); }
.accent-wrap input[type="color"] {
  position: absolute; inset: -4px;
  width: calc(100% + 8px); height: calc(100% + 8px);
  border: none; padding: 0; cursor: pointer;
  opacity: 0;
}
.accent-swatch {
  width: 100%; height: 100%;
  background: var(--accent);
  pointer-events: none;
}

/* Theme toggle */
.theme-label {
  display: flex; align-items: center; gap: 0.4rem;
  cursor: pointer; font-size: 0.82rem; color: var(--text2);
}
.theme-label input { display: none; }
.theme-pill {
  width: 40px; height: 22px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: 11px;
  position: relative;
  transition: background 0.3s;
}
.theme-label input:checked ~ .theme-pill { background: var(--accent); }
.theme-pill::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: var(--text2);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
}
.theme-label input:checked ~ .theme-pill::after {
  transform: translateX(18px);
  background: #fff;
}

/* ── Page Body Padding ── */
.page-body { padding-top: 64px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.82rem; border-radius: 9px; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px var(--accent-glow);
}

/* ── Section ── */
.section { padding: 5rem 2rem; }
.section-sm { padding: 3rem 2rem; }
.container { max-width: 1180px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ── Price ── */
.price-original {
  color: #f87171;
  text-decoration: line-through;
  font-size: 0.88rem;
  font-weight: 400;
}
.price-current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.price-free {
  color: #34d399;
  font-weight: 700;
}

/* ── Tag / Badge ── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ── Footer ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--card-border);
  padding: 3rem 2rem 2rem;
}
.footer-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}
.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text3);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: var(--text2);
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

/* ── Trust Banner ── */
.trust-banner {
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  border-bottom: 1px solid var(--card-border);
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  color: var(--text2);
}

/* ── Misc ── */
.divider {
  height: 1px;
  background: var(--card-border);
  margin: 0 auto;
}
.text-accent { color: var(--accent); }
.text-muted { color: var(--text2); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header { padding: 0 1rem; }
  .site-header nav { display: none; }
  .site-header nav.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    gap: 1rem;
  }
  .header-controls { gap: 0.5rem; }
  .section { padding: 3rem 1.25rem; }
  .mobile-menu-btn {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg3); border: 1px solid var(--card-border);
    color: var(--text2); border-radius: 8px;
    width: 36px; height: 36px; cursor: pointer;
    font-size: 1.1rem;
  }
}
@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}