:root {
    --primary-color: #d62828;
    --secondary-color: #1d3557;
    --text-main: #333333;
    --text-light: #555555;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-light-blue: #f0f4f8; /* Soft blue-gray for profile background */
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --max-width: 1000px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Language Toggle Display */
span.lang-ja, span.lang-en, span.lang-ko, span.lang-zh {
    display: none;
}
body.lang-ja-active span.lang-ja,
body.lang-en-active span.lang-en,
body.lang-ko-active span.lang-ko,
body.lang-zh-active span.lang-zh {
    display: inline;
}

/* Display block for p tags with spans */
p > span.lang-ja, p > span.lang-en, p > span.lang-ko, p > span.lang-zh { display: none; }
body.lang-ja-active p > span.lang-ja,
body.lang-en-active p > span.lang-en,
body.lang-ko-active p > span.lang-ko,
body.lang-zh-active p > span.lang-zh {
    display: block;
}

/* Typography elements */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

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

.text-link {
    color: #4da8da;
}
.text-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Layout framework */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
    scroll-margin-top: 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.bg-light { background-color: var(--bg-light); }
.bg-light-blue { background-color: var(--bg-light-blue); }
.text-main { color: var(--text-main) !important; }
.mt-4 { margin-top: 1.5rem; }

/* Header */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

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

.logo-wrapper {
    flex-shrink: 0;
}

.brand-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    position: relative;
    color: var(--secondary-color);
    font-size: 1.05rem;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

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

/* Language Select */
.lang-select {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d3557' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    transition: all var(--transition-speed);
}
.lang-select:hover, .lang-select:focus {
    background-color: #e2e8f0;
    outline: none;
}

/* Hamburger Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--secondary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(rgba(29, 53, 87, 0.75), rgba(29, 53, 87, 0.85)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2072') center/cover no-repeat;
    padding: 4rem 1rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(var(--bg-white) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.05;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    animation: slideUp 1s ease-out forwards;
}

.hero h1 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    color: #f0f0f0;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(214, 40, 40, 0.3);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(214, 40, 40, 0.4);
}

/* Business Section */
.business-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform var(--transition-speed);
}

.business-card:hover {
    transform: translateY(-5px);
}

.business-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eeeeee;
}

.feature-list {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.assembly-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Advantage Section */
.advantage-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
}

.advantage-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Image Wrappers */
.image-wrapper {
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.03);
}

.shadow { box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.img-small img { max-width: 300px; margin: 0 auto; }

/* Profile Section - Light Theme */
.profile-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.profile-table th, .profile-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #eeeeee;
    text-align: left;
    color: var(--text-main);
}

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

.profile-table th {
    width: 30%;
    font-weight: 700;
    color: var(--secondary-color);
    background: #fdfdfd;
}

/* Contact Form */
.contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

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

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.required {
    font-size: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-submit button {
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
}

/* Footer */
.footer {
    background-color: #0a0a0a;
    color: #888888;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px; /* Reduces all rem-based sizes globally for mobile */
    }

    .header-container {
        padding: 0 1rem;
    }
    
    .menu-toggle {
        display: flex; /* Show hamburger on mobile */
    }

    /* Mobile Nav Menu Styles */
    .nav-menu {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    }

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

    .nav-menu a {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Hamburger Animation Setup */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    
    .section-header h2 { font-size: 1.8rem; }
    
    .assembly-images {
        grid-template-columns: 1fr;
    }
    
    .profile-table th, .profile-table td {
        display: block;
        width: 100%;
    }
    
    .profile-table th {
        padding-bottom: 0.5rem;
        background: transparent;
        color: var(--primary-color);
    }
    
    .profile-table td {
        padding-top: 0;
        padding-bottom: 1.5rem;
    }
}
