/* ==========================================================================
   DESIGN SYSTEM & CUSTOM STYLING - NEXURA CO., LTD.
   ========================================================================== */

/* 1. Theme Configuration & Variables */
:root {
    /* Fonts */
    --font-heading: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Global Container Width */
    --container-width: 1200px;

    /* Theme Variables (Forced Light Mode) */
    --bg-main: #F8FAFC; /* Light Gray */
    --bg-surface: #FFFFFF;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    --bg-navbar: rgba(248, 250, 252, 0.85);
    
    --text-primary: #0B1220; /* Deep Corporate Navy */
    --text-secondary: #6B7280; /* Text Gray */
    --text-muted: #94A3B8;
    
    --border-color: #E5E7EB; /* Medium Gray */
    --border-hover: rgba(22, 62, 143, 0.3); /* Executive Blue */
    
    --accent-start: #163E8F; /* Executive Blue */
    --accent-end: #2563EB; /* Tech Accent Blue */
    --accent-gradient: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    --accent-glow: rgba(22, 62, 143, 0.08);
    
    --shadow-main: 0 10px 35px -10px rgba(11, 18, 32, 0.06);
    --shadow-glow: 0 0 15px rgba(22, 62, 143, 0.05);
    
    --scrollbar-track: #F8FAFC;
    --scrollbar-thumb: #E5E7EB;
    --scrollbar-thumb-hover: #163E8F;
}

/* 2. Global Resets & Elements */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* 3. Utility Classes */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
}

.text-center { text-align: center; }
.max-w-700 { max-width: 700px; margin-left: auto; margin-right: auto; }
.m-top-30 { margin-top: 30px; }
.m-top-40 { margin-top: 40px; }
.m-top-50 { margin-top: 50px; }
.m-top-60 { margin-top: 60px; }

/* Grid Layouts */
.grid {
    display: grid;
    gap: 30px;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }
.gap-50 { gap: 50px; }

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}
.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--bg-main);
    transform: translateY(-2px);
}


.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Glassmorphism Card base */
.glass-card {
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.highlight-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-primary);
    font-weight: 500;
}

/* 4. Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background-color: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding var(--transition-normal);
}

.navbar.scrolled .nav-container {
    padding: 15px 30px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 52px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: height var(--transition-normal);
}

.navbar.scrolled .logo-img {
    height: 44px;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: none; /* Mobile first, shown in media query */
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    position: relative;
    padding: 6px 0;
    opacity: 0.85;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-start);
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--accent-end);
    opacity: 1;
}

.nav-btn-contact {
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--text-primary);
    font-weight: 600;
    opacity: 1;
    transition: all var(--transition-fast);
}

.nav-btn-contact:hover {
    background: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
}

.nav-btn-contact::after {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Theme Toggle styles */
.theme-toggle-btn {
    display: none !important;
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile menu toggle */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 5. Hero Section Styles */
.hero-section {
    position: relative;
    padding-top: 150px;
    padding-bottom: 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#hero-particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
}

.hero-bg-img.active {
    opacity: 1;
    animation: kenBurnsBg 10s ease-out forwards;
}

@keyframes kenBurnsBg {
    0% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.hero-slides-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
}

.hero-slide {
    grid-area: 1 / 1 / 2 / 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

/* Staggered text content fade-in and slide-up inside active slide */
.hero-slide .hero-tagline,
.hero-slide .hero-title,
.hero-slide .hero-description {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide.active .hero-tagline {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.hero-slide.active .hero-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.hero-slide.active .hero-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.45s;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(11, 15, 25, 0.82) 0%, rgba(11, 15, 25, 0.72) 100%);
}

html[data-theme="light"] .hero-overlay {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.82) 0%, rgba(248, 250, 252, 0.72) 100%);
}

@media (min-width: 1024px) {
    .hero-overlay {
        background: linear-gradient(to right, rgba(11, 15, 25, 0.96) 0%, rgba(11, 15, 25, 0.8) 50%, rgba(11, 15, 25, 0.45) 100%);
    }
    
    html[data-theme="light"] .hero-overlay {
        background: linear-gradient(to right, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.8) 50%, rgba(248, 250, 252, 0.45) 100%);
    }
}

.hero-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 650px;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Decorative Divider Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(130% + 1.3px);
    height: 60px;
    transform: rotateY(180deg);
}

.hero-wave .shape-fill {
    fill: var(--bg-main);
}

/* 6. Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

/* About Section */
.about-section {
    background-color: var(--bg-surface);
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.visual-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.visual-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.visual-card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Graphic elements */
.tech-grid-graphic {
    height: 150px;
    position: relative;
    margin-bottom: 30px;
    background: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    box-shadow: 0 0 15px var(--accent-start);
}

.node-1 { top: 25%; left: 25%; }
.node-2 { top: 60%; left: 75%; }
.node-3 { top: 75%; left: 40%; }

.line {
    position: absolute;
    background: var(--accent-gradient);
    opacity: 0.3;
    transform-origin: top left;
}

.line-1 {
    top: calc(25% + 6px);
    left: calc(25% + 6px);
    width: 150px;
    height: 1.5px;
    transform: rotate(26deg);
}

.line-2 {
    top: calc(75% + 6px);
    left: calc(40% + 6px);
    width: 130px;
    height: 1.5px;
    transform: rotate(-18deg);
}

.stats-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 18px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.2);
}

.badge-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
}

.badge-lbl {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Mission Section */
.mission-section {
    background-color: var(--bg-main);
}

.mv-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: all var(--transition-normal);
}

.mv-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-main);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin-bottom: 25px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.mv-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.mv-card p {
    color: var(--text-secondary);
}

.values-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.value-item {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    transition: border-color var(--transition-normal);
}

.value-item:hover {
    border-color: var(--accent-start);
}

.value-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.value-item h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.value-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Business Areas Section */
.services-section {
    background-color: var(--bg-main);
}

.service-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 35px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-main), 0 20px 40px rgba(37, 99, 235, 0.12);
}

.service-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-end);
    cursor: pointer;
    transition: color var(--transition-normal);
}

.service-arrow svg {
    width: 16px;
    height: 16px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-arrow svg {
    transform: translateX(6px);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-start);
    margin-bottom: 25px;
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(0, 242, 254, 0.2);
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Company Profile & Activities Section */
.profile-section {
    background-color: var(--bg-surface);
}

.structure-desc {
    margin-bottom: 20px;
}

.structure-note {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activities-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.check-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-start);
    margin-top: 3px;
    flex-shrink: 0;
}

.activities-list span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.profile-details-wrapper {
    display: flex;
    align-items: stretch;
}

.profile-card {
    width: 100%;
    padding: 40px;
}

.profile-card h3 {
    font-size: 1.75rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.profile-table {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .table-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.table-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.table-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.05rem;
}

.table-value a:hover {
    color: var(--accent-start);
}

/* 7. Contact Section Styles */
.contact-section {
    background-color: var(--bg-main);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-start);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.info-item:hover .info-icon {
    background-color: var(--bg-surface);
    border-color: var(--accent-start);
}

.info-icon svg {
    width: 18px;
    height: 18px;
}

.info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.info-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-text p a:hover {
    color: var(--accent-start);
}

/* 8. Footer Styles */
.main-footer {
    background-color: #05070c;
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    color: #9ca3af;
}

html[data-theme="light"] .main-footer {
    background-color: #0f172a;
    color: #cbd5e1;
    border-top: none;
}

.footer-grid {
    display: grid;
    gap: 40px;
}

.footer-logo {
    display: block;
    margin-bottom: 15px;
}

.footer-logo-img {
    height: 95px;
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #4b5563;
}

html[data-theme="light"] .footer-copyright {
    color: #64748b;
}

.footer-grid h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-detail-item {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-detail-item a:hover {
    color: var(--accent-start);
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list a {
    font-size: 0.9rem;
    color: #9ca3af;
}

html[data-theme="light"] .footer-links-list a {
    color: #cbd5e1;
}

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

/* 9. Modal Windows Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 12, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    position: relative;
    overflow-y: auto;
    transform: translateY(30px);
    transition: transform var(--transition-normal);
    display: none;
}

.modal-overlay.active .modal-box.active {
    display: block;
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-content {
    padding: 40px;
}

.modal-content h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
    padding-right: 30px;
}

.modal-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.modal-content h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Specific Commercial Table styles */
.commercial-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.com-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.com-row:last-child {
    border-bottom: none;
}

.com-lbl {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.com-val {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* 10. Scroll & Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.9s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(70px);
    transition: opacity 0.9s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.9s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform, opacity;
}

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

/* Delay for stagger reveals */
.hero-content .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.2s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.3s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.4s; }


/* ==========================================================================
   MEDIA QUERIES (RESPONSIVENESS)
   ========================================================================== */

/* Tablet & Smaller Desktop (768px and up) */
@media (min-width: 768px) {
    /* Grids scaling */
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    .section-title {
        font-size: 2.75rem;
    }
    
    /* Company Profile Grid Row */
    .table-row {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
    
    .com-row {
        grid-template-columns: 180px 1fr;
        gap: 20px;
    }

    /* Footer styling */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Navigation & Layout (1024px and up) */
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }

    /* Show Navigation Menu */
    .nav-menu {
        display: flex;
        align-items: center;
        gap: 30px;
    }

    .mobile-menu-btn {
        display: none;
    }

    .hero-title {
        font-size: 3.75rem;
    }

    .footer-grid {
        grid-template-columns: 2fr 1.5fr 1fr;
    }
}

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 4.25rem;
    }
}

/* Mobile responsive navigation panel */
@media (max-width: 1023px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--bg-surface);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        padding: 100px 40px;
        gap: 25px;
        transition: right var(--transition-normal);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.15rem;
    }

    .nav-btn-contact {
        align-self: flex-start;
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   11. CORPORATE OVERHAUL STYLES (TABS, CTA, FORM, LEGAL)
   ========================================================================== */

/* Profile Tabs */
.profile-tabs {
    display: inline-flex;
    background-color: var(--border-color);
    padding: 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.profile-tab-btn {
    background: none;
    border: none;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-tab-btn:hover {
    color: var(--text-primary);
}

.profile-tab-btn.active {
    background-color: var(--accent-end);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.profile-lang-content {
    animation: fadeIn var(--transition-normal) forwards;
}

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

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: var(--bg-main);
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(22, 62, 143, 0.05) 50%, var(--bg-main) 100%);
}

.cta-card {
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
}

.cta-card h2 {
    font-size: 2.25rem;
    margin-top: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Contact Form */
.contact-form-wrapper {
    width: 100%;
}

.contact-form {
    padding: 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

/* Fix option values visibility in select list for Dark Theme */
.form-group select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-end);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: rgba(255, 255, 255, 0.04);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.required {
    color: #EF4444;
    margin-left: 2px;
}

/* Checkbox group styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    accent-color: var(--accent-end);
}

.checkbox-group label {
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group a {
    color: var(--accent-end);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.form-status {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    animation: fadeIn var(--transition-fast) forwards;
}

.form-status.success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.form-status.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Legal Standalone Pages Styling */
.legal-header {
    padding: 120px 0 60px 0;
    background: linear-gradient(180deg, rgba(22, 62, 143, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.legal-header p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.legal-container {
    padding: 80px 0;
}

.legal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

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

.legal-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.legal-sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-sidebar-item a {
    display: block;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.legal-sidebar-item.active a,
.legal-sidebar-item a:hover {
    background-color: var(--bg-surface);
    color: var(--accent-end);
    border-color: var(--border-color);
}

.legal-content {
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-main);
}

.legal-content-section {
    margin-bottom: 40px;
}

.legal-content-section:last-child {
    margin-bottom: 0;
}

.legal-content-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-end);
    display: inline-block;
}

.legal-content-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 25px 0 12px 0;
}

.legal-content-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 15px;
}

.legal-content-section ul,
.legal-content-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.legal-content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 30px;
}

.legal-lang-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.legal-lang-btn:hover {
    color: var(--text-primary);
}

.legal-lang-btn.active {
    background-color: var(--accent-end);
    border-color: var(--accent-end);
    color: #FFFFFF;
}

.legal-sub-container {
    animation: fadeIn var(--transition-normal) forwards;
}

.legal-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

/* ==========================================================================
   10. TEAM & PROCESS SECTION STYLING
   ========================================================================== */

/* Team Section Styles */
.team-section {
    padding: 80px 0;
    background-color: var(--bg-main);
}

.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.team-card {
    flex: 1 1 400px;
    max-width: 500px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 35px;
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-main), 0 20px 40px rgba(37, 99, 235, 0.12);
}

.team-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 25px;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-info h3 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 700;
    line-height: 1.2;
}

.team-romaji {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.team-role {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-end);
    letter-spacing: 0.08em;
}

.team-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.team-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.team-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.team-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background-color: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--text-primary);
}

html[data-theme="light"] .team-tag {
    background-color: rgba(22, 62, 143, 0.05);
    border-color: rgba(22, 62, 143, 0.1);
}

.team-meta-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
}

.team-meta-item:last-child {
    margin-bottom: 0;
}

.team-meta-item strong {
    color: var(--text-primary);
}

/* Process Section Styles */
.process-section {
    padding: 80px 0;
    background-color: var(--bg-surface);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 50px;
}

@media (max-width: 1200px) {
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.process-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.process-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-main);
}

.process-num {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.process-card h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.process-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   PREMIUM CUSTOM INTERACTIVE & VISUAL ENHANCEMENTS
   ========================================================================== */

/* 1. Team Avatar Image & Hover scale */
.team-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.team-card:hover .team-avatar {
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}

.team-card:hover .team-avatar-img {
    transform: scale(1.1);
}

/* 2. Spotlight Shine (Radial Gradient Hover) on Cards */
.service-card, 
.team-card, 
.process-card, 
.mv-card {
    position: relative;
    overflow: hidden;
}

.service-card::before,
.team-card::before,
.process-card::before,
.mv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(800px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(22, 62, 143, 0.05), transparent 40%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before,
.team-card:hover::before,
.process-card:hover::before,
.mv-card:hover::before {
    opacity: 1;
}

/* Make card contents render on top of the spotlight glow layer */
.service-card > *,
.team-card > *,
.process-card > *,
.mv-card > * {
    position: relative;
    z-index: 2;
}

/* Specific elements inside cards that might already be positioned */
.service-card .service-icon,
.team-card .team-card-header,
.process-card .process-num {
    z-index: 3;
}

/* 3. Top scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* 4. Ambient Floating Background Glow Orbs */
.ambient-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.glow-orb {
    position: absolute;
    border-radius: var(--radius-full);
    pointer-events: none;
    will-change: transform;
    opacity: 0.06;
    mix-blend-mode: multiply;
    filter: blur(160px);
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(22, 62, 143, 0) 70%);
    top: 10%;
    left: -5%;
    animation: floatOrb1 20s infinite alternate ease-in-out;
}

.orb-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(11, 18, 32, 0) 70%);
    bottom: 15%;
    right: -10%;
    animation: floatOrb2 25s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    50% {
        transform: translate(80px, 60px) scale(1.1);
    }
    100% {
        transform: translate(-30px, 120px) scale(0.95);
    }
}

@keyframes floatOrb2 {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    50% {
        transform: translate(-100px, -80px) scale(0.9);
    }
    100% {
        transform: translate(60px, 40px) scale(1.15);
    }
}

/* 5. Slider Navigation Dots for Hero Slideshow */
.hero-slider-nav {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 35px;
    position: relative;
    z-index: 15;
}

.slider-dot {
    width: 32px;
    height: 5px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    padding: 0;
}

html[data-theme="light"] .slider-dot {
    background-color: rgba(11, 18, 32, 0.15);
}

.slider-dot.active {
    width: 64px;
    background: var(--accent-gradient);
}

.slider-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

html[data-theme="light"] .slider-dot::after {
    background-color: rgba(11, 18, 32, 0.25);
}

.slider-dot.active::after {
    animation: activeDotProgress 6s linear forwards;
}

@keyframes activeDotProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* ==========================================================================
   12. MOBILE & PERFORMANCE OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
    /* Disable GPU-heavy floating blur elements and blueprint background lines on mobile */
    .ambient-glow, 
    .glow-orb,
    .blueprint-grid {
        display: none !important;
        animation: none !important;
        filter: none !important;
    }
    
    /* Clean up HTML overflow issues */
    html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
    }
    
    /* Disable Ken Burns background zoom on mobile to prevent paint lag */
    .hero-bg-img.active {
        animation: none !important;
    }
    
    /* Hide off-screen nav completely when inactive to prevent focus or scroll bugs */
    .nav-menu {
        visibility: hidden;
    }
    .nav-menu.active {
        visibility: visible;
    }
}

/* ==========================================================================
   13. INSTITUTIONAL REPOSITIONING STYLES (UTILITY BAR, TIMELINE & COMPLIANCE)
   ========================================================================== */

/* Header Utility Bar */
.header-utility-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: transform var(--transition-normal);
}

.header-utility-bar a {
    color: inherit;
    transition: color var(--transition-fast);
}

.header-utility-bar a:hover {
    color: var(--accent-end);
}

.utility-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.utility-left, .utility-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.utility-divider {
    color: var(--border-color);
    font-weight: 300;
}

/* Adjust navbar for top utility bar */
.navbar {
    top: 36px !important;
}

.navbar.scrolled {
    top: 0 !important;
}

/* When navbar is scrolled, utility bar transitions up out of view */
.header-utility-bar.scrolled {
    transform: translateY(-100%);
}

@media (max-width: 768px) {
    .header-utility-bar {
        display: none !important;
    }
    .navbar {
        top: 0 !important;
    }
}

/* Roadmap Timeline Styles */
.roadmap-section {
    padding: 80px 0;
    background-color: var(--bg-main);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    position: relative;
    width: 45%;
    padding: 25px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-main);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.timeline-content:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    left: 55%;
}

.timeline-dot {
    position: absolute;
    top: 30px;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 3px solid var(--bg-main);
    box-shadow: var(--shadow-glow);
    transform: translateX(-50%);
    z-index: 5;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-end);
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.timeline-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-item {
        margin-bottom: 30px;
    }
    .timeline-content {
        width: calc(100% - 40px);
        left: 40px !important;
    }
    .timeline-dot {
        left: 20px;
    }
}

/* Phase 2 Hiding Class for Compliance */
.phase2-content {
    display: none !important;
}

/* ==========================================================================
   ADVANCED WEBDESIGN REFINEMENTS (HITACHI & SPIKE STUDIO STYLE)
   ========================================================================== */

/* Blueprint Guidelines Background */
.blueprint-grid {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-width);
    height: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1; /* Below text containers which will have z-index: 5 */
    padding: 0 30px;
}

.blueprint-grid .grid-line {
    width: 1px;
    height: 0%;
    background-color: var(--border-color);
    opacity: 0.12;
    transition: height 2.5s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-normal);
}

.blueprint-grid.active .grid-line {
    height: 100%;
}

/* Technical Blueprint Section Dividers & Custom Numbering */
.section-divider-line {
    width: 0%;
    height: 1px;
    background-color: var(--border-color);
    transition: width 1.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    margin-bottom: 50px;
    will-change: width;
}

.section-divider-line.active {
    width: 100%;
}

.section-number {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-right: 10px;
    opacity: 0.5;
}

/* Curtain reveal masks */
.reveal-text-mask {
    overflow: hidden;
    position: relative;
    display: block;
}

.reveal-text-mask .section-title,
.reveal-text-mask .section-tag,
.reveal-text-mask .section-subtitle {
    transform: translateY(105%);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.9s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform, opacity;
}

.reveal-text-mask.active .section-title,
.reveal-text-mask.active .section-tag,
.reveal-text-mask.active .section-subtitle {
    transform: translateY(0);
    opacity: 1;
}

/* Stagger delays inside the active reveal masks */
.reveal-text-mask.active .section-tag {
    transition-delay: 0.05s;
}
.reveal-text-mask.active .section-title {
    transition-delay: 0.14s;
}
.reveal-text-mask.active .section-subtitle {
    transition-delay: 0.24s;
}

/* Card Bracket Corner Styling */
.tech-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    pointer-events: none;
    z-index: 10;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.corner-tl {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 12px;
    right: 12px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 12px;
    left: 12px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
}

/* Glow highlights for tech corners on hover */
.service-card:hover .corner-tl,
.profile-card:hover .corner-tl {
    border-color: var(--accent-end);
    transform: translate(-3px, -3px);
}

.service-card:hover .corner-tr,
.profile-card:hover .corner-tr {
    border-color: var(--accent-end);
    transform: translate(3px, -3px);
}

.service-card:hover .corner-bl,
.profile-card:hover .corner-bl {
    border-color: var(--accent-end);
    transform: translate(-3px, 3px);
}

.service-card:hover .corner-br,
.profile-card:hover .corner-br {
    border-color: var(--accent-end);
    transform: translate(3px, 3px);
}

/* Enhancing service-card hover states */
.service-card {
    cursor: pointer;
    z-index: 5;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    pointer-events: none;
    transition: border-color var(--transition-slow);
    z-index: 2;
}

.service-card:hover::after {
    border-color: rgba(37, 99, 235, 0.35);
}

/* SVG circuit paths for About Visual */
.animated-circuit-path {
    stroke-dasharray: 10, 1000;
    stroke-dashoffset: 0;
    animation: flowPulse 5s linear infinite;
}

@keyframes flowPulse {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -1000;
    }
}

.pulse-glow-node {
    animation: pulseNode 2s ease-in-out infinite;
}

@keyframes pulseNode {
    0%, 100% {
        r: 6px;
        opacity: 0.5;
    }
    50% {
        r: 9px;
        opacity: 1;
    }
}

/* ==========================================================================
   BUSINESS AREAS MODAL SYSTEM
   ========================================================================== */

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.service-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 18, 32, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 850px;
    max-height: 85vh;
    display: flex;
    z-index: 10;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.service-modal.active .modal-wrapper {
    transform: scale(1);
}

.modal-content-card {
    background-color: #0b1220;
    color: #ffffff;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(37, 99, 235, 0.15);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Custom Scrollbar for Modal content */
.modal-content-card::-webkit-scrollbar {
    width: 8px;
}
.modal-content-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.modal-content-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}
.modal-content-card::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.5);
}

/* Tech corner highlights inside dark modal */
.modal-content-card .tech-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: border-color var(--transition-normal), transform var(--transition-normal);
}
.modal-content-card .corner-tl { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.modal-content-card .corner-tr { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.modal-content-card .corner-bl { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.modal-content-card .corner-br { bottom: 15px; right: 15px; border-left: none; border-top: none; }

.modal-content-card:hover .tech-corner {
    border-color: var(--accent-end);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-fast);
    z-index: 15;
}

.modal-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-close-btn svg {
    width: 18px;
    height: 18px;
}

.modal-header {
    padding-right: 30px; /* Leave space for close button */
}

.modal-header .section-tag {
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.12em;
}

.modal-header h2 {
    font-size: 1.85rem;
    color: #ffffff;
    margin-bottom: 12px;
    margin-top: 5px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-intro {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.5;
    font-weight: 400;
}

.modal-body-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.modal-info-block {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 24px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: background var(--transition-normal), border-color var(--transition-normal);
}

.modal-info-block:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.block-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    transition: transform var(--transition-fast);
}

.modal-info-block:hover .block-icon {
    transform: translateY(-2px);
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.block-icon svg {
    width: 20px;
    height: 20px;
}

.block-text h4 {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.block-text p {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    margin-top: auto;
}

.modal-footer .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .modal-body-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .modal-wrapper {
        max-height: 80vh;
    }
}

@media (max-width: 576px) {
    .modal-wrapper {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .modal-content-card {
        border-radius: 0;
        padding: 30px 20px 20px 20px;
        border: none;
    }
    
    .modal-content-card .tech-corner {
        display: none;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-intro {
        font-size: 0.95rem;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ==========================================================================
   3D STRATEGIC ROADMAP STYLING (VIDEO-BASED)
   ========================================================================== */

.visual-card {
    transform-style: preserve-3d;
    overflow: visible !important;
}

.visual-card-content {
    transform-style: preserve-3d;
    transform: translateZ(10px);
}

.stats-badge {
    transform-style: preserve-3d;
    transform: translateZ(25px);
    z-index: 10;
}

/* Position stats badge inside the container bottom right */
.roadmap-video-container .stats-badge {
    top: auto;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateZ(35px);
}

.roadmap-video-container .stats-badge .badge-num {
    font-size: 0.82rem;
    line-height: 1.1;
}

.roadmap-video-container .stats-badge .badge-lbl {
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

.roadmap-video-container {
    width: calc(100% + 80px);
    margin-left: -40px;
    margin-right: -40px;
    margin-top: -40px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    border-top-left-radius: calc(var(--radius-lg) - 1px);
    border-top-right-radius: calc(var(--radius-lg) - 1px);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    transform-style: preserve-3d;
    background: transparent; /* Remove background borders */
    border: none; /* Remove border */
}

.roadmap-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Reservas space for performance */
    border-top-left-radius: calc(var(--radius-lg) - 1px);
    border-top-right-radius: calc(var(--radius-lg) - 1px);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    transform-style: preserve-3d;
    transform: translateZ(15px) scale(1.04) translateY(-1.5%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    /* Brightness and contrast filters to fix low visibility */
    filter: brightness(1.12) contrast(1.05) drop-shadow(0 10px 25px rgba(0, 0, 0, 0.08));
}

.visual-card.active .roadmap-video {
    opacity: 1;
    transform: translateZ(15px) scale(1.04) translateY(-1.5%);
}

/* Parallax zoom effect on user hover tilt */
.visual-card:hover .roadmap-video {
    transform: translate3d(0, -2px, 30px) scale(1.06) translateY(-1.5%);
    filter: brightness(1.16) contrast(1.07) drop-shadow(0 15px 35px rgba(0, 0, 0, 0.12));
}

/* Mobile responsive fallback to disable Z-translation to prevent clipping */
@media (max-width: 768px) {
    .roadmap-video-container {
        width: calc(100% + 80px);
        margin-left: -40px;
        margin-right: -40px;
        margin-top: -40px;
        margin-bottom: 25px;
        height: auto;
        min-height: auto;
        perspective: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        background: transparent;
        border: none;
    }

    .roadmap-video {
        transform: scale(1.04) translateY(-1.5%) !important;
        opacity: 1 !important;
        transition: none !important;
        aspect-ratio: auto;
        border-top-left-radius: calc(var(--radius-lg) - 1px);
        border-top-right-radius: calc(var(--radius-lg) - 1px);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .visual-card:hover .roadmap-video {
        transform: scale(1.04) translateY(-1.5%) !important;
    }

    .roadmap-video-container .stats-badge {
        transform: none !important;
    }
}

/* ==========================================================================
   11. GLOBAL LANGUAGE SWITCHER STYLING
   ========================================================================== */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 5px;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.5);
    transition: all var(--transition-fast);
}

.navbar.scrolled .lang-switcher {
    background-color: var(--bg-surface-glass);
}

.lang-btn {
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

.lang-btn.active {
    color: #FFFFFF;
    background: var(--accent-gradient);
    font-weight: 700;
}

.lang-separator {
    color: var(--text-muted);
    font-weight: 300;
    user-select: none;
    font-size: 0.75rem;
}

/* Page Language Hiding Logic */
html:not([lang="en"]) .lang-en,
html[lang="en"] .lang-ja {
    display: none !important;
}



