/* ============================================
   THOUGHT2DESIGN - SCROLL STORYTELLING
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - Deep Purple Intelligence Theme */
    --color-primary: #0F0F1A;
    /* Charcoal Black */
    --color-secondary: #7C3AED;
    /* Tech Purple */
    --color-support: #1C1C2B;
    /* Dark Graphite */
    --color-accent: #22D3EE;
    /* Neon Blue */

    --color-bg-dark: #0F0F1A;
    /* Primary Background */
    --color-bg-surface: #1C1C2B;
    /* Secondary Surface */
    --color-bg-light: #1C1C2B;
    /* For light sections */
    --color-text-primary: #F3F4F6;
    /* Off White */
    --color-text-secondary: #A1A1AA;
    /* Muted Lavender Gray */
    --color-text-muted: #A1A1AA;
    --color-text-dark: #F3F4F6;
    /* For light backgrounds */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #22D3EE 100%);
    --gradient-accent: linear-gradient(135deg, #22D3EE 0%, #7C3AED 100%);
    --gradient-hero: linear-gradient(135deg, #0F0F1A 0%, #1C1C2B 100%);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Spacing - Optimized (Reduced) */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* overflow-x: hidden intentionally NOT set on html — causes position:fixed
       elements to be clipped on iOS/mobile. Set on body only instead. */
}

/* Smooth scrolling with easing */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: var(--transition-base);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-base);
    position: relative;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
}

.nav-link:hover::after {
    width: 80%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ===== HERO SECTION ===== */
.hero-story {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
}

/* Particles.js Network Background */
.particles-network-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.particles-network-bg canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-story::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(34, 211, 238, 0.15) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    z-index: 0;
}



@keyframes heroGlow {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.6;
    }
}

.hero-content-story {
    max-width: 1200px;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 var(--spacing-md);
}

.hero-text-reveal {
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-subtitle-story {
    font-size: 1rem;
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--spacing-sm);
}

.hero-title-story {
    font-size: clamp(3rem, 8vw, 7rem);
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.hero-description-story {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-secondary);
    border-radius: 20px;
    position: relative;
    animation: bounce 2s infinite;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

.scroll-indicator p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== STORY SECTIONS ===== */
.story-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-xl) var(--spacing-md);
    /* Visible by default — no JS dependency */
    opacity: 1;
    transform: translateY(0);
}

.story-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-section[data-theme="dark"] {
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
}

.story-section[data-theme="light"] {
    background: var(--color-bg-light);
    color: var(--color-text-dark);
}

.story-section[data-theme="gradient"] {
    background: linear-gradient(135deg, #1C1C2B 0%, #0F0F1A 100%);
    color: var(--color-text-primary);
}

.story-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.story-text {
    opacity: 1;
    transform: translateX(0);
}

.story-section.visible .story-text {
    opacity: 1;
    transform: translateX(0);
}

.story-text.centered {
    text-align: center;
    grid-column: 1 / -1;
}

.story-label {
    font-size: 0.9rem;
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.story-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.story-section[data-theme="light"] .story-title {
    color: var(--color-text-dark);
}

.story-description {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: #cfcfcf !important;
}

.story-section[data-theme="light"] .story-description {
    color: #cfcfcf !important;
}

/* Floating Elements */
.story-visual {
    opacity: 1;
    transform: translateX(0);
}

.story-section.visible .story-visual {
    opacity: 1;
    transform: translateX(0);
}

.floating-elements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.float-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition-slow);
    animation: float 4s ease-in-out infinite;
}

.float-card:nth-child(1) {
    grid-column: 1 / -1;
}

.float-card:nth-child(2) {
    animation-delay: 1s;
}

.float-card:nth-child(3) {
    animation-delay: 2s;
}

.float-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--color-secondary);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.4);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.icon-large {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

.float-card h4 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
}

/* ===== PINNED SECTIONS ===== */
.pinned-section {

    padding: 0;
}

.pinned-content {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.pinned-content.inverse {
    grid-template-columns: 1fr 1fr;
}

.sticky-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-video {
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    opacity: 1;
    transform: scale(1);
}

.pinned-section.visible .story-video {
    opacity: 1;
    transform: scale(1);
}

.scroll-text {
    padding: var(--spacing-lg);
}

.scroll-step {
    opacity: 1;
    transform: translateY(0);
    margin-bottom: var(--spacing-xl);
}

.scroll-step.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-step h3 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
    color: inherit;
}

/* Products Header Section */
.products-header {
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--color-bg-dark);
    text-align: center;
}

.products-header .section-title-story {
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

.products-header .section-description-story {
    max-width: 800px;
    margin: 0 auto;
}

/* Product Section Wrapper with Rounded Container */
.product-section-wrapper {
    padding: var(--spacing-xl) var(--spacing-md);
}

.product-rounded-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--spacing-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition-slow);
}

.product-section-wrapper:hover .product-rounded-container {
    border-color: var(--color-secondary);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}

/* Adjust pinned content inside rounded container */
.product-rounded-container .pinned-content {
    padding: 0;
}

.product-rounded-container .story-content {
    padding: 0;
}

/* ===== SPLIT CONTENT ===== */
.split-content {
    gap: var(--spacing-xl);
}

.story-visual-split {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-visualization {
    position: relative;
    width: 400px;
    height: 400px;
}

.tech-circle {
    position: absolute;
    border: 2px solid var(--color-secondary);
    border-radius: 50%;
    animation: pulse-ring 3s ease-in-out infinite;
}

.tech-circle:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 100px;
    left: 100px;
}

.tech-circle:nth-child(2) {
    width: 300px;
    height: 300px;
    top: 50px;
    left: 50px;
    animation-delay: 1s;
}

.tech-circle:nth-child(3) {
    width: 400px;
    height: 400px;
    top: 0;
    left: 0;
    animation-delay: 2s;
}

@keyframes pulse-ring {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--spacing-md);
    transition: var(--transition-base);
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.3);
}

.feature-box h4 {
    font-size: 1.25rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
}

.feature-box p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ===== STATS SECTION ===== */
.stats-parallax {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F0F1A 0%, #1C1C2B 100%);
    position: relative;
    overflow: hidden;
}

.stats-parallax::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="%231877F2" opacity="0.3"/></svg>');
    opacity: 0.1;
}

.stats-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    z-index: 2;
}

.stat-mega {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.stats-parallax.visible .stat-mega {
    opacity: 1;
    transform: translateY(0);
}

.stat-mega:nth-child(2) {
    transition-delay: 0.2s;
}

.stat-mega:nth-child(3) {
    transition-delay: 0.4s;
}

.stat-number {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 800;
    font-family: var(--font-display);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.stat-plus {
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--color-accent);
}

.stat-mega p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
    box-shadow: 0 15px 40px rgba(34, 211, 238, 0.3);
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
}

.stat-item p {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* ===== MSiM NETWORK VISUAL (Homepage) ===== */
.msim-network-visual {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.msim-svg {
    width: 100%;
    height: auto;
    max-width: 420px;
    overflow: visible;
}

.msim-node {
    animation: msimNodePulse 3s ease-in-out infinite;
}

.msim-node--1 {
    animation-delay: 0s;
}

.msim-node--2 {
    animation-delay: 0.5s;
}

.msim-node--3 {
    animation-delay: 1s;
}

.msim-node--4 {
    animation-delay: 1.5s;
}

.msim-node--5 {
    animation-delay: 2s;
}

.msim-node--6 {
    animation-delay: 2.5s;
}

@keyframes msimNodePulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.6));
    }
}

.msim-pulse {
    animation: msimRingPulse 2.5s ease-in-out infinite;
    transform-origin: center;
}

.msim-pulse--delay {
    animation-delay: 1.2s;
}

@keyframes msimRingPulse {

    0%,
    100% {
        r: 55;
        opacity: 0.3;
    }

    50% {
        r: 62;
        opacity: 0.7;
    }
}

.msim-network-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 1rem;
}

/* MSiM homepage: visual alignment in story-content layout */
@media (min-width: 769px) {
    #msim-story .story-visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #msim-story .msim-network-visual {
        max-width: 420px;
        width: 100%;
    }

    #msim-story .msim-svg {
        max-width: 420px;
        width: 100%;
    }
}

/* Domain pill badges */
.msim-domain-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.msim-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.25s ease;
}

.msim-pill:hover {
    border-color: rgba(34, 211, 238, 0.45);
    color: var(--color-text-primary);
    background: rgba(34, 211, 238, 0.06);
}

/* ===== TEAM SECTION ===== */
.team-story {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header-story {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title-story {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-family: var(--font-display);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

/* Contact section specific heading colors */
.contact-story .story-label,
.contact-story .section-title-story {
    color: #FFFFFF;
}

.section-description-story {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.team-grid-story {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.team-card-story {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition-slow);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.team-card-story:hover {
    transform: translateY(-10px);
    border-color: var(--color-secondary);
    box-shadow: 0 15px 50px rgba(124, 58, 237, 0.3);
}

.team-image-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto var(--spacing-md);
    position: relative;
}

.team-avatar-story {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-secondary);
    transition: var(--transition-base);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.team-card-story:hover .team-avatar-story {
    transform: scale(1.05);
    border-color: var(--color-accent);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.4);
}

.team-info {
    margin-bottom: var(--spacing-md);
}

.team-name-story {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.team-bio-story {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: var(--spacing-sm) 0;
    font-style: italic;
}

.team-role-story {
    font-size: 0.95rem;
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: var(--spacing-sm);
    display: block;
}

/* Social Icons */
.team-social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    font-size: 1.125rem;
}

.social-icon-link:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: white;
    transform: translateY(-3px);
}

.social-icon-link svg {
    width: 18px;
    height: 18px;
}


/* ===== CONTACT SECTION ===== */
.contact-story {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--color-bg-dark);
}

.contact-content-story {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.contact-info-story {
    padding-right: var(--spacing-lg);
}

.contact-details-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.contact-detail-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.contact-icon-story {
    width: 50px;
    height: 50px;
    background: var(--color-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon-story svg {
    width: 24px;
    height: 24px;
    color: white;
}

.contact-detail-item h4 {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}

.contact-detail-item p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

.contact-detail-item a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

.contact-detail-item a:hover {
    color: var(--color-accent);
}

/* Contact Form */
.contact-form-story {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--spacing-lg);
}

.form-group-story {
    margin-bottom: var(--spacing-md);
}

.form-group-story input,
.form-group-story textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition-base);
}

.form-group-story input::placeholder,
.form-group-story textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group-story input:focus,
.form-group-story textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.08);
}

.form-group-story textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-story {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);

}

.btn-primary-story {
    background: var(--gradient-accent);
    color: white;
}

.btn-primary-story:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.4);
}

/* ===== FOOTER ===== */
.footer-story {
    background: #0A0E27;
    padding: var(--spacing-lg) var(--spacing-md);
}

.footer-content-story {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--color-text-muted);
}

.footer-links-story {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links-story a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-links-story a:hover {
    color: var(--color-accent);
}

.footer-bottom-story {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-bottom-story p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {

    .story-content,
    .pinned-content,
    .contact-content-story {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .pinned-content.inverse {
        grid-template-columns: 1fr;
    }

    .stats-content {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .team-grid-story {
        grid-template-columns: 1fr;
    }

    /* Product section responsive */
    .product-rounded-container {
        padding: var(--spacing-lg);
    }

    .product-section-wrapper {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .sticky-visual {
        order: -1;
        margin-bottom: var(--spacing-md);
    }

    .story-video {
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    /* ===== MOBILE NAV OVERLAY =====
       Use opacity + visibility instead of transform to avoid
       position:fixed clipping caused by overflow-x:hidden on
       html/body (common in WordPress / iOS environments). */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-md);
        gap: var(--spacing-lg);
        /* opacity+visibility avoids the iOS fixed-element / overflow-hidden bug */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        z-index: 99999;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    .nav-menu .nav-link {
        font-size: 1.5rem;
        padding: 1rem 2rem;
        color: var(--color-text-primary);
        text-align: center;
        display: block;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
        z-index: 999999;
        /* above everything including WP admin bar */
        position: relative;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-title-story {
        font-size: 2.5rem;
    }

    .hero-description-story {
        font-size: 1.125rem;
    }

    .pinned-section {
        min-height: auto;
        padding: var(--spacing-md) 0;
    }

    /* Fix sticky/pinned sections on mobile - disable sticky behavior */
    .pinned-content {
        position: relative;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    /* Make all scroll steps visible on mobile */
    .scroll-step {
        opacity: 1 !important;
        transform: none !important;
    }

    .floating-elements {
        grid-template-columns: 1fr;
    }

    .float-card:nth-child(1) {
        grid-column: 1;
    }

    /* Mobile product sections */
    .product-rounded-container {
        padding: var(--spacing-md);
        border-radius: 16px;
        overflow: hidden;
        /* prevent text/content from breaking out */
        width: 100%;
        box-sizing: border-box;
    }

    .scroll-text {
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        padding: var(--spacing-sm);
    }

    .story-description {
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }

    .product-section-wrapper {
        padding: var(--spacing-md) var(--spacing-xs);
    }

    .story-section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .story-title {
        font-size: 2rem;
    }

    .story-description {
        font-size: 1rem;
    }

    .section-title-story {
        font-size: 2rem;
    }

    .tech-visualization {
        width: 280px;
        height: 280px;
    }

    .tech-circle:nth-child(1) {
        width: 140px;
        height: 140px;
        top: 70px;
        left: 70px;
    }

    .tech-circle:nth-child(2) {
        width: 210px;
        height: 210px;
        top: 35px;
        left: 35px;
    }

    .tech-circle:nth-child(3) {
        width: 280px;
        height: 280px;
        top: 0;
        left: 0;
    }

    /* Ensure videos are responsive */
    .story-video {
        max-width: 100%;
        border-radius: 12px;
    }

    /* Contact section mobile */
    .contact-content-story {
        padding: 0;
    }

    .contact-info-story {
        padding-right: 0;
        margin-bottom: var(--spacing-lg);
    }

    /* ===== FOOTER MOBILE FIX ===== */
    .footer-content-story {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-md);
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-links-story {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .footer-bottom-story {
        padding-top: var(--spacing-sm);
    }
}

/* ===== OUR CLIENTS SECTION ===== */
.clients-section {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--color-bg-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.clients-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.clients-header {
    margin-bottom: var(--spacing-xl);
}

.clients-logos-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}

.client-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
    cursor: default;
    backdrop-filter: blur(10px);
}

.client-logo-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(124, 58, 237, 0.2);
}

.client-logo-item img {
    max-height: 60px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(30%) brightness(1.05);
    transition: filter 0.35s ease;
}

.client-logo-item:hover img {
    filter: grayscale(0%) brightness(1.1);
}

/* For logos with dark/colored elements needing a light background */
.client-logo-light {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.15);
}

.client-logo-light:hover {
    background: rgba(255, 255, 255, 0.96);
}

.client-logo-light img {
    filter: none;
}

.client-logo-light:hover img {
    filter: none;
}

/* Company name text inside the original logo boxes */
.client-name-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text-primary);
    transition: color 0.35s ease;
    white-space: nowrap;
}

.client-logo-item:hover .client-name-text {
    color: var(--color-accent);
}

/* =============================================
   MSiM BROCHURE BUTTON — Homepage variant
   ============================================= */

.msim-cta-row {
    margin-top: 1.75rem;
}

/* The button shares .btn-story base and gets its own modifier */
.btn-story--brochure {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 12px;
    border: 1.5px solid rgba(124, 58, 237, 0.55);
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.btn-story--brochure svg {
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.btn-story--brochure:hover {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(124, 58, 237, 0.85);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.3);
}

.btn-story--brochure:hover svg {
    opacity: 1;
    transform: translateY(-1px);
}

/* =============================================
   MSiM BROCHURE BUTTON — Products-page variant
   (.btn-prod base already defined in products-page.css)
   ============================================= */

.btn-prod--brochure {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-prod--brochure svg {
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.btn-prod--brochure:hover svg {
    opacity: 1;
    transform: translateY(-1px);
}

/* =============================================
   MSiM PDF VIEWER MODAL
   ============================================= */

.msim-pdf-modal {
    /* Hidden by default */
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
    align-items: center;
    justify-content: center;
}

/* Show when .active is added via JS */
.msim-pdf-modal.active {
    display: flex;
}

/* Semi-transparent blurred backdrop */
.msim-pdf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 20, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    animation: msimFadeIn 0.22s ease both;
}

/* The actual modal panel */
.msim-pdf-modal__shell {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    height: min(90vh, 800px);
    background: rgba(20, 16, 38, 0.97);
    border: 1px solid rgba(124, 58, 237, 0.35);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(124, 58, 237, 0.1),
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(124, 58, 237, 0.18);
    animation: msimSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Modal header bar */
.msim-pdf-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(124, 58, 237, 0.1);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    flex-shrink: 0;
}

.msim-pdf-modal__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: 0.3px;
}

.msim-pdf-modal__title svg {
    color: var(--color-secondary);
    flex-shrink: 0;
}

/* Close button */
.msim-pdf-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msim-pdf-modal__close:hover {
    background: rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.6);
    color: #fff;
    transform: scale(1.08);
}

/* The iframe container fills remaining height */
.msim-pdf-modal__body {
    flex: 1;
    overflow: hidden;
    background: #fff;
}

.msim-pdf-modal__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Animations */
@keyframes msimFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes msimSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .msim-pdf-modal__shell {
        width: 98vw;
        height: 92vh;
        border-radius: 14px;
    }

    .msim-pdf-modal__header {
        padding: 0.75rem 1rem;
    }

    .msim-pdf-modal__title {
        font-size: 0.85rem;
    }
}