/* ===================================
   NUEVA VISTA FOUNDATION
   Sacred Temple Global Styles
   =================================== */

/* CSS Variables - Sacred Design System */
:root {
    /* Sacred Color Palette */
    --volcanic-red: #C72C48;
    --deep-blue: #004D7A;
    --sacred-white: #f4f1ea;
    --obsidian-dark: #1a1a1a;
    --obsidian-medium: #2d1810;
    --glow-red: rgba(199, 44, 72, 0.6);
    --glow-blue: rgba(0, 77, 122, 0.4);

    /* Mont-Fort Inspired Accents */
    --dark-teal: #0d3a3a;
    --elegant-divider: rgba(199, 44, 72, 0.2);

    /* Typography - OPTIMIZED WITH GEORGIA */
    --font-mystical: Georgia, 'Times New Roman', serif;
    --font-body: Georgia, 'Times New Roman', serif;
    --font-cinzel: 'Cinzel', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Animation Timings */
    --pulse-duration: 4s;
    --breathe-duration: 6s;
    --transition-smooth: 0.3s ease;
    --transition-sacred: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

    /* Sacred Geometry */
    --foundation-x: 120;
    --foundation-y: 100;
    --capital-x: 280;
    --capital-y: 100;
    --ai-x: 200;
    --ai-y: 200;
    --center-x: 200;
    --center-y: 150;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--obsidian-dark);
    /* Fallback */
    background: radial-gradient(ellipse at center, var(--obsidian-medium) 0%, var(--obsidian-dark) 70%);
    color: var(--sacred-white);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Volcanic Texture Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, rgba(199, 44, 72, 0.05) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(0, 77, 122, 0.05) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="volcanic" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="%23C72C48" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23volcanic)"/></svg>');
    z-index: -1;
    pointer-events: none;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mystical);
    font-weight: normal;
    line-height: 1.3;
    color: var(--sacred-white);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--spacing-md);
    font-weight: bold;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-body);
    font-weight: 700;
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-body);
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1rem, 2vw, 1.1rem);
    opacity: 1;
    /* High contrast */
}

a {
    color: var(--volcanic-red);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--sacred-white);
    text-shadow: 0 0 10px var(--glow-red);
}

/* ===================================
   SACRED COMPONENTS
   =================================== */

/* Sacred Button - Inter Bold for better conversion */
.sacred-button {
    background: linear-gradient(135deg, var(--volcanic-red) 0%, var(--deep-blue) 100%);
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 16px;
    color: white;
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition-sacred);
    box-shadow: 0 8px 25px var(--glow-red);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.sacred-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.sacred-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px var(--glow-red);
}

.sacred-button:hover::before {
    animation: shimmer 0.6s ease;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Pathway Card */
.pathway-card {
    background: rgba(244, 241, 234, 0.12);
    /* Increased from 0.05 */
    border: 2px solid rgba(199, 44, 72, 0.4);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.pathway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(199, 44, 72, 0.1), transparent);
    transition: left 0.5s ease;
}

.pathway-card:hover {
    background: rgba(199, 44, 72, 0.15);
    border-color: var(--volcanic-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--glow-red);
}

.pathway-card:hover::before {
    left: 100%;
}

/* Sacred Container */
.sacred-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    text-align: center;
}

/* Section Spacing */
.sacred-section {
    padding: var(--spacing-xl) 0;
    position: relative;
    text-align: center;
}

/* ===================================
   SACRED ANIMATIONS
   =================================== */

/* Sacred Pulse */
@keyframes sacred-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

.sacred-pulse {
    animation: sacred-pulse var(--pulse-duration) ease-in-out infinite;
}

/* Fault Line Glow */
@keyframes fault-glow {

    0%,
    100% {
        opacity: 0.2;
        box-shadow: 0 0 10px var(--volcanic-red);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px var(--volcanic-red);
    }
}

.fault-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--volcanic-red), transparent);
    animation: fault-glow var(--breathe-duration) ease-in-out infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-sacred) ease-out;
}

/* Fog Reveal */
@keyframes fogReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.fog-reveal {
    animation: fogReveal var(--transition-sacred) ease-out;
}

/* ===================================
   NAVIGATION
   =================================== */
.sacred-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(199, 44, 72, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mystical);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sacred-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .nav-logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-logo {
        font-size: 1.2rem;
    }
}

.nav-logo span {
    color: var(--volcanic-red);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: wrap;
}

@media (min-width: 1200px) {
    .nav-links {
        gap: 2rem;
    }
}

.nav-links a {
    color: var(--sacred-white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    white-space: nowrap;
    font-size: 0.95rem;
}

@media (min-width: 1024px) {
    .nav-links a {
        font-size: 1rem;
    }
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--volcanic-red);
    text-shadow: 0 0 10px rgba(199, 44, 72, 0.3);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--volcanic-red);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--volcanic-red);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--sacred-white);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
        --spacing-md: 1.5rem;
    }

    body {
        background: var(--obsidian-dark) !important;
        /* Prevent text size adjustment on iOS */
        -webkit-text-size-adjust: 100%;
        /* Smooth scrolling on iOS */
        -webkit-overflow-scrolling: touch;
    }

    .sacred-container {
        padding: var(--spacing-sm);
    }

    /* Improve touch targets */
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
        /* iOS recommended touch target */
    }

    /* Better tap highlighting */
    a,
    button {
        -webkit-tap-highlight-color: rgba(199, 44, 72, 0.3);
        tap-highlight-color: rgba(199, 44, 72, 0.3);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        height: 100vh;
        width: 70%;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform var(--transition-sacred);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateX(0);
        left: auto;
        /* Override previous left setting if any */
    }

    .nav-links a {
        padding: 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(199, 44, 72, 0.2);
        width: 100%;
        text-align: center;
        white-space: nowrap;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
        /* Ensure above nav overlay */
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

@media (max-width: 480px) {
    .sacred-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 48px;
        /* Better touch target */
    }

    /* Improve pathway cards on mobile */
    .pathway-card {
        min-width: 100% !important;
        margin-bottom: 1rem;
        padding: 1.5rem;
    }

    /* Better spacing on mobile */
    .pathway-trinity {
        flex-direction: column;
        gap: 1rem !important;
    }

    /* Improve hero text on mobile */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    /* Better form inputs on mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        padding: 1rem !important;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-center {
    text-align: center;
}

.text-volcanic {
    color: var(--volcanic-red);
}

.text-blue {
    color: var(--deep-blue);
}

.text-sacred {
    color: var(--sacred-white);
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.flex {
    display: flex;
}

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

.flex-column {
    flex-direction: column;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* Performance Optimization */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* ===================================
   GEORGIA TYPOGRAPHY ENHANCEMENTS
   =================================== */

/* Sacred Text - Georgia Italic for mystical content */
.sacred-text,
.mystical-quote,
blockquote {
    font-family: var(--font-mystical);
    font-style: italic;
    font-size: 1.25em;
    line-height: 2.0;
    letter-spacing: 0.03em;
    color: var(--sacred-white);
    text-align: center;
    margin: 2rem auto;
    max-width: 800px;
    opacity: 0.95;
}

/* Personal Voice - Georgia Italic for authentic passages */
.personal-voice {
    font-family: var(--font-mystical);
    font-style: italic;
    font-size: 1.15em;
    line-height: 1.9;
    color: var(--sacred-white);
    border-left: 3px solid var(--volcanic-red);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

/* Pull Quotes - Georgia Bold Italic */
.pull-quote {
    font-family: var(--font-mystical);
    font-style: italic;
    font-weight: bold;
    font-size: 1.5em;
    line-height: 1.6;
    color: var(--volcanic-red);
    text-align: center;
    margin: 3rem auto;
    max-width: 700px;
}

/* Sacred emphasis */
.emphasis-sacred {
    font-family: var(--font-mystical);
    font-style: italic;
}

/* ===================================
   OPTIMIZED ANIMATIONS (GPU)
   =================================== */

@keyframes spherePulse {

    0%,
    100% {
        stroke-width: 1px;
        opacity: 0.6;
    }

    50% {
        stroke-width: 3px;
        opacity: 1;
    }
}

@keyframes sacredRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes energyPulse {

    0%,
    100% {
        r: 2px;
        opacity: 0.4;
    }

    50% {
        r: 5px;
        opacity: 1;
    }
}

.animated-sphere {
    animation: spherePulse 4s ease-in-out infinite;
    transform-origin: center;
}

.animated-rotate {
    animation: sacredRotate 60s linear infinite;
    /* Slower, majestic rotation */
    transform-origin: 200px 150px;
    /* Center of the pentagram */
}

.energy-dot {
    animation: energyPulse 3s ease-in-out infinite;
    transform-origin: center;
}

/* Staggered Delays */
.delay-1 {
    animation-delay: 1s;
}

.delay-2 {
    animation-delay: 2s;
}

/* ===================================
   GLOBAL AUDIO PLAYER (TOP RIGHT)
   =================================== */
.global-player {
    position: fixed;
    top: 100px;
    /* Below navigation */
    right: 20px;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 320px;
    opacity: 1;
    transform: translateY(0);
}

.global-player.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.global-player-container {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(199, 44, 72, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(199, 44, 72, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Audio Progress Bar */
.audio-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: height 0.2s ease;
}

.audio-progress-container:hover {
    height: 6px;
}

.audio-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--volcanic-red), var(--deep-blue));
    width: 0%;
    transition: width 0.1s linear, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(199, 44, 72, 0.5);
}

.global-player-container:hover {
    background: rgba(20, 20, 20, 0.6);
    border-color: rgba(199, 44, 72, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.global-control-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--sacred-white);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    /* Fix alignment */
}

.global-control-btn:hover {
    background: var(--volcanic-red);
    border-color: var(--volcanic-red);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--glow-red);
}

.global-track-info {
    display: flex;
    flex-direction: column;
}

.track-title {
    color: var(--sacred-white);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.track-status {
    color: var(--volcanic-red);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

/* Audio Visualizer Animation */
.visualizer-bars {
    display: flex;
    gap: 2px;
    height: 12px;
    align-items: flex-end;
}

.bar {
    width: 2px;
    background: var(--volcanic-red);
    animation: visualize 0.8s ease-in-out infinite alternate;
}

.bar:nth-child(2) {
    animation-delay: 0.2s;
    height: 60%;
}

.bar:nth-child(3) {
    animation-delay: 0.4s;
    height: 30%;
}

@keyframes visualize {
    0% {
        height: 20%;
        opacity: 0.5;
    }

    100% {
        height: 100%;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .global-player {
        top: auto;
        bottom: 1.25rem;
        right: 1.25rem;
        left: 1.25rem;
        /* Full width on mobile */
        display: flex;
        justify-content: center;
    }

    .global-player-container {
        width: 100%;
        justify-content: space-between;
        max-width: 400px;
    }

    .sacred-footer {
        padding-bottom: 9rem !important;
    }
}

/* Visualizer Paused State */
.visualizer-bars.paused .bar {
    animation-play-state: paused;
    opacity: 0.2;
    transition: height 0.3s ease, opacity 0.3s ease;
}

/* ===================================
   AI ORACLE CHAT WIDGET
   =================================== */
.nueva-chat-toggle {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: var(--deep-blue) !important;
    color: white !important;
    font-size: 1.8rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    z-index: 99999 !important;
    transition: var(--transition-smooth);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nueva-chat-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--volcanic-red);
}

.nueva-chat-toggle.active {
    background: var(--obsidian-medium);
    transform: rotate(45deg);
}

.nueva-chat-box {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: var(--transition-sacred);
    transform-origin: bottom right;
}

.nueva-chat-box.hidden {
    display: none;
    pointer-events: none;
}

.nueva-chat-header {
    padding: 1.5rem;
    background: linear-gradient(to right, var(--deep-blue), var(--volcanic-red));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nueva-chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nueva-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.nueva-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--deep-blue) transparent;
}

.nueva-message {
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.nueva-message.ai {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sacred-white);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.nueva-message.user {
    background: var(--deep-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.nueva-chat-input {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
}

.nueva-chat-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: var(--font-body);
}

.nueva-chat-input button {
    background: var(--volcanic-red);
    border: none;
    color: white;
    padding: 0 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.nueva-chat-input button:hover {
    background: var(--deep-blue);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Chat Widget - Full Screen Experience */
@media (max-width: 768px) {
    .nueva-chat-toggle {
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        font-size: 1.6rem !important;
        transition: opacity 0.3s ease, transform 0.3s ease !important;
    }

    /* Hide toggle button when chat is open on mobile - prevents blocking send button */
    .nueva-chat-toggle.active {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: scale(0) !important;
    }

    .nueva-chat-box {
        width: 100% !important;
        height: 100dvh !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .nueva-chat-header h3 {
        font-size: 1rem;
    }

    .nueva-chat-messages {
        padding: 0.6rem 0.75rem 0.2rem 0.75rem;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.4rem;
    }

    .nueva-message {
        max-width: 90%;
        font-size: 0.9rem;
        padding: 0.6rem 0.9rem;
        margin-bottom: 0.2rem;
    }

    .nueva-chat-input {
        padding: 0.6rem;
        position: sticky;
        bottom: 0;
        background: rgba(26, 26, 26, 0.98);
        gap: 0.4rem;
        backdrop-filter: blur(10px);
    }

    .nueva-chat-input input {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 0.9rem 1rem;
    }

    .nueva-chat-input button {
        padding: 0.9rem 1.2rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nueva-chat-toggle {
        bottom: 15px !important;
        right: 15px !important;
        width: 52px !important;
        height: 52px !important;
        font-size: 1.5rem !important;
    }

    /* Hide toggle button when chat is open on small mobile too */
    .nueva-chat-toggle.active {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: scale(0) !important;
    }

    .nueva-chat-header {
        padding: 1rem 0.8rem;
    }

    .nueva-chat-header h3 {
        font-size: 0.9rem;
    }

    .nueva-message {
        max-width: 92%;
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem;
    }

    .nueva-chat-input {
        padding: 0.7rem;
    }

    .nueva-chat-input input {
        padding: 0.8rem 0.9rem;
        font-size: 16px;
    }

    .nueva-chat-input button {
        padding: 0.8rem 1rem;
        min-width: 48px;
        /* Touch target size - larger for better UX */
        min-height: 48px;
        /* Ensure button is tall enough */
        flex-shrink: 0;
        /* Prevent button from shrinking */
    }

    /* Ensure send button is always accessible - no overlap */
    .nueva-chat-input {
        padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
        /* Account for safe area on iOS */
        z-index: 10;
        /* Above other elements */
    }

    /* Pathway selection buttons - mobile optimized */
    .pathway-btn {
        min-height: 48px !important;
        padding: 1rem 1.2rem !important;
        font-size: 0.95rem !important;
        -webkit-tap-highlight-color: rgba(199, 44, 72, 0.3);
        tap-highlight-color: rgba(199, 44, 72, 0.3);
    }

    .pathway-btn:active {
        transform: scale(0.98);
        background: rgba(199, 44, 72, 0.2) !important;
    }

    .pathway-options {
        gap: 0.8rem !important;
    }
}

/* ===================================
   MONT-FORT INSPIRED ENHANCEMENTS
   =================================== */

/* 3D Mountain Scene Container */
.mountain-scene-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
    transition: opacity 0.8s ease;
}

.mountain-scene-background canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Scroll Indicator - Mont-Fort Style */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    color: var(--sacred-white);
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.7;
    animation: fadeInOut 3s ease-in-out infinite;
    pointer-events: none;
}

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

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Elegant Horizontal Dividers */
.elegant-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            rgba(199, 44, 72, 0.3),
            rgba(0, 77, 122, 0.3),
            transparent);
    margin: 4rem 0;
    position: relative;
}

.elegant-divider::before,
.elegant-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--volcanic-red);
    transform: translateY(-50%);
}

.elegant-divider::before {
    left: 20%;
}

.elegant-divider::after {
    right: 20%;
    background: var(--deep-blue);
}

/* Floating Circular Indicators */
.floating-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--volcanic-red);
    opacity: 0.6;
    animation: float 4s ease-in-out infinite;
    pointer-events: none;
}

.floating-indicator.blue {
    background: var(--deep-blue);
    animation-delay: 1s;
}

.floating-indicator.white {
    background: var(--sacred-white);
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 0.8;
    }
}

/* Premium Typography Enhancements */
.hero-portal h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.section-tagline {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Enhanced Section Spacing */
.section-spacer {
    height: 6rem;
}

@media (max-width: 768px) {
    .section-spacer {
        height: 4rem;
    }

    .mountain-scene-background {
        opacity: 0.2;
    }

    .scroll-indicator {
        font-size: 0.8rem;
    }
}

/* Premium Sacred Button */
.sacred-button-premium {
    position: relative;
    padding: 1.2rem 2.8rem;
    font-family: var(--font-cinzel);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--sacred-white) !important;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 4px;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    outline: none;
}

.sacred-button-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent,
            var(--volcanic-red),
            var(--deep-blue),
            transparent 60%);
    animation: rotate-border 4s linear infinite;
    z-index: -2;
    opacity: 0.5;
}

.sacred-button-premium::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(13, 13, 13, 0.95);
    z-index: -1;
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow: inset 0 0 15px rgba(199, 44, 72, 0.1);
}

.sacred-button-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(199, 44, 72, 0.4);
    color: var(--sacred-white) !important;
}

.sacred-button-premium:hover::before {
    opacity: 1;
    animation-duration: 2s;
}

.sacred-button-premium:hover::after {
    background: rgba(20, 20, 20, 0.85);
}

@keyframes rotate-border {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 768px) {

    .sacred-button-premium::before,
    .sacred-connect-btn::before {
        animation-duration: 6s !important;
        /* Slower = less GPU cycles */
    }

    .visualizer-bars .bar {
        animation-duration: 1.5s !important;
    }

    /* Reduce blur complexity for mobile performance */
    .sacred-button-premium,
    .sacred-connect-btn,
    .nueva-chat-box,
    .pathway-card {
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        background: rgba(20, 20, 20, 0.85) !important;
        /* Solider background for performance */
    }
}

/* Mobile Chat Overlap Adjustments */
@media (max-width: 768px) {
    body.chat-open .global-player {
        top: 10px !important;
        bottom: auto !important;
        z-index: 10001 !important;
        /* Above chat box */
    }

    body.chat-open .nueva-chat-box {
        top: 80px !important;
        /* height of player + margin */
        height: calc(100dvh - 80px) !important;
        border-top: 1px solid rgba(199, 44, 72, 0.3);
    }

    body.chat-open .nueva-chat-toggle {
        display: none !important;
        /* Hide toggle when open to avoid clutter */
    }

    /* Enlarge Audio Control Button for Mobile */
    .global-control-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.2rem !important;
    }

    .global-player {
        width: 280px !important;
    }
}

/* Sacred Connect Button - Enhanced Interpersonal style */
.sacred-connect-btn {
    position: relative;
    padding: 1.2rem 3rem;
    font-family: var(--font-cinzel);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--sacred-white) !important;
    background: rgba(199, 44, 72, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(199, 44, 72, 0.4);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    outline: none;
}

.sacred-connect-btn:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(199, 44, 72, 0.25);
    border-color: var(--volcanic-red);
    box-shadow: 0 15px 40px rgba(199, 44, 72, 0.3);
    color: white !important;
}

.sacred-connect-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(199, 44, 72, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sacred-connect-btn:hover::before {
    opacity: 1;
}

/* Interpersonal Grid Refinement */
.human-connection {
    text-align: center;
    padding: 2rem;
    background: rgba(199, 44, 72, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(199, 44, 72, 0.1);
    backdrop-filter: blur(5px);
}