/* ========================================
   IMPERIAL NEXTOS — PAGE STYLES
   ======================================== */

.nextos-page {
    --card-accent: #58a6ff;
    --nextos-blue: #58a6ff;
    --nextos-blue-soft: rgb(88 166 255 / 10%);
    --nextos-blue-border: rgb(88 166 255 / 30%);

    scroll-behavior: smooth;
}

/* Header */

.nextos-header {
    position: relative;
    overflow: hidden;
}

.nextos-home-link {
    display: inline-block;
}

.nextos-eyebrow {
    margin: 0 0 10px;
    color: var(--nextos-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.nextos-tagline {
    max-width: 650px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.nextos-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.nextos-badge {
    padding: 7px 12px;
    color: var(--nextos-blue);
    background: var(--nextos-blue-soft);
    border: 1px solid var(--nextos-blue-border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 650;
}

.nextos-badge-warning {
    color: var(--yellow);
    background: color-mix(in srgb, var(--yellow) 10%, var(--surface));
    border-color: color-mix(in srgb, var(--yellow) 35%, var(--border));
}

/* Navigation */

.nextos-page .main-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.nextos-page .main-navigation a {
    padding: 9px 13px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none;
    transition:
        color 200ms ease,
        background-color 200ms ease,
        border-color 200ms ease;
}

.nextos-page .main-navigation a:hover,
.nextos-page .main-navigation a:focus-visible {
    color: var(--nextos-blue);
    background: var(--nextos-blue-soft);
    border-color: var(--nextos-blue-border);
}

/* Main layout */

.nextos-main {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 70px;
}

.nextos-section {
    margin: 0 0 76px;
    scroll-margin-top: 24px;
}

.nextos-section-heading {
    margin-bottom: 25px;
}

.nextos-section-heading h2 {
    margin: 0 0 12px;
}

.nextos-section-heading > p:last-child {
    max-width: 700px;
    color: var(--muted);
    line-height: 1.7;
}

/* Common NextOS cards */

.nextos-card {
    min-width: 0;
    padding: 24px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);

    transition:
        transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 260ms ease,
        background-color 260ms ease,
        box-shadow 260ms ease;
}

.nextos-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--nextos-blue);
    font-size: 1.15rem;
}

.nextos-card p {
    color: var(--muted);
    line-height: 1.75;
}

.nextos-card a {
    color: var(--nextos-blue);
    font-weight: 650;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.nextos-card a:hover {
    text-decoration: underline;
}

.nextos-card:hover {
    transform: translateY(-5px);
    border-color: var(--nextos-blue-border);
    box-shadow:
        0 12px 26px rgb(0 0 0 / 18%),
        0 0 16px rgb(88 166 255 / 5%);
}

/* Overview */

.nextos-overview-grid,
.nextos-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.nextos-overview-card {
    border-top: 2px solid var(--nextos-blue);
}

.nextos-version-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 24px;
    background: var(--nextos-blue-soft);
    border: 1px solid var(--nextos-blue-border);
    border-radius: var(--radius);
}

.nextos-version-panel > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nextos-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 1px;
}

.nextos-version-panel strong {
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.nextos-version {
    color: var(--nextos-blue);
    font-size: 1.6rem;
}

/* Technical specifications */

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

.nextos-tech-card {
    position: relative;
    overflow: hidden;
}

.nextos-tech-number {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--nextos-blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nextos-tech-card h3 {
    color: var(--text);
}

.nextos-tech-card:hover h3 {
    color: var(--nextos-blue);
}

/* Roadmap */

.nextos-roadmap {
    display: grid;
    gap: 16px;
}

.nextos-roadmap-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
}

.nextos-roadmap-marker {
    display: grid;
    place-items: center;
    align-self: start;
    width: 40px;
    height: 40px;
    color: var(--nextos-blue);
    background: var(--nextos-blue-soft);
    border: 1px solid var(--nextos-blue-border);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
}

.nextos-roadmap-card {
    padding: 20px 24px;
}

.nextos-roadmap-card h3 {
    margin: 8px 0;
    color: var(--text);
}

.nextos-roadmap-status {
    display: inline-block;
    color: var(--nextos-blue);
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

/* Download panel */

.nextos-download-panel {
    padding: clamp(24px, 5vw, 44px);
    text-align: center;
    background:
        linear-gradient(
            135deg,
            rgb(88 166 255 / 9%),
            transparent 65%
        ),
        var(--surface);
    border: 1px solid var(--nextos-blue-border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 12px 36px rgb(0 0 0 / 12%);
}

.nextos-download-panel h2 {
    margin-top: 0;
}

.nextos-download-panel > p:not(.nextos-eyebrow) {
    max-width: 650px;
    margin: 12px auto;
    color: var(--muted);
    line-height: 1.75;
}

.nextos-download-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    max-width: 480px;
    margin: 28px auto;
    padding: 18px;
    text-align: left;
    background: rgb(0 0 0 / 12%);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.nextos-download-info span {
    color: var(--muted);
}

.nextos-download-info strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.nextos-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 13px 24px;
    color: #07111d;
    background: var(--nextos-blue);
    border: 1px solid var(--nextos-blue);
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;

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

.nextos-download-button:hover {
    transform: translateY(-2px);
    background: #79b8ff;
    box-shadow: 0 8px 24px rgb(88 166 255 / 22%);
}

.nextos-download-button:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 4px;
}

.nextos-download-note {
    font-size: 0.88rem;
}

/* Warning */

.nextos-warning {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 16px;
    margin-top: 22px;
    padding: 24px;
    background: color-mix(in srgb, var(--yellow) 6%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--yellow) 35%, var(--border));
    border-radius: var(--radius);
}

.nextos-warning-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #171207;
    background: var(--yellow);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 900;
}

.nextos-warning h3 {
    margin-top: 0;
    color: var(--yellow);
}

.nextos-warning p {
    color: var(--muted);
    line-height: 1.75;
}

/* Other projects */

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

.nextos-project-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-decoration: none;
}

.nextos-project-link h3 {
    margin: 4px 0;
}

.nextos-project-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.nextos-project-link > span:last-child {
    margin-top: auto;
    color: var(--nextos-blue);
    font-weight: 700;
}

/* Footer */

.nextos-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
}

.nextos-footer a {
    color: var(--nextos-blue);
    text-decoration: none;
}

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

/* Scroll reveal — activated by nextos.js */

.nextos-page .nextos-reveal {
    opacity: 1;
    transform: none;
}

.nextos-page .nextos-reveal.is-pending {
    opacity: 0;
    transform: translateY(14px);
}

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

.nextos-page .nextos-reveal {
    transition:
        opacity 450ms ease,
        transform 450ms ease;
}

/* Responsive */

@media (max-width: 800px) {
    .nextos-tech-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nextos-version-panel {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .nextos-other-projects {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nextos-main {
        width: min(100% - 28px, 1100px);
        padding-top: 20px;
    }

    .nextos-section {
        margin-bottom: 52px;
    }

    .nextos-overview-grid,
    .nextos-info-grid,
    .nextos-tech-grid {
        grid-template-columns: 1fr;
    }

    .nextos-card {
        padding: 20px;
    }

    .nextos-download-info {
        gap: 12px;
        padding: 14px;
        font-size: 0.9rem;
    }

    .nextos-warning {
        grid-template-columns: 1fr;
    }

    .nextos-roadmap-item {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }

    .nextos-roadmap-marker {
        width: 32px;
        height: 32px;
    }

    .nextos-page .main-navigation {
        gap: 5px;
    }

    .nextos-page .main-navigation a {
        padding: 8px 9px;
        font-size: 0.9rem;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .nextos-page,
    .nextos-card,
    .nextos-download-button,
    .nextos-page .main-navigation a,
    .nextos-page .nextos-reveal {
        scroll-behavior: auto;
        transition: none;
    }

    .nextos-card:hover,
    .nextos-download-button:hover {
        transform: none;
    }

    .nextos-page .nextos-reveal.is-pending {
        opacity: 1;
        transform: none;
    }
}

/* GitHub repository panel */

.nextos-github-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 24px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.nextos-github-panel h3 {
    margin: 0 0 8px;
    color: var(--nextos-blue);
}

.nextos-github-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 560px) {
    .nextos-github-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .nextos-github-panel .nextos-download-button {
        align-self: flex-start;
    }
}