/* Geist Website — Landing page styles */

/*---- Font face ---------------------------------------------------------------*/

@font-face {
    font-family: 'GeistPixel-Circle';
    src: url('../fonts/GeistPixel/GeistPixel-Circle.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/*---- CSS custom properties ---------------------------------------------------*/

:root {
    --bs-body-font-family: 'GeistPixel-Circle', monospace;
    --bs-body-font-size: 14px;
    --geist-accent: #6b5ce7;
    --geist-accent-hover: #5a4bd6;
    --geist-accent-glow: rgba(107, 92, 231, 0.35);
    --geist-border-color: #dee2e6;
    --geist-muted: #6c757d;
}

[data-bs-theme="dark"] {
    --geist-accent: #8b7cf7;
    --geist-accent-hover: #9d90f9;
    --geist-accent-glow: rgba(139, 124, 247, 0.3);
    --geist-border-color: #3a3a5c;
    --geist-muted: #9e9eb8;
}

/*---- Global ------------------------------------------------------------------*/

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overflow-x: hidden;
}

@media (max-width: 600px) {
    html, body {
        overflow-y: auto;
    }
}

body {
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
}

a {
    color: var(--geist-accent);
}

a:hover {
    color: var(--geist-accent-hover);
}

/*---- Scrollbar ---------------------------------------------------------------*/

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--geist-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--geist-accent);
}

/*---- Mascot float animation --------------------------------------------------*/

.geist-float {
    animation: geist-float 3s ease-in-out infinite;
}

@keyframes geist-float {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 16px var(--geist-accent)); }
    50% { transform: translateY(-14px); filter: drop-shadow(0 0 32px var(--geist-accent)); }
}

/*---- Landing page layout -----------------------------------------------------*/

.geist-landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Scattered pixel pattern — bottom */
.geist-landing::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    pointer-events: none;
    z-index: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='80'%3E%3Crect x='3' y='2' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='67' y='5' width='3' height='3' fill='%236c757d'/%3E%3Crect x='31' y='9' width='1' height='1' fill='%236b5ce7'/%3E%3Crect x='89' y='12' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='14' y='17' width='3' height='3' fill='%236c757d'/%3E%3Crect x='52' y='14' width='1' height='1' fill='%236b5ce7'/%3E%3Crect x='78' y='21' width='2' height='2' fill='%236c757d'/%3E%3Crect x='41' y='25' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='6' y='30' width='1' height='1' fill='%236c757d'/%3E%3Crect x='93' y='28' width='3' height='3' fill='%236b5ce7'/%3E%3Crect x='23' y='34' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='59' y='32' width='1' height='1' fill='%236c757d'/%3E%3Crect x='83' y='38' width='2' height='2' fill='%236c757d'/%3E%3Crect x='37' y='41' width='3' height='3' fill='%236b5ce7'/%3E%3Crect x='11' y='45' width='1' height='1' fill='%236b5ce7'/%3E%3Crect x='71' y='44' width='2' height='2' fill='%236c757d'/%3E%3Crect x='49' y='50' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='96' y='48' width='1' height='1' fill='%236c757d'/%3E%3Crect x='19' y='53' width='3' height='3' fill='%236c757d'/%3E%3Crect x='63' y='56' width='1' height='1' fill='%236b5ce7'/%3E%3Crect x='85' y='58' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='7' y='62' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='43' y='63' width='1' height='1' fill='%236c757d'/%3E%3Crect x='76' y='66' width='3' height='3' fill='%236c757d'/%3E%3Crect x='28' y='69' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='55' y='72' width='2' height='2' fill='%236c757d'/%3E%3Crect x='91' y='71' width='1' height='1' fill='%236b5ce7'/%3E%3Crect x='15' y='76' width='1' height='1' fill='%236c757d'/%3E%3Crect x='69' y='75' width='2' height='2' fill='%236b5ce7'/%3E%3Crect x='38' y='78' width='3' height='3' fill='%236b5ce7'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
    mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
}

[data-bs-theme="dark"] .geist-landing::after {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='80'%3E%3Crect x='3' y='2' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='67' y='5' width='3' height='3' fill='%239e9eb8'/%3E%3Crect x='31' y='9' width='1' height='1' fill='%238b7cf7'/%3E%3Crect x='89' y='12' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='14' y='17' width='3' height='3' fill='%239e9eb8'/%3E%3Crect x='52' y='14' width='1' height='1' fill='%238b7cf7'/%3E%3Crect x='78' y='21' width='2' height='2' fill='%239e9eb8'/%3E%3Crect x='41' y='25' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='6' y='30' width='1' height='1' fill='%239e9eb8'/%3E%3Crect x='93' y='28' width='3' height='3' fill='%238b7cf7'/%3E%3Crect x='23' y='34' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='59' y='32' width='1' height='1' fill='%239e9eb8'/%3E%3Crect x='83' y='38' width='2' height='2' fill='%239e9eb8'/%3E%3Crect x='37' y='41' width='3' height='3' fill='%238b7cf7'/%3E%3Crect x='11' y='45' width='1' height='1' fill='%238b7cf7'/%3E%3Crect x='71' y='44' width='2' height='2' fill='%239e9eb8'/%3E%3Crect x='49' y='50' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='96' y='48' width='1' height='1' fill='%239e9eb8'/%3E%3Crect x='19' y='53' width='3' height='3' fill='%239e9eb8'/%3E%3Crect x='63' y='56' width='1' height='1' fill='%238b7cf7'/%3E%3Crect x='85' y='58' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='7' y='62' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='43' y='63' width='1' height='1' fill='%239e9eb8'/%3E%3Crect x='76' y='66' width='3' height='3' fill='%239e9eb8'/%3E%3Crect x='28' y='69' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='55' y='72' width='2' height='2' fill='%239e9eb8'/%3E%3Crect x='91' y='71' width='1' height='1' fill='%238b7cf7'/%3E%3Crect x='15' y='76' width='1' height='1' fill='%239e9eb8'/%3E%3Crect x='69' y='75' width='2' height='2' fill='%238b7cf7'/%3E%3Crect x='38' y='78' width='3' height='3' fill='%238b7cf7'/%3E%3C/svg%3E");
    opacity: 0.6;
}

/*---- Hero section ------------------------------------------------------------*/

.geist-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.geist-hero-title {
    font-family: 'GeistPixel-Circle', monospace;
    font-size: 5rem;
    font-weight: normal;
    color: var(--geist-accent);
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 40px var(--geist-accent-glow);
}

.geist-hero-tagline {
    font-size: 1.1rem;
    color: var(--geist-muted);
    margin: 0;
    letter-spacing: 0.02em;
}

/*---- OS selector tabs --------------------------------------------------------*/

.geist-os-tabs {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid var(--geist-border-color);
    overflow: hidden;
}

.geist-os-tab {
    padding: 0.4rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    font-size: 13px;
    font-family: var(--bs-body-font-family);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.geist-os-tab:hover {
    background: color-mix(in srgb, var(--geist-accent) 12%, transparent);
}

.geist-os-tab.active {
    background: var(--geist-accent);
    color: #fff;
}

/*---- Install command block ---------------------------------------------------*/

.geist-install-command {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid var(--geist-border-color);
    border-radius: 10px;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 13px;
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-bs-theme="dark"] .geist-install-command {
    background: rgba(0, 0, 0, 0.35);
}

.geist-install-command code {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-body-color);
}

.geist-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--geist-border-color);
    background: transparent;
    color: var(--geist-muted);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 11px;
    font-family: var(--bs-body-font-family);
    padding: 0 0.5rem;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.geist-copy-btn:hover {
    background: color-mix(in srgb, var(--geist-accent) 15%, transparent);
    border-color: var(--geist-accent);
    color: var(--geist-accent);
}

.geist-copy-btn span {
    color: #28a745;
    font-weight: 600;
}

/*---- Wandering ghosts --------------------------------------------------------*/

.geist-wanderer {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' style='image-rendering:pixelated'%3E%3Crect x='4' y='0' width='8' height='1' fill='%238b7cf7'/%3E%3Crect x='3' y='1' width='10' height='1' fill='%238b7cf7'/%3E%3Crect x='2' y='2' width='12' height='1' fill='%238b7cf7'/%3E%3Crect x='2' y='3' width='12' height='1' fill='%238b7cf7'/%3E%3Crect x='2' y='4' width='2' height='1' fill='%238b7cf7'/%3E%3Crect x='4' y='4' width='2' height='1' fill='%23ffffff'/%3E%3Crect x='6' y='4' width='2' height='1' fill='%238b7cf7'/%3E%3Crect x='8' y='4' width='2' height='1' fill='%23ffffff'/%3E%3Crect x='10' y='4' width='4' height='1' fill='%238b7cf7'/%3E%3Crect x='2' y='5' width='2' height='1' fill='%238b7cf7'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='5' y='5' width='1' height='1' fill='%231a1a2e'/%3E%3Crect x='6' y='5' width='2' height='1' fill='%238b7cf7'/%3E%3Crect x='8' y='5' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='9' y='5' width='1' height='1' fill='%231a1a2e'/%3E%3Crect x='10' y='5' width='4' height='1' fill='%238b7cf7'/%3E%3Crect x='2' y='6' width='12' height='8' fill='%238b7cf7'/%3E%3Crect x='2' y='14' width='2' height='1' fill='%238b7cf7'/%3E%3Crect x='12' y='14' width='2' height='1' fill='%238b7cf7'/%3E%3Crect x='2' y='15' width='1' height='1' fill='%238b7cf7'/%3E%3Crect x='13' y='15' width='1' height='1' fill='%238b7cf7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    opacity: 0;
    filter: drop-shadow(0 0 10px var(--geist-accent-glow));
}

.geist-wanderer-1 { width:48px; height:48px; top:12%; animation: gw-drift1 12s linear infinite, gw-bob 2.8s ease-in-out infinite, gw-appear 1.5s 0.3s forwards; }
.geist-wanderer-2 { width:32px; height:32px; top:50%; animation: gw-drift2 16s linear infinite, gw-bob-flip 3.4s ease-in-out infinite, gw-appear 1.5s 0.8s forwards; }
.geist-wanderer-3 { width:40px; height:40px; top:78%; animation: gw-drift3 14s linear infinite, gw-bob 2.5s ease-in-out infinite, gw-appear 1.5s 1.2s forwards; }
.geist-wanderer-4 { width:24px; height:24px; top:28%; animation: gw-drift4 18s linear infinite, gw-bob-flip 2.1s ease-in-out infinite, gw-appear 1.5s 0.5s forwards; }
.geist-wanderer-5 { width:36px; height:36px; top:88%; animation: gw-drift5 13s linear infinite, gw-bob 3.0s ease-in-out infinite, gw-appear 1.5s 1.6s forwards; }

@keyframes gw-appear { to { opacity: 0.35; } }

@keyframes gw-drift1 { 0% { left:-50px; } 100% { left:calc(100% + 50px); } }
@keyframes gw-drift2 { 0% { right:-35px; left:auto; } 100% { right:calc(100% + 35px); left:auto; } }
@keyframes gw-drift3 { 0% { left:-45px; } 100% { left:calc(100% + 45px); } }
@keyframes gw-drift4 { 0% { right:-28px; left:auto; } 100% { right:calc(100% + 28px); left:auto; } }
@keyframes gw-drift5 { 0% { left:-40px; } 100% { left:calc(100% + 40px); } }

@keyframes gw-bob {
    0%, 100% { transform: translateY(0) scaleX(-1); }
    50% { transform: translateY(-14px) scaleX(-1); }
}

@keyframes gw-bob-flip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/*---- Wandering BOO texts -----------------------------------------------------*/

.geist-boo {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    font-family: 'GeistPixel-Circle', monospace;
    color: var(--geist-accent);
    opacity: 0;
    text-shadow: 0 0 12px var(--geist-accent-glow);
}

.geist-boo-1 { left:8%;  top:20%; font-size:16px; animation: geist-boofloat 6s 1.5s ease-in-out infinite; }
.geist-boo-2 { right:10%; top:65%; font-size:13px; animation: geist-boofloat 7s 3s ease-in-out infinite; }
.geist-boo-3 { left:60%; top:82%; font-size:18px; animation: geist-boofloat 8s 5s ease-in-out infinite; }
.geist-boo-4 { right:25%; top:12%; font-size:12px; animation: geist-boofloat 6.5s 0.5s ease-in-out infinite; }

@keyframes geist-boofloat {
    0%   { opacity:0; transform:translateY(0) scale(0.8); }
    12%  { opacity:0.5; transform:translateY(-8px) scale(1); }
    35%  { opacity:0.35; transform:translateY(-20px) scale(1.05); }
    55%  { opacity:0; transform:translateY(-35px) scale(0.9); }
    100% { opacity:0; transform:translateY(-35px) scale(0.9); }
}

/*---- Mobile ------------------------------------------------------------------*/

@media (max-width: 600px) {
    .geist-hero {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .geist-hero-title {
        font-size: 3rem;
    }

    .geist-hero-tagline {
        font-size: 0.95rem;
    }

    .geist-install-command {
        max-width: 100%;
        font-size: 11px;
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    /* Scale down mascot */
    .geist-float {
        width: 96px !important;
        height: 96px !important;
    }
    .geist-float svg {
        width: 96px;
        height: 108px;
    }

    /* Hide wandering ghosts on small screens */
    .geist-wanderer {
        display: none;
    }

    /* Hide BOO texts on small screens */
    .geist-boo {
        display: none;
    }

    /* Tone down the dot grid */
    .geist-landing::after {
        opacity: 0.2;
    }

    .geist-footer {
        bottom: 1rem;
    }
}

/*---- Footer ------------------------------------------------------------------*/

.geist-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: var(--geist-muted);
    z-index: 1;
}
