/* ==========================================================================
   PSYKEY HEART LLC - MASTER GLOBAL DESIGN SYSTEM (PHASE 1)
   ========================================================================== */

/* 1. IMPORT GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Quicksand:wght@400;600&display=swap');

/* 2. THE MASTER CONTROL BOARD (CSS VARIABLES) */
:root {
  /* Color Palette */
  --bg-main: #120B1A;           /* Deep Twilight Velvet */
  --bg-surface: #1C1328;        /* Dark Panel Background */
  --bg-surface-hover: #291C3A;  /* Interactive Surface */
  
  --color-lavender: #D8B4F8;    /* Logo Crystal Purple */
  --color-pink: #FFB7D5;        /* Butterfly Watercolor Pink */
  --color-tiffany: #7DE3E1;     /* Interactive Cyan/Tiffany */
  
  --text-main: #F5EEFE;         /* Soft Off-White/Lavender Text */
  --text-muted: #BFA8D8;        /* Subtitles & Fine Print */

  /* Magical Glow Effects */
  --glow-tiffany: 0 0 15px rgba(125, 227, 225, 0.4);
  --glow-pink: 0 0 15px rgba(255, 183, 213, 0.4);
  --glow-lavender: 0 0 20px rgba(216, 180, 248, 0.3);

  /* Typography */
  --font-heading: 'Cinzel Decorative', serif;
  --font-body: 'Quicksand', sans-serif;

  /* Layout & Spacing */
  --site-max-width: 1200px;
  --radius-card: 16px;
  --radius-button: 30px;
}

/* 3. BASE RESET & GLOBAL STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Atmosphere (Immersive Subtle Watercolor Texture) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 20%, rgba(216, 180, 248, 0.08), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(125, 227, 225, 0.05), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* 4. TYPOGRAPHY HIERARCHY (H1 - H6) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  letter-spacing: 1px;
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  text-shadow: var(--glow-lavender);
  color: var(--color-lavender);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--color-tiffany);
  text-shadow: var(--glow-tiffany);
}

h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--color-pink);
}

h4 { font-size: 1.25rem; color: var(--text-main); }
h5 { font-size: 1rem; color: var(--text-muted); }
h6 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; }

/* 5. GLOBAL INTERACTIVE ELEMENTS (BUTTONS & LINKS) */
a {
  color: var(--color-tiffany);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-pink);
  text-shadow: var(--glow-pink);
}

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--bg-main);
  background: linear-gradient(135deg, var(--color-tiffany), var(--color-lavender));
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  box-shadow: var(--glow-tiffany);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(216, 180, 248, 0.7);
}

/* 6. RESPONSIVE BREAKPOINTS (MOBILE & TABLET ADAPTATION) */

/* Mobile Phones (up to 768px wide, like iPhone 11) */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  .site-container {
    padding: 0 16px;
  }
}

/* Tablets & Small Laptops (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-container {
    padding: 0 32px;
  }
}

/* ==========================================================================
   PSYKEY HEART LLC - GLOBAL SHELL STYLES (PHASE 2)
   ========================================================================== */

/* 1. LAYOUT UTILITIES */
.site-container {
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 32px; /* Base horizontal padding */
}

/* 2. THE MAIN STICKY HEADER (The Cloud Crown) */
.main-header {
    position: fixed; /* Keep pinned to top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Stays above everything */
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: center; /* Centers the Crown Logo */
    align-items: center;
    position: relative; /* Base for positioning children */
}

/* The Cloud Bed Bed (Using ::before pseudo-element with watercolor image) */
.main-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('cloud_bed.png'); /* The Watercolor Clouds */
    background-size: cover;
    background-position: center bottom;
    opacity: 0.6; /* Soft cloud translucency */
    z-index: -1;
}

/* Base style for the Crown Logo positioning */
.brand-crown {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    max-height: 80px; /* Limits the logo height so it looks like a clean crown */
    width: auto;
    margin: 0 15px; /* Spacing between logo and menu links */
    z-index: 10;
}

/* BUTTERFLY ANIMATION RULES (For Nav and Mobile Portal) */
@keyframes flutterAndDrift {
    0% { transform: translateY(0px) rotate(-5deg); }
    25% { transform: translateY(-10px) rotate(5deg) scale(1.1); }
    50% { transform: translateY(0px) rotate(-5deg); }
    75% { transform: translateY(10px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(-5deg); }
}

@keyframes flyOffAndFade {
    0% { transform: translate(0,0); opacity: 1; }
    100% { transform: translate(150px, -200px); opacity: 0; }
}

/* Placeholder emoji butterflies near logo */
.butterfly {
    position: absolute;
    font-size: 1.5rem;
    animation: flutterAndDrift 6s infinite ease-in-out;
    opacity: 0.8;
}

.bfly-left {
    left: -40px;
    animation-delay: 1s;
}

.bfly-right {
    right: -40px;
    animation-delay: 2s;
}

/* Hide desktop navigation in the header because the logo is centered crown style */
.desktop-nav {
    display: none;
}

/* Adjust Main content so sticky header doesn't cover it */
.main-content {
    margin-top: 100px; /* Offset the header height */
}

/* 3. MOBILE MENU TRIGGER (Hamburger Icon) */
.mobile-nav-toggle {
    position: absolute; /* Place relative to header container */
    left: 15px;
    top: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

/* The Hamburger Bars (Customizable) */
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-tiffany);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger::before { content: ""; transform: translateY(-8px); }
.hamburger::after { content: ""; transform: translateY(5px); }

/* Rotate hamburger into an X when menu is active (JavaScript adds .active) */
.mobile-nav-toggle.active .hamburger { background: transparent; }
.mobile-nav-toggle.active .hamburger::before { transform: rotate(45deg); }
.mobile-nav-toggle.active .hamburger::after { transform: rotate(-45deg); }


/* 4. MOBILE NAVIGATION OVERLAY (The Glassmorphism Portal) */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 19, 40, 0.95); /* Frosted Dark Panel */
    backdrop-filter: blur(8px); /* Frosted Glass Effect */
    z-index: 999;
    
    /* Center the menu links */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Initially hidden for fade animation */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Show menu (JavaScript adds .open) */
.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Larger butterflies inside the glass portal */
.bfly-overlay {
    position: absolute;
    font-size: 3rem;
    animation: flutterAndDrift 8s infinite ease-in-out;
    opacity: 0.6;
}

#bfly-overlay-1 { top: 10%; left: 10%; animation-delay: 0.5s; }
#bfly-overlay-2 { bottom: 20%; right: 15%; animation-delay: 1.5s; }
#bfly-overlay-3 { top: 50%; left: 80%; animation-delay: 2.5s; }

/* The close button inside the overlay */
.close-overlay {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: var(--color-lavender);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 25px 0;
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-lavender);
    text-shadow: var(--glow-lavender);
}

.mobile-nav-links a:hover {
    color: var(--color-tiffany);
    text-shadow: var(--glow-tiffany);
}

/* Apply the fly-off animation to overlay butterflies when menu closes (Added by JS) */
.bfly-fly-off {
    animation: flyOffAndFade 1.2s forwards ease-in !important;
}


/* 5. GLOBAL FOOTER STYLES */
.main-footer {
    padding: 60px 0;
    border-top: 1px solid rgba(216, 180, 248, 0.1); /* Subtle Lavender Divider */
    margin-top: 100px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap; /* Stack on mobile */
    justify-content: space-between;
}

.footer-mailing-list, .footer-links {
    flex: 1 1 45%; /* Two columns on desktop */
    min-width: 300px;
    margin-bottom: 40px;
}

.footer-mailing-list p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Secure Form Styling */
.secure-form {
    display: flex;
    gap: 10px;
}

.secure-form input[type="email"] {
    flex-grow: 1;
    padding: 12px;
    background-color: var(--bg-surface);
    border: 1px solid rgba(125, 227, 225, 0.3); /* Suble Tiffany Border */
    border-radius: var(--radius-button);
    color: var(--text-main);
    font-family: var(--font-body);
}

.secure-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-tiffany);
    box-shadow: var(--glow-tiffany);
}

.footer-links h3, .footer-mailing-list h3 {
    margin-bottom: 15px;
}

.social-links {
    list-style: none;
}

.social-links a {
    color: var(--color-pink);
    text-shadow: var(--glow-pink);
    font-weight: 600;
}

.social-links a:hover {
    color: var(--color-tiffany);
    text-shadow: var(--glow-tiffany);
}

/* Copyright Row */
.footer-copyright {
    flex: 1 1 100%;
    text-align: center;
    border-top: 1px solid rgba(216, 180, 248, 0.05);
    padding-top: 30px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* 6. RESPONSIVE BREAKPOINT ADAPTATIONS FOR SHELL */

@media (max-width: 768px) {
    .brand-crown {
        max-width: 200px; /* Prevent crown from getting too big on tiny screens */
    }
    
    .mobile-nav-toggle {
        left: 5px; /* Adjust placement closer to edge on phone */
    }
    
    .secure-form {
        flex-direction: column; /* Stack input and button on mobile */
    }
}

