/* ═══════════════════════════════════════════
   HAPPILY EVER PLANNER — Design System
   Enchanted fairy tale meets modern luxury
   ═══════════════════════════════════════════ */

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

/* ── Variables ── */
:root {
  --royal:        #1a0f3c;
  --royal-mid:    #261758;
  --royal-light:  #352279;
  --purple:       #7c5cbf;
  --purple-light: #a78bfa;
  --purple-glow:  rgba(124, 92, 191, 0.35);
  --gold:         #d4a843;
  --gold-light:   #f0d68a;
  --gold-glow:    rgba(212, 168, 67, 0.25);
  --rose:         #e8a0bf;
  --rose-light:   #f5c6db;
  --ivory:        #f8f4ff;
  --ivory-warm:   #faf6f0;
  --text:         #f0ecff;
  --text-dim:     rgba(240, 236, 255, 0.6);
  --text-faint:   rgba(240, 236, 255, 0.35);
  --text-dark:    #1a0f3c;
  --text-dark-dim:#6b5f8a;
  --border:       rgba(255, 255, 255, 0.08);
  --border-gold:  rgba(212, 168, 67, 0.2);
  --glass:        rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.08);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', -apple-system, sans-serif;
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--royal);
  overflow-x: hidden;
  line-height: 1.7;
}

body.light-page {
  background: var(--ivory);
  color: var(--text-dark);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ── Ambient Background ── */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(170deg, #0d0820 0%, var(--royal) 30%, #1e1050 60%, #150c35 100%);
}

.ambient-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.ambient-bg .orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--purple-glow), transparent 70%);
  top: -10%; left: -5%;
  animation-delay: 0s;
}

.ambient-bg .orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  top: 40%; right: -10%;
  animation-delay: -7s;
}

.ambient-bg .orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232, 160, 191, 0.15), transparent 70%);
  bottom: -5%; left: 30%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

/* Stars canvas */
.stars-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 800px;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(13, 8, 32, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav__logo-icon {
  font-size: 1.5rem;
}

.nav__logo span {
  color: var(--gold-light);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--gold);
  color: var(--royal) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border-radius: 100px;
  transition: all 0.3s var(--ease-out);
  letter-spacing: 0.02em;
}

.nav__cta:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--gold-glow);
}

.nav__mobile-toggle {
  display: none;
  background: none;
  color: var(--text);
  font-size: 1.5rem;
  padding: 8px;
}

/* ── Typography ── */
.heading-xl {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.heading-md {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.heading-sm {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
}

.text-lg {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.text-md {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.text-gold { color: var(--gold-light); }
.text-purple { color: var(--purple-light); }
.text-rose { color: var(--rose); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold), #c49a35);
  color: var(--royal);
  box-shadow: 0 4px 20px var(--gold-glow);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 168, 67, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn--outline:hover {
  background: var(--glass-strong);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn--purple {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white;
  box-shadow: 0 4px 20px var(--purple-glow);
}

.btn--purple:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 92, 191, 0.45);
}

/* ── Section Styles ── */
.section {
  padding: 100px 0;
  position: relative;
}

.section--padded { padding: 120px 0; }

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 16px;
}

.section__label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
}

.section__divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin: 20px 0;
}

/* ── Glass Cards ── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s var(--ease-out);
}

.glass-card:hover {
  background: var(--glass-strong);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ── Sparkle Decorations ── */
.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: sparkle 3s ease-in-out infinite;
  box-shadow: 0 0 6px var(--gold-glow);
}

@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Footer ── */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer__brand span { color: var(--gold-light); }

.footer__desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 320px;
}

.footer__col-title {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.3s;
}

.footer__links a:hover { color: var(--gold-light); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer__disclaimer {
  max-width: 600px;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.6;
  margin-top: 8px;
}

/* ── Light page overrides ── */
.light-page .nav.scrolled {
  background: rgba(248, 244, 255, 0.9);
  border-bottom-color: rgba(26, 15, 60, 0.08);
}

.light-page .nav__links a { color: var(--text-dark-dim); }
.light-page .nav__links a:hover { color: var(--text-dark); }
.light-page .nav__logo { color: var(--text-dark); }

.light-page .footer {
  background: var(--royal);
  color: var(--text);
}

.light-page h1, .light-page h2, .light-page h3 {
  color: var(--text-dark);
}

.light-page .text-lg, .light-page .text-md {
  color: var(--text-dark-dim);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: block; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(13, 8, 32, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .section { padding: 60px 0; }
  .section--padded { padding: 80px 0; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
