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

:root {
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --accent-color: #0056b3; /* Clean corporate blue */
    --accent-hover: #004494;
    --text-primary: #333333; 
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #e9ecef;
    --container-width: 1000px;
    --header-height: 80px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Offset for fixed header when scrolled */
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    letter-spacing: 0.03em;
}

main {
    transition: filter 0.4s ease, opacity 0.4s ease; /* Smooth transition for blur and whiteout */
}

main.is-autoscrolling {
    filter: blur(12px); /* Blur intensity during auto-scroll */
    opacity: 0.15; /* Whiteout effect */
    pointer-events: none; /* Prevent interaction during the transition */
}

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

ul {
    list-style: none;
}

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

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

.bg-light {
    background-color: var(--bg-light);
}

.text-accent {
    color: var(--accent-color);
}

/* Header */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    display: block;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-nav {
    background-color: var(--accent-color);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700 !important;
}

.btn-nav:hover {
    background-color: var(--accent-hover);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    background-color: #ffffff;
}

.hero-video-wrapper {
    width: 100%;
    max-width: 400px; /* Adjusted max-width for better look */
    margin: 0 auto 20px auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-video {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1.04) contrast(1.05);
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.3;
    margin-bottom: 30px;
    font-weight: 700;
    color: #1a1a1a;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.15);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.25);
}

.btn-outline {
    background-color: #ffffff;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: rgba(0, 86, 179, 0.05);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 700;
    color: var(--accent-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    margin-top: 15px;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Cards (Strengths & Services) */
.card {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border-color: #d0e1f9;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1a1a1a;
    line-height: 1.4;
}

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

/* Case Studies */
.case-study-wrap {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.case-study-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
}

.case-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.case-header h3 {
    font-size: 1.5rem;
    color: #1a1a1a;
}

.before-after-grid {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 30px;
}

.ba-box {
    flex: 1;
    padding: 25px;
    border-radius: 8px;
}

.ba-box.before {
    background-color: #fdf2f2;
    border: 1px solid #f9d6d5;
}

.ba-box.after {
    background-color: #f0f9f4;
    border: 1px solid #cce5d6;
}

.ba-box h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.ba-box.before h4 { color: #d32f2f; }
.ba-box.after h4 { color: #2e7d32; }

.ba-box h4 span {
    font-size: 0.8rem;
    background: rgba(255,255,255,0.8);
    padding: 2px 8px;
    border-radius: 4px;
}

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

.ba-box.after p strong {
    color: #1a1a1a;
}

.ba-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.case-result {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
}

.case-result strong {
    color: var(--accent-color);
}

/* Products */
.product-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: inline-block;
}

.status {
    display: inline-block;
    background-color: #e9ecef;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Company Profile */
.company-table-wrap {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th, .company-table td {
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.company-table th {
    width: 25%;
    color: var(--text-secondary);
    font-weight: 500;
}

.company-table td {
    color: var(--text-primary);
    font-weight: 500;
}

/* Contact */
.contact-box {
    background-color: var(--bg-light);
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.contact-msg {
    color: var(--text-primary);
    margin-bottom: 40px;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

.qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-code img {
    width: 120px;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.qr-code span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    padding: 40px 0;
    background-color: #1a1a1a;
    color: #ffffff;
    text-align: center;
}

.footer-logo img {
    height: 30px;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

footer p {
    font-size: 0.85rem;
    color: #888888;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

/* Mobile Responsive */
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        br { display: none; }
    }

    .hero-btns {
        flex-direction: column;
    }

    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .before-after-grid {
        flex-direction: column;
        gap: 15px;
    }

    .ba-arrow {
        transform: rotate(90deg);
        margin: -5px 0;
    }

    .case-study-box {
        padding: 25px;
    }

    .contact-footer {
        flex-direction: column;
        gap: 30px;
    }

    .company-table th, .company-table td {
        display: block;
        width: 100%;
    }
    
    .company-table th {
        border-bottom: none;
        padding-bottom: 5px;
        color: var(--accent-color);
    }
    
    .company-table td {
        padding-top: 0;
        padding-bottom: 20px;
    }
}
