/*
© 2025–2026 Born4Flight s.r.o. All rights reserved.
B4F®, Born4Flight® and FL1GHT™ are trademarks of Born4Flight s.r.o.
*/

@font-face {
    font-family: 'Hacked';
    src: url('fonts/HACKED.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Audiowide';
    src: url('fonts/Audiowide-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* FL1GHT Timeline – Modern Showreel-Style Milestone Presentation */

.flight-page-hero {
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(6rem, 15vw, 10rem) 2rem clamp(3rem, 8vw, 5rem);
    position: relative;
    overflow: hidden;
}

.flight-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 100%;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(198, 8, 36, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.flight-page-logo {
    width: clamp(4rem, 10vw, 6rem);
    height: clamp(4rem, 10vw, 6rem);
    object-fit: contain;
    filter: drop-shadow(0 0 2rem rgba(198, 8, 36, 0.5));
    margin-bottom: 1.25rem;
    animation: flightLogoFloat 4s ease-in-out infinite;
}

@keyframes flightLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.flight-page-title {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.flight-page-subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 32rem;
    line-height: 1.6;
}

/* Showreel Timeline – full-width stacked cards */
.flight-timeline-section {
    padding: 0 !important;
    background: var(--bg-primary);
}

/* Hidden until "View Milestones" clicked */
.flight-milestones-collapsed {
    display: none;
}

/* Spacer – slight scroll to reveal first epoch */
.flight-timeline-spacer {
    min-height: clamp(40vh, 55vh, 70vh);
    width: 100%;
}

.flight-timeline {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Line counter visualization – vertical fill bar, left side (desktop) */
@media (max-width: 1023px) {
    .flight-lines-visual { display: none !important; }
}

.flight-lines-visual {
    position: fixed;
    left: clamp(1rem, 3vw, 2rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.flight-lines-visual.visible {
    opacity: 1;
}

.flight-lines-visual-track {
    width: 8px;
    height: clamp(200px, 50vh, 360px);
    background: rgba(198, 8, 36, 0.08);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.flight-lines-visual-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, rgba(198, 8, 36, 0.5) 0%, rgba(198, 8, 36, 0.85) 50%, #C60824 100%);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(198, 8, 36, 0.4);
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.flight-lines-visual-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.flight-lines-visual-value {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    color: #C60824;
    min-width: 4ch;
}

.flight-lines-visual-label {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    color: var(--text-secondary);
}

html[data-theme="light"] .flight-lines-visual-track {
    background: rgba(198, 8, 36, 0.06);
}

html[data-theme="light"] .flight-lines-visual-fill {
    background: linear-gradient(180deg, rgba(198, 8, 36, 0.35) 0%, rgba(198, 8, 36, 0.7) 50%, #C60824 100%);
}

/* Vertical milestone rail – scrollbar-style, right side (desktop) */
@media (max-width: 1023px) {
    .flight-milestone-rail { display: none !important; }
}

.flight-milestone-rail {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.flight-milestone-rail.visible {
    opacity: 1;
}

.flight-milestone-rail-track {
    width: 12px;
    height: clamp(180px, 45vh, 320px);
    background: rgba(198, 8, 36, 0.08);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.flight-milestone-rail-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    background: rgba(198, 8, 36, 0.4);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.flight-milestone-rail-dot.active {
    background: #C60824;
    box-shadow: 0 0 8px rgba(198, 8, 36, 0.6);
}

.flight-milestone-rail-version {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 600;
    color: rgba(198, 8, 36, 0.9);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.flight-milestone-rail-version.visible {
    opacity: 1;
    transform: translateX(0);
}

html[data-theme="light"] .flight-milestone-rail-track {
    background: rgba(198, 8, 36, 0.06);
}

html[data-theme="light"] .flight-milestone-rail-dot {
    background: rgba(198, 8, 36, 0.35);
}

html[data-theme="light"] .flight-milestone-rail-dot.active {
    background: #C60824;
}

html[data-theme="light"] .flight-milestone-rail-version {
    color: rgba(198, 8, 36, 0.95);
}

html[data-theme="light"] .flight-lines-visual-value {
    color: #C60824;
}

/* Milestone – full-width showreel frame, faster scroll reveal */
.flight-milestone.scroll-fade-in {
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.flight-milestone {
    position: relative;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto 0;
}

.flight-milestone-content {
    width: 100%;
    overflow: hidden;
}

/* Card – cinematic frame with 16:9 media */
.flight-milestone-card {
    position: relative;
    margin: 0 clamp(1rem, 4vw, 2.5rem) clamp(3rem, 8vw, 6rem);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.flight-milestone-card:hover {
    border-color: rgba(198, 8, 36, 0.25);
    box-shadow: 0 0 0 1px rgba(198, 8, 36, 0.1),
                0 1.5rem 4rem rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .flight-milestone-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .flight-milestone-card:hover {
    border-color: rgba(198, 8, 36, 0.35);
    box-shadow: 0 0 0 1px rgba(198, 8, 36, 0.15),
                0 1.5rem 4rem rgba(0, 0, 0, 0.08);
}

/* Light theme – flight page hero & timeline */
html[data-theme="light"] .flight-page-hero::before {
    background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(198, 8, 36, 0.08) 0%, transparent 55%);
}

html[data-theme="light"] .flight-milestone-media {
    background: linear-gradient(135deg, rgba(198, 8, 36, 0.04) 0%, rgba(0, 0, 0, 0.08) 100%);
}

html[data-theme="light"] .flight-milestone-media::before {
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
}

html[data-theme="light"] .flight-milestone-media-placeholder {
    color: rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .flight-milestone-media-placeholder svg {
    opacity: 0.35;
}

html[data-theme="light"] .flight-timeline-arrow {
    color: rgba(198, 8, 36, 0.45);
}

html[data-theme="light"] .flight-timeline-arrow svg {
    filter: drop-shadow(0 0 8px rgba(198, 8, 36, 0.2));
}

html[data-theme="light"] .flight-milestone-changes li::before {
    background: #C60824;
}

/* Media – strict 16:9 */
.flight-milestone-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(198, 8, 36, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.flight-milestone-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

.flight-milestone-media img,
.flight-milestone-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Image compare slider – drag to compare two images */
.flight-milestone-compare {
    position: absolute;
    inset: 0;
    cursor: col-resize;
    user-select: none;
}

.flight-milestone-compare-before,
.flight-milestone-compare-after {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.flight-milestone-compare-before img,
.flight-milestone-compare-after img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.flight-milestone-compare-after {
    clip-path: inset(0 50% 0 0);
}

.flight-milestone-compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2.75rem;
    margin-left: -1.375rem;
    z-index: 3;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flight-milestone-compare-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    width: 3px;
    background: #C60824;
    box-shadow: 0 0 6px rgba(198, 8, 36, 0.5);
}

.flight-milestone-compare-handle-grip {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border-radius: 50%;
    background: #C60824;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 12px rgba(198, 8, 36, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.2);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Version badge overlay on media */
.flight-milestone-media-badge {
    position: absolute;
    bottom: 1rem;
    left: 1.25rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flight-milestone-media-badge .flight-milestone-badge-version {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: rgba(198, 8, 36, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    letter-spacing: 0.02em;
}

.flight-milestone-media-badge .flight-milestone-badge-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(45, 55, 75, 0.85);
    padding: 0.35rem 0.65rem;
    border-radius: 0.35rem;
    letter-spacing: 0.02em;
}

.flight-milestone-media-badge time {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-weight: 600;
}

html[data-theme="light"] .flight-milestone-media-badge .flight-milestone-badge-date {
    background: rgba(60, 75, 95, 0.9);
    color: rgba(255, 255, 255, 0.95);
}

/* Placeholder – 16:9 with centered content */
.flight-milestone-media-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.flight-milestone-media-placeholder svg {
    width: 2.5rem;
    height: 2.5rem;
    opacity: 0.4;
}

/* Card body – below media */
.flight-milestone-body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.flight-milestone-title {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.flight-milestone-changes {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.flight-milestone-changes ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.flight-milestone-changes li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
}

.flight-milestone-changes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    background: #C60824;
    border-radius: 50%;
}

/* Remove duplicate header – version/date now in media overlay */
.flight-milestone-header {
    display: none;
}

/* Epoch headers – Hacked font + faster reveal */
.flight-epoch.scroll-fade-in {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.flight-epoch {
    position: relative;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
    text-align: center;
    overflow: hidden;
}

.flight-epoch-title {
    font-family: 'Hacked', monospace, sans-serif;
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    padding-bottom: 0.75rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, #C60824, #FF3FE0, #64FFFF, #FFDD3A, #C60824);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.flight-epoch-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C60824, #FF3FE0, #C60824, transparent);
    transform: translateX(-50%);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.flight-epoch.visible .flight-epoch-title {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: epochGradientShift 4s ease-in-out infinite 0.4s,
               epochGlitchReveal 0.5s ease-out;
}

.flight-epoch.visible .flight-epoch-title::after {
    width: 100%;
}

.flight-epoch-date {
    font-family: 'Audiowide', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    margin: 0.75rem 0 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.flight-epoch.visible .flight-epoch-date {
    opacity: 1;
    transform: translateY(0);
}

@keyframes epochGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes epochGlitchReveal {
    0% { filter: contrast(1) brightness(1); }
    20% { filter: contrast(1.4) brightness(1.15); }
    40% { filter: contrast(1.2) brightness(1.05); }
    100% { filter: contrast(1) brightness(1); }
}

/* Stagger animation – applied via inline style in JS */

/* Down arrow between milestones – faster reveal */
.flight-timeline-arrow.scroll-fade-in {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reduce gap above arrow: milestone card before arrow gets less bottom margin so gap above = gap below */
.flight-milestone:has(+ .flight-timeline-arrow) .flight-milestone-card {
    margin-bottom: 0;
}

.flight-timeline-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) 0;
    color: rgba(198, 8, 36, 0.5);
    transition: color 0.3s ease;
}

.flight-timeline-arrow svg {
    width: clamp(2.5rem, 5vw, 3.5rem);
    height: clamp(2.5rem, 5vw, 3.5rem);
    filter: drop-shadow(0 0 12px rgba(198, 8, 36, 0.25));
}

.flight-timeline-arrow.scroll-fade-in.visible {
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* Launch CTA */
.flight-page-cta {
    text-align: center;
    padding: clamp(4rem, 10vh, 6rem) 2rem;
}

.flight-page-cta-inner {
    max-width: 28rem;
    margin: 0 auto;
}

.flight-page-cta-title {
    font-family: 'fccTYPO', monospace, sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.flight-page-cta-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.flight-page-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.flight-page-cta .btn:disabled,
.flight-page-cta .btn.flight-cta-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}
