/* ============================================
   LUNAR APPS - Main Stylesheet
   Astrology-first, tech-second
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Palette: Night Sky */
    --color-bg-deep:      #0B0D17;
    --color-bg-dark:      #12152B;
    --color-bg-card:      #1A1E3A;
    --color-bg-card-hover:#22274A;

    /* Accents: Moonlight & Lavender */
    --color-primary:      #C8B6FF;
    --color-primary-light:#E0D4FF;
    --color-primary-dark: #9D7CFF;
    --color-secondary:    #A0C4FF;
    --color-accent:       #FFD6A5;

    /* Text */
    --color-text:         #E8E6F0;
    --color-text-muted:   #8A87A8;
    --color-text-dim:     #5A5780;

    /* Utilities */
    --color-border:       rgba(200, 182, 255, 0.12);
    --color-glow:         rgba(157, 124, 255, 0.15);

    /* Typography */
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

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

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg-deep);
    min-height: 100vh;
    overflow-x: hidden;

    display: flex;
    justify-content: space-around;
    flex-direction: column;
}

/* Selection */
::selection {
    background: var(--color-primary-dark);
    color: #fff;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p {
    color: var(--color-text-muted);
    /* max-width: 65ch; */
}

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

a:hover {
    color: var(--color-primary-light);
}

.lucid-icon {
    width: 20px;
    height: 20px;
    /* vertical-align: middle; */
}

/* ---------- Layout ---------- */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 13, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-base);
}

.site-header .container {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.site-header .container .right-section {
    display: inline-block;
}

.site-header.scrolled {
    background: rgba(11, 13, 23, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-glow));
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--color-text);
    background: rgba(200, 182, 255, 0.06);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link.active {
    color: var(--color-primary);
}


/* ============================================
   MENU TOGGLE BUTTON
   ============================================ */

.menu-toggle {
    display: none;              /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 6px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Open state - transforms to X */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile: show toggle, hide nav by default */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;          /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--color-bg-dark);
        border-top: 1px solid var(--color-border);
        padding: var(--space-md);
        flex-direction: column;
        gap: var(--space-sm);
        z-index: 999;
    }

    .main-nav.open {
        display: flex;          /* Show when toggled */
    }

    .main-nav a {
        padding: var(--space-sm);
        text-align: center;
    }
}



/* CTA Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--color-bg-deep);
    box-shadow: 0 4px 20px rgba(157, 124, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(157, 124, 255, 0.4);
    color: var(--color-bg-deep);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn-outline:hover {
    background: rgba(200, 182, 255, 0.1);
    color: var(--color-primary-light);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 72px; /* header height */
}

/* Background decoration */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(157, 124, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(160, 196, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    min-height: calc(100vh - 72px);
    padding: var(--space-lg) var(--space-md);
}

/* Hero Image */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px var(--color-border);
}

.hero-image-wrapper .moon-loader-wrapper {
    position: relative;
    z-index: 10;
    transform: rotate(-20deg);
}

/* Glow effect behind image */
.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(200, 182, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Decorative stars */
.star-decoration {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
    animation: twinkle 30s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1.5);
        box-shadow: 0 0 15px var(--color-primary-light), 0 0 30px var(--color-primary-light);
    }
    50% {
        opacity: 0.3;
        transform: scale(1);
        box-shadow: 0 0 5px var(--color-primary-light);
    }
}

/* Hero Content */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(200, 182, 255, 0.08);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
    width: fit-content;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-text);
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    max-width: 50ch;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-xs);
}

/* ---------- Section Base ---------- */
.section {
    padding: var(--space-xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin: auto;
}

/* ---------- Products Section ---------- */
.products-section {
    background: var(--color-bg-dark);
    border-top: 1px solid var(--color-border);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
}

/* Product Card */
.product-card {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: var(--space-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 182, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card.coming-soon {
    opacity: 0.7;
}

.product-card.coming-soon:hover {
    opacity: 0.85;
}

.product-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
    width: fit-content;
}

.status-live {
    background: rgba(129, 199, 132, 0.12);
    color: #81C784;
    border: 1px solid rgba(129, 199, 132, 0.2);
}

.status-soon {
    background: rgba(255, 214, 165, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(255, 214, 165, 0.2);
}

.product-card h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.5rem;
    margin: 0.8rem 0;
}

.product-card p {
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
    line-height: 1.7;
}

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

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.meta-tag svg {
    width: 14px;
    height: 14px;
    stroke: var(--color-text-dim);
}

/* ---------- Features Section ---------- */
.features-section {
    background: var(--color-bg-deep);
}

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

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

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-primary);
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.feature-item p {
    font-size: 0.9rem;
    margin: 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-bg-dark);
    border-top: 1px solid var(--color-border);
    padding: var(--space-md) 0 var(--space-md);
    margin-top: auto;
}

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

.footer-brand {
    max-width: 300px;
}

/* .footer-brand .logo {
    margin-bottom: var(--space-sm);
} */

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-column h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.footer-links {
    text-align: center;
}

.footer-column ul {
    list-style: none;
}

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

.footer-column a {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: rgba(200, 182, 255, 0.1);
    border-color: var(--color-primary);
}

.footer-social svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-text-muted);
    transition: stroke var(--transition-fast);
}

.footer-social a:hover svg {
    stroke: var(--color-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-md);
    }

    .hero-content {
        order: -1;
        align-items: center;
    }

    .hero-description {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Mobile menu would go here */
    }

    .hero {
        min-height: auto;
        padding-top: 72px;
    }

    .hero-inner {
        min-height: auto;
        padding: var(--space-md) var(--space-md);
    }

    .section {
        padding: var(--space-lg) 0;
    }

    .products-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* ---------- Pages ---------- */
.page-container {
    padding-top: 72px;
}

.page-content {
    margin: 2rem auto;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content p {
    margin: 1.5rem auto;
}


.page-content figure {
    max-width: 100%;
    margin: 0 0 1.5rem 0;
}

.page-content figure img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Bloco, imagem à esquerda */
.page-content figure.align-left img {
    margin-right: auto;
    margin-left: 0;
}

/* Bloco, centralizado */
.page-content figure.align-center img {
    margin-right: auto;
    margin-left: auto;
}

/* Bloco, imagem à direita */
.page-content figure.align-right img {
    margin-right: 0;
    margin-left: auto;
}

/* Inline, à esquerda, texto ao redor */
.page-content figure.align-float-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 50%;
}

/* Inline, à direita, texto ao redor */
.page-content figure.align-float-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 50%;
}



/* Limpa o float após o conteúdo */
.page-content::after {
    content: "";
    display: table;
    clear: both;
}

.page-footer {
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    text-align: right;
    padding: 2px 0 2rem;
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
