/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #0f172a;      
    --card-bg: #1e293b;        
    --hover-bg: #334155;       
    --text-color: #f8fafc;     
    --accent-color: #94a3b8;   
    --primary-color: #38bdf8;  
    --border-color: #334155;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Hero Gradient made slightly darker to contrast with brand intro */
    --gradient-hero: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* --- HEADER --- */
.site-header {
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    
    /* UPDATED: Gradient now fades to #0e0e0e */
    background: radial-gradient(circle at center bottom, #1e293b 0%, #0e0e0e 100%);
    
    border-bottom: none; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* The "Glowing" Bottom Border Line */
.site-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 20%, var(--primary-color) 50%, var(--border-color) 80%, transparent 100%);
    opacity: 0.6;
}

.site-header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* LOGO TYPOGRAPHY */
.logo { 
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: "Cheltenham", "ITC Cheltenham Std", "Bookman Old Style", "Century Expanded", "Georgia", serif;
    font-weight: 700;
    font-size: 1.6rem; 
    color: var(--text-color);
    text-transform: uppercase; 
    letter-spacing: 1px;
    text-decoration: none;
}

.logo img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

nav a { 
    margin-left: 2rem; 
    font-weight: 500; 
    font-size: 0.9rem; 
    color: var(--accent-color); 
    transition: all 0.2s; 
    font-family: var(--font-main); 
}

nav a:hover { 
    color: #fff; 
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.btn-primary { 
    background: var(--gradient-primary); 
    color: #0f172a; padding: 0.5rem 1rem; 
    border-radius: 6px; font-weight: 600; 
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* --- NEW: BRAND INTRO SECTION --- */
.brand-intro {
    padding: 5rem 0 3rem;
    text-align: center;
    background-color: var(--bg-color);
}

.brand-intro h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.brand-subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 500;
}

/* --- FEATURED HERO: MARQUEE MAGIC --- */
.hero-featured {
    background: var(--gradient-hero);
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.featured-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.featured-text h2 {
    font-size: 3rem; /* Large size for visual hierarchy */
    font-family: "Times New Roman", serif;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.featured-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.featured-lead {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 300;
}

.featured-desc {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.platform-tag {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Visual Styling for Hero Image */
.hero-img {
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
    border-radius: 12px;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}
.hero-img:hover { transform: perspective(1000px) rotateY(0deg); }


/* --- APP STORE GRID --- */
.app-grid-section { padding: 4rem 0 6rem; }

.section-header { margin-bottom: 3rem; text-align: center; }
.section-header h2 { 
    font-size: 1.8rem; 
    margin-bottom: 0.5rem; 
    font-family: "Cheltenham", "ITC Cheltenham Std", "Bookman Old Style", "Century Expanded", "Georgia", serif;
    font-weight: 700;
    text-transform: uppercase; 
    letter-spacing: 1px;
}
.section-header p { color: var(--accent-color); }

.app-grid {
    display: grid;
    /* CHANGE: Force exactly 2 columns on desktop */
    grid-template-columns: repeat(2, 1fr); 
    gap: 2rem; /* Increased gap slightly since cards are bigger */
}

.grid-category-label {
    grid-column: 1 / -1; /* Spans the full width */
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.grid-category-label:first-child { margin-top: 0; }

/* The App Card */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem; /* Increased padding for "chunkier" look */
    border-radius: 12px;
    display: flex;
    align-items: center; 
    gap: 1.5rem;
    transition: all 0.2s ease;
}

.app-card:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.app-icon {
    flex-shrink: 0;
    width: 72px; /* Slightly larger icon to match wider card */
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.app-details {
    flex: 1;
    min-width: 0;
}

.app-details h3 {
    font-size: 1.25rem; /* Larger heading */
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.app-summary {
    font-size: 1rem;
    color: var(--accent-color);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    /* Allow 6 lines */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-badge {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 10px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}


/* ===================================================== */
/* --- FOOTER --- */
.site-footer {
    padding: 5rem 0;
    position: relative;
    /* STUNNING UPDATE: Deep radial gradient instead of flat color */
    background: radial-gradient(circle at center top, #111827 0%, #000000 100%);
    color: var(--accent-color);
    font-size: 0.95rem;
}

/* The "Glowing" Top Border Line */
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 20%, var(--primary-color) 50%, var(--border-color) 80%, transparent 100%);
    opacity: 0.5;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem; /* Increased gap for a more spacious feel */
    text-align: left;
}

.footer-icon {
    width: 140px; /* Slightly larger for presence */
    height: 140px;
    object-fit: contain;
    /* Subtle drop shadow to lift it off the dark background */
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    opacity: 1; 
}

.footer-brand {
    /* MATCHING THE HEADER FONT */
    font-family: "Cheltenham", "ITC Cheltenham Std", "Bookman Old Style", "Century Expanded", "Georgia", serif;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.5rem; /* Larger and more authoritative */
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    /* Optional: A subtle text shadow */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.footer-stack p {
    margin-bottom: 0.4rem;
    color: #94a3b8; /* Slate-400 for better readability */
}

/* The "See what we can do" line needs to stand out */
.footer-cta {
    margin-top: 1.5rem;
    color: #f8fafc !important; /* Bright white */
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-stack a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px dotted rgba(56, 189, 248, 0.4);
}
.footer-stack a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* --- NEW: Download Group Styles --- */
.download-group {
    margin-bottom: 1.25rem;
}

.download-group h4 {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 6px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.os-icon {
    height: 2.5em;
    width: auto;
    /* Makes the icon greyish-white (assuming black source) */
    filter: invert(1) opacity(0.7);
    transition: filter 0.2s ease;
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-download:hover .os-icon {
    /* Makes the icon black for the hover state */
    filter: invert(0);
}

.download-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* --- PRODUCT BOTTOM GRID (Desktop) --- */
.product-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 4rem;
}

/* MOBILE RESPONSIVE UPDATE */
@media (max-width: 768px) {
    /* Header Fix */
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .product-bottom-grid {
        /* Switch to Flexbox for bulletproof vertical stacking */
        display: flex;
        flex-direction: column;
        gap: 2rem; /* This forces 2rem of space between the cards */
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }

    nav a {
        margin-left: 0;
    }

    /* Brand Intro */
    .brand-intro h1 {
        font-size: 2rem;
    }

    /* Featured Hero */
    .featured-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .featured-text h2 {
        font-size: 2.5rem;
    }

    .featured-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .action-row {
        justify-content: center;
        flex-direction: column;
    }

    /* App Grid */
    .app-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-row {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .site-footer::before {
        background: var(--border-color); /* Simple line on mobile */
    }
}

/* ===================================================== */
/* --- PRODUCT PAGE STYLES --- */

.product-page {
    padding-bottom: 6rem;
}

/* Breadcrumbs */
.breadcrumbs {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 2rem 0 1rem;
    font-size: 0.9rem;
    color: var(--accent-color);
}
.breadcrumbs li::after {
    content: "/";
    margin-left: 0.5rem;
    color: #334155;
}
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a:hover { color: var(--primary-color); }

/* Product Header (Hero) */
.product-header {
    padding: 2rem 0 4rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4rem;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 70%);
}

.product-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.product-big-icon {
    width: 128px;
    height: 128px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.product-title-block h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-family: "Cheltenham", "ITC Cheltenham Std", "Bookman Old Style", serif;
}

.product-tagline {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.product-meta-row {
    display: flex;
    gap: 0.75rem;
}

.meta-pill {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Two Column Layout */
.product-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main content is 2x wider than sidebar */
    gap: 4rem;
}

/* Main Content Area */
/* --- SCREENSHOT CAROUSEL (GNOME Software Style) --- */

.carousel-container {
    margin-bottom: 3rem;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    
    /* Show scrollbar on Firefox but make it thin */
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* Styled Scrollbar for Chrome/Edge/Safari */
.carousel-track::-webkit-scrollbar {
    height: 8px; /* Height of horizontal scrollbar */
}

.carousel-track::-webkit-scrollbar-track {
    background: transparent;
}

.carousel-track::-webkit-scrollbar-thumb {
    background-color: #334155; /* Dark grey thumb */
    border-radius: 20px;       /* Rounded edges */
    border: 2px solid #0f172a; /* Padding around the thumb */
}

.carousel-item {
    flex: 0 0 100%; /* Full width on mobile */
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-hint {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-align: right;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* DESKTOP TWEAK: Show smaller items so you see more at once */
@media (min-width: 768px) {
    .carousel-item {
        flex: 0 0 91%; /* Increased by 30% (70% * 1.3 = 91%) */
        scroll-snap-align: start; /* Aligns to left instead of center */
    }
}

.main-screenshot {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.content-block { margin-bottom: 3rem; }
.content-block h2 { font-size: 1.8rem; margin-bottom: 1rem; color: var(--text-color); }
.content-block p { color: #cbd5e1; margin-bottom: 1rem; font-size: 1.05rem; }

.feature-list {
    list-style: none;
    padding-left: 0;
}
.feature-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: #cbd5e1;
}
.feature-list li::before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.2rem;
}

/* Sidebar */
.product-sidebar { display: flex; flex-direction: column; gap: 2rem; }

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
}

.sidebar-card h3 { font-size: 1.1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }

.full-width-btn {
    display: block;
    text-align: center;
    margin-top: 1rem;
}

.specs-list { list-style: none; font-size: 0.9rem; }
.specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.specs-list li:last-child { border-bottom: none; }
.specs-list strong { color: var(--text-color); }
.specs-list li { color: var(--accent-color); }

/* Product Mobile Responsive */
@media (max-width: 900px) {
    .product-layout { grid-template-columns: 1fr; gap: 2rem; }
    .product-header-content { flex-direction: column; text-align: center; }
    .product-meta-row { justify-content: center; }
    .product-sidebar { order: -1; } /* Puts download button above description on mobile */
}