/* Glowly Me Custom Design System & Animations
   In strict compliance with brand/brand-guidelines.md
   Version 1.0 — Maternal Serenity & Calm Sage Direction */

:root {
  /* 2.1 Primary Brand Palette */
  --color-sage-deep: #5F7F6B;     /* Primary CTAs, high-contrast titles, active navigation (AAA 7.2:1) */
  --color-sage: #A9C1B0;          /* Calm Sage, borders, soothing accents */
  --color-sage-light: #E6EEE8;    /* Soft Sage Tint: chip backgrounds, badge surfaces */
  --color-secondary: #6D8299;     /* Muted Slate Blue: trust tone, metrics, icons (AA 5.4:1) */
  --color-slate-light: #E4EAF1;   /* Slate Light chip backgrounds */

  /* 2.2 Surface & Canvas Palette */
  --color-canvas: #FBF9F5;        /* Morning Cream Canvas */
  --color-card: #FFFFFF;          /* Pure White for elevated cards */
  --color-charcoal: #2D3748;      /* Gentle dark slate for typography */
  --color-text-muted: #718096;    /* Muted Slate text */
  --color-subtle: #8795A1;        /* Inactive states & placeholders */

  /* 2.3 Pastel Accent Palette (Chips & Badges) */
  --chip-sand-bg: #F1ECE4;
  --chip-sand-fg: #8A7B62;
  --chip-tea-bg: #E8EFEC;
  --chip-tea-fg: #5E8077;
  --chip-warm-bg: #FDF6ED;
  --chip-warm-fg: #9A6A2E;

  /* 5.1 Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-hero: 24px;
  --radius-full: 9999px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-canvas);
  color: var(--color-charcoal);
  overflow-x: hidden;
  scroll-behavior: smooth;
  letter-spacing: -0.01em;
}

/* Frosted Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(109, 130, 153, 0.08);
}

.glass-nav {
  background: rgba(251, 249, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(169, 193, 176, 0.35);
}

/* Gradient Typography */
.gradient-text-sage {
  background: linear-gradient(135deg, #2D3748 0%, #5F7F6B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-calm {
  background: linear-gradient(135deg, #5F7F6B 0%, #6D8299 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ambient Diffuse Daylight Glows */
.ambient-glow-1 {
  position: absolute;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(169, 193, 176, 0.38) 0%, rgba(169, 193, 176, 0) 70%);
  border-radius: 50%;
  filter: blur(55px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(109, 130, 153, 0.20) 0%, rgba(109, 130, 153, 0) 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Phone Mockup Frame */
.phone-mockup {
  position: relative;
  width: 320px;
  height: 660px;
  background: #1E293B;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 25px 60px -15px rgba(45, 55, 72, 0.25),
              0 0 0 1px rgba(255, 255, 255, 0.12),
              inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  margin: 0 auto;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #FBF9F5;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 24px;
  background: #1E293B;
  border-radius: 20px;
  z-index: 30;
}

.phone-speaker {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background: #334155;
  border-radius: 4px;
}

/* Floating Badges */
.floating-badge {
  animation: floatSlow 4s ease-in-out infinite alternate;
}

.floating-badge-delayed {
  animation: floatSlow 5s ease-in-out infinite alternate-reverse;
}

@keyframes floatSlow {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

/* Stage Selector Tabs */
.stage-tab-active {
  background-color: var(--color-sage-deep) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(95, 127, 107, 0.30) !important;
}

/* Interactive Week Buttons */
.tab-active {
  background-color: var(--color-sage-deep) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(95, 127, 107, 0.35) !important;
  border-color: var(--color-sage-deep) !important;
}

/* Accordion Transition */
.faq-answer {
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.faq-answer.open {
  max-height: 320px;
  padding-bottom: 1.25rem !important;
  opacity: 1;
}

/* Buttons */
.btn-sage-primary {
  background-color: var(--color-sage-deep);
  color: #FFFFFF;
  transition: all 0.25s ease;
}

.btn-sage-primary:hover {
  background-color: #4D6857;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(95, 127, 107, 0.40);
}

.btn-google-play {
  background-color: #1E293B;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

.btn-google-play:hover {
  background-color: #0F172A;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(30, 41, 59, 0.4);
}

.btn-app-store-coming {
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px dashed rgba(109, 130, 153, 0.4);
  color: #2D3748;
  transition: all 0.25s ease;
}

.btn-app-store-coming:hover {
  background: #E6EEE8;
  border-color: var(--color-sage);
  transform: translateY(-2px);
}

/* Native HTML5 Dialog & Backdrop */
dialog#iosWaitlistModal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  width: 480px;
}

dialog#iosWaitlistModal::backdrop {
  background: rgba(30, 41, 59, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

dialog#iosWaitlistModal[open] {
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
