/* --- HERO SECTION STYLING --- */
#hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 2;
    background-color: transparent;
}

.hero-vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, #020411 95%);
    z-index: 2;
    pointer-events: none;
}

#hero-animation-canvas {
    position: absolute;
    z-index: 1;
}


.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: visible;
    z-index: 15;

}

.hero-content {
    animation: fadeInContent 1.5s 0.5s ease-out forwards;
    opacity: 0;
    z-index: 20;
}

@keyframes fadeInContent {
    to { opacity: 1; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--pure-white) 0%, var(--kinetic-teal) 50%, var(--neon-periwinkle) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 245, 212, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 3.5rem;
    opacity: 0.9;
}

.hero-cta .cta-primary {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--pure-white);
    padding: 1rem 2.5rem;
    border: 2px solid var(--kinetic-teal);
    border-radius: 50px;
    background: rgba(0, 245, 212, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.hero-cta .cta-primary:hover {
    background: var(--kinetic-teal);
    color: var(--quantum-blue);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 245, 212, 0.4);
}

.modules-3d-container {
    position: relative;
    width: 100%;
    height: 600px;
}

#cubes-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    animation: pulseScroll 2.5s infinite ease-in-out;
}

@keyframes pulseScroll {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
    50% { transform: translate(-50%, 5px); opacity: 1; }
}

/* ======================================================= */
/* ==   RESPONSIVE TEXT VISIBILITY UTILITIES            == */
/* ======================================================= */

/* By default, hide the mobile-specific elements */
.show-on-mobile {
    display: none;
}

/* On screens 960px or smaller... */
@media (max-width: 960px) {
    /* Hide the desktop-specific elements */
    .hide-on-mobile {
        display: none;
    }

    /* Show the mobile-specific elements */
    .show-on-mobile {
        display: block; /* For the h1 */
    }

    /*
      This is important: We must re-apply the inline-block display
      for the mobile bullet list so it centers correctly.
    */
    .hero-subtitle.show-on-mobile {
        display: inline-block;
    }
}

/* ======================================================= */
/* ==   DESKTOP CONTENT ALIGNMENT FIX (ADD TO END OF FILE) == */
/* ======================================================= */

/*
  This targets the main content block on desktop ONLY.
  It turns it into a flex container, which makes its children
  (the h1 and the content-offset div) behave predictably.
  align-items: flex-start ensures they don't stretch to full width.
*/
@media (min-width: 961px) {
  .hero-container > .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /*
    Now that the container is no longer stretched,
    a simple margin correctly indents the bullets and button.
  */
  .hero-content .content-offset {
    margin-left: 32px;
  }
}

/* Find the entire @media (max-width: 960px) block and REPLACE it with this: */

/* Hero.css */

/* Hero.css */

/* REPLACE your entire @media (max-width: 960px) block with this one */

@media (max-width: 960px) {

    /* --- BASE MOBILE STYLES (Your "Droid" Version) --- */
    /* This is the original layout from the version where cubes were visible. */
    /* It will apply to Android and all non-Apple mobile devices. */

    #hero-section {
        height: auto; 
        min-height: 100vh;
    }

       .hero-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
        padding: 60px 1rem 30px 1rem; /* Reduced from 90px */
        gap: 0; /* Reduced from 1rem */
        min-height: 100vh;
        grid-template-columns: none;
    }

    .modules-3d-container {
        order: 1;
        flex: none;
        height: 250px; /* The reliable fixed height that keeps cubes visible */
        width: 100%;
        position: relative;
        margin: 0 auto;
        display: block !important;
        z-index: 1;
        opacity: 1;
    }

    .hero-content {
        order: 2;
        flex: none;
    }
    
    #cubes-canvas {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
    }
    

    .hero-title {
        margin-bottom: 1.5rem;
    }

/* This now ONLY targets the visible mobile list */
    .hero-subtitle.show-on-mobile {
        display: inline-block;
        text-align: left;
        max-width: 85%;
        margin-bottom: 3rem;
        font-size: 1.2rem; /* Adjust this value as needed */
    }

       /* ADD THIS NEW RULE FOR MOBILE SPACING */
    .hero-cta {
        margin-top: 1rem; /* Adjust this value as needed */
    }
    
    /* --- IPHONE-ONLY OVERRIDES --- */
@supports (-webkit-touch-callout: none) {
  
  /* 1. Fix the container layout */
  .hero-container {
    /* 
      THE KEY FIX: Change 'center' to 'flex-start'.
      This anchors your content block to the top of the container,
      so padding-top will now work intuitively.
    */
    justify-content: flex-start; 

    /* Now you have direct control. This sets the space above the cubes. */
    padding-top: 60px; /* Adjust this value to move everything up or down */
    padding-bottom: 40px; /* Space below the button */
    
    /* These are unchanged from before */
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 1rem;
  }

  /* 2. Fix the content sizing (these are the same as before) */
  .hero-title {
    font-size: clamp(2.1rem, 7vw, 2.6rem);
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3.5vw, 1.05rem);
    margin-bottom: 3rem;
  }

  .hero-cta .cta-primary {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
}
/* ADD THIS RULE - Hides the canvas by default to prevent flash */
#cubes-canvas {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}



/*
  ADD THIS ENTIRE BLOCK TO THE END OF YOUR FILE
  ==============================================================
  ==   IPHONE-SPECIFIC SPACING ADJUSTMENT                     ==
  ==============================================================
  This is a trick to target ONLY Safari on iOS devices.
  We give the content a little extra padding at the top on iPhones,
  which makes the Android layout appear higher up by comparison.
*/
@supports (-webkit-touch-callout: none) {
  /* This rule block is only understood by iOS Safari */

  @media (max-width: 960px) {
    .hero-container {
      padding-top: 50px; /* Reduced from 80px */
    }
  }
}