/* Shared styles for the SkyCrew subpages: /skycrew, /skycrew/download,
   /skycrew/info, /skycrew/commands, /skycrew/aircraft */

body.skycrew-subpage {
    background: #020617;
}

/* Secondary sub-nav tying the 5 SkyCrew pages together */
.skycrew-subnav {
    position: sticky;
    top: 78px;
    z-index: 900;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 2rem;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.skycrew-subnav-link {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.skycrew-subnav-link:hover {
    color: #f8fafc;
    border-color: rgba(59, 130, 246, 0.4);
}

.skycrew-subnav-link.active {
    background: #3b82f6;
    color: #ffffff;
}

/* Page hero band (shorter than the landing-page full-viewport hero) */
.skycrew-page-hero {
    position: relative;
    padding: 4rem 2rem 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.skycrew-page-hero::before {
    content: '';
    position: absolute;
    top: -4rem;
    left: 50%;
    width: 700px;
    height: 400px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(59, 130, 246, 0.16), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.skycrew-page-hero .eyebrow {
    display: inline-block;
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.skycrew-page-hero h1 {
    font-size: 2.75rem;
    color: #f8fafc;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.skycrew-page-hero p {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Buttons (shared with skycrew.css's hero — kept visually identical) */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #38bdf8;
    color: #0f172a;
}

.btn-primary:hover {
    background-color: #7dd3fc;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #94a3b8;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #0f172a;
    transform: translateY(-2px);
}

.skycrew-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
}

.skycrew-section + .skycrew-section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.skycrew-section h2 {
    font-size: 1.9rem;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.skycrew-section .section-lede {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 700px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Scroll-reveal animation, toggled by IntersectionObserver in skycrew-pages.js */
.reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Feature grid (Information page) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.75rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: #3b82f6;
    box-shadow: 0 16px 32px -12px rgba(59, 130, 246, 0.35);
}

.feature-card .feature-icon {
    font-size: 1.4rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
}

.feature-card h3 {
    color: #f8fafc;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Pipeline timeline (How It Works) */
.pipeline-timeline {
    position: relative;
    padding-left: 2.5rem;
}

.pipeline-timeline::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6, rgba(59, 130, 246, 0.1));
}

.pipeline-step {
    position: relative;
    margin-bottom: 2rem;
}

.pipeline-step::before {
    content: attr(data-step);
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.pipeline-step h3 {
    color: #f8fafc;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.pipeline-step p {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Accordion (Information page FAQ-style sections) */
.accordion-item {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    background: none;
    border: none;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.accordion-trigger .badge {
    flex-shrink: 0;
    background: #3b82f6;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.accordion-trigger .chevron {
    margin-left: auto;
    transition: transform 0.25s ease;
    color: #64748b;
}

.accordion-item.open .accordion-trigger .chevron {
    transform: rotate(180deg);
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-panel {
    max-height: 1200px;
}

.accordion-panel-inner {
    padding: 0 1.4rem 1.4rem;
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.7;
}

.accordion-panel-inner strong {
    color: #cbd5e1;
}

.accordion-panel-inner code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
}

.accordion-panel-inner h3 {
    color: #f8fafc;
    font-size: 1rem;
    margin: 1.2rem 0 0.6rem;
}

.accordion-panel-inner h3:first-child {
    margin-top: 0;
}

.accordion-panel-inner ul {
    margin: 0 0 0.75rem;
    padding-left: 1.3rem;
}

.accordion-panel-inner li {
    margin-bottom: 0.5rem;
}

.accordion-panel-inner li:last-child {
    margin-bottom: 0;
}

/* Updates page: each version's content is far longer than the Information
   page's FAQ answers, so the shared 1200px accordion max-height would clip
   it — scoped by page ID rather than raising the shared default, since
   download.html's troubleshooting accordion doesn't need this much room. */
#skycrew-updates-root .accordion-item.open .accordion-panel {
    max-height: 6000px;
}

/* Trust / privacy badge row */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.trust-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.trust-item:hover {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.1);
}

.trust-item .check {
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
}

.trust-item p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

/* Command filter chips (Commands page) */
.command-filters-panel {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.command-filters-hint {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 1rem;
}

.command-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.command-filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.command-filter-btn:hover {
    border-color: #3b82f6;
    color: #f8fafc;
}

.command-filter-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Manufacturer master button — click to open an accordion row of its
   aircraft below the whole filter bar, so a growing model lineup doesn't
   have to grow the flat filter bar one chip per aircraft forever. */
.command-filter-master {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.command-filter-master:hover {
    border-color: #3b82f6;
    color: #f8fafc;
}

.command-filter-master[aria-expanded="true"] {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
}

/* A family with an active-but-collapsed variant stays visually marked,
   distinct from .active (full blue fill), so the user can tell which
   manufacturer is filtered without its accordion being open. */
.command-filter-master.has-active {
    border-color: #3b82f6;
    color: #93c5fd;
}

.command-filter-caret {
    transition: transform 0.2s ease;
}

.command-filter-master[aria-expanded="true"] .command-filter-caret {
    transform: rotate(180deg);
}

/* Each manufacturer's aircraft in one horizontal, horizontally-scrollable
   line (never wraps — .command-filter-btn is flex-shrink:0) below the
   whole filter row, so the lineup can grow arbitrarily large without ever
   needing more vertical space than a single row. */
.command-filter-accordion {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-bottom: 0.3rem;
    transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
}

.command-filter-accordion.open {
    max-height: 60px;
    opacity: 1;
    margin-top: 1rem;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.command-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.4rem;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.command-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 14px 28px -14px rgba(59, 130, 246, 0.35);
}

.command-card.hidden {
    display: none;
}

.command-card h3 {
    color: #f8fafc;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.command-card .phrase-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.command-card .phrase-chip {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
}

.command-card .scope-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

/* Aircraft cards (Supported Aircraft page) */
.aircraft-tier {
    margin-bottom: 3rem;
}

.aircraft-tier-note {
    color: #94a3b8;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    line-height: 1.6;
}

.aircraft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
}

.aircraft-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.aircraft-card:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 14px 28px -14px rgba(59, 130, 246, 0.4);
}

.aircraft-card h3 {
    color: #f8fafc;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.aircraft-card .aircraft-type {
    color: #64748b;
    font-size: 0.82rem;
    display: block;
    margin-bottom: 0.75rem;
}

.aircraft-card .tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.tag-supported {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.tag-alpha {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.tag-checklist {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.tag-untested {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.tag-unsupported {
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
}

@media (max-width: 640px) {
    .skycrew-page-hero h1 {
        font-size: 2rem;
    }

    .pipeline-timeline {
        padding-left: 2rem;
    }

    .pipeline-step::before {
        left: -2rem;
    }
}
