/* =========================================================
   FlameOShell
   Global Styles
   ========================================================= */

:root {
    --bg: #090807;
    --bg-soft: #0f0d0b;
    --panel: rgba(20, 16, 13, 0.78);
    --panel-solid: #14100d;

    --orange: #ff7a2f;
    --orange-bright: #ff9b54;
    --orange-dark: #b94816;

    --text: #f5eee8;
    --text-soft: #b9aea5;
    --text-muted: #766c64;

    --border: rgba(255, 122, 47, 0.16);
    --border-bright: rgba(255, 122, 47, 0.32);

    --green: #6ee7a0;

    --mono: "DM Mono", monospace;
    --sans: "Space Grotesk", sans-serif;

    --container: 1180px;
}


/* =========================================================
   Reset
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(255, 122, 47, 0.08),
            transparent 38%
        ),
        var(--bg);

    color: var(--text);

    font-family: var(--sans);

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

::selection {
    background: rgba(255, 122, 47, 0.3);
    color: white;
}


/* =========================================================
   Background
   ========================================================= */

.grid-background {
    position: fixed;
    inset: 0;

    z-index: -3;

    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: 70px 70px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 75%
    );

    pointer-events: none;
}

.background-glow {
    position: fixed;

    width: 520px;
    height: 520px;

    border-radius: 50%;

    filter: blur(120px);

    opacity: 0.12;

    pointer-events: none;

    z-index: -2;
}

.glow-one {
    top: 5%;
    left: -250px;

    background: var(--orange);

    animation: floatGlow 10s ease-in-out infinite;
}

.glow-two {
    top: 45%;
    right: -300px;

    background: #ff4b00;

    animation: floatGlow 13s ease-in-out infinite reverse;
}


/* =========================================================
   Navigation
   ========================================================= */

.navbar {
    width: min(
        calc(100% - 48px),
        var(--container)
    );

    height: 76px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 17px;
    font-weight: 600;

    letter-spacing: -0.02em;
}

.brand-fire {
    font-size: 20px;

    filter:
        drop-shadow(0 0 8px rgba(255, 122, 47, 0.5));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;

    color: var(--text-soft);

    font-size: 14px;
}

.nav-links a {
    transition:
        color 180ms ease,
        opacity 180ms ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links .github-link {
    color: var(--orange);

    padding: 9px 15px;

    border: 1px solid var(--border-bright);

    border-radius: 8px;

    background: rgba(255, 122, 47, 0.05);
}

.nav-links .github-link:hover {
    background: rgba(255, 122, 47, 0.11);

    box-shadow:
        0 0 25px rgba(255, 122, 47, 0.08);
}


/* =========================================================
   Hero
   ========================================================= */

.hero {
    width: min(
        calc(100% - 48px),
        var(--container)
    );

    min-height: 680px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: 70px;

    padding: 90px 0 80px;
}

.hero-content {
    position: relative;

    z-index: 2;

    animation: fadeUp 800ms ease both;
}

.status-pill {
    width: fit-content;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 7px 12px;

    margin-bottom: 26px;

    border: 1px solid var(--border);

    border-radius: 999px;

    background: rgba(255, 122, 47, 0.04);

    color: var(--text-soft);

    font-family: var(--mono);
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 10px rgba(110, 231, 160, 0.65);

    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    max-width: 680px;

    font-size: clamp(
        55px,
        7vw,
        92px
    );

    line-height: 0.96;

    letter-spacing: -0.065em;

    font-weight: 700;
}

.hero h1 span {
    display: block;

    color: var(--orange);

    text-shadow:
        0 0 35px rgba(255, 122, 47, 0.14);
}

.hero-description {
    max-width: 590px;

    margin-top: 28px;

    color: var(--text-soft);

    font-size: 17px;

    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 36px;
}


/* =========================================================
   Buttons
   ========================================================= */

.button {
    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 0 19px;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #160d08;

    background: var(--orange);

    box-shadow:
        0 0 30px rgba(255, 122, 47, 0.13);
}

.button-primary:hover {
    background: var(--orange-bright);

    box-shadow:
        0 10px 40px rgba(255, 122, 47, 0.18);
}

.button-secondary {
    color: var(--text-soft);

    border: 1px solid rgba(255, 255, 255, 0.1);

    background: rgba(255, 255, 255, 0.025);
}

.button-secondary:hover {
    color: var(--text);

    border-color: var(--border-bright);

    background: rgba(255, 122, 47, 0.05);
}


/* =========================================================
   Hero Terminal
   ========================================================= */

.hero-terminal {
    position: relative;

    animation:
        fadeUp 900ms 150ms ease both,
        terminalFloat 6s ease-in-out infinite;
}

.hero-terminal::before {
    content: "";

    position: absolute;

    inset: 15%;

    background: var(--orange);

    filter: blur(100px);

    opacity: 0.09;

    z-index: -1;
}

.terminal-window {
    overflow: hidden;

    border: 1px solid rgba(255, 122, 47, 0.2);

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(31, 23, 18, 0.95),
            rgba(10, 9, 8, 0.98)
        );

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.45),
        0 0 70px rgba(255, 122, 47, 0.07);

    transform:
        perspective(1000px)
        rotateY(-3deg)
        rotateX(2deg);
}

.terminal-topbar {
    height: 45px;

    display: flex;
    align-items: center;

    padding: 0 15px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);

    background: rgba(255, 255, 255, 0.025);
}

.terminal-dots {
    display: flex;
    gap: 7px;
}

.terminal-dots span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.17);
}

.terminal-title {
    position: absolute;
    left: 50%;

    transform: translateX(-50%);

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
}

.terminal-status {
    margin-left: auto;

    color: var(--green);

    font-size: 9px;
}

.terminal-body {
    min-height: 330px;

    padding: 27px;

    font-family: var(--mono);
    font-size: 12px;

    line-height: 2;
}

.terminal-line {
    display: flex;
    flex-wrap: wrap;
}

.typing-line {
    align-items: center;
}

.prompt {
    color: var(--orange);
    white-space: pre;
}

.path {
    color: #d5c6bc;
}

.command {
    color: #f7f1eb;

    margin-left: 5px;
}

.terminal-output {
    padding-left: 4px;

    color: #7f756e;
}

.cursor {
    width: 7px;
    height: 15px;

    display: inline-block;

    margin-left: 5px;

    background: var(--orange);

    animation: cursorBlink 1s steps(1) infinite;
}


/* =========================================================
   Stats
   ========================================================= */

.stats {
    width: min(
        calc(100% - 48px),
        var(--container)
    );

    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat {
    min-height: 125px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 25px;

    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.stat:last-child {
    border-right: 0;
}

.stat-number {
    color: var(--orange);

    font-family: var(--mono);
    font-size: 20px;
    font-weight: 500;
}

.stat-label {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 12px;
}


/* =========================================================
   Sections
   ========================================================= */

.section {
    width: min(
        calc(100% - 48px),
        var(--container)
    );

    margin: 0 auto;

    padding: 150px 0 30px;
}

.section-heading {
    max-width: 720px;

    margin-bottom: 60px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 18px;

    color: var(--orange);

    font-family: var(--mono);
    font-size: 10px;

    letter-spacing: 0.16em;
}

.eyebrow span {
    color: var(--text-muted);
}

.section-heading h2 {
    font-size: clamp(
        38px,
        5vw,
        62px
    );

    line-height: 1;

    letter-spacing: -0.05em;
}

.section-heading h2 span {
    color: var(--orange);
}

.section-heading p {
    max-width: 620px;

    margin-top: 22px;

    color: var(--text-soft);

    font-size: 15px;

    line-height: 1.75;
}


/* =========================================================
   Feature Grid
   ========================================================= */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}

.feature-card {
    min-height: 270px;

    padding: 28px;

    border: 1px solid var(--border);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 122, 47, 0.045),
            rgba(255, 255, 255, 0.012)
        );

    transition:
        transform 220ms ease,
        border-color 220ms ease,
        background 220ms ease,
        box-shadow 220ms ease;
}

.feature-card:hover {
    transform: translateY(-5px);

    border-color: var(--border-bright);

    background:
        linear-gradient(
            145deg,
            rgba(255, 122, 47, 0.09),
            rgba(255, 255, 255, 0.02)
        );

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.22);
}

.feature-icon {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    margin-bottom: 25px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: rgba(255, 122, 47, 0.06);

    font-size: 19px;
}

.feature-card h3 {
    font-size: 18px;

    letter-spacing: -0.02em;
}

.feature-card p {
    margin-top: 11px;

    color: var(--text-soft);

    font-size: 13px;

    line-height: 1.7;
}

.code-tag {
    display: inline-block;

    margin-top: 22px;

    padding: 5px 8px;

    border-radius: 5px;

    background: rgba(255, 122, 47, 0.07);

    color: var(--orange-bright);

    font-family: var(--mono);
    font-size: 10px;
}


/* =========================================================
   Interactive Terminal
   ========================================================= */

.terminal-section {
    padding-top: 170px;
}

.interactive-terminal {
    overflow: hidden;

    border: 1px solid var(--border-bright);

    border-radius: 14px;

    background: #080706;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.35),
        0 0 80px rgba(255, 122, 47, 0.045);
}

.interactive-topbar {
    height: 48px;

    display: flex;
    align-items: center;

    padding: 0 17px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);

    background: #110e0c;
}

.interactive-title {
    position: absolute;
    left: 50%;

    transform: translateX(-50%);

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
}

.live-badge {
    margin-left: auto;

    padding: 4px 7px;

    border: 1px solid rgba(110, 231, 160, 0.2);

    border-radius: 4px;

    color: var(--green);

    font-family: var(--mono);
    font-size: 8px;

    letter-spacing: 0.1em;
}

.terminal-output-area {
    height: 390px;

    padding: 25px;

    overflow-y: auto;

    font-family: var(--mono);
    font-size: 12px;

    line-height: 1.9;
}

.demo-line {
    color: var(--text-soft);
}

.demo-line.muted {
    color: var(--text-muted);
}

.orange {
    color: var(--orange);
}

.terminal-input-row {
    min-height: 56px;

    display: flex;
    align-items: center;

    padding: 0 25px;

    border-top: 1px solid rgba(255, 255, 255, 0.06);

    background: #0c0a09;
}

.terminal-prompt {
    flex-shrink: 0;

    color: var(--orange);

    font-family: var(--mono);
    font-size: 12px;
}

#terminalInput {
    width: 100%;

    margin-left: 10px;

    outline: none;

    border: 0;

    background: transparent;

    color: var(--text);

    caret-color: var(--orange);

    font-family: var(--mono);
    font-size: 12px;
}

.command-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 15px;
}

.command-hints button {
    padding: 7px 11px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: rgba(255, 122, 47, 0.035);

    color: var(--text-muted);

    cursor: pointer;

    font-family: var(--mono);
    font-size: 10px;

    transition:
        color 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.command-hints button:hover {
    color: var(--orange-bright);

    border-color: var(--border-bright);

    background: rgba(255, 122, 47, 0.08);
}


/* =========================================================
   Architecture
   ========================================================= */

.architecture-section {
    padding-top: 170px;
}

.architecture {
    display: flex;
    align-items: stretch;

    gap: 13px;
}

.architecture-step {
    position: relative;

    flex: 1;

    min-height: 270px;

    padding: 27px;

    border: 1px solid var(--border);

    border-radius: 13px;

    background: rgba(255, 255, 255, 0.012);
}

.step-number {
    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
}

.step-icon {
    margin-top: 42px;

    font-size: 25px;
}

.architecture-step h3 {
    margin-top: 18px;

    font-size: 18px;
}

.architecture-step p {
    margin-top: 9px;

    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.7;
}

.architecture-arrow {
    align-self: center;

    color: var(--orange);

    font-family: var(--mono);
    font-size: 18px;
}

.syscalls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 25px;
}

.syscalls span {
    padding: 7px 10px;

    border: 1px solid rgba(255, 122, 47, 0.12);

    border-radius: 6px;

    background: rgba(255, 122, 47, 0.035);

    color: #a9988d;

    font-family: var(--mono);
    font-size: 10px;
}


/* =========================================================
   CTA
   ========================================================= */

.cta-section {
    position: relative;

    width: min(
        calc(100% - 48px),
        var(--container)
    );

    margin: 160px auto 100px;

    overflow: hidden;

    border: 1px solid var(--border-bright);

    border-radius: 20px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255, 122, 47, 0.13),
            transparent 45%
        ),
        #0f0c0a;
}

.cta-glow {
    position: absolute;

    width: 400px;
    height: 400px;

    top: -250px;
    left: 50%;

    transform: translateX(-50%);

    background: var(--orange);

    filter: blur(130px);

    opacity: 0.08;
}

.cta-content {
    position: relative;

    padding: 90px 30px;

    text-align: center;
}

.cta-fire {
    font-size: 35px;

    margin-bottom: 20px;

    filter:
        drop-shadow(0 0 20px rgba(255, 122, 47, 0.45));
}

.cta-content h2 {
    font-size: clamp(
        38px,
        5vw,
        60px
    );

    line-height: 1;

    letter-spacing: -0.05em;
}

.cta-content h2 span {
    color: var(--orange);
}

.cta-content p {
    max-width: 560px;

    margin: 20px auto 30px;

    color: var(--text-soft);

    font-size: 14px;

    line-height: 1.7;
}

.install-command {
    max-width: 720px;

    min-height: 54px;

    display: flex;
    align-items: center;

    margin: 0 auto 25px;

    padding: 0 9px 0 17px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 9px;

    background: #080706;

    text-align: left;
}

.install-command > span {
    margin-right: 10px;

    color: var(--orange);

    font-family: var(--mono);
}

.install-command code {
    flex: 1;

    overflow: hidden;

    color: #bfb3aa;

    font-family: var(--mono);
    font-size: 10px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.install-command button {
    padding: 7px 10px;

    border: 1px solid var(--border);

    border-radius: 5px;

    background: rgba(255, 122, 47, 0.07);

    color: var(--orange-bright);

    cursor: pointer;

    font-family: var(--mono);
    font-size: 9px;

    transition:
        background 180ms ease,
        border-color 180ms ease;
}

.install-command button:hover {
    background: rgba(255, 122, 47, 0.13);

    border-color: var(--border-bright);
}

.cta-button {
    margin-top: 3px;
}


/* =========================================================
   Footer
   ========================================================= */

footer {
    width: min(
        calc(100% - 48px),
        var(--container)
    );

    min-height: 100px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid rgba(255, 255, 255, 0.06);

    color: var(--text-muted);

    font-size: 11px;
}

.footer-brand {
    color: var(--text-soft);

    font-weight: 600;
}

.footer-text {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--orange);
}


/* =========================================================
   Animations
   ========================================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes cursorBlink {
    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

@keyframes terminalFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes floatGlow {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -20px);
    }
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 950px) {

    .hero {
        grid-template-columns: 1fr;

        gap: 60px;

        padding-top: 70px;
    }

    .hero-terminal {
        max-width: 700px;

        width: 100%;

        margin: 0 auto;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .architecture {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .architecture-arrow {
        display: none;
    }

    .architecture-step {
        min-height: 230px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat:nth-child(2) {
        border-right: 0;
    }

    .stat:nth-child(-n + 2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}


@media (max-width: 700px) {

    .navbar {
        width: min(
            calc(100% - 30px),
            var(--container)
        );
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a:not(.github-link) {
        display: none;
    }

    .hero,
    .section,
    .stats,
    .cta-section,
    footer {
        width: min(
            calc(100% - 30px),
            var(--container)
        );
    }

    .hero {
        padding-top: 55px;

        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(
            48px,
            14vw,
            72px
        );
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .terminal-window {
        transform: none;
    }

    .terminal-body {
        min-height: 270px;

        padding: 20px;

        font-size: 10px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat {
        min-height: 105px;

        padding: 18px;
    }

    .section {
        padding-top: 110px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: auto;
    }

    .architecture {
        grid-template-columns: 1fr;
    }

    .architecture-step {
        min-height: 210px;
    }

    .terminal-output-area {
        height: 330px;

        padding: 20px;
    }

    .terminal-input-row {
        padding: 0 15px;
    }

    .terminal-prompt {
        font-size: 10px;
    }

    #terminalInput {
        font-size: 10px;
    }

    .cta-section {
        margin-top: 110px;
        margin-bottom: 60px;
    }

    .cta-content {
        padding: 65px 18px;
    }

    .install-command {
        min-height: 50px;
    }

    .install-command code {
        font-size: 8px;
    }

    footer {
        flex-direction: column;

        gap: 13px;

        padding: 30px 0;

        text-align: center;
    }
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}