/* --- CORE SYSTEM --- */
:root {
    --bg: #080808;
    --surface: #080808;
    --text-main: #f0f0f0;
    --text-dim: #888888;
    
    /* NEW: Aviation/Tech Blue */
    --accent: #2979ff; 
    
    --border: 1px solid #222;
    --font-main: 'Archivo', sans-serif;
    --font-tech: 'JetBrains Mono', monospace;
    --pad: 2rem; 
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; 
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1.05; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; border-left: 2px solid var(--accent); padding-left: 1rem; }

.mono { font-family: var(--font-tech); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
.dim { color: var(--text-dim); }
.accent-text { color: var(--accent); }

/* --- LAYOUT STRATEGY --- */

/* MOBILE / DEFAULT: Bounded Box Look */
.container {
    width: 95%; /* Small gaps on sides */
    max-width: 500px; /* Constrain on tablets/large phones before desktop switch */
    margin: 0 auto;
    border-left: var(--border);
    border-right: var(--border);
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* DESKTOP: Full Width Look */
@media (min-width: 769px) {
    .container {
        width: 100%;
        max-width: none;
        border-left: none;
        border-right: none;
    }
}

/* This class centers content when the container is full width */
.content-limit {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: center; /* Center the inner content wrapper */
    /* border-bottom: var(--border); */
    position: sticky;
    top: 0;
    background: var(--bg);
    backdrop-filter: blur(8px);
    z-index: 100;
}

/* Inner wrapper for nav to keep it aligned with content */
nav .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.5rem var(--pad);
}

.nav-right { display: flex; align-items: center; gap: 2rem; }

.nav-contact {
    border: 1px solid var(--text-main);
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-block;
}
.nav-contact:active, .nav-contact:hover { 
    background: var(--accent); 
    border-color: var(--accent);
    color: var(--bg); 
}

.lang-toggle {
    cursor: pointer;
    font-family: var(--font-tech);
    font-size: 0.9rem;
    color: var(--text-dim);
    padding: 10px;
}
.lang-toggle span.active { color: var(--accent); font-weight: bold; }


/* --- HERO SECTION --- */
.hero-wrapper {
    /* position: relative; */
    width: 100%;
    
    /* THE FIX: Force the section to be exactly the height of the screen */
    height: 105vh; 
    
    background-color: var(--bg);
    overflow: hidden; /*Crops the bottom of the tall image so no gap exists */
}


/* LAYER 1: The Image (Sets the physical height of the page) */
.hero-image-container {
  position: relative;
  width: 100%;
  z-index: 1;
  height: 100%;
}

.hero-image-container::before {
  content: "";
  position: absolute;
  inset: 0; /* shorthand for top/right/bottom/left: 0 */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,     /* fully transparent at top */
    rgba(0, 0, 0, 0.8) 80%,  /* mostly black at bottom */
    rgb(8, 8, 8) 100%  /* mostly black at bottom */
  );
  pointer-events: none; /* so clicks go through to links/buttons underneath */
  z-index: 2;
}

.hero-gradient {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: min(28vh, 320px);
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  background: linear-gradient(
    to bottom,
    rgba(41, 121, 255, 0.35) 0%,
    rgba(0, 0, 0, 0.05) 35%,
    rgba(126, 126, 126, 0) 100%
  );
}

#heroImg {
  position: relative;
  z-index: 1;
}


/* LAYER 2: The Content (Anchored to Screen Size, not Image Size) */
.hero-content-anchor {
    /* Absolute position relative to the top of the page */
    position: absolute;
    top: 0; 
    left: 0;
    
    /* CRITICAL FIX: Force this container to be exactly screen height */
    height: 100vh; 
    width: 100%;
    
    /* Align text to the bottom of this screen-sized box */
    display: flex;
    align-items: flex-end;
    
    /* Ensure it sits on top of the image */
    z-index: 20; 
    
    /* Space from bottom of screen */
    padding-bottom: 5vh; 
    
    /* Let clicks pass through empty areas to the image */
    pointer-events: none;
    
    /* Gradient attached to the VIEWPORT, not the image */
    /* background: linear-gradient(to bottom, transparent 50%, rgba(8,8,8,0.8) 85%, var(--bg) 100%); */
    background: transparent;
}

/* The Text Layout */
.hero-layout {
    width: 100%; /* Ensure grid takes full width */
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: end;
    
    /* Re-enable clicking for buttons/text */
    pointer-events: auto; 
    
    /* Text Shadow for readability */
    text-shadow: 0 4px 30px rgba(0,0,0,1);
}

.hero-right p {
    font-size: 1.1rem;
    color: #f0f0f0;
    max-width: 500px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-content-anchor {
        position: relative; /* Stack normally on mobile */
        height: auto;       /* Let it grow naturally */
        background: var(--bg); /* Solid background, no gradient */
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-shadow: none;
    }

}
/* --- HERO → FEATURES OVERLAP (Desktop) ---
   Fixes the visual gap by:
   1) ensuring the hero image covers the full 100vh wrapper, and
   2) pulling the Features section upward so it partially overlaps the hero image.
*/
/* @media (min-width: 769px) {
  .hero-image-container {
    height: 100%;
  }

  #heroImg {
    height: 100%;
    object-fit: cover;
  }

  .features-split {
    position: relative;
    z-index: 30;
    /* "Hover" the section into the hero while scrolling down */
    /* margin-top: clamp(-140px, -12vh, -80px);
  }
} */


/* --- SECTIONS --- */
.section-std {
    /* Smart Padding for Full Width */
    padding: 4rem max(var(--pad), calc((100% - 1200px) / 2));
    /* border-bottom: var(--border); */
}

/* --- INTRO GRID --- */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.intro-grid p { color: var(--text-dim); font-size: 1.1rem; }

/* --- FEATURES SPLIT SECTION --- */
.feature-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Equal split: Image | Text */
    gap: 4rem;
    align-items: center;
}

.feature-image {
    aspect-ratio: 3/4;
    border: var(--border);
    overflow: hidden;
    position: relative;
}

/* Update this specific block in your existing CSS */
.feature-bullets li {
    display: flex;
    align-items: flex-start; /* Aligns icon to top of text if text wraps */
    gap: 1.5rem;
    font-size: 1rem; /* Adjusted for better readability */
    line-height: 1.4;
    color: var(--text-main);
    font-family: var(--font-main); /* Changed to main font for better reading */
    margin-bottom: 0.5rem;
}

.feature-bullets li strong {
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-tech);
    letter-spacing: 0.05em;
    display: block; /* Makes the bold title sit nicely */
    margin-bottom: 0.2rem;
}

.feature-bullets li span {
    color: var(--text-dim);
}

/* Icon Styling update */
.feature-bullets i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
    margin-top: 5px; /* Visual alignment fix */
    flex-shrink: 0; /* Prevents icon from getting squashed */
}

/* --- CONTACT --- */
.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.contact-card {
    border: var(--border);
    padding: 2rem;
    min-width: 250px;
    background: var(--surface);
    display: flex; flex-direction: column; align-items: center;
}
.contact-card:hover { border-color: var(--accent); }

/* --- LIGHTBOX --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.lightbox-content {
    max-width: 95%;
    max-height: 80vh;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    :root { --pad: 1.25rem; }
    
    /* Ensure Nav respects padding on mobile */
    nav .nav-content { padding: 1rem var(--pad); flex-direction: column; align-items: flex-start; gap: 1rem; }
    
    .nav-right {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #222;
        padding-top: 1rem;
    }

    .intro-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    /* On mobile, remove the PC border logic for gallery and just stack them */
    .gallery-grid { grid-template-columns: 1fr; border: none; }
    .gallery-item { border-right: none; }
    
    .specs-grid { grid-template-columns: 1fr; gap: 2rem; }
    .spec-list { grid-template-columns: 1fr; gap: 2rem; }
    
    .contact-methods { flex-direction: column; width: 100%; gap: 1rem; }
    .contact-card { width: 100%; padding: 1.5rem; }

    .hero { min-height: 60vh; }
}

/* --- NEW VIDEO INTERFACE (Horizontal Layout) --- */
.video-interface {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* Main Player Styling */
.main-player-wrapper {
    width: 100%;
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border: var(--border);
    margin-bottom: 1rem;
}

.main-player-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.video-title-bar {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    display: inline-block;
    width: 100%;
}

.video-main-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-main);
}

/* Carousel Container */
.video-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* The Scrollable List */
.video-thumbnail-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem; /* Space for scrollbar if visible */
    width: 100%;
    
    /* Hide Scrollbar for clean look (Firefox) */
    scrollbar-width: none; 
}
/* Hide Scrollbar (Chrome/Safari) */
.video-thumbnail-list::-webkit-scrollbar {
    display: none;
}

/* Individual Thumbnail Item */
.thumbnail-item {
    /* FIXED WIDTH: This ensures they sit side-by-side and don't shrink */
    flex: 0 0 220px; 
    cursor: pointer;
    transition: 0.2s;
}

.thumb-img-box {
    width: 100%;
    aspect-ratio: 16/9;
    border: var(--border);
    background: #000;
    margin-bottom: 0.5rem;
    overflow: hidden;
    position: relative;
}

.thumb-img-box img {
    opacity: 0.6;
    transition: 0.3s;
}

/* Hover Effects */
.thumbnail-item:hover .thumb-img-box { border-color: var(--accent); }
.thumbnail-item:hover .thumb-img-box img { opacity: 1; transform: scale(1.05); }

.thumb-text {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-main);
    line-height: 1.3;
    /* Limit to 2 lines of text */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Carousel Buttons */
.carousel-btn {
    background: var(--surface);
    border: var(--border);
    color: var(--text-main);
    width: 40px; 
    height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0; /* Prevents button from being squashed */
    z-index: 5;
}

.carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    :root { --pad: 1rem; }
    
    /* 1. CONTAINER: Remove "boxed" look, go full width, transparent borders */
    .container {
        width: 95%;
        max-width: none;
        border: none;
        background: var(--bg);
    }

    /* NAV: Break out of container, but keep content aligned */
    nav {
        /* 1. Force full viewport width */
        width: 100vw; 
        
        /* 2. Pull to left edge (undoing the container's margin) */
        margin-left: calc((100% - 100vw) / 2);
        
        /* 3. Ensure background covers the whole strip */
        background: var(--bg); 
    }

    nav .nav-content {
        /* 4. Re-align inner content to match the 95% container width */
        width: 95%;
        margin: 0 auto; /* Center the content strip */
        
        /* Flex settings (same as before) */
        display: flex;
        flex-direction: row; 
        align-items: center;
        justify-content: space-between; /* Ensures Logo Left, Links Right */
        gap: 0;
        height: 80px; 
        
        /* Remove side padding since we are defining width explicitly */
        padding: 1rem 0; 
    }
    
    .nav-right {
        width: auto;
        border-top: none;
        padding-top: 0;
        gap: 1rem;
    }
    .nav-contact { padding: 0.4rem 0.8rem; font-size: 0.7rem; }
    .lang-toggle { font-size: 0.8rem; }

    /* 2. HERO WRAPPER: Anchored to bottom of viewport */
    .hero-wrapper { 
        /* 1. Force width to be full screen width */
        width: 100vw; 
        
        /* 2. Pull the element to the left edge of the screen */
        /* Formula: (ParentWidth - ScreenWidth) / 2 */
        margin-left: calc((100% - 100vw) / 2);
        
        /* 3. Original Heights */
        height: calc(100vh - 80px);
        height: calc(100svh - 80px); 
        min-height: 450px;
        margin-top: 0;
        position: relative;
        overflow: hidden; 
    }

    /* 3. HERO IMAGE: (Unchanged) */
    #heroImg {
        width: 100%;
        height: 70%;
        object-fit: cover;
        object-position: 50% 80%; 
    }

    .hero-content-anchor {
        position: absolute; 
        top: 0; left: 0;
        height: 100%;
        width: 100%;
        padding-bottom: 2rem;
        background: linear-gradient(to bottom, transparent 40%, rgba(8,8,8,0.6) 70%, var(--bg) 100%);
        display: flex;
        align-items: flex-end;
        
        /* NEW: Centering logic for the text inside the full-width image */
        /* This ensures the text aligns with your 95% container below */
        justify-content: center; 
    }

    /* GRID: Re-constrain the text width */
    .hero-layout {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        align-items: start;
        gap: 1rem;
        
        /* NEW: Manually set this back to 95% so it matches the container */
        width: 95%; 
    }

    .hero-left, .hero-right { display: contents; }

    /* 4. TAGS: Confined to Left Column, Smaller */
    .hero-tags {
        grid-column: 1 / 2; /* Same width as Hero Title */
        margin-bottom: 0.2rem;
        font-size: 0.6rem; /* Smaller size */
        white-space: nowrap; /* Keep on one line if possible */
        display: flex;
        flex-direction: column; /* Stack the small tags vertically */
        gap: 0.3rem;
    }

    .hero-left h1 {
        grid-column: 1 / 2;
        font-size: 1.6rem;
        line-height: 1.1;
        margin-bottom: 0;
        text-align: left;
    }

    /* 5. INTRO TITLE: Mirrored Alignment (Text Right, Border Right) */
    .hero-right h2 {
        grid-column: 2 / 3;
        font-size: 1rem;
        margin-top: 4px; 
        margin-bottom: 0;
        line-height: 1.2;
        
        /* The Mirror Logic */
        text-align: right;
        border-left: none; /* Remove desktop border */
        border-right: 2px solid var(--accent); /* Add right border */
        padding-left: 0;
        padding-right: 0.8rem;
    }

    .hero-right p {
        grid-column: 1 / -1; /* Full width below */
        font-size: 0.95rem;
        margin-top: 0.5rem;
        line-height: 1.4;
        text-align: left;
    }
    
    .hero-right .mono.dim { display: none; } 

    /* FEATURES: Reset overlap */
    .features-split {
        margin-top: 0; 
        padding-top: 2rem;
    }

    .feature-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-image {
        width: 100%;
        aspect-ratio: 3/4;
        order: -1;
    }
    
    .feature-list-wrapper { width: 100%; }

    /* GENERAL FIXES */
    .intro-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-methods { flex-direction: column; width: 100%; gap: 1rem; }
    .contact-card { width: 100%; padding: 1.5rem; }
    .thumbnail-item { flex: 0 0 160px; }
    .carousel-btn { display: none; }
}

/* --- TABLET / IPAD OPTIMIZATION --- */
/* Applies to screens larger than mobile but smaller than large desktops */
@media (min-width: 769px) and (max-width: 900px) {

    /* 1. CONTAINER: Create the side "borders" (gutters) */
    .container {
        width: 92%;       /* Adjusts the empty space on sides */
        max-width: none;  /* Allows it to shrink/grow within this range */
        margin: 0 auto;   /* Centers the container */
    }

    /* 2. NAVIGATION: Break out, then align content */
    nav {
        width: 100vw;
        margin-left: calc((100% - 100vw) / 2);
        background: var(--bg);
    }
    
    nav .nav-content {
        /* Matches container width so logo/links align with page content */
        width: 92%; 
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }

    /* 3. HERO WRAPPER: Break out to full screen width */
    .hero-wrapper {
        width: 100vw;
        margin-left: calc((100% - 100vw) / 2);
        
        /* Optional: Tweak height for tablet if needed */
        height: 85vh; 
        min-height: 400px;
        position: relative;
        overflow: hidden;
    }

    #heroImg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center; /* Adjust if you need specific focal point */
    }

    /* 4. HERO CONTENT: Re-align text to the grid */
    .hero-content-anchor {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0; left: 0;
        display: flex;
        align-items: flex-end; /* Or wherever you want the text */
        padding-bottom: 2rem;
        
        /* Gradient overlay for readability */
        background: linear-gradient(to bottom, transparent 40%, rgba(8,8,8,0.6) 80%, var(--bg) 100%);
    }

    .hero-layout {
        /* CRITICAL: Match the container width here */
        width: 92%; 
        margin: 0 auto;
        
        /* Keep Desktop Grid Layout (Do not stack) */
        display: grid;
        grid-template-columns: 1fr 1fr; /* Keep the split layout */
        gap: 2rem;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {

    /* 1. CONTAINER: Create the side "borders" (gutters) */
    .container {
        width: 92%;       /* Adjusts the empty space on sides */
        max-width: none;  /* Allows it to shrink/grow within this range */
        margin: 0 auto;   /* Centers the container */
    }

    /* 2. NAVIGATION: Break out, then align content */
    nav {
        width: 100vw;
        margin-left: calc((100% - 100vw) / 2);
        background: var(--bg);
    }
    
    nav .nav-content {
        /* Matches container width so logo/links align with page content */
        width: 92%; 
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }

    /* 3. HERO WRAPPER: Break out to full screen width */
    .hero-wrapper {
        width: 100vw;
        margin-left: calc((100% - 100vw) / 2);
        
        /* Optional: Tweak height for tablet if needed */
        height: 73vh; 
        min-height: 400px;
        position: relative;
        overflow: hidden;
    }

    #heroImg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center; /* Adjust if you need specific focal point */
    }

    /* 4. HERO CONTENT: Re-align text to the grid */
    .hero-content-anchor {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0; left: 0;
        display: flex;
        align-items: flex-end; /* Or wherever you want the text */
        padding-bottom: 2rem;
        
        /* Gradient overlay for readability */
        background: linear-gradient(to bottom, transparent 40%, rgba(8,8,8,0.6) 80%, var(--bg) 100%);
    }

    .hero-layout {
        /* CRITICAL: Match the container width here */
        width: 92%; 
        margin: 0 auto;
        
        /* Keep Desktop Grid Layout (Do not stack) */
        display: grid;
        grid-template-columns: 1fr 1fr; /* Keep the split layout */
        gap: 2rem;
    }
    .hero-left h1 { font-size: 2.5rem; } /* Scaled down slightly from Desktop */
    .hero-right p { font-size: 1rem; }
}