:root {
    --deep-space-blue: #1a1b2f;
    --cosmic-purple: #5d4e6d;
    --ethereal-teal: #7ee6d2;
    --starlight-white: #f7f7ff;
    --subtle-gold: #d4af37;
    --transition-standard: all 0.3s ease;
    --transition-quick: 400ms ease-in-out;
}

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

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: rgb(11, 0, 27);
    animation: backgroundFlow 60s linear infinite;
    color: white;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s ease;
}

body.touching {
    background-color: rgba(0, 0, 0, 0.3);
}

body.form-open {
    background-color: rgba(0, 0, 0, 0.3);
}

@keyframes backgroundPulse {
    0% {
        background-color: rgba(0, 0, 0, 0.2);
    }
    50% {
        background-color: rgba(0, 0, 0, 0.4);
    }
    100% {
        background-color: rgba(0, 0, 0, 0.2);
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/TheMin-Flow.png');
    background-repeat: repeat;
    opacity: 0.005;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease-out;
}

body.touching::before {
    opacity: 0.05;
    transition: opacity 0.3s ease-out;
}

body.fading::before {
    opacity: 0.005;
    transition: opacity 0.8s ease-in;
}

.landing-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 15vh;
    z-index: 1;
}

.earth-transition {
    position: relative;
    min-height: 100vh;
    width: 100%;
    margin-top: -15vh;
    z-index: 2;
    top: 30px; /* Default for desktop */
}

.earth-image {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('../images/Earth.png');
    background-size: cover;
    background-position: top center;
    z-index: 1;
    pointer-events: none;
}

.sacred-geometry {
    width: 303px;
    height: 303px;
    position: relative;
    animation: rotate 60s linear infinite, fadeIn 2s forwards;
    margin-bottom: 0;
    opacity: 0;
}

.title-wrapper {
    position: relative;
    text-align: center;
    display: inline-block;
}

.title-primary {
    font-family: 'Montserrat', sans-serif;
    font-size: 76.8px;
    font-weight: 100;
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeInLetters 2s forwards;
    text-transform: none;
}

.inc {
    position: absolute;
    top: 0;
    right: -40px;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInLetters 2s forwards 0.5s;
}

.main-titles {
    text-align: center;
    margin-top: -3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 5vh;
}

.title-secondary {
    font-family: 'Montserrat', sans-serif;
    font-size: 52.8px;
    font-weight: 200;
    letter-spacing: 3px;
    opacity: 0;
    animation: fadeInLetters 2s forwards 2s, pulsate 4s ease-in-out infinite 4s;
    text-transform: none;
}

.floating-messages,
.message {
    display: none;
}

.pillars {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 2rem;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 25vh;
}

.pillar {
    flex: 1;
    position: relative;
    min-height: 400px;
    padding: 2rem;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.3);
}

.pillar:hover {
    transform: translateY(-10px);
}

.pillar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
    transition: opacity 0.5s ease;
}

.pillar:hover::before {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.pillar-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.pillar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(0.8) brightness(0.8);
}

.pillar:hover .pillar-image img {
    transform: scale(1);
    filter: saturate(1) brightness(0.9);
}

.sacred-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.1;
    mix-blend-mode: soft-light;
    transition: all 0.5s ease;
}

.pillar:hover .sacred-bg {
    opacity: 0.15;
    transform: scale(1.05);
}

.content-wrapper {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    transition: background 0.5s ease;
}

.pillar:hover .content-wrapper {
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.text-content {
    margin-top: 2rem;
    transform: translateY(20px);
    opacity: 0.9;
    transition: all 0.5s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pillar:hover .text-content {
    transform: translateY(0);
    opacity: 1;
}

.pillar h3 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
    line-height: 1.4;
}

.pillar .highlight {
    font-weight: 400;
    color: #f0f0f0;
}

.pillar p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0.3rem 0;
    opacity: 0.9;
    font-weight: 300;
}

.pillar p.emphasis {
    font-size: 1.3rem;
    color: #f0f0f0;
    font-weight: 400;
    margin-top: 0.2rem;
}

.sacred-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    margin: 2rem auto 0;
    position: relative;
}

.sacred-line::before,
.sacred-line::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.sacred-line::before {
    left: 0;
}

.sacred-line::after {
    right: 0;
}

.access-button {
    margin-top: 2rem;
    background: transparent;
    color: var(--starlight-white);
    padding: 1.2rem 3rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-standard);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 1s forwards 2s;
    border: none;
    outline: none;
}

.access-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--subtle-gold);
    border-radius: 30px;
    animation: drawBorder 2s forwards 2s;
    clip-path: inset(0 100% 0 0);
}

.access-button:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 20px var(--subtle-gold);
    transform: translateY(-2px);
}

.access-button:active {
    transform: translateY(1px);
}

.sacred-portal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, var(--subtle-gold) 0%, rgba(212, 175, 55, 0.3) 70%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 30px var(--subtle-gold);
}

.portal-active .sacred-portal {
    animation: portalOpen 2.5s ease-out forwards;
}

.sacred-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s ease;
}

.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards 3s;
    z-index: 10;
}

.scroll-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
}

.sacred-scroll {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0)
    );
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    position: absolute;
    left: -1px;
    animation: scrollDown 2s cubic-bezier(0.76, 0, 0.3, 1) infinite;
}

@keyframes scrollDown {
    0% {
        top: -4px;
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 60px;
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.scroll-indicator:hover .sacred-scroll {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.7),
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0)
    );
    transition: all 0.3s ease;
}

/* Hide scroll indicator when user has scrolled significantly */
@media (max-height: 700px) {
    .scroll-indicator {
        display: none;
    }
}

.landing-container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.scroll-indicator:hover .scroll-text {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.scroll-indicator:hover .sacred-scroll {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0)
    );
    transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 768px) {
    .earth-image {
        height: 130%;
    }
    
    .pillars {
        flex-direction: column;
        padding: 2rem 1rem;
        padding-top: 20vh;
    }

    .pillar {
        min-height: 300px;
    }

    .sacred-geometry {
        width: 303px;
        height: 303px;
        margin-bottom: 1rem;
    }

    .title-wrapper {
        margin-bottom: 0.5rem;
    }

    .title-primary {
        font-size: calc(32px + 2vw);
        margin: 0.5rem 0;
        font-weight: 200;
    }

    .inc {
        font-size: calc(12px + 0.5vw);
        top: 0.5rem;
    }

    .title-secondary {
        margin: 0.5rem 0;
        font-size: calc(24.2px + 1vw);
        font-weight: 300;
        margin-top: -24px;
    }

    .typing-messages {
        font-size: calc(16px + 0.8vw);
        max-width: 90%;
        margin: 1rem auto;
        min-height: 48px;
    }

    .access-button {
        font-size: calc(16px + 0.5vw);
        padding: 0.8rem 1.5rem;
        margin-top: 1rem;
    }

    .sacred-form-container {
        width: 100%;
    }

    .sacred-form input {
        font-size: 16px;
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .sacred-form label {
        font-size: 14px;
    }

    .main-titles {
        margin-top: -2rem;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .earth-image {
        height: 140%;
    }
    
    .pillars {
        padding-top: 15vh;
    }

    .sacred-geometry {
        width: 303px;
        height: 303px;
    }

    .title-primary {
        font-size: calc(28px + 2vw);
        font-weight: 300;
    }

    .inc {
        font-size: calc(10px + 0.5vw);
        top: 0.7rem;
    }

    .title-secondary {
        font-size: calc(19.8px + 1vw);
        font-weight: 400;
        margin-top: -24px;
    }

    .typing-messages {
        font-size: calc(14px + 0.8vw);
        margin: 0.8rem auto;
        min-height: 40px;
    }

    .access-button {
        font-size: calc(14px + 0.5vw);
        padding: 0.7rem 1.3rem;
    }

    .sacred-form-container {
        padding: 1.2rem;
    }

    .sacred-form input {
        font-size: 14px;
        padding: 0.7rem;
    }

    .sacred-form label {
        font-size: 12px;
    }

    .main-titles {
        margin-top: -1.5rem;
        gap: 0.8rem;
    }
}

/* Portrait phones */
@media (max-width: 380px) {
    .sacred-geometry {
        width: 288px;
        height: 288px;
    }

    .landing-container {
        padding: 1rem;
    }

    .title-primary {
        font-size: calc(24px + 2vw);
        font-weight: 400;
    }

    .typing-messages {
        font-size: calc(13px + 0.8vw);
        margin: 0.6rem auto;
        min-height: 36px;
    }
}

/* Landscape mode */
@media (max-height: 480px) and (orientation: landscape) {
    .landing-container {
        padding: 0.5rem;
    }

    .sacred-geometry {
        width: 288px;
        height: 288px;
        margin-bottom: 0.5rem;
    }

    .title-wrapper {
        margin-bottom: 0.3rem;
    }

    .title-primary {
        font-size: calc(24px + 1.5vw);
        margin: 0.3rem 0;
        font-weight: 400;
    }

    .title-secondary {
        font-size: calc(19.8px + 1vw);
        font-weight: 500;
        margin: 0.3rem 0;
    }

    .typing-messages {
        font-size: calc(12px + 0.8vw);
        margin: 0.5rem auto;
        min-height: 32px;
    }

    .access-button {
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
    }

    .sacred-form-container {
        width: 100%;
    }

    .sacred-form input {
        font-size: 14px;
        padding: 0.7rem;
    }

    .sacred-form label {
        font-size: 12px;
    }

    .main-titles {
        margin-top: -1.5rem;
        gap: 0.8rem;
    }
}

/* Luna's Blog Link */
.blog-link {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1000;
    transition: var(--transition-standard);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--subtle-gold);
}

.blog-text {
    color: var(--starlight-white);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-right: 0.5rem;
    font-weight: 300;
    transition: var(--transition-standard);
}

.blog-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--subtle-gold);
    transition: var(--transition-standard);
}

.blog-link:hover .blog-text {
    color: var(--subtle-gold);
}

.blog-link:hover .blog-circle {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--subtle-gold);
}

@media (max-width: 768px) {
    .blog-link {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.08);
    }
    
    .blog-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    
    .blog-circle {
        width: 12px;
        height: 12px;
        margin: 0;
        position: relative;
    }

    .blog-circle::after {
        content: '';
        position: absolute;
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        border: 1px solid var(--subtle-gold);
        border-radius: 50%;
        opacity: 0;
        transition: var(--transition-standard);
    }
    
    .blog-link:hover .blog-circle,
    .blog-link:active .blog-circle {
        transform: scale(1);
    }

    .blog-link:hover .blog-circle::after,
    .blog-link:active .blog-circle::after {
        opacity: 0.5;
        animation: pulseCircle 2s infinite ease-in-out;
    }
}

@keyframes pulseCircle {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.constellation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.constellation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 1s infinite alternate;
    opacity: 0;
}

@keyframes twinkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 4px #fff;
    }
}

@media (max-width: 1024px) {
    .earth-transition {
        top: 100px;
    }
}

@media (max-width: 768px) {
    .earth-transition {
        top: 220px;
    }
    
    .earth-image {
        height: 130%;
    }
    
    .pillars {
        padding-top: 20vh;
    }
}

@media (max-width: 480px) {
    .earth-transition {
        top: 270px;
    }
    
    .earth-image {
        height: 140%;
    }
    
    .pillars {
        padding-top: 15vh;
    }
}
