/*
 * Starwisdom Main Stylesheet
 * Vision page uses SVG fractalNoise filter for parchment edges
 */

:root {
    --bg-dark: #020314;
    --text-light: #f8f4ff;
    --text-muted: #b8b4c2;
    --accent-gold: #ffd875;
    --accent-gold-soft: #f9dca2;
    --logo-height: 90px;
    --content-max-width: 640px;
    --panel-bg: rgba(2, 3, 20, 0.55);
    --panel-blur: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #000000;
    color: var(--text-light);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.page-home {
    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(22, 11, 173, 0.25),
            transparent 55%
        ),
        #000000;
}


.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: left center;  /* Anchor lighthouse to left */
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.page-home .site-main {
    justify-content: center;
    align-items: center;
    padding-top: 0;
}

.page-home .content-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    margin: 0;
    max-width: 900px;
}


.bg-default {
    background-image: url("../img/hero-desktop.webp");
}

.bg-night {
    background-image: url("../img/hero-night.webp");
}

.bg-dawn {
    background-image: url("../img/hero-dawn.webp");
}


@media (max-width: 1200px) {
    .bg-default { background-image: url("../img/hero-tablet.webp"); }
    .brand-wordmark {
        max-width: 480px;
    }
    .site-logo {
        top: 5rem;
    }
    .site-main {
        padding-top: calc(var(--logo-height) + 3rem);
    }
}
@media (max-width: 768px) {
    .bg-default { background-image: url("../img/hero-mobile.webp"); }
    .page-bg { background-position: 10% center; }
}


@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500&display=swap');


.site-logo {
    position: absolute;
    top: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.page-vision .site-logo {
    top: 2rem;
}

.brand-wordmark {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.8));
}


.floating-nav {
    position: fixed;
    top: 2rem;
    right: 3rem;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.page-login .floating-nav {
    display: none;
}

.floating-nav .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}


.site-main {
    min-height: 100vh;
    padding-top: calc(var(--logo-height) + 4rem);
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.content-panel {
    max-width: var(--content-max-width);
    width: 90%;
    padding: 3rem;
    background: var(--panel-bg);
    backdrop-filter: blur(var(--panel-blur));
    -webkit-backdrop-filter: blur(var(--panel-blur));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}


.home-hero {
    text-align: center;
    padding: 2rem;
    margin-top: -10vh;
}

.home-tagline {
    text-align: center;
    padding: 1rem;
    margin-top: 1.00rem;
}

.hero-main {
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    color: #E6E1D8;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
}

.hero-sub {
    font-family: 'Philosopher', sans-serif;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 400;
    margin: 0;
    color: #E6E1D8;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
}

/* Vision page parchment with ragged SVG edges */
.page-vision .site-main {
    padding-top: 12rem;
}

.page-vision .content-panel {
    max-width: none;
    width: 60%;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.page-vision .parchment-content {
    position: relative;
    max-width: 960px;
    margin: 0 auto 4rem;
    padding: 3.5rem 3.75rem;

    background: none;
    border: 1px solid #c99866;
    box-shadow: 0 0 80px 20px rgba(184, 109, 41, 0.2);
    filter: none;
    color: #2b1d0e;
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    line-height: 1.75;
    z-index: 2;
}

/* Golden Hour Parchment - warm candlelight glow */
.page-vision .parchment-content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    
    /* Richer, warmer parchment blend */
    background: radial-gradient(
        circle at 50% 35%, 
        #fff5e0 10%, 
        #ffc988 50%, 
        #d69e6b 100%
    );

    filter: none; 
    border-radius: 2px;
    box-shadow: 
        0 0 30px rgba(0,0,0,0.5); /* Lift off the void */
}

.page-vision .parchment-content h1 {
    font-family: 'Philosopher', sans-serif;
    font-size: 2.75rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 2rem;
    color: #1a0a05;
    letter-spacing: 0.05em;
    text-align: center;
}

.page-vision .parchment-content h2 {
    font-family: 'Philosopher', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    margin: 2rem 0 1rem;
    color: #1a0a05;
    letter-spacing: 0.05em;
    text-align: center;
}

/* Default BOLD is now Strong Brown (Grounding) */
.page-vision .parchment-content strong,
.page-vision .parchment-content b {
    color: #4A2510; /* Deep Walnut/Coffee */
    font-weight: 700;
}

/* The "Vows" get the Crimson Ink (Authority) */
.page-vision .text-crimson {
    color: #9C2121 !important; /* Forces the red only where we want it */
    letter-spacing: 0.02em;
}

/* The "Whisper" style for "Deep magic" */
.page-vision .magic-whisper {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #6E5C4E; /* Faded ink style */
    margin-bottom: 0.25rem; /* Tucked closer to the next line */
}

/* The "Voice" style for "Powerful magic" */
.page-vision .magic-voice {
    font-family: 'Georgia', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #2E1A0F;
    margin-top: 0;
    margin-bottom: 2rem; /* Pause after the statement */
}

.page-vision .parchment-content p {
    margin-bottom: 1.5rem;
}

.page-vision .parchment-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}


.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: all 0.25s ease;
    border: none;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.03);
    color: #E0E0E0;
    border: 1px solid rgba(224, 224, 224, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.4s ease;
}
.btn-primary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: #E0E0E0;
    border: 1px solid rgba(224, 224, 224, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.4s ease;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}


.messages {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: var(--content-max-width);
    width: 90%;
}

.message {
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
    animation: fadeOut 4s ease-in-out forwards;
}

@keyframes fadeOut {
    0%, 70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        pointer-events: none;
    }
}

.message.success { background: rgba(59,130,246,0.2); border: 1px solid #3b82f6; }
.message.error { background: rgba(59,130,246,0.2); border: 1px solid #3b82f6; }
.message.warning { background: rgba(59,130,246,0.2); border: 1px solid #3b82f6; }
.message.info { background: rgba(59,130,246,0.2); border: 1px solid #3b82f6; }


.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    background: rgba(15, 13, 11, 0.9);
    border-top: 1px solid rgba(255, 216, 117, 0.1);
}

.site-footer .footer-link {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .footer-link:hover {
    color: var(--accent-gold);
}

.site-footer .footer-divider {
    margin: 0 0.5rem;
    color: rgba(255,255,255,0.3);
}


@media (max-width: 768px) {
    :root {
        --logo-height: 70px;
    }

    .site-logo {
        top: 5rem;
    }

    .brand-wordmark {
        max-width: 480px;
    }

    .floating-nav {
        top: 0.75rem;
        right: 1.5rem;
        gap: 0.5rem;
    }

    .floating-nav .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .content-panel {
        padding: 2rem 1.5rem;
    }

    .site-main {
        padding-top: calc(var(--logo-height) + 4rem);
    }

    .home-hero {
        margin-top: 0;
        padding: 1rem;
    }

    .hero-main {
        font-size: clamp(1.5rem, 5vw, 2rem);
        line-height: 1.3;
    }

    .hero-sub {
        font-size: clamp(1rem, 4vw, 1.25rem);
        margin-top: 0.5rem;
    }

    .page-vision .parchment-content {
        padding: 4rem 2rem;
        font-size: 0.95rem;
    }

    .page-vision .parchment-content h1 {
        font-size: 2rem;
    }

    .page-vision .parchment-content h2 {
        font-size: 1.5rem;
    }
}

/* Error Pages */
.page-error .error-container {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.page-error .error-icon {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.page-error .error-title {
    font-family: 'Philosopher', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-error .error-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Legal Pages */
.page-legal .content-panel {
    max-width: 1000px;
}

.page-legal .legal-content {
    max-width: 1000px;
    margin: 0 auto;
}

.page-legal h1 {
    font-family: 'Philosopher', serif;
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.page-legal .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.page-legal .legal-section {
    margin-bottom: 2.5rem;
}

.page-legal h2 {
    font-family: 'Philosopher', serif;
    font-size: 1.75rem;
    color: var(--accent-gold-soft);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-legal h3 {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-legal p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.page-legal ul {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.8;
}

.page-legal li {
    margin-bottom: 0.5rem;
}

.page-legal .legal-link {
    color: var(--accent-gold-soft);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 216, 117, 0.3);
    transition: border-color 0.2s ease;
}

.page-legal .legal-link:hover {
    border-bottom-color: var(--accent-gold);
}
