/* ==========================================================================
   ESPEJO ESPIRITUAL — Estética mística y cósmica
   ========================================================================== */
:root {
    --bg-deep: #050308;
    --bg-main: #0a0612;
    --bg-surface: #120c1a;
    --bg-alt: #0f0a18;
    --text-primary: #f0eaf4;
    --text-secondary: #a89bb8;
    --text-muted: #6b5d7a;
    --accent: #c9a0dc;
    --accent-glow: rgba(201, 160, 220, 0.4);
    --accent-cyan: #7dd3fc;
    --border: rgba(201, 160, 220, 0.15);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
}

/* Light mode: paleta del logo (púrpura, cyan, fucsia) + naturaleza */
[data-theme="light"] {
    --bg-deep: #f5f0fa;
    --bg-main: #faf5ff;
    --bg-surface: #ffffff;
    --bg-alt: #f3eefc;
    --text-primary: #1e1a2e;
    --text-secondary: #4a3d6b;
    --text-muted: #6b5d8a;
    --accent: #7e22ce;
    --accent-glow: rgba(126, 34, 206, 0.2);
    --accent-cyan: #06b6d4;
    --accent-fuchsia: #c026d3;
    --border: rgba(126, 34, 206, 0.18);
}

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

html {
    scroll-behavior: smooth;
    min-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.4s ease;
    min-width: 100vw;
    min-height: 100vh;
}

/* Animated cosmic background (dark mode) */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cosmic-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    background: 
        radial-gradient(ellipse 120% 80% at 50% 20%, rgba(126, 34, 206, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 100% 120% at 80% 80%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 20% 60%, rgba(201, 160, 220, 0.06) 0%, transparent 50%);
    animation: gradient-drift 20s ease-in-out infinite;
}

/* Light: gradiente inspirado en loto, lavanda y cielo (paleta del logo) */
[data-theme="light"] .cosmic-gradient {
    background: 
        linear-gradient(180deg, rgba(224, 231, 255, 0.4) 0%, transparent 35%),
        radial-gradient(ellipse 60% 45% at 50% 100%, rgba(201, 160, 220, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(192, 38, 211, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 45% 50% at 85% 60%, rgba(6, 182, 212, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 80% 80% at 50% 50%, rgba(250, 245, 255, 0.5) 0%, transparent 70%);
    animation: nature-breathe 25s ease-in-out infinite;
}

@keyframes gradient-drift {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(2deg); opacity: 0.9; }
}

@keyframes nature-breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.95; }
}

/* Stars background - cubren todo el viewport sin bordes visibles */
#stars, #stars2, #stars3 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120vw;
    height: 120vh;
    min-width: 120vw;
    min-height: 120vh;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    transition: transform 0.1s ease-out;
}

.star {
    will-change: opacity;
}

/* Light mode: nature particles (leaves, pollen) instead of stars */
[data-theme="light"] .star {
    background: transparent !important;
    border-radius: 50% 40% 50% 45% !important;
    box-shadow: none !important;
}

/* Partículas: pétalos lavanda/violeta (paleta logo) */
[data-theme="light"] #stars .star {
    background: rgba(126, 34, 206, 0.35) !important;
    width: 4px !important;
    height: 6px !important;
    animation: leaf-float 8s ease-in-out infinite !important;
}

/* Partículas: pétalos fucsia (como loto del logo) */
[data-theme="light"] #stars2 .star {
    background: rgba(192, 38, 211, 0.4) !important;
    width: 3px !important;
    height: 5px !important;
    animation: pollen-drift 12s ease-in-out infinite !important;
}

/* Partículas: gotas cyan (agua, pétalos loto) */
[data-theme="light"] #stars3 .star {
    background: rgba(6, 182, 212, 0.35) !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    animation: dust-settle 15s ease-in-out infinite !important;
}

@keyframes leaf-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.4; }
    25% { transform: translate(3px, -4px) rotate(5deg); opacity: 0.8; }
    50% { transform: translate(-2px, 2px) rotate(-3deg); opacity: 0.6; }
    75% { transform: translate(2px, 3px) rotate(2deg); opacity: 0.9; }
}

@keyframes pollen-drift {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    50% { transform: translate(-4px, -6px); opacity: 0.7; }
}

@keyframes dust-settle {
    0%, 100% { transform: translate(0, 0); opacity: 0.25; }
    50% { transform: translate(2px, 4px); opacity: 0.5; }
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.module {
    padding: 6rem 0;
    position: relative;
}

.bg-alt { background: var(--bg-alt); }
.bg-dark {
    background: var(--bg-deep);
    color: var(--text-primary);
}

/* Sección ética: gradiente púrpura profundo (como el anillo del logo) */
[data-theme="light"] .bg-dark {
    background: linear-gradient(180deg, #4c1d95 0%, #2e1065 50%, #1e1b4b 100%);
}

[data-theme="light"] .bg-dark,
[data-theme="light"] .bg-dark .manifesto-block .lead,
[data-theme="light"] .bg-dark .manifesto-block p,
[data-theme="light"] .bg-dark .link-arrow {
    color: #e9d5ff !important;
}

[data-theme="light"] .bg-dark .link-arrow:hover {
    color: #c4b5fd !important;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 6, 18, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s ease;
}

[data-theme="light"] .navbar {
    background: rgba(250, 245, 255, 0.92);
    border-bottom-color: rgba(126, 34, 206, 0.12);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-theme {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: color 0.3s, background 0.3s;
}

.btn-theme:hover {
    color: var(--accent);
}

/* Hero */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .hero-glow {
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201, 160, 220, 0.15) 0%, transparent 70%);
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-logo-wrap {
    margin-bottom: 1.5rem;
}

.hero-logo {
    max-width: min(320px, 50vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 40px var(--accent-glow));
    animation: logo-float 6s ease-in-out infinite;
}

[data-theme="light"] .hero-logo {
    filter: drop-shadow(0 4px 24px rgba(126, 34, 206, 0.15));
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-subline {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--text-secondary);
    font-weight: 300;
    font-style: italic;
}

.hero-desc {
    max-width: 600px;
    margin: 2rem auto 2.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-deep);
}

.btn-primary:hover {
    background: var(--accent-cyan);
    color: var(--bg-deep);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);
    color: #fff;
}

[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #6d21a8 0%, #9333ea 100%);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.scroll-arrow {
    margin-top: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* Section headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Vision cards */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.vision-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.vision-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

[data-theme="light"] .vision-card:hover {
    box-shadow: 0 16px 40px rgba(126, 34, 206, 0.12);
}

.vision-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.vision-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.vision-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Constructos wheel */
.constructos-wheel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.constructo-item {
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.4s;
}

.constructo-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}

/* MIT Journey */
.mit-journey {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.mit-phase {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s;
}

.mit-phase:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

[data-theme="light"] .mit-phase:hover {
    box-shadow: 0 8px 30px rgba(126, 34, 206, 0.12);
}

.mit-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.mit-phase h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.mit-phase p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* PsychoGAT */
.psychogat-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.psychogat-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.psychogat-content h3:first-child {
    margin-top: 0;
}

.psychogat-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.psychogat-list {
    list-style: none;
    margin: 1.5rem 0;
}

.psychogat-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.psychogat-list li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
}

.psychogat-note {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(201, 160, 220, 0.1);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
}

[data-theme="light"] .psychogat-note {
    background: rgba(201, 160, 220, 0.12);
    border-left-color: var(--accent);
}

.psychogat-diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.diagram-node {
    padding: 1rem 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-weight: 500;
    color: var(--accent);
}

.diagram-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* Síntesis */
.sintesis-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.sintesis-block h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.sintesis-lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.sintesis-block p {
    color: var(--text-secondary);
}

/* Ethics */
.ethics-container {
    max-width: 700px;
    text-align: center;
}

.manifesto-block h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.manifesto-block .lead {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.manifesto-block p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.link-arrow {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.3s;
}

.link-arrow:hover {
    transform: translateX(6px);
}

/* CTA */
.section-cta {
    text-align: center;
}

.section-cta h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.section-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    height: 36px;
    width: auto;
    margin-bottom: 0.5rem;
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-weight: 600;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
    .mit-journey {
        grid-template-columns: 1fr;
    }
    
    .vision-grid {
        grid-template-columns: 1fr;
    }
    
    .psychogat-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links a {
        display: none;
    }
    
    .constructos-wheel {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
