:root {
    /* Colors - BMW M Style & Street */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f4;
    /* Concrete vibe */
    --text-primary: #111111;
    --text-secondary: #666666;

    /* BMW M Colors */
    --m-blue: #008AC9;
    --m-purple: #2B115A;
    --m-red: #E91E24;
    --m-orange: #FF9900;
    --m-lime: #CCFF00;
    --m-teal: #00CC99;

    /* Accents */
    --accent-color: #000000;
    --border-color: #dddddd;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    /* Use Black weight */
    --font-body: 'Noto Sans JP', sans-serif;

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    /* Tightened from 5rem */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    /* Speed/Sporty feel */
    line-height: 1.1;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
    /* Removed left/transform hack */
    transform: skew(-10deg);
    background: var(--text-primary);
    color: #fff;
    padding: 0.5rem 2rem;
}

.section-header-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.jp-sub {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--m-blue);
    margin-top: 0.5rem;
    font-style: normal;
    letter-spacing: 0.1em;
}

/* M-Stripe Decoration */
.m-stripe {
    height: 5px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(90deg,
            var(--m-blue) 0%, var(--m-blue) 33%,
            var(--m-purple) 33%, var(--m-purple) 66%,
            var(--m-red) 66%, var(--m-red) 100%);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--text-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    border: 3px solid var(--text-primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform: skew(-10deg);
}

.btn span {
    display: block;
    transform: skew(10deg);
    /* Counter-skew text */
}

.btn:hover {
    background: transparent;
    color: var(--text-primary);
}

/* LINE Button */
.btn-line {
    background: #06C755;
    border-color: #06C755;
    color: #fff;
}

.btn-line:hover {
    background: transparent;
    color: #06C755;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;

    /* Default: Transparent or Glass-like */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);

    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 2px solid transparent;
    /* Hidden by default */
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 0.8rem 0;
    /* Compact on scroll */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--text-primary);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Global Container for Spacing */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.grid {
    display: grid;
}

.logo a {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.05em;
    font-style: italic;
    color: var(--text-primary);
}

/* Service Card readability improvements */
.service-grid-fixed {
    display: grid;
    /* Default Mobile: 1 Column */
    grid-template-columns: 1fr;
    gap: 3rem;
    /* margin-top: 3rem; Removed for consistency */
}

/* Tablet: 2 Columns */
@media (min-width: 768px) {
    .service-grid-fixed {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4rem 2rem;
    }
}

/* Desktop: 3 Columns (Strict) */
@media (min-width: 1024px) {
    .service-grid-fixed {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.service-card {
    background: #fff;
    border: 3px solid var(--text-primary);
    padding: 3rem 2.5rem;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    /* Softer corners */
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.05);
}

/* Make text clearer */
.service-card p {
    color: #333;
    /* Darker than text-secondary */
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Reset excessive rotation for readability */
.rotate-left,
.rotate-right {
    transform: none;
    /* Removed static rotation */
}

/* Only rotate slightly on hover for effect */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 10px 10px 0 var(--m-blue);
    z-index: 10;
}

.dark-section {
    background-color: #111;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: var(--spacing-lg) 0;
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.media-grid {
    display: grid;
    gap: 4rem;
    margin-bottom: 5rem;
}

@media (min-width: 900px) {
    .media-grid {
        grid-template-columns: 1.2fr 0.8fr;
        /* Video wider than blog */
        align-items: start;
    }
}

/* YouTube Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border: 1px solid #333;
}

.video-wrapper iframe,
.video-wrapper .video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
}

.play-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.media-title {
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* Blog List */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    display: block;
    background: #222;
    padding: 1.5rem;
    border-left: 3px solid var(--m-blue);
    transition: background 0.3s;
}

.blog-card:hover {
    background: #333;
}

.blog-date {
    font-family: var(--font-heading);
    color: #888;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.blog-cat {
    background: var(--m-blue);
    color: #fff;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 2px;
}

.blog-title {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    color: #fff;
}

.btn-outline-white {
    display: inline-block;
    padding: 10px 30px;
    border: 2px solid #fff;
    color: #fff;
    text-align: center;
    margin-top: 1rem;
    transition: all 0.3s;
}

.btn-outline-white:hover {
    background: #fff;
    color: #000;
}

/* Digital Section */
.divider-line {
    height: 1px;
    background: #333;
    margin: 4rem 0;
}

.digital-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.digital-text {
    text-align: left;
}

/* Override centered section title for Digital section */
/* Override centered section title for Digital section */
.digital-text .section-title {
    /* left: auto; Not needed anymore */
    transform: skew(-10deg);
    text-align: left;
    margin-bottom: 2rem;
    padding-left: 1rem;
    /* Visual balance */
    padding-right: 1rem;
}



.digital-text p {
    font-size: 1.1rem;
    line-height: 2;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 4rem;
    /* Increased spacing */
}

.digital-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.code-bg {
    width: 100%;
    max-width: 500px;
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    padding: 2rem;
    border-radius: 5px;
    border: 1px solid #333;
    opacity: 0.9;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

@media (max-width: 900px) {
    .digital-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .digital-text {
        text-align: center;
    }

    .digital-text .section-title {
        left: 50%;
        transform: translateX(-50%) skew(-10deg);
        text-align: center;
        margin-bottom: 2rem;
    }
}

.btn-white {
    background: #fff;
    color: #000;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-weight: 900;
    display: inline-block;
    border: 2px solid #fff;
    /* Explicit border for structure */
    transition: all 0.3s;
}

.btn-white:hover {
    background: #000;
    color: #fff;
    border-color: #fff;
    /* Keep white border for definition */
}

/* Access / Map */
.bg-light {
    background: #f8f8f8;
}

.map-container {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #ddd;
    line-height: 0;
    margin-bottom: 3rem;
}

.company-info {
    text-align: center;
}

.info-name {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    font-style: italic;
}

.info-hours h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    font-weight: 900;
}

.hours-table {
    margin: 0 auto;
    /* Center the table */
}

.hours-table th {
    text-align: right;
    /* Labels right-aligned for clean axis */
    padding-right: 2rem;
    padding-bottom: 0.5rem;
    color: #666;
}

.hours-table td {
    text-align: left;
    /* Values left-aligned */
    font-weight: 700;
    padding-bottom: 0.5rem;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}

body.loaded #loading-screen {
    transform: translateY(-100%);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 5rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    letter-spacing: -5px;
}

/* Glitch Animation Parts */
.l-m1,
.l-m2,
.l-w {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.l-m1 {
    animation: glitchAppear 0.5s forwards 0.2s;
    color: var(--m-blue);
}

.l-m2 {
    animation: glitchAppear 0.5s forwards 0.4s;
    color: var(--m-purple);
}

.l-w {
    animation: glitchAppear 0.5s forwards 0.6s;
    color: var(--m-red);
}

@keyframes glitchAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) skew(20deg);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px) skew(-10deg);
    }

    70% {
        transform: translateY(2px) skew(5deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) skew(0);
    }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: #333;
    margin: 0 auto 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: white;
    animation: loadingFill 2s cubic-bezier(0.2, 0, 0, 1) forwards;
}

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

    40% {
        width: 30%;
    }

    70% {
        width: 40%;
    }

    /* Stutter/Pause like engine rev styling */
    100% {
        width: 100%;
    }
}

.loading-text {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    animation: blink 0.5s infinite alternate;
}

@keyframes blink {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

/* Main Nav Japanese Font */
.main-nav a {
    font-family: var(--font-body);
    /* Use Japanese font */
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    letter-spacing: 0.05em;
}

.main-nav ul {
    display: flex;
    gap: 2.5rem;
}

/* Main Nav Hidden (Using Overlay for All) */
.main-nav {
    display: none;
}

.menu-trigger-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Full Screen Overlay Menu (Premium Dark Theme) */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 15, 15, 0.98);
    /* Dark Background */
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(10px);
    /* Stronger Blur */
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-content {
    width: 100%;
    max-width: 800px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.mobile-nav.active .nav-brand {
    opacity: 1;
    transform: translateY(0);
}

.text-red {
    color: var(--m-red);
}

.nav-menu {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 4rem;
}

.nav-menu li {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Staggered Animation using CSS variables */
.mobile-nav.active .nav-menu li {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.1s + (var(--anim-order, 1) * 0.08s));
}

.nav-menu a {
    color: #ccc;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
    transition: color 0.3s, transform 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Base state for the M-color underline effect */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--m-blue), var(--m-purple), var(--m-red));
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-menu a:hover {
    color: #fff;
    transform: scale(1.05);
}

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

/* Background ghost text effect for hover */
.nav-menu a::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    font-family: var(--font-heading);
    font-size: 4rem;
    font-style: italic;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    /* Very subtle ghost text */
    pointer-events: none;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    white-space: nowrap;
    z-index: -1;
}

.nav-menu a:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(-2deg);
    color: rgba(255, 255, 255, 0.08);
    /* slightly brighter on hover */
}

/* Navigation Footer (Info & Social) */
.nav-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #333;
    padding-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.6s, transform 0.5s ease 0.6s;
}

.mobile-nav.active .nav-footer {
    opacity: 1;
    transform: translateY(0);
}

.nav-info p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.nav-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #555;
    border-radius: 50%;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--m-red);
    transform: translateY(-3px);
}

/* Adjust mobile layout */
@media (max-width: 600px) {
    .nav-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .nav-brand {
        margin-bottom: 2rem;
    }
}

/* Service Grid Layout */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem 3rem;
}

.service-en {
    font-family: var(--font-heading);
    font-weight: 900;
    font-style: italic;
    color: var(--m-blue);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    margin-top: -0.5rem;
}

/* Hero Section Updates */
.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center Hero Content */
}

.hero-date {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: white;
    background: var(--m-red);
    padding: 0.5rem 1.5rem;
    transform: rotate(-2deg);
    margin-bottom: 1rem;
    box-shadow: 5px 5px 0 var(--m-blue);
    letter-spacing: 0.1em;
    animation: pulseShadow 2s infinite;
}

.hero-title {
    font-size: 6rem;
    line-height: 0.85;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-style: italic;
    transform: rotate(-3deg);
}

.outline-text {
    -webkit-text-stroke: 2px var(--text-primary);
    color: transparent;
}

.hero-subtitle-jp {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    background: var(--text-primary);
    display: inline-block;
    padding: 1rem 2rem;
    transform: rotate(2deg);
    box-shadow: 10px 10px 0 var(--m-blue);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.btn-big {
    font-size: 1.2rem;
    padding: 20px 60px;
    background: var(--m-red);
    border: none;
    color: white;
    box-shadow: 5px 5px 0 var(--text-primary);
    transform: skew(0deg);
    /* Reset skew for readability */
    border-radius: 50px;
    /* Friendlier shape */
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-big:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--text-primary);
    background: var(--m-red);
    color: white;
}

.btn-big span {
    transform: none;
}

/* Service Cards "Broken Grid" */
.service-card {
    background: white;
    border: 3px solid var(--text-primary);
    padding: 3rem 2rem;
    position: relative;
    transition: transform 0.3s;
    border-radius: 20px;
    box-shadow: none;
}

.card-badge {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background: var(--m-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    border: 3px solid var(--text-primary);
}

.service-card:nth-child(2) .card-badge {
    background: var(--m-purple);
}

.service-card:nth-child(3) .card-badge {
    background: var(--m-red);
}

.rotate-left {
    transform: rotate(-2deg);
}

.rotate-right {
    transform: rotate(2deg);
    margin-top: 3rem;
}

.service-card:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 10;
    box-shadow: 15px 15px 0 rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.service-card p {
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
}

.link-arrow {
    display: inline-block;
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
}

.link-arrow:hover {
    background: var(--m-blue);
}

/* Footer & Mobile */
.site-footer {
    clip-path: none;
    /* Remove polygon for better content fit */
    /* Remove polygon for better content fit */
    margin-top: 0;
    background: var(--text-primary);
    text-align: center;
    padding: 4rem 0;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
    font-style: italic;
}

.site-footer p {
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle-jp {
        font-size: 1.2rem;
    }

    .rotate-left,
    .rotate-right {
        transform: none;
        margin-top: 0;
    }

    .grid {
        gap: 2rem;
    }
}

.hamburger-line {
    background: var(--text-primary);
    height: 3px;
}

.main-nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--m-red);
    transition: width 0.3s;
}

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

/* Hero Section */
.hero-section {
    height: 100vh;
    padding-top: 80px;
    /* Header space */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    overflow: hidden;
}

/* Dynamic background pattern */
.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--text-secondary) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
}

/* Hero Image Container */
.hero-image-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.9) 45%),
        url('../assets/images/hero_engine_concept.png');
    /* Try to load if exists */
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.5;
}

/* ALL NEW ANIMATIONS START HERE */
/* Hero Animations (Chaos Mode) */
/* Hero Animations (Chaos Mode) */
@keyframes slamEntrance {
    0% {
        opacity: 0;
        transform: scale(3) rotate(-10deg) skew(20deg);
        filter: blur(10px);
    }

    40% {
        opacity: 1;
        transform: scale(0.9) rotate(2deg) skew(-5deg);
        filter: blur(0);
    }

    60% {
        transform: scale(1.05) rotate(-1deg) skew(2deg);
        text-shadow: 5px 0 var(--m-red), -5px 0 var(--m-blue);
    }

    80% {
        transform: scale(0.95) rotate(0deg);
        text-shadow: -2px 0 var(--m-red), 2px 0 var(--m-blue);
    }

    100% {
        opacity: 1;
        /* Ensure text visible */
        transform: scale(1) rotate(-3deg);
        /* Keep original rotation */
        text-shadow: 0 0 transparent;
    }
}

/* ... existing glitchLoop ... */
/* ... */
/* Staggered Line Animation Classes */
.line-wrapper {
    display: block;
    opacity: 0;
    transform: rotate(-3deg);
}

@keyframes glitchLoop {

    0%,
    100% {
        text-shadow: 0 0 transparent;
        transform: translate(0, 0) rotate(-3deg);
    }

    2% {
        text-shadow: 3px 0 var(--m-red), -3px 0 var(--m-blue);
        transform: translate(-2px, 1px) rotate(-2deg);
    }

    4% {
        text-shadow: -3px 0 var(--m-red), 3px 0 var(--m-blue);
        transform: translate(2px, -1px) rotate(-4deg);
    }

    6% {
        text-shadow: 0 0 transparent;
        transform: translate(0, 0) rotate(-3deg);
    }
}

/* Updated Hero Stripes */
.hero-stripes {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    /* Covers right side */
    height: 100%;
    background: repeating-linear-gradient(120deg,
            var(--m-blue) 0,
            var(--m-blue) 50px,
            var(--m-purple) 50px,
            var(--m-purple) 100px,
            var(--m-red) 100px,
            var(--m-red) 150px,
            transparent 150px,
            transparent 300px);
    background-size: 200% 200%;
    opacity: 0.15;
    z-index: 1;
    mix-blend-mode: multiply;
    animation: stripeFlow 20s linear infinite;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

@keyframes stripeFlow {
    0% {
        background-position: 0% 0%;
    }

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

/* Staggered Line Animation Classes */
.line-wrapper {
    display: block;
    opacity: 0;
    transform: rotate(-3deg);
}

body.loaded .hero-title .line-wrapper {
    animation: slamEntrance 0.8s cubic-bezier(0.1, 0.7, 0.1, 1) forwards, glitchLoop 5s infinite 1s;
}

body.loaded .hero-title .line-1 {
    animation-delay: 0.2s, 3s;
}

body.loaded .hero-title .line-2 {
    animation-delay: 0.4s, 4.5s;
}

body.loaded .hero-title .line-3 {
    animation-delay: 0.6s, 6s;
}

/* Subtitle Animation */
.hero-subtitle-jp {
    opacity: 0;
    /* Hidden initially */
}

body.loaded .hero-subtitle-jp {
    animation: snapIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 1.2s,
        pulseShadow 3s infinite 2s;
}

@keyframes snapIn {
    0% {
        opacity: 0;
        transform: translate(-50px, 20px) rotate(-10deg) scale(0.8);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(2deg) scale(1);
        filter: blur(0);
    }
}

@keyframes pulseShadow {

    0%,
    100% {
        box-shadow: 10px 10px 0 var(--m-blue);
        transform: rotate(2deg) scale(1);
    }

    50% {
        box-shadow: 15px 15px 10px var(--m-purple);
        transform: rotate(2deg) scale(1.02);
    }
}

/* --- VISUAL ENHANCEMENTS (Phase 2) --- */

/* Service Cards "Broken Grid" Hover Effects */
.service-card {
    transition: all 0.2s cubic-bezier(0.1, 0.7, 0.1, 1);
    /* Smoother transition */
    box-shadow: 0 0 0 var(--text-primary);
    /* Initial state */
    z-index: 1;
}

.service-card:hover {
    transform: translate(-5px, -5px);
    box-shadow: 8px 8px 0 var(--text-primary);
    z-index: 10;
}

/* Specific Border Colors on Hover */
.service-card:nth-child(1):hover {
    box-shadow: 8px 8px 0 var(--m-blue);
    border-color: var(--m-blue);
}

.service-card:nth-child(2):hover {
    box-shadow: 8px 8px 0 var(--m-purple);
    border-color: var(--m-purple);
}

.service-card:nth-child(3):hover {
    box-shadow: 8px 8px 0 var(--m-red);
    border-color: var(--m-red);
}

.service-card:nth-child(4):hover {
    box-shadow: 8px 8px 0 var(--m-orange);
    border-color: var(--m-orange);
}

.service-card:nth-child(5):hover {
    box-shadow: 8px 8px 0 var(--m-lime);
    border-color: var(--m-lime);
}

.service-card:nth-child(6):hover {
    box-shadow: 8px 8px 0 var(--m-teal);
    border-color: var(--m-teal);
}

/* Rotate badge on hover */
.service-card:hover .card-badge {
    transform: scale(1.1) rotate(10deg);
}

.card-badge {
    transition: transform 0.3s;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 4rem;
    position: absolute;
    top: -20px;
    right: 10px;
    opacity: 0.1;
    line-height: 1;
}

/* Badge Colors */
.service-card:nth-child(1) .card-badge {
    color: var(--m-blue);
}

.service-card:nth-child(2) .card-badge {
    color: var(--m-purple);
}

.service-card:nth-child(3) .card-badge {
    color: var(--m-red);
}

.service-card:nth-child(4) .card-badge {
    color: var(--m-orange);
}

.service-card:nth-child(5) .card-badge {
    color: var(--m-lime);
}

.service-card:nth-child(6) .card-badge {
    color: var(--m-teal);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.1, 0.7, 0.1, 1);
}

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

/* Background Texture */
.bg-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* --- STAFF SECTION (The Crew) --- */
.staff-card {
    position: relative;
    /* transition: transform 0.3s; */
}

/* Image Styling */
.staff-image-wrapper {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    border: 3px solid var(--text-primary);
    box-shadow: 10px 10px 0 var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.staff-img-placeholder {
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.5s ease;
}

/* Hover Effects */
.staff-card:hover .staff-image-wrapper {
    transform: translate(-5px, -5px);
    box-shadow: 15px 15px 0 var(--m-red);
    border-color: var(--m-red);
}

.staff-card:hover .staff-img-placeholder {
    filter: grayscale(0%) contrast(1);
}

/* Staff Info */
.staff-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.staff-role {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: inline-block;
    background: var(--text-primary);
    color: white;
    padding: 2px 10px;
    transform: skew(-10deg);
}

.staff-desc {
    font-size: 1rem;
    line-height: 1.8;
}

.text-red {
    color: var(--m-red);
}

.text-blue {
    color: var(--m-blue);
}

/* --- SUB-PAGES (Services) --- */
.page-hero {
    padding-top: 150px;
    padding-bottom: 50px;
    background: var(--bg-color);
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.page-desc {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.8;
}

/* Service Detail Sections */
.detail-header {
    border-bottom: 3px solid var(--text-primary);
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.detail-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--m-blue);
    line-height: 1;
}

.service-detail-section:nth-child(even) .detail-number {
    color: var(--m-purple);
}

.service-detail-section:nth-child(odd) .detail-number {
    color: var(--m-red);
}


.detail-title {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    margin: 0;
}

.en-sub {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-left: 1rem;
    letter-spacing: 0.1em;
}

.detail-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.detail-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.detail-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.check-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--m-blue);
}

.img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #999;
    border: 2px solid var(--text-primary);
    box-shadow: 10px 10px 0 var(--text-secondary);
}

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

    .detail-content .detail-image {
        order: -1;
        /* Image first on mobile */
    }

    .profile-row {
        flex-direction: column;
    }

    .profile-row dt {
        width: 100%;
        margin-bottom: 0.5rem;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }
}

/* --- CONTACT PAGE --- */
.phone-box {
    text-align: center;
    padding: 3rem;
    background: white;
    border: 3px solid var(--text-primary);
    box-shadow: 10px 10px 0 var(--text-secondary);
}

.phone-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin: 1rem 0;
    text-decoration: none;
    transition: color 0.3s;
}

.phone-number:hover {
    color: var(--m-blue);
}

/* Contact Form */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.required {
    background: var(--m-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: text-top;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ccc;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--m-blue);
    background: white;
}

.form-submit {
    text-align: center;
    margin-top: 3rem;
}

/* --- ENHANCED FOOTER --- */
.site-footer {
    background: #111;
    color: #fff;
    padding: 4rem 0 2rem;
    border-top: 5px solid var(--text-primary);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

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

.footer-info p {
    color: #aaa;
    line-height: 1.8;
}

.footer-links h4,
.footer-media h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--m-blue);
    letter-spacing: 0.1em;
}

.footer-links ul,
.footer-media ul {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-media li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-media a {
    color: #ccc;
    font-weight: 500;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.footer-links a:hover,
.footer-media a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}