/* --- Variables & Theme --- */
:root {
    --bg-dark: #020617;
    /* Slate 950 */
    --bg-panel: rgba(15, 23, 42, 0.6);
    /* Slate 900 with opacity */
    --primary: #3b82f6;
    /* Blue 500 */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #06b6d4;
    /* Cyan 500 */
    --accent: #6366f1;
    /* Indigo 500 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-text: linear-gradient(135deg, #60a5fa, #22d3ee);
    --terminal-green: #22c55e;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* --- Utilities --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--secondary);
}

/* --- Terminal Preloader --- */
.terminal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    transition: opacity 0.5s ease;
    padding: 2rem;
}

.terminal-content {
    width: 100%;
    max-width: 800px;
    color: var(--terminal-green);
    font-size: 1.1rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-cursor {
    animation: blink 1s infinite;
}

/* --- Background Effects --- */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 20s infinite alternate;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -150px;
    left: -150px;
    animation: float 25s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* --- Components --- */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-main);
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    /* Pill shape */
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glow-effect:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--text-main);
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: padding 0.3s ease, background 0.3s ease;
}

header.scrolled {
    padding: 1rem 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-logo {
    height: 40px;
    width: auto;
    /* Fixed: Removed brightness(0) which caused solid white block. */
    /* Added mix-blend-mode to ensure logo blends if it has a background */
    mix-blend-mode: screen;
    filter: invert(1);
    /* Invert standard dark logo to light for dark theme */
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
    color: var(--secondary);
}

.btn-nav {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.btn-nav:hover {
    background: var(--text-main);
    color: var(--bg-dark);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    /* font-family: 'Outfit', sans-serif; */
    /* Optional for headings */
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
    font-weight: 300;
    min-height: 3rem;
    /* Prevent Layout Shift */
    border-right: 2px solid var(--secondary);
    /* Typewriter cursor */
    display: inline-block;
    padding-right: 5px;
    animation: blink 0.75s step-end infinite;
}

/* --- Glitch Effect --- */
.glitch {
    position: relative;
    display: inline-block;
    color: white;
    /* Ensure base color */
}

.glitch:hover::before,
.glitch:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch:hover::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch:hover::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(70px, 9999px, 86px, 0);
    }

    5% {
        clip: rect(21px, 9999px, 6px, 0);
    }

    10% {
        clip: rect(6px, 9999px, 75px, 0);
    }

    15% {
        clip: rect(98px, 9999px, 20px, 0);
    }

    20% {
        clip: rect(54px, 9999px, 85px, 0);
    }

    100% {
        clip: rect(31px, 9999px, 14px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    5% {
        clip: rect(37px, 9999px, 21px, 0);
    }

    10% {
        clip: rect(96px, 9999px, 79px, 0);
    }

    15% {
        clip: rect(28px, 9999px, 43px, 0);
    }

    20% {
        clip: rect(13px, 9999px, 66px, 0);
    }

    100% {
        clip: rect(65px, 9999px, 16px, 0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-main);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* --- Vision Visual --- */
.vision-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.vision-text {
    flex: 1;
}

.vision-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.vision-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.floating-logo {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3));
    animation: float-logo 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
}

/* Hover Effect for Logo */
.floating-logo:hover {
    animation-play-state: paused;
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 60px rgba(6, 182, 212, 0.8)) brightness(1.2);
    cursor: pointer;
}

@keyframes float-logo {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* --- Method Section --- */
section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.method-card {
    padding: 3rem 2rem;
    transition: all 0.4s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    /* For shine effect */
    background: var(--bg-panel);
    /* Ensure background is set for contrast */
}

/* Shine Effect Configuration */
.method-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.method-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.2), 0 0 20px rgba(6, 182, 212, 0.1) inset;
    border-color: var(--secondary);
}

.method-card:hover::after {
    left: 150%;
    transition: left 0.7s ease;
}

.pillar-name {
    font-family: monospace;
    color: var(--secondary);
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.method-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.method-card p {
    color: var(--text-muted);
}

/* --- Future / Portfolio --- */
.future-content {
    padding: 5rem 3rem;
    text-align: center;
}

.future-stats {
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- Footer & CTA --- */
.cta-container {
    text-align: center;
    max-width: 800px;
}

.cta-container h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-container p {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.signup-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.signup-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.signup-input:focus {
    border-color: var(--primary);
}

.footer-legal {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #020617;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

/* --- Animations --- */
[data-scroll] {
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-scroll="fade-up"] {
    transform: translateY(40px);
}

[data-scroll="slide-right"] {
    transform: translateX(-40px);
}

[data-scroll="zoom-in"] {
    transform: scale(0.9);
}

[data-scroll].in-view {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger delays */
[data-delay="100"] {
    transition-delay: 0.1s;
}

[data-delay="200"] {
    transition-delay: 0.2s;
}

[data-delay="300"] {
    transition-delay: 0.3s;
}

[data-delay="400"] {
    transition-delay: 0.4s;
}

[data-delay="500"] {
    transition-delay: 0.5s;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        gap: 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .vision-content {
        flex-direction: column;
    }

    .signup-form {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        margin: 0 0 1rem 0;
    }

    .future-stats {
        flex-direction: column;
        gap: 2rem;
    }
}