/* ============================================================
   AGLAEA - LUXURY GIFTING PLATFORM
   Design System & Stylesheet
   ============================================================ */

/* CSS Variables */
:root {
    /* Colors - Refined Luxury Palette */
    --cream: #FAF7F2;
    --stone: #E8DCC4;
    --gold: #C9A870;
    --charcoal: #2C2C2C;
    --slate: #5A5A5A;
    --warm-white: #FFFCF7;
    --deep-gold: #B8976A;
    --soft-gray: #8A8070;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--charcoal);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-sm);
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--slate);
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
    background: var(--charcoal);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--stone);
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav a {
    color: var(--stone);
    font-size: 0.938rem;
    font-weight: 400;
    opacity: 0.9;
}

.nav a:hover {
    opacity: 1;
    color: var(--gold);
}

.btn-nav {
    background: var(--gold);
    color: var(--charcoal);
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    opacity: 1 !important;
}

.btn-nav:hover {
    background: var(--deep-gold);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 0.938rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--gold);
    color: var(--charcoal);
}

.btn-primary:hover {
    background: var(--deep-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(201, 168, 112, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--charcoal);
    border: 1px solid var(--charcoal);
}

.btn-secondary:hover {
    background: var(--charcoal);
    color: var(--cream);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--stone);
    color: var(--charcoal);
}

.btn-outline:hover {
    background: var(--stone);
}

.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.063rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: var(--space-xl) 0;
}

.hero-content {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-md);
    font-weight: 300;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--slate);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.hero-note {
    font-size: 0.875rem;
    color: var(--soft-gray);
    font-style: italic;
}

.hero-decoration {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--stone) 100%);
    opacity: 0.08;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */

.how-it-works {
    padding: var(--space-xl) 0;
    background: var(--warm-white);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.step {
    text-align: center;
    padding: var(--space-md);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: var(--space-sm);
    opacity: 0.3;
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.step-desc {
    color: var(--slate);
    line-height: 1.7;
}

/* ============================================================
   FEATURES
   ============================================================ */

.features {
    padding: var(--space-xl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.feature {
    text-align: center;
    padding: var(--space-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.feature-desc {
    color: var(--slate);
    line-height: 1.7;
}

/* ============================================================
   PRICING
   ============================================================ */

.pricing-preview {
    padding: var(--space-xl) 0;
    background: var(--warm-white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 1px solid var(--stone);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.pricing-card-featured {
    border: 2px solid var(--gold);
    box-shadow: 0 8px 24px rgba(201, 168, 112, 0.15);
}

.pricing-card-coming {
    opacity: 0.7;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--charcoal);
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.813rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--stone);
}

.pricing-name {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.pricing-price {
    margin-bottom: var(--space-xs);
}

.price-amount {
    font-size: 2.5rem;
    font-family: var(--font-display);
    font-weight: 400;
}

.price-period {
    color: var(--slate);
    font-size: 1rem;
}

.pricing-annual {
    font-size: 0.875rem;
    color: var(--soft-gray);
}

.pricing-features {
    margin-bottom: var(--space-md);
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cream);
    color: var(--slate);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓ ";
    color: var(--gold);
    font-weight: 600;
    margin-right: 0.5rem;
}

.pricing-card .btn {
    width: 100%;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, var(--charcoal) 0%, #1a1a1a 100%);
    color: var(--cream);
    text-align: center;
}

.cta-title {
    color: var(--cream);
    margin-bottom: var(--space-sm);
}

.cta-subtitle {
    color: var(--stone);
    margin-bottom: var(--space-lg);
    font-size: 1.125rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background: var(--charcoal);
    color: var(--stone);
    padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-xs);
}

.footer-tagline {
    font-size: 0.875rem;
    font-style: italic;
    opacity: 0.7;
    line-height: 1.6;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.938rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--stone);
    opacity: 0.7;
    font-size: 0.938rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(232, 220, 196, 0.2);
    color: var(--stone);
    opacity: 0.6;
    font-size: 0.875rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
    }
    
    .nav {
        gap: var(--space-sm);
    }
    
    .nav a {
        font-size: 0.875rem;
    }
    
    .btn-nav {
        padding: 0.5rem 1rem;
    }
    
    .hero {
        min-height: 70vh;
        padding: var(--space-lg) 0;
    }
    
    .hero-ctas {
        flex-direction: column;
    }
    
    .hero-ctas .btn {
        width: 100%;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   BLOG PREVIEW SECTION (Homepage)
   ============================================================ */

.blog-preview {
    background: var(--cream);
    padding: var(--space-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--slate);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--stone);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.blog-card-image {
    background: linear-gradient(135deg, var(--gold) 0%, #B8935A 100%);
    height: 200px;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-category {
    color: var(--gold);
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--charcoal);
    text-decoration: none;
    transition: var(--transition);
}

.blog-card-title a:hover {
    color: var(--gold);
}

.blog-card-excerpt {
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.938rem;
}

.blog-read-more {
    color: var(--gold);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    font-size: 0.938rem;
}

.blog-read-more:hover {
    gap: 0.5rem;
}

.blog-cta-link {
    text-align: center;
}

/* Responsive - Blog Preview */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   FAQ PAGE STYLES
   ============================================================ */

/* FAQ Hero */
.faq-hero {
    background: linear-gradient(135deg, var(--cream) 0%, var(--stone) 100%);
    padding: 5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--stone);
}

.faq-hero .container {
    max-width: 800px;
}

.faq-hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--charcoal);
    letter-spacing: -0.5px;
}

.faq-subtitle {
    font-size: 1.25rem;
    color: var(--slate);
    font-weight: 300;
}

/* FAQ Content */
.faq-content {
    padding: 5rem 0;
    background: white;
}

.faq-content .container {
    max-width: 900px;
}

.faq-category {
    margin-bottom: 4rem;
}

.faq-category:last-child {
    margin-bottom: 0;
}

.faq-category-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
    letter-spacing: -0.5px;
}

/* FAQ Items */
.faq-item {
    border-bottom: 1px solid var(--stone);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.75rem 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--charcoal);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.faq-question:hover {
    color: var(--gold);
}

.faq-question:focus {
    outline: none;
}

.faq-icon {
    font-size: 2rem;
    color: var(--gold);
    font-weight: 300;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1.5rem;
    line-height: 1;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding-bottom: 2rem;
}

.faq-answer p {
    color: var(--slate);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.063rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    margin: 1.25rem 0 1.25rem 2rem;
    color: var(--slate);
    line-height: 1.8;
}

.faq-answer li {
    margin-bottom: 0.75rem;
    font-size: 1.063rem;
}

.faq-answer strong {
    color: var(--charcoal);
    font-weight: 600;
}

/* FAQ CTA */
.faq-cta {
    background: linear-gradient(135deg, var(--gold) 0%, #B8935A 100%);
    padding: 5rem 0;
    text-align: center;
    color: white;
}

.faq-cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.faq-cta-content h2 {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.faq-cta-content p {
    font-size: 1.188rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* FAQ Responsive */
@media (max-width: 768px) {
    .faq-hero {
        padding: 4rem 0 3rem;
    }

    .faq-hero h1 {
        font-size: 2.5rem;
    }

    .faq-subtitle {
        font-size: 1.125rem;
    }

    .faq-content {
        padding: 3rem 0;
    }

    .faq-category {
        margin-bottom: 3rem;
    }

    .faq-category-title {
        font-size: 1.875rem;
    }

    .faq-question {
        font-size: 1.25rem;
        padding: 1.5rem 0;
    }

    .faq-icon {
        font-size: 1.5rem;
        margin-left: 1rem;
    }

    .faq-answer p,
    .faq-answer li {
        font-size: 1rem;
    }

    .faq-cta {
        padding: 4rem 0;
    }

    .faq-cta-content h2 {
        font-size: 2rem;
    }

    .faq-cta-content p {
        font-size: 1.063rem;
    }
}

@media (max-width: 480px) {
    .faq-hero h1 {
        font-size: 2rem;
    }

    .faq-question {
        font-size: 1.125rem;
        padding: 1.25rem 0;
    }

    .faq-category-title {
        font-size: 1.625rem;
    }
}

/* ============================================================
   HAMBURGER MOBILE NAVIGATION
   ============================================================ */

/* Mobile menu toggle button - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1001;
}

/* CSS-drawn hamburger icon (more reliable than ☰ character) */
.mobile-menu-toggle::before,
.mobile-menu-toggle::after,
.mobile-menu-toggle span {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    margin: 5px auto;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.mobile-menu-toggle span {
    display: block;
}

.mobile-menu-toggle:hover::before,
.mobile-menu-toggle:hover::after,
.mobile-menu-toggle:hover span {
    background: var(--gold);
}

.mobile-menu-toggle:hover {
    color: var(--gold);
}

/* Mobile menu overlay backdrop */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    
    /* Show hamburger button */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Header layout adjustments */
    .header {
        position: relative;
        z-index: 1000;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    /* Logo styling */
    .header-content .logo {
        font-size: 1.5rem;
    }
    
    /* Hide nav by default on mobile, show as slide-out panel */
    .nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        gap: 0;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    /* When menu is open, slide it in */
    .nav.active {
        right: 0;
    }
    
    /* Nav items on mobile */
    .nav a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--stone);
        font-size: 1.063rem;
        text-align: left;
        margin-left: 0 !important;
    }
    
    .nav a:last-of-type {
        border-bottom: none;
    }
    
    /* Hide the user email on mobile menu (or show it differently) */
    .nav #userEmail {
        width: 100%;
        padding: 1rem 0;
        font-size: 0.875rem;
        color: var(--slate);
        border-bottom: 1px solid var(--stone);
        text-align: left;
        margin-left: 0 !important;
        word-break: break-all;
    }
    
    /* Buttons in nav (Sign Out / Get Started) */
    .nav .btn-nav,
    .nav .btn {
        width: 100%;
        margin-top: 1rem;
        text-align: center;
        justify-content: center;
        display: flex;
    }
    
    /* Style the gear icon */
    .nav a[href="settings.html"] {
        font-size: 1.063rem;
    }
    
    .nav a[href="settings.html"]::after {
        content: ' Settings';
        font-size: 1rem;
    }
    
    /* Close button inside menu */
    .mobile-menu-close {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--charcoal);
        padding: 0.5rem;
        line-height: 1;
    }
    
    .mobile-menu-close:hover {
        color: var(--gold);
    }
    
    /* Body lock when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================================
   FORCE HAMBURGER VISIBILITY (override conflicts)
   ============================================================ */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
        background: transparent !important;
    }
    
    /* Make hamburger lines light cream/gold to match AGLAEA logo */
    .mobile-menu-toggle::before,
    .mobile-menu-toggle::after,
    .mobile-menu-toggle span {
        background: #d4b78f !important;
    }
    
    .mobile-menu-toggle:hover::before,
    .mobile-menu-toggle:hover::after,
    .mobile-menu-toggle:hover span {
        background: #ebd4a8 !important;
    }
}
