:root {
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #050308;
    --text: #111111;
    --muted: #5f5f5f;
    --border: #e2e2e2;
    /* Brand magenta accents derived from logo */
    --accent: #d9195d;
    --accent-soft: rgba(217, 25, 93, 0.09);
    --accent-gradient: linear-gradient(135deg, #d9195d 0%, #a31247 50%, #7f0d36 100%);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.15);
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 64px;
    --space-2xl: 96px;
    --max-width: 1200px;
    --header-height: 72px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg: #0a0a0a;
    --bg-alt: #141414;
    --text: #f5f5f5;
    --muted: #a0a0a0;
    --border: #2a2a2a;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
    transition: background-color var(--transition-medium), color var(--transition-medium);
    overflow-x: hidden;
}

/* Custom Cursor */
.custom-cursor {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    mix-blend-mode: difference;
    display: none;
}

.custom-cursor.hover {
    width: 50px;
    height: 50px;
    border-color: var(--accent);
    background: var(--accent-soft);
}

.custom-cursor.click {
    width: 20px;
    height: 20px;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    display: none;
}

@media (hover: hover) and (pointer: fine) {

    .custom-cursor,
    .cursor-dot {
        display: block;
    }

    html {
        cursor: none;
    }

    a,
    button,
    .btn,
    .card {
        cursor: none;
    }
}

/* Preloader removed - was causing major CLS issues */
/* Content now loads immediately without preloader */

.preloader-content {
    text-align: center;
}

.preloader-logo {
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo-img {
    width: auto;
    max-width: 200px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.25));
}

.preloader-progress {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.preloader-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 999px;
    width: 0%;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Interactive Background Canvas */
.interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-medium);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.back-to-top:active {
    transform: translateY(-2px);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Prevent layout shift for images with explicit dimensions */
img[width][height] {
    height: auto;
    /* Browser will calculate aspect-ratio from width/height attributes */
}

/* Ensure SVG images are properly sized for viewport - but allow explicit sizing for logos */
img[src$=".svg"]:not(.logo-img) {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Logo-specific sizing - ensure it never exceeds viewport */
.logo-img {
    width: 120px;
    height: 32px;
    max-width: min(120px, 100%);
    max-height: 32px;
    object-fit: contain;
    display: block;
    aspect-ratio: 120 / 32;
}

@media (max-width: 768px) {
    .logo-img {
        width: 100px;
        height: 27px;
        max-width: min(100px, 100%);
        max-height: 27px;
    }
}

.page {
    min-height: 100vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.section:nth-of-type(even) {
    background: var(--bg-alt);
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-xl) 0;
    }
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin: 0 0 var(--space-md);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    margin: 0 0 var(--space-md);
    color: var(--muted);
}

.tagline {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-sm);
}

.list {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--muted);
}

.list li {
    margin-bottom: 0.25rem;
}

.steps {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--muted);
}

.steps li {
    margin-bottom: 0.25rem;
}

/* Header / nav with Glassmorphism */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    /* Reserve space to prevent CLS */
    min-height: var(--header-height);
}

[data-theme="dark"] .site-header {
    background: rgba(10, 10, 10, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    /* Reserve space for navigation to prevent CLS - fixed height prevents shifts */
    min-height: var(--header-height);
    max-height: var(--header-height);
    position: relative;
    /* Prevent any layout shifts */
    contain: layout style;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Logo sizing defined globally above - removed duplicate */

.nav-links {
    /* Hide on mobile but reserve space structure to prevent CLS */
    display: none;
    align-items: center;
    gap: 1.75rem;
    font-size: 0.92rem;
    /* Ensure no layout shift when shown */
    will-change: contents;
}

.nav-links a {
    padding: 6px 0;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--transition-fast);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    display: none;
}

.nav-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.nav-trigger-caret {
    font-size: 0.7rem;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 190px;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 110;
}

[data-theme="dark"] .nav-dropdown {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Megamenu Styles - Full Page */
.nav-megamenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium);
    z-index: 1000;
    overflow-y: auto;
    /* Prevent layout shifts - remove from layout when hidden */
    visibility: hidden;
    /* Ensure it doesn't affect document flow */
    contain: layout style paint;
    /* Prevent any layout calculations when hidden */
    will-change: opacity, visibility;
}

.megamenu-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    border: none;
    background: var(--bg-alt);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.megamenu-close:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(90deg);
}

[data-theme="dark"] .nav-megamenu {
    background: rgba(10, 10, 10, 0.98);
}

.nav-megamenu.is-open {
    opacity: 1;
    pointer-events: auto;
    /* Show megamenu without layout shift */
    visibility: visible;
}

.megamenu-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    width: 100%;
    min-height: 100vh;
    max-width: 100%;
    /* Prevent layout shifts in megamenu content */
    contain: layout style;
}

.megamenu-nav {
    background: var(--bg-alt);
    padding: var(--space-2xl) var(--space-xl);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.megamenu-nav-item {
    padding: var(--space-lg);
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    width: 100%;
    box-sizing: border-box;
}

.megamenu-nav-item:hover {
    background: rgba(217, 25, 93, 0.05);
    border-left-color: var(--accent);
}

.megamenu-nav-item.active {
    background: rgba(217, 25, 93, 0.1);
    border-left-color: var(--accent);
}

.megamenu-nav-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
    margin-top: 0;
}

.megamenu-nav-item.active h3 {
    color: var(--accent);
}

.megamenu-nav-item p {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.megamenu-content {
    padding: var(--space-2xl);
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.megamenu-content-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.megamenu-content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.megamenu-content-panel h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-md);
    line-height: 1.2;
    max-width: 800px;
}

.megamenu-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    max-width: 700px;
}

.megamenu-links {
    display: grid;
    gap: var(--space-md);
}

.megamenu-link-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
    max-width: 800px;
}

.megamenu-link-card:hover {
    border-color: var(--accent);
    background: rgba(217, 25, 93, 0.03);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(217, 25, 93, 0.1);
}

.megamenu-link-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
    margin-top: 0;
    flex: 1;
}

.megamenu-link-card p {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.link-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    margin-left: var(--space-md);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.megamenu-link-card:hover .link-arrow {
    transform: translateX(4px);
}

.nav-trigger.is-active {
    color: var(--accent);
}

.nav-trigger.is-active .nav-trigger-caret {
    transform: rotate(180deg);
}

.nav-trigger-caret {
    transition: transform var(--transition-fast);
}

.nav-dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 0.86rem;
    color: var(--muted);
    white-space: nowrap;
}

.nav-dropdown a:hover {
    background: #f7f7f7;
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast),
        border-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
    white-space: nowrap;
}

.btn-small {
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-soft);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text);
    color: var(--text);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--text);
    transition: width var(--transition-fast);
    z-index: -1;
}

.btn-outline:hover::before {
    width: 100%;
}

.btn-outline:hover {
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-open .hamburger span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md) 0 var(--space-md);
    border-top: 1px solid var(--border);
    background: var(--bg);
    /* Prevent layout shift */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.nav-open .mobile-menu {
    visibility: visible;
    opacity: 1;
    max-height: 1000px;
}

.mobile-menu a {
    padding: 4px 0;
    font-size: 0.95rem;
}

/* Hero */
.hero {
    padding-top: calc(var(--space-2xl) * 1.5);
    padding-bottom: calc(var(--space-2xl) * 1.5);
    position: relative;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
    /* Reserve space to prevent CLS - fixed min-height */
    min-height: 100vh;
    /* Prevent layout shifts */
    contain: layout style;
    /* Ensure stable layout */
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(217, 25, 93, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(127, 13, 54, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    gap: var(--space-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
    /* Prevent layout shifts in grid */
    contain: layout style;
    /* Reserve minimum height to prevent shifts */
    min-height: 500px;
}

.hero-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* REMOVED animation for fastest LCP - content visible immediately */
    /* animation: fadeInUp 0.4s ease-out; */
    /* Ensure font loads quickly - use system font first */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-display: optional;
    /* Prevent layout shift - reserve space for text */
    min-height: 1.2em;
    line-height: 1.2;
    /* Ensure immediate visibility for LCP */
    opacity: 1;
    transform: none;
    visibility: visible;
    /* Prioritize rendering for LCP */
    contain: layout style;
    will-change: contents;
}

.hero-sub {
    max-width: 36rem;
    font-size: 1.1rem;
    line-height: 1.8;
    /* Removed animation for faster LCP - content visible immediately */
    opacity: 1;
    transform: none;
    /* Reserve space to prevent layout shift */
    min-height: 3em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    /* Removed animation for faster LCP */
    opacity: 1;
    transform: none;
    /* Reserve space to prevent layout shift */
    min-height: 48px;
}

.hero-meta {
    margin-top: var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    font-size: 0.9rem;
    color: var(--muted);
    /* Removed animation for faster LCP */
    opacity: 1;
    transform: none;
    /* Reserve space to prevent layout shift */
    min-height: 1.5em;
}

.hero-visual {
    position: relative;
    min-height: 400px;
    height: 400px;
    max-height: 400px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(233, 236, 239, 0.6) 50%, rgba(222, 226, 230, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    /* Removed animation for faster LCP */
    opacity: 1;
    transform: none;
    /* Prevent layout shift - fixed dimensions */
    aspect-ratio: 4 / 3;
    /* Reserve space and prevent shifts */
    contain: layout style paint;
    /* Ensure stable dimensions */
    width: 100%;
    flex-shrink: 0;
}

.hero-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Prevent canvas from causing layout shifts */
    display: block;
    /* Reserve space */
    min-width: 100%;
    min-height: 100%;
}

[data-theme="dark"] .hero-visual {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(37, 37, 37, 0.6) 50%, rgba(42, 42, 42, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-orbit {
    position: absolute;
    inset: 16px;
    border-radius: 999px;
    border: 1px dashed rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-core {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-node {
    position: absolute;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.7rem;
    color: var(--muted);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.hero-node:nth-child(2) {
    top: 18%;
    left: 12%;
}

.hero-node:nth-child(3) {
    top: 12%;
    right: 10%;
}

.hero-node:nth-child(4) {
    bottom: 14%;
    left: 14%;
}

.hero-node:nth-child(5) {
    bottom: 12%;
    right: 12%;
}

/* Grids & cards */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 {
    grid-template-columns: minmax(0, 1fr);
}

.grid-3 {
    grid-template-columns: minmax(0, 1fr);
}

.grid-4 {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .nav-links {
        /* Show navigation on desktop - display flex without layout shift */
        display: flex;
        /* Ensure smooth appearance without affecting layout */
        animation: none;
    }

    .nav-cta {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }

    .hamburger {
        display: none;
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.2fr 1fr;
    }

    .hero-heading {
        font-size: 2.6rem;
    }
}

.section-header {
    margin-bottom: var(--space-lg);
}

.section-header p {
    max-width: 34rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
}

/* Glassmorphism Cards */
.card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

/* Modern reveal animation for sections/cards */
/* CRITICAL: Make visible by default to prevent CLS */
.reveal {
    /* Start visible to prevent layout shift - content is visible immediately */
    opacity: 1 !important;
    transform: none !important;
    /* Reserve space */
    min-height: 1px;
    /* Smooth transition only if JS wants to animate */
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

/* Only animate if JS explicitly initializes */
.reveal.js-initialized:not(.is-visible) {
    opacity: 0;
    transform: translateY(30px);
}

.reveal.js-initialized.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure no layout shift on page load */
.section, .card {
    opacity: 1;
    transform: none;
}

/* Portfolio items - prevent layout shift when filtering */
.portfolio-item {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    /* Reserve space to prevent shift */
    min-height: 400px;
}

.portfolio-item[style*="visibility: hidden"] {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent);
    background: var(--bg);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: var(--space-sm);
}

.card-list {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Portfolio Interactive Cards */
.portfolio-card-interactive {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portfolio-media {
    position: relative;
    width: 100%;
    height: 240px;
    max-width: 100%;
    overflow: hidden;
    background: var(--bg-alt);
    /* Prevent layout shift - fixed aspect ratio */
    aspect-ratio: 16 / 9;
    min-height: 240px;
}

@media (max-width: 768px) {
    .portfolio-media {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .portfolio-media {
        height: 180px;
    }
}

.portfolio-image-placeholder {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-medium);
}

.portfolio-image-placeholder svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.portfolio-card-interactive:hover .portfolio-image-placeholder {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
    backdrop-filter: blur(4px);
}

.portfolio-card-interactive:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-demo-btn {
    transform: translateY(10px);
    transition: transform var(--transition-medium);
}

.portfolio-card-interactive:hover .portfolio-demo-btn {
    transform: translateY(0);
}

.portfolio-content {
    padding: var(--space-lg);
}

.portfolio-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

/* Industries Storytelling Cards */
.industries-grid {
    gap: var(--space-xl);
    grid-template-columns: repeat(2, 1fr) !important;
}

.industry-card {
    padding: var(--space-xl);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.industry-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    .industries-grid {
        grid-template-columns: 1fr !important;
    }
}

.industry-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.industry-problem {
    font-size: 0.9rem;
    color: var(--muted);
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: rgba(217, 25, 93, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
}

.industry-problem strong {
    color: var(--text);
    display: block;
    margin-bottom: var(--space-xs);
}

.industry-solution {
    font-size: 0.9rem;
    color: var(--text);
    margin: var(--space-md) 0;
    line-height: 1.7;
}

.industry-solution strong {
    color: var(--accent);
    display: block;
    margin-bottom: var(--space-xs);
}

.industry-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: auto;
    padding-top: var(--space-md);
}

.card-list li {
    margin-bottom: 2px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    color: var(--muted);
    background: #fff;
    cursor: pointer;
}

.chip-select.chip-active,
.chip-toggle.chip-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.chips-multi .chip {
    user-select: none;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    align-items: center;
}

.pill-muted {
    background: #f8f8f8;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: var(--muted);
}

.section-subgrid {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

@media (min-width: 768px) {
    .section-subgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* FAQ */
.faq-item {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: #fff;
}

.faq-q {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.faq-a {
    font-size: 0.88rem;
    color: var(--muted);
}

/* Forms */
form {
    display: grid;
    gap: var(--space-md);
}

.field {
    display: grid;
    gap: 4px;
    font-size: 0.85rem;
}

label {
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    transition: border-color var(--transition-fast),
        box-shadow var(--transition-fast), background var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.form-row {
    display: grid;
    gap: var(--space-md);
}

.form-row-2 {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .form-row-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-help {
    font-size: 0.75rem;
    color: var(--muted);
}

/* AI stepper */
.stepper {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    margin-bottom: var(--space-md);
}

.stepper-bar {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: #e8e8e8;
    overflow: hidden;
}

.stepper-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.25s ease;
}

.stepper-label {
    font-weight: 500;
}

.ai-controls {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-md);
}

.ai-summary {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #fff;
}

.ai-summary h4 {
    margin: 0 0 var(--space-sm);
}

/* Contact layout */
.contact-grid {
    align-items: flex-start;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: #ffffff;
    padding: var(--space-lg) 0;
    font-size: 0.8rem;
}

.footer-top {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 2fr 1.2fr 1.2fr;
    }
}

.footer-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
}

.footer-links a {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-sm);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.6);
}

/* Dark mode toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    transform: scale(1.1);
}

.theme-icon {
    display: inline-block;
    transition: transform var(--transition-medium);
}

[data-theme="dark"] .theme-icon {
    transform: rotate(180deg);
}

/* Keyframe animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Parallax effect for hero visual */
.hero-visual {
    animation: float 6s ease-in-out infinite;
}

.hero-node {
    animation: pulse 3s ease-in-out infinite;
}

.hero-node:nth-child(2) {
    animation-delay: 0.5s;
}

.hero-node:nth-child(3) {
    animation-delay: 1s;
}

.hero-node:nth-child(4) {
    animation-delay: 1.5s;
}

.hero-node:nth-child(5) {
    animation-delay: 2s;
}

/* Smooth scroll reveal with parallax */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Enhanced section spacing */
.section-header {
    margin-bottom: var(--space-xl);
}

.section-header p {
    max-width: 42rem;
    font-size: 1.05rem;
}

/* Improved container padding */
.container {
    padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .megamenu-container {
        grid-template-columns: 1fr;
    }

    .megamenu-nav {
        padding: var(--space-lg);
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: flex;
        overflow-x: auto;
        gap: var(--space-sm);
        height: auto;
        position: relative;
        overflow-y: visible;
    }

    .megamenu-nav-item {
        min-width: 200px;
        margin-bottom: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .megamenu-nav-item.active {
        border-left: none;
        border-bottom-color: var(--accent);
    }

    .megamenu-nav-item:hover {
        border-left: none;
        border-bottom-color: var(--accent);
    }

    .megamenu-content {
        padding: var(--space-lg);
    }

    .megamenu-content-panel h2 {
        font-size: 1.8rem;
    }

    .megamenu-description {
        font-size: 1rem;
    }

    .portfolio-media {
        height: 200px;
    }

    .industry-card {
        padding: var(--space-lg);
    }

    .industry-problem,
    .industry-solution {
        font-size: 0.85rem;
    }
}

/* Enhanced tagline */
.tagline {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

/* Better card spacing */
.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.card-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

/* Asymmetrical Layouts */
.section-asymmetric {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .section-asymmetric {
        grid-template-columns: 1fr 1.2fr;
    }

    .section-asymmetric.reverse {
        grid-template-columns: 1.2fr 1fr;
    }

    .section-asymmetric .section-asymmetric-item:nth-child(2) {
        margin-top: var(--space-xl);
    }
}

/* Enhanced Depth Effects */
.card-depth {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.04);
}

.card-depth:hover {
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 15px 40px rgba(0, 0, 0, 0.12),
        0 30px 80px rgba(0, 0, 0, 0.08);
}

/* Scrollytelling Classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.scroll-parallax {
    transition: transform 0.1s ease-out;
}

/* Staggered Animation Delays */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-visual,
    .hero-node {
        animation: none;
    }

    .custom-cursor,
    .cursor-dot {
        display: none !important;
    }

    html {
        cursor: auto !important;
    }
}