/* ============================================
   N850YR — The Beechcraft Duke B60
   A Love Letter in Code
   ============================================ */

:root {
    /* Nostalgic warmth transitioning to modern teal */
    --color-cream: #f5f0e8;
    --color-warm-white: #faf8f4;
    --color-parchment: #ede6d8;
    --color-gold: #c9a84c;
    --color-gold-dark: #8b6914;
    --color-teal: #1a7a6d;
    --color-teal-dark: #0d4f45;
    --color-teal-light: #2ba393;
    --color-navy: #1a2332;
    --color-navy-light: #2a3a4f;
    --color-charcoal: #2c2c2c;
    --color-text: #3a3530;
    --color-text-light: #6b6560;
    --color-text-muted: #9a9490;
    --color-border: #e0d8cc;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: clamp(4rem, 10vw, 8rem);
    --container-max: 1200px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-warm-white);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.4s ease;
}

.nav.scrolled {
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(12px);
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 2px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 35, 50, 0.4) 0%,
        rgba(26, 35, 50, 0.2) 40%,
        rgba(26, 35, 50, 0.6) 80%,
        rgba(26, 35, 50, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s ease 0.3s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s ease 0.6s forwards;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    font-style: italic;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
    opacity: 0;
    animation: fadeUp 1s ease 0.9s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite 2s;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--section-padding) 2rem;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-gold);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--color-navy);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: 400;
}

/* ============================================
   Content Layouts
   ============================================ */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin: 3rem 0;
}

.content-grid-reverse .content-image {
    order: -1;
}

.content-wide {
    max-width: 800px;
    margin: 2rem 0;
}

.content-text p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: var(--color-text);
}

.content-text .lead,
.content-wide .lead {
    font-size: 1.2rem;
    color: var(--color-navy);
    font-weight: 400;
    line-height: 1.8;
}

.content-wide p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.content-text h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-navy);
    margin: 2rem 0 0.75rem;
}

.content-text h3:first-child {
    margin-top: 0;
}

.content-image {
    position: relative;
}

.content-image img {
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.image-caption {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ============================================
   Pull Quote
   ============================================ */
.section-prologue {
    background: var(--color-navy);
    padding: 5rem 2rem;
}

.pull-quote {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-style: italic;
    color: rgba(255,255,255,0.9);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    padding: 2rem 0;
}

.pull-quote::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    color: var(--color-gold);
    opacity: 0.3;
    font-family: var(--font-display);
    line-height: 1;
}

.pull-quote cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--color-gold);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stat-card {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--color-teal-dark);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* ============================================
   Image Breaks
   ============================================ */
.section-image-break {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    overflow: hidden;
}

.section-image-break img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-break-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.image-break-caption p {
    max-width: var(--container-max);
    margin: 0 auto;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-style: italic;
}

/* ============================================
   Timeline
   ============================================ */
.timeline {
    position: relative;
    margin: 4rem 0;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-gold), var(--color-teal));
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.45rem;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-gold);
    border: 3px solid var(--color-warm-white);
    box-shadow: 0 0 0 2px var(--color-gold);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-teal);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ============================================
   Comparison (Before/After)
   ============================================ */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.comparison-item {
    position: relative;
}

.comparison-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.comparison-label {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

/* ============================================
   Gallery
   ============================================ */
.section-gallery {
    background: var(--color-parchment);
}

.gallery-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gallery-filter {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-border);
    background: var(--color-warm-white);
    border-radius: 2px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-filter:hover,
.gallery-filter.active {
    background: var(--color-navy);
    color: #fff;
    border-color: var(--color-navy);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item.hidden {
    display: none;
}

/* ============================================
   Specifications
   ============================================ */
.section-specs {
    background: var(--color-navy);
    color: #fff;
}

.section-specs .section-title {
    color: #fff;
}

.section-specs .section-subtitle {
    color: rgba(255,255,255,0.6);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.spec-group {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 1.5rem;
}

.spec-group h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.spec-group table {
    width: 100%;
    border-collapse: collapse;
}

.spec-group td {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.spec-group td:first-child {
    color: rgba(255,255,255,0.6);
    width: 45%;
}

.spec-group td:last-child {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    text-align: right;
}

/* ============================================
   Closing
   ============================================ */
.section-closing {
    padding: 6rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, var(--color-warm-white), var(--color-cream));
}

.closing-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-navy);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.closing-content p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.closing-mono {
    font-family: var(--font-mono) !important;
    font-size: 0.85rem !important;
    color: var(--color-teal) !important;
    letter-spacing: 1px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-charcoal);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--color-gold);
    letter-spacing: 3px;
    display: block;
    margin-bottom: 0.5rem;
}

.footer p {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ============================================
   Animations
   ============================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-grid-reverse .content-image {
        order: 0;
    }

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

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

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 35, 50, 0.98);
        padding: 2rem;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

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

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

    .timeline {
        padding-left: 2rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-item::before {
        left: -2.45rem;
    }

    .hero-title {
        letter-spacing: -1px;
    }
}
