
/* ========================================
   IMPERIAL QOSFS — PAGE STYLES
   ======================================== */

.qosfs-page {
    --qosfs-accent: #7bc96f;
    --qosfs-accent-bright: #a0e68f;
    --qosfs-accent-bg: #153326;

    min-height: 100vh;
}

/* Header */

.qosfs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.qosfs-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
}

.qosfs-brand img {
    display: block;
    object-fit: contain;
    border-radius: 10px;
}

.qosfs-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 20px;
}

.qosfs-navigation a {
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 180ms ease;
}

.qosfs-navigation a:hover,
.qosfs-navigation a:focus-visible {
    color: var(--qosfs-accent-bright);
}

/* Main layout */

.qosfs-main {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

.qosfs-hero {
    position: relative;
    padding: clamp(45px, 8vw, 90px) 0 65px;
    border-bottom: 1px solid var(--border);
}

.qosfs-eyebrow {
    margin: 0 0 14px;
    color: var(--qosfs-accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.qosfs-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qosfs-title-row h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.5rem, 7vw, 4.6rem);
    line-height: 1.08;
    letter-spacing: -2px;
}

.qosfs-title-row h1 span {
    color: var(--qosfs-accent);
}

.qosfs-subtitle {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.qosfs-status {
    flex-shrink: 0;
    padding: 8px 13px;
    color: var(--qosfs-accent-bright);
    background: var(--qosfs-accent-bg);
    border: 1px solid rgb(123 201 111 / 35%);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
}

.qosfs-intro {
    max-width: 720px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.85;
}

.qosfs-intro a,
.qosfs-spec-row a {
    color: var(--qosfs-accent-bright);
    text-decoration: none;
}

.qosfs-intro a:hover,
.qosfs-spec-row a:hover {
    text-decoration: underline;
}

/* Badges and buttons */

.qosfs-badges,
.qosfs-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.qosfs-badges {
    margin-top: 24px;
}

.qosfs-badges span {
    padding: 7px 11px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
}

.qosfs-actions {
    margin-top: 30px;
}

.qosfs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    transition:
        transform 200ms ease,
        background-color 200ms ease,
        border-color 200ms ease;
}

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

.qosfs-button-primary {
    color: #0b1710;
    background: var(--qosfs-accent);
}

.qosfs-button-primary:hover {
    background: var(--qosfs-accent-bright);
}

.qosfs-button-secondary {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.qosfs-button-secondary:hover {
    border-color: var(--qosfs-accent);
}

/* Sections */

.qosfs-section {
    padding: 65px 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 24px;
}

.qosfs-section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.qosfs-section-heading h2,
.qosfs-nextos-panel h2,
.qosfs-github-panel h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    letter-spacing: -0.7px;
}

.qosfs-section-heading > p:last-child,
.qosfs-nextos-panel p:not(.qosfs-eyebrow),
.qosfs-github-panel p:not(.qosfs-eyebrow) {
    color: var(--muted);
    line-height: 1.8;
}

/* Cards */

.qosfs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.qosfs-card {
    --card-accent: var(--qosfs-accent);

    position: relative;
    min-width: 0;
    padding: 25px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 2px solid var(--card-accent);
    border-radius: 13px;
    transition:
        transform 250ms ease,
        border-color 250ms ease,
        background-color 250ms ease,
        box-shadow 250ms ease;
}

.qosfs-card:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    border-color: var(--card-accent);
    box-shadow: 0 12px 30px rgb(0 0 0 / 18%);
}

.qosfs-card-purpose {
    --card-accent: #7bc96f;
}

.qosfs-card-philosophy {
    --card-accent: #56b6a0;
}

.qosfs-card-performance {
    --card-accent: #58a6ff;
}

.qosfs-card-number {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--card-accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.qosfs-card h3 {
    margin: 0 0 10px;
    color: var(--card-accent);
    font-size: 1.2rem;
}

.qosfs-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.8;
}

/* Technical specifications */

.qosfs-spec-panel {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.qosfs-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 22px;
    border-bottom: 1px solid var(--border);
}

.qosfs-spec-row:last-child {
    border-bottom: 0;
}

.qosfs-spec-row > span {
    color: var(--muted);
}

.qosfs-spec-row strong {
    color: var(--text);
    text-align: right;
    overflow-wrap: anywhere;
}

.qosfs-status-text {
    color: var(--qosfs-accent-bright) !important;
}

/* Compatibility */

.qosfs-compatibility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qosfs-card-current {
    --card-accent: #58a6ff;
}

.qosfs-card-future {
    --card-accent: #7bc96f;
}

.qosfs-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 9px;
    color: var(--card-accent);
    background: color-mix(in srgb, var(--card-accent) 10%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--card-accent) 30%, var(--border));
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 750;
}

/* Warning */

.qosfs-warning {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 45px 0 0;
    padding: 24px;
    background: #292619;
    border: 1px solid #63562c;
    border-radius: 13px;
}

.qosfs-warning-icon {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #171309;
    background: #eac45e;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 900;
}

.qosfs-warning h2 {
    margin: 2px 0 8px;
    color: #f2d77f;
    font-size: 1.15rem;
}

.qosfs-warning p {
    margin: 0;
    color: #d2c9a8;
    line-height: 1.8;
}

/* Documentation */

.qosfs-docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.qosfs-doc-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
    padding: 19px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        background-color 220ms ease;
}

.qosfs-doc-card:hover {
    transform: translateY(-3px);
    background: var(--surface-hover);
    border-color: var(--qosfs-accent);
}

.qosfs-doc-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--qosfs-accent);
    background: var(--qosfs-accent-bg);
    border-radius: 10px;
    font-size: 1.3rem;
}

.qosfs-doc-content {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 6px;
}

.qosfs-doc-content strong {
    font-size: 0.95rem;
}

.qosfs-doc-content small {
    color: var(--muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.qosfs-doc-arrow {
    color: var(--qosfs-accent);
}

/* NextOS and GitHub panels */

.qosfs-nextos-panel,
.qosfs-github-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 24px;
    padding: clamp(24px, 4vw, 38px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.qosfs-nextos-panel {
    border-left: 3px solid #58a6ff;
}

.qosfs-github-panel {
    margin-bottom: 65px;
    border-left: 3px solid var(--qosfs-accent);
}

.qosfs-nextos-panel > div,
.qosfs-github-panel > div {
    max-width: 650px;
}

.qosfs-nextos-panel .qosfs-eyebrow {
    color: #58a6ff;
}

.qosfs-nextos-panel .qosfs-button {
    flex-shrink: 0;
}

/* Footer */

.qosfs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 25px 0 35px;
    border-top: 1px solid var(--border);
}

.qosfs-footer a {
    color: var(--qosfs-accent-bright);
    text-decoration: none;
}

.qosfs-footer a:hover {
    text-decoration: underline;
}

.qosfs-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Back to top */

.qosfs-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #0b1710;
    background: var(--qosfs-accent);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgb(0 0 0 / 25%);
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 180ms ease,
        background-color 180ms ease;
}

.qosfs-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.qosfs-back-to-top:hover {
    background: var(--qosfs-accent-bright);
}

/* Reveal animation */

.qosfs-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 500ms ease,
        transform 500ms ease;
}

.qosfs-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.qosfs-reveal:nth-child(2) {
    transition-delay: 40ms;
}

.qosfs-reveal:nth-child(3) {
    transition-delay: 80ms;
}

/* Responsive */

@media (max-width: 760px) {
    .qosfs-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .qosfs-navigation {
        justify-content: flex-start;
        gap: 12px 18px;
    }

    .qosfs-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .qosfs-docs-grid {
        grid-template-columns: 1fr;
    }

    .qosfs-nextos-panel,
    .qosfs-github-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .qosfs-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .qosfs-main {
        width: calc(100% - 28px);
    }

    .qosfs-header,
    .qosfs-footer {
        width: calc(100% - 28px);
    }

    .qosfs-title-row h1 {
        letter-spacing: -1px;
    }

    .qosfs-spec-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        padding: 16px;
    }

    .qosfs-spec-row strong {
        text-align: left;
    }

    .qosfs-warning {
        padding: 18px;
    }

    .qosfs-doc-card {
        padding: 15px;
    }

    .qosfs-actions .qosfs-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qosfs-page *,
    .qosfs-page *::before,
    .qosfs-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .qosfs-reveal {
        opacity: 1;
        transform: none;
    }

    .qosfs-card:hover,
    .qosfs-doc-card:hover,
    .qosfs-button:hover {
        transform: none;
    }
}
