:root {
    --primary: #3b65ff;
    --primary-hover: #2a4ecc;
    --bg-base: #050505;
    --bg-surface: rgba(15, 15, 18, 0.6);
    --bg-surface-strong: rgba(10, 10, 14, 0.84);
    --border-color: rgba(59, 101, 255, 0.15);
    --border-strong: rgba(59, 101, 255, 0.28);
    --text-main: #f0f0f0;
    --text-muted: #888891;
    --syn-keyword: #ff7b72;
    --syn-function: #79c0ff;
    --syn-method: #d2a8ff;
    --syn-string: #a5d6ff;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

html.scroll-dragging {
    scroll-behavior: auto !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    scrollbar-width: none;
}

.terminal-body code {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.bg-glows {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: 
        radial-gradient(circle at 15% -5%, rgba(59, 101, 255, 0.18), transparent 45%),
        radial-gradient(circle at 85% 40%, rgba(59, 101, 255, 0.12), transparent 50%),
        radial-gradient(circle at 50% 105%, rgba(59, 101, 255, 0.15), transparent 60%);
}

.bg-grid {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.045em;
}

span {
    color: var(--primary);
}

#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.loader-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.loader-text span {
    animation: blink 1.4s infinite both;
}

@keyframes blink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

.scroll-rail {
    position: fixed;
    top: 18px;
    right: 12px;
    bottom: 18px;
    width: 12px;
    border-radius: 999px;
    background: rgba(8, 12, 24, 0.78);
    border: 1px solid rgba(59, 101, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    z-index: 250;
    pointer-events: auto;
    cursor: pointer;
    touch-action: none;
}

.scroll-thumb {
    position: absolute;
    top: 0;
    left: 1px;
    width: 8px;
    height: 64px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(119, 152, 255, 0.95), rgba(59, 101, 255, 0.75));
    box-shadow: 0 0 18px rgba(59, 101, 255, 0.35);
    cursor: grab;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

body.scroll-dragging .scroll-thumb {
    cursor: grabbing;
    box-shadow: 0 0 24px rgba(59, 101, 255, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.82), rgba(5, 5, 5, 0.42));
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease;
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 101, 255, 0.3);
}

section {
    padding: 140px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero {
    position: relative;
    min-height: 100vh;
    gap: 56px;
    padding-top: 150px;
    padding-bottom: 130px;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 760px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3.6rem, 9vw, 6.2rem);
    line-height: 0.96;
    margin-bottom: 22px;
    background: linear-gradient(180deg, #f7f8fb 0%, #c4c7d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    background: linear-gradient(180deg, #7f9bff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto 34px auto;
}

.hero-actions,
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions {
    margin-bottom: 18px;
}

.hero-btn,
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hero-btn {
    min-width: 190px;
    padding: 15px 24px;
    border-radius: 18px;
    font-weight: 700;
    border: 1px solid transparent;
}

.hero-btn i,
.social-btn i,
.card-icon i {
    width: 18px;
    height: 18px;
}

.hero-btn-primary {
    background: linear-gradient(180deg, rgba(59, 101, 255, 0.34), rgba(59, 101, 255, 0.14));
    border-color: var(--border-strong);
    box-shadow: 0 20px 48px rgba(59, 101, 255, 0.18);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.hero-btn:hover,
.social-btn:hover {
    transform: translateY(-2px);
}

.hero-btn-primary:hover {
    background: linear-gradient(180deg, rgba(59, 101, 255, 0.38), rgba(59, 101, 255, 0.22));
    box-shadow: 0 24px 50px rgba(59, 101, 255, 0.26);
}

.hero-btn-secondary:hover,
.social-btn:hover {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.07);
}

.social-links {
    margin-bottom: 2px;
}

.social-btn {
    padding: 10px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.script-showcase {
    width: 100%;
    max-width: 880px;
    scroll-margin-top: 120px;
    position: relative;
    z-index: 1;
}

.showcase-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    margin-bottom: 20px;
}

.label-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 101, 255, 0.55), transparent);
}

.terminal-box {
    width: 100%;
    max-width: 760px;
    background: linear-gradient(180deg, rgba(17, 18, 24, 0.96), rgba(9, 9, 13, 0.96));
    border: 1px solid rgba(59, 101, 255, 0.16);
    border-radius: 24px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(24px);
    text-align: left;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.terminal-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(59, 101, 255, 0.12), transparent 28%, transparent 70%, rgba(59, 101, 255, 0.08)),
        radial-gradient(circle at top right, rgba(59, 101, 255, 0.1), transparent 24%);
    pointer-events: none;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    border-radius: 22px 22px 0 0;
    position: relative;
}

.mac-dots {
    display: flex;
    gap: 8px;
}

.mac-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #444;
}

.mac-dots span:nth-child(1) {
    background: #ff5f56;
}

.mac-dots span:nth-child(2) {
    background: #ffbd2e;
}

.mac-dots span:nth-child(3) {
    background: #27c93f;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.copy-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color);
}

.terminal-body {
    padding: 24px 30px;
    overflow-x: auto;
}

.terminal-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    white-space: nowrap;
    line-height: 1.6;
    display: block;
}

.keyword {
    color: var(--syn-keyword);
}

.function {
    color: var(--syn-function);
}

.method {
    color: var(--syn-method);
}

.string {
    color: var(--syn-string);
}

.features {
    position: relative;
    padding-top: 150px;
    min-height: 100vh;
}

.section-title {
    text-align: left;
    margin-bottom: 60px;
    width: 100%;
    max-width: 1100px;
}

.section-title h2 {
    font-size: clamp(2.6rem, 6vw, 4rem);
    margin-bottom: 12px;
    max-width: 620px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 460px;
    line-height: 1.7;
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 24px;
    max-width: 1100px;
    width: 100%;
}

.feature-card {
    background: linear-gradient(180deg, rgba(14, 14, 18, 0.88), rgba(10, 10, 14, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 34px 28px;
    border-radius: 22px;
    backdrop-filter: blur(14px);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    flex: 1 1 320px;
    max-width: 352px;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(59, 101, 255, 0.08), transparent 30%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-color);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.feature-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(59, 101, 255, 0.12);
    color: var(--primary);
    margin-bottom: 20px;
    border: 1px solid rgba(59, 101, 255, 0.15);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.about {
    position: relative;
    min-height: 70vh;
    padding-top: 170px;
}

.about-shell {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 48px;
    padding: 44px 42px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(12, 13, 18, 0.72), rgba(8, 8, 10, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.about-lead {
    text-align: left;
}

.about-kicker {
    color: var(--primary);
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.about-copy {
    width: 100%;
    max-width: 620px;
    text-align: left;
}

.about-shell h2 {
    font-size: clamp(2.8rem, 6vw, 4.4rem);
    line-height: 0.98;
}

.about-copy p {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.85;
    margin-bottom: 18px;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 5%;
    width: 100%;
    background: rgba(255, 255, 255, 0.01);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    filter: blur(8px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

@media (max-width: 768px) {
    .scroll-rail {
        right: 8px;
        width: 10px;
    }

    nav {
        padding: 16px 5%;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 100px 5%;
    }

    .hero {
        padding-top: 130px;
        padding-bottom: 110px;
        gap: 30px;
    }

    .features {
        padding-top: 120px;
    }

    .hero-actions,
    .social-links {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn,
    .social-btn {
        width: 100%;
    }

    .section-title {
        text-align: center;
        margin-bottom: 42px;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }

    .about {
        padding-top: 120px;
    }

    .about-shell {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 28px 22px;
    }

    .about-shell h2 {
        font-size: 2.2rem;
    }

    .terminal-body {
        padding: 20px;
    }

    .terminal-body code {
        font-size: 0.85rem;
    }

    .grid-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .feature-card {
        width: 100%;
        max-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}