/* --- Global Variables & Resets --- */
:root {
    /* Primary backgrounds */
    --primary-black: #000000;
    --primary-white: #FFFFFF;

    /* Text */
    --text-light-gray: #CCCCCC;

    /* Palette (Deepest to Lightest) provided by user */
    --color-deep-red: #9E2A1B; /* Deep Red (Shadow) */
    --color-bright-redorange: #E64A19; /* Bright Red-Orange */
    --color-vibrant-orange: #F57C00; /* Vibrant Orange (Mid-tone) */
    --color-golden-yellow: #FFA726; /* Golden Yellow (Highlight) */

    /* Compatibility aliases used across existing CSS */
    --accent-amber: var(--color-golden-yellow);
    --accent-red: var(--color-bright-redorange);
    --accent-orange: var(--color-vibrant-orange);

    /* Gradient from darkest to lightest */
    --accent-gradient: linear-gradient(90deg, var(--color-deep-red), var(--color-bright-redorange), var(--color-vibrant-orange), var(--color-golden-yellow));

    --footer-dark-gray: #1a1a1a; /* Slightly lighter than black for footer */
    --card-bg: #0f0f0f; /* default card background for dark pages */
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif; /* Using a modern sans-serif, like Inter or Poppins */
    background-color: var(--primary-black);
    color: var(--primary-white);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

body.menu-open {
    overflow: hidden;
}

img,
picture,
video,
iframe {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ======================
  HEADER & NAVIGATION STYLING
  ====================== 
*/
.main-header {
    background-color: var(--primary-black);
    padding: 15px 5vw; /* Responsive padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle divider */
    position: sticky; /* Sticky header for premium feel */
    top: 0;
    z-index: 1000; /* Ensure it stays on top */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Logo (Top-Left) */
.navbar-left .logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-white);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); /* Subtle text glow */
    z-index: 1001;
}

.header-logo-icon { /* Style for your actual logo image */
    height: 35px; /* Adjust size as needed */
    margin-right: 10px;
    /* This will make the logo slightly glow like the website example */
    filter: drop-shadow(0 0 8px rgba(255, 196, 0, 0.5)) drop-shadow(0 0 15px rgba(229, 57, 53, 0.3));
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    gap: 5px;
}

.mobile-menu-toggle .hamburger {
    width: 25px;
    height: 3px;
    background-color: var(--primary-white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Nav Links (Center) */
.navbar-center .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px; /* Increased space for premium feel */
}

.nav-menu li a {
    color: var(--text-light-gray);
    font-weight: 500;
    padding-bottom: 8px; /* Space for the hover underline */
    position: relative; /* For the underline animation */
    transition: color 0.3s ease;
}

/* Custom underline hover glow */
.nav-menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient); /* Amber to Red gradient */
    transition: width 0.3s ease-out;
}

.nav-menu li a:hover,
.nav-menu li a:focus {
    color: var(--primary-white);
}

.nav-menu li a:hover::after,
.nav-menu li a:focus::after {
    width: 100%;
}

/* Dropdown specific (just basic structure, full mega-menu styling is complex) */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: var(--primary-black);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-content a {
    color: var(--text-light-gray);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-white);
}

.dropdown:hover .dropdown-content {
    display: block; /* Show on hover */
}


/* Sign In Button (Top-Right) */
.navbar-right .btn-signin {
    border: 1px solid var(--text-light-gray);
    padding: 10px 25px; /* Slightly larger for premium feel */
    border-radius: 50px; /* More rounded pill shape */
    font-weight: 500;
    color: var(--primary-white);
    transition: all 0.3s ease;
    background-color: transparent;
}

.navbar-right .btn-signin:hover {
    background: var(--accent-gradient); /* Gradient fill on hover */
    border-color: transparent; /* Hide border when filled */
    color: var(--primary-white);
    box-shadow: 0 0 15px rgba(255, 196, 0, 0.4); /* Subtle glow */
}

/* ======================
  HERO SECTION STYLING (Premium Look with Animations)
  ====================== 
*/
.hero-section {
    position: relative;
    height: 90vh; /* Takes up most of the viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Crucial for background animations */
    background-color: var(--primary-black);
    text-align: center;
}

/* Animated Background Effect (Data Lines / Pulse) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 50h100M50 0v100" stroke="%23222" stroke-width="0.5" /></svg>'); /* Subtle grid pattern */
    background-size: 50px 50px;
    opacity: 0.1; /* Very subtle */
    animation: panBackground 60s linear infinite; /* Slow, continuous movement */
    z-index: 1;
}

/* Animate the grid */
@keyframes panBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100px 100px;
    }
}

/* Hero Content - Logo, Tagline, Buttons */
.hero-content {
    position: relative;
    z-index: 10; /* Ensure content is above the background animation */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

/* Logo in Hero Section (If you want it large here as well) */
.hero-logo-large {
    width: 150px; /* Adjust size */
    margin-bottom: 40px;
    /* Apply the same glow effect */
    filter: drop-shadow(0 0 15px rgba(255, 196, 0, 0.6)) drop-shadow(0 0 25px rgba(229, 57, 53, 0.4));
    animation: fadeInScale 1.5s ease-out; /* Intro animation */
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light-gray);
    max-width: 700px;
    margin-top: 0;
}

.hero-tagline {
    font-size: 3.5em; /* Large, bold text */
    font-weight: 800; /* Extra bold */
    color: var(--primary-white);
    margin-bottom: 50px; /* Space above buttons */
    max-width: 900px;
    line-height: 1.2;
    letter-spacing: -1px; /* Tighter letter spacing */
    animation: textSlideUp 1s ease-out 0.5s forwards; 
    opacity: 0; /* Start hidden for animation */
    transform: translateY(20px);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 25px; /* Space between buttons */
    /* This applies the animation to the buttons */
    animation: fadeIn 1s ease-out 1.2s forwards; 
    opacity: 0; /* Start hidden */
}

/* Base button style */
.btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    cursor: pointer;
}

/* Primary Amber Glow Button */
.btn-primary-glow {
    background: transparent;
    border: 2px solid var(--accent-amber);
    color: var(--accent-amber);
    box-shadow: 0 0 10px rgba(255, 196, 0, 0.3); /* Initial subtle glow */
}

.btn-primary-glow:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: var(--primary-white);
    box-shadow: 0 0 20px rgba(255, 196, 0, 0.6); /* Stronger glow on hover */
    transform: translateY(-3px); /* Slight lift */
}

/* Secondary White Outline Button */
.btn-secondary-outline {
    background: transparent;
    border: 2px solid var(--primary-white);
    color: var(--primary-white);
}

.btn-secondary-outline:hover {
    background-color: var(--primary-white);
    color: var(--primary-black);
    transform: translateY(-3px);
}


/* ======================
  SECTION BASICS (Alternating background)
  ====================== 
*/
.dark-section {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 100px 5vw; /* Generous padding */
}

.light-section {
    background-color: var(--primary-white);
    color: var(--primary-black);
    padding: 100px 5vw;
    border-top: 1px solid #e0e0e0; /* Subtle divider */
}

.content-section {
    padding: 6rem 0;
}

/* --- Keyframe Animations for a premium feel --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes textSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ======================
  LIGHT SECTION STYLING (Ecosystem)
  ====================== 
*/

.ecosystem-container {
    max-width: 1200px;
    margin: 0 auto; /* Center the content */
    text-align: center;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5em; /* 40px */
    font-weight: 700;
    color: #111;
    margin-bottom: 60px;
}

.subtitle {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    color: var(--text-light-gray);
}

/* Flexbox wrapper for the cards */
.product-cards-wrapper {
    display: flex;
    justify-content: center; /* Center the cards */
    gap: 30px; /* Space between cards */
    flex-wrap: wrap; /* Allow cards to wrap on smaller screens */
    text-align: left;
}

.product-card {
    background: var(--primary-white);
    border-radius: 16px; /* Rounded corners */
    padding: 30px;
    display: block; /* allow anchor cards to behave as block-level elements */
    flex-basis: 350px; /* Each card has a base width */
    flex-grow: 1;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Premium, subtle shadow */
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px); /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Stronger shadow */
}

/* Card-specific accent borders from your design */
.card-mylyfeline {
    border-top: 4px solid var(--accent-amber);
}
.card-opus {
    border-top: 4px solid #007AFF; /* Blue accent */
}
.card-nexus {
    border-top: 4px solid var(--accent-red);
}

.product-card h3 {
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 15px;
}

.product-card p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    min-height: 80px; /* Gives cards uniform height */
}

/* App store buttons for the first card */
.app-store-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.store-badge {
    height: 40px; /* Adjust as needed */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.store-badge:hover {
    opacity: 1;
}

/* Page mode utilities */
.page-dark { background: var(--primary-black); color: var(--primary-white); }
.page-light { background: var(--primary-white); color: var(--primary-black); }

.content-section.page-dark {
    background-color: var(--primary-black);
    color: var(--primary-white);
}

.content-section.page-light {
    background-color: var(--primary-white);
    color: var(--primary-black);
}

.content-section.page-light .section-title {
    color: var(--primary-black);
}

.content-section.page-dark .section-title {
    color: var(--primary-white);
}

/* Subpage hero - responsive and centralized so pages don't look zoomed */
.subpage-hero {
    padding: clamp(36px, 6vw, 80px) 20px;
    text-align: center;
    background: transparent; /* default transparent, may be overridden by .page-dark */
}
.page-dark .subpage-hero {
    background: linear-gradient(135deg, var(--color-deep-red) 0%, var(--color-bright-redorange) 60%);
    color: var(--primary-white);
}
.page-light .subpage-hero {
    background: transparent;
    color: var(--primary-black);
}
.subpage-hero h1 {
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
    margin: 0 0 12px 0;
    line-height: 1.08;
    font-weight: 800;
}
.subpage-hero p {
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    max-width: 780px;
    margin: 0 auto 24px auto;
    color: inherit;
    font-weight: 400;
}

/* App download and features sections adapt to page mode */
.page-light .app-download-section { background: #f8f9fa; color: var(--primary-black); }
.page-dark .app-download-section { background: transparent; color: var(--primary-white); }
.features-section { padding: 40px 20px; }

/* Make download badges slightly larger and responsive */
.download-buttons-container img { height: auto; max-height: 72px; width: auto; }

/* ======================
  FOOTER STYLING
  ====================== 
*/
.site-footer {
    background-color: var(--footer-dark-gray);
    color: var(--text-light-gray);
    padding: 4rem 5vw 2rem 5vw;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--primary-white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: var(--accent-amber);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light-gray);
}

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

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* ======================
  STATS GRID STYLING
  ====================== 
*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-light-gray);
    margin: 0;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ======================
  FEATURES GRID STYLING
  ====================== 
*/
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-amber);
    box-shadow: 0 15px 35px rgba(255, 196, 0, 0.15);
}

.feature-card i {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-white);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light-gray);
    font-size: 1.05rem;
    line-height: 1.7;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================
  ABOUT GRID STYLING
  ====================== 
*/
.about-grid {
    max-width: 1000px;
    margin: 3rem auto;
    text-align: left;
}

.about-text h3 {
    color: var(--accent-amber);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ======================
  CONTACT CARDS GRID
  ====================== 
*/
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 3rem auto 0 auto;
}

.contact-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-orange);
    box-shadow: 0 15px 35px rgba(246, 124, 0, 0.15);
}

.contact-card h3 {
    color: var(--primary-white);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-card a {
    color: var(--accent-orange);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--accent-amber);
}

.social-media a i {
    transition: all 0.3s ease;
}

.social-media a:hover i {
    color: var(--accent-orange) !important;
    transform: scale(1.2);
}

@media (max-width: 992px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================
  MOBILE RESPONSIVE NAVIGATION
  ====================== 
*/
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-center {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--primary-black);
        transition: right 0.3s ease;
        padding-top: 80px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-center.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }
    
    .navbar-center .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: 18px 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-content {
        position: static;
        display: none;
        background-color: rgba(255, 255, 255, 0.03);
        box-shadow: none;
        margin: 0;
        border-radius: 0;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .navbar-right {
        position: fixed;
        bottom: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        background-color: var(--primary-black);
        transition: right 0.3s ease;
        padding: 20px 30px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-right.active {
        right: 0;
    }
    
    .navbar-right .btn-signin {
        width: 100%;
        text-align: center;
    }
}

/* --- Global Responsive Tweaks --- */
@media (max-width: 1024px) {
    .hero-section {
        height: auto;
        min-height: 70vh;
        padding: 80px 20px;
    }

    .product-card {
        flex-basis: 300px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    .hero-section {
        padding: 60px 16px 80px 16px;
        text-align: left;
    }

    .hero-content {
        align-items: flex-start;
    }

    .hero-tagline {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .product-cards-wrapper {
        flex-direction: column;
    }

    .stats-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 12px 16px;
    }

    .navbar-left .logo {
        font-size: 1rem;
    }

    .hero-section {
        padding: 48px 14px 64px 14px;
    }

    .hero-tagline {
        letter-spacing: normal;
    }

    .btn {
        font-size: 1rem;
        padding: 14px 24px;
    }

    .site-footer {
        padding: 3rem 1.5rem 1.5rem 1.5rem;
    }
}