:root {
    --primary-red: #cc0000;
    --dark-grey: #1a1a1a;
    --text-white: #ffffff;
    --gold: #d4af37;
    --font-stack: 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background-color: #000;
    color: white;
    overflow-x: hidden;
}
/* 画面からはみ出した画像などを非表示にし、横スクロールを禁止する */
html, body {
    overflow-x: hidden;
    width: 100%;
}


/* =========================================
   HERO SECTION
   ========================================= */

.hero-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 2rem;
    background-color: #000;
    /* Fallback */
}

/* Background */
.hero-bg {
    position: absolute;
    /* Changed from fixed to prevent overlap */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: url('industrial_background_1766449324168.png');
    filter: brightness(0.6) contrast(1.2) grayscale(0.2);
    z-index: 0;
    /* Lowered z-index just in case */
}

/* Header Logo */
.header-logo {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Add background to make black logo visible */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.brand-logo {
    height: 35px;
    /* Smaller mobile size */
    width: auto;
    filter: none;
    margin-bottom: 0;
}

/* Top Banner (Angled Red) - Mobile Version */
.top-banner-wrapper {
    position: relative;
    width: 110%;
    margin-left: -5%;
    transform: rotate(-3deg);
    z-index: 5;
    margin-top: 6rem;
    margin-bottom: 0rem;
    pointer-events: none;
}

.top-banner {
    background: linear-gradient(180deg, #aa0000 0%, #dd0000 50%, #aa0000 100%);
    padding: 0.8rem 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    text-align: center;
}

.top-banner h1 {
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
    color: #fff;
    transform: skewX(-5deg);
    white-space: normal;
    line-height: 1.2;
}

/* Product Layer - Mobile */
.product-layer {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 500px;
    margin: -1rem auto 0;
    transform: none;
    display: flex;
    justify-content: center;
}

.product-img {
    width: 110%;
    height: auto;
    filter: drop-shadow(10px 15px 30px rgba(0, 0, 0, 0.8));
    transform: translateX(5%);
}

/* Content Overlay - Mobile */
.content-overlay {
    position: relative;
    z-index: 10;
    width: 95%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Main Message */
.main-message h2 {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.3;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.4);
    display: block;
    padding: 0.5rem;
    text-align: center;
    backdrop-filter: blur(2px);
}

/* Feature Bar */
.feature-bar {
    background: linear-gradient(90deg, #880000 0%, #aa0000 50%, #660000 100%);
    padding: 0.5rem 1rem;
    transform: skewX(-10deg);
    margin: 0 auto;
    width: 95%;
    border-right: 3px solid #fff;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.feature-bar p {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    transform: skewX(10deg);
    letter-spacing: 0.05em;
}

/* Hero Footer */
.hero-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    padding: 1rem;
}

.footer-text {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.pre-cta {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-button {
    display: block;
    width: 100%;
    background: linear-gradient(45deg, #cc0000, #ff0000);
    padding: 0.8rem 0;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(200, 0, 0, 0.4);
    text-decoration: none;
    text-align: center;
}

.disclaimer {
    color: #ccc;
    font-size: 0.7rem;
    margin-top: 0.8rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    opacity: 0.8;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 5px;
}

.scroll-indicator .arrow {
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(45deg);
    margin: 0 auto;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: rotate(45deg) translate(0, 0);
    }

    40% {
        transform: rotate(45deg) translate(-5px, -5px);
    }

    60% {
        transform: rotate(45deg) translate(-3px, -3px);
    }
}

/* =========================================
   SECTION 2: PROBLEM
   ========================================= */

.section-problem {
    position: relative;
    padding: 4rem 1rem;
    background-color: #111;
    overflow: hidden;
}

.problem-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('rusted_pipe_problem_1766456119122.png');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    /* Semi-visible background of rust */
    z-index: 0;
    filter: grayscale(0.5) contrast(1.3);
}

.problem-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
}

.section-badge {
    background: var(--primary-red);
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 2rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.problem-item {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #444;
    padding: 1.5rem;
    text-align: center;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.p-icon {
    font-size: 2rem;
    color: var(--gold);
    display: block;
    margin-bottom: 0.5rem;
}

.problem-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.problem-item p {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}

.problem-impact {
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    border-top: 2px solid var(--primary-red);
}

.problem-impact p {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.6;
}

.highlight-red {
    color: var(--primary-red);
    font-size: 1.3rem;
}

/* =========================================
   SECTION 3: SOLUTION
   ========================================= */

.section-solution {
    position: relative;
    padding: 4rem 1rem;
    background-color: #001;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

.solution-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('ufb_bubbles_clean_retry_1766456184852.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
    filter: hue-rotate(10deg) brightness(0.8);
}

.solution-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
}

.badge-blue {
    background: #0088cc;
    /* Cyan/Blue for clean water feel */
}

.solution-lead {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    font-weight: 700;
}

.highlight-blue {
    color: #00ccff;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.solution-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(20, 40, 60, 0.9), rgba(0, 10, 20, 0.95));
    border: 1px solid #004466;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0.5;
    pointer-events: none;
}

.f-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 0.05em;
}

.feature-card p {
    font-size: 0.9rem;
    color: #bcd;
    line-height: 1.5;
}

/* =========================================
   DESKTOP ADJUSTMENTS (SECTION 2 & 3)
   ========================================= */

@media (min-width: 768px) {

    /* Hero Adjustments */
    /* Hero Adjustments */
    .hero-container {
        display: block;
        padding-bottom: 0;
        height: auto;
        /* Changed from 100vh */
        min-height: 100vh;
        overflow: visible;
        /* Changed from overflow-x/y handling */
    }

    .hero-bg {
        position: fixed;
    }

    .header-logo {
        top: 30px;
        left: 40px;
        padding: 0.5rem 1rem;
    }

    .brand-logo {
        height: 60px;
    }

    /* Banner: Positioned clearly below logo */
    .top-banner-wrapper {
        position: absolute;
        top: 15vh;
        /* Responsive spacing */
        left: -5%;
        width: 110%;
        margin: 0;
        transform: rotate(-3deg);
    }

    .top-banner h1 {
        font-size: 3.5rem;
    }

    /* Product: Positioned on the RIGHT side */
    .product-layer {
        position: absolute;
        top: 55%;
        right: 2%;
        left: auto;
        width: 48%;
        max-width: 700px;
        transform: translateY(-50%);
        margin: 0;
        z-index: 2;
    }

    .product-img {
        width: 100%;
        filter: drop-shadow(20px 20px 50px rgba(0, 0, 0, 0.8));
        transform: none;
    }

    /* Text Overlay: Positioned on the LEFT side, Anchored to TOP */
    .content-overlay {
        position: absolute;
        top: 35vh;
        /* Linked to Viewport Height to stay below banner */
        left: 5%;
        width: 45%;
        max-width: 650px;
        bottom: auto;
        /* Remove bottom anchor */
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .main-message h2 {
        font-size: 2.8rem;
        text-align: left;
        background: rgba(0, 0, 0, 0.6);
        padding: 1.5rem;
        border-left: 8px solid var(--primary-red);
        /* Fix wrapping */
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .feature-bar {
        margin: 0;
        width: fit-content;
        transform: skewX(-15deg);
        padding: 0.8rem 2rem;
    }

    .feature-bar p {
        font-size: 1.2rem;
    }

    .hero-footer {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        background: transparent;
        padding: 0;
        gap: 2rem;
        margin-top: 2rem;
    }

    .footer-text {
        text-align: left;
        width: auto;
    }

    .cta-button {
        font-size: 2rem;
        width: auto;
        padding: 0.5rem 2rem;
        border: 2px solid #fff;
        background: rgba(200, 0, 0, 0.8);
    }

    .qr-area {
        display: flex;
    }

    /* Problem Section Desktop */
    .section-problem {
        padding: 8rem 4rem;
    }

    .section-title {
        font-size: 3.5rem;
        text-align: center;
        margin-bottom: 4rem;
    }

    .problem-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
        max-width: 1200px;
        margin: 0 auto 4rem;
    }

    .problem-impact {
        max-width: 800px;
        margin: 0 auto;
    }

    /* Solution Section Desktop */
    .section-solution {
        padding: 8rem 4rem;
    }

    .solution-lead {
        font-size: 1.5rem;
        max-width: 800px;
        margin: 0 auto 4rem;
    }

    .solution-features {
        flex-direction: row;
        justify-content: center;
        gap: 3rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .feature-card {
        flex: 1;
    }
}

/* =========================================
   RULES SECTIONS (Common Styles)
   ========================================= */

.section-rule {
    position: relative;
    padding: 6rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    background-color: #0a0a0a;
    border-bottom: 1px solid #333;
    overflow: hidden;
}

.rule-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-white);
    opacity: 0.1;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: 'Helvetica', sans-serif;
    letter-spacing: 0.05em;
}

.rule-number-center {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-white);
    opacity: 0.1;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: 'Helvetica', sans-serif;
    letter-spacing: 0.05em;
    text-align: center;
}

.rule-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.rule-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: #ccc;
}

.highlight-gold {
    color: var(--gold);
    font-weight: 700;
}

.rule-image-wrapper {
    width: 100%;
    height: 300px;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid #444;
    overflow: hidden;
}

.placeholder-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* PLACEHOLDER GRADIENTS (To be replaced by images) */
.p-holder-construction {
    background: linear-gradient(135deg, #2c3e50, #000);
}

.p-holder-nursing {
    background: linear-gradient(135deg, #4b6cb7, #182848);
}

.p-holder-fish {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
}

.p-holder-tech {
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
}

.p-holder-engine {
    background: linear-gradient(135deg, #434343, #000000);
}

.p-holder-tunnel {
    background: linear-gradient(135deg, #0F2027, #203A43, #2C5364);
}

.p-holder-13a,
.p-holder-40a,
.p-holder-50a {
    background: linear-gradient(45deg, #d4af37, #996515);
}

.p-holder-medical {
    background: linear-gradient(135deg, #fff, #eee);
    color: #333;
}

.p-holder-laundry {
    background: linear-gradient(135deg, #a8c0ff, #3f2b96);
}

.p-holder-bath {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
}

.p-holder-station {
    background: linear-gradient(135deg, #CAC531, #F3F9A7);
    color: #333;
}




/* SCENES SECTION */
.section-scenes {
    padding: 6rem 1rem;
    background-color: #111;
}

.section-title-center {
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 3rem;
}

.scenes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on mobile */
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.scene-card {
    background: #222;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.scene-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.scenes-note {
    text-align: center;
    margin-top: 2rem;
    color: #999;
    font-size: 0.9rem;
}

/* LINEUP SECTION */
.section-lineup {
    padding: 6rem 1rem;
    background-color: #080808;
    text-align: center;
}

.lineup-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.lineup-item {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 2rem;
    border-radius: 8px;
}

.lineup-img {
    height: 150px;
    background: #333;
    /* Placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.lineup-info h4 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

/* COMPANY SECTION */
.section-company {
    padding: 6rem 1rem;
    background-color: #000;
    color: #fff;
    text-align: center;
    border-top: 5px solid var(--primary-red);
}

.company-box {
    max-width: 600px;
    margin: 0 auto 4rem;
    text-align: left;
    border: 1px solid #333;
    padding: 2rem;
}

.company-box dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    /* Mobile definition list */
    gap: 1rem;
}

.company-box dt {
    font-weight: 700;
    color: #888;
}

.company-box dd {
    margin-left: 0;
}

.final-cta {
    margin-top: 4rem;
}

.cta-button-large {
    display: inline-block;
    background: linear-gradient(45deg, #cc0000, #ff0000);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    padding: 1.5rem 4rem;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(200, 0, 0, 0.3);
    transition: transform 0.2s;
}

.cta-button-large:hover {
    transform: scale(1.05);
}

/* =========================================
   DESKTOP ADJUSTMENTS (SECTION 4+)
   ========================================= */

@media (min-width: 768px) {

    /* Rule Section Desktop */
    .section-rule {
        flex-direction: row;
        align-items: center;
        padding: 8rem 4rem;
        gap: 4rem;
    }

    .section-rule.rule-right .rule-content {
        order: 1;
    }

    .section-rule.rule-right .rule-image-wrapper {
        order: 2;
    }

    .section-rule.rule-left .rule-content {
        order: 2;
    }

    .section-rule.rule-left .rule-image-wrapper {
        order: 1;
    }

    .rule-content,
    .rule-image-wrapper {
        flex: 1;
    }

    .rule-number {
        font-size: 5rem;
        position: absolute;
        top: 2rem;
        z-index: 0;
    }

    .rule-title {
        font-size: 2.5rem;
        margin-top: 3rem;
        /* Space for number */
        position: relative;
        z-index: 1;
    }

    .scenes-grid {
        grid-template-columns: repeat(4, 1fr);
        /* 4 cols on desktop */
    }

    .lineup-container {
        flex-direction: row;
        justify-content: center;
    }

    .lineup-item {
        flex: 1;
    }
}

/* =========================================
   NEW STRUCTURE STYLES (Refactoring)
   ========================================= */

/* CONTAINER & UTILS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.en-title {
    display: block;
    font-family: 'Helvetica', sans-serif;
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: 0.1em;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.jp-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: break-word;
}

@media (max-width: 767px) {
    .jp-title {
        font-size: 1.6rem;
    }

    .jp-title br {
        display: none;
        /* Let text flow naturally on mobile */
    }
}

/* ヘッダーの基本スタイルに transition を追加 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid #333;
    z-index: 1000;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    
    /* ↓ 追加：動きを滑らかにする */
    transition: transform 0.3s ease-in-out;
    /* Safari用の最適化：カクつき防止 */
    will-change: transform;
    transform: translateY(0);
}

/* ↓ 追加：このクラスがつくと上に隠れる */
.site-header.hide {
    transform: translateY(-100%);
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 30px;
    width: auto;
}

.site-nav {
    display: none;
    /* Hidden on mobile */
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.site-nav a:hover {
    color: var(--primary-red);
}

.header-cta .btn-contact-header {
    background: var(--primary-red);
    color: #fff;
    padding: 0.5rem 1.2rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.3s;
    display: none;
    /* Hidden on mobile */
}

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

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s;
}

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

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

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

/* MOBILE NAV OVERLAY */
@media (max-width: 767px) {
    .site-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        padding: 100px 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

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

    .site-nav ul {
        flex-direction: column;
        gap: 2rem;
    }

    .site-nav a {
        font-size: 1.2rem;
        display: block;
    }
}

/* SECTION: ABOUT */
.section-about {
    padding: 6rem 0;
    background-color: #111;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('rusted_pipe_problem_1766456119122.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    z-index: 10;
}

.about-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 2;
    font-size: 1.1rem;
}

.tech-block {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 4rem;
    background: #1a1a1a;
    border: 1px solid #333;
}

.tech-image {
    width: 100%;
    height: 300px;
    position: relative;
}

.tech-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-caption {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    font-size: 0.8rem;
    color: #eee;
}

.tech-content {
    padding: 2rem;
}

.tech-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.tech-content p {
    line-height: 1.8;
    color: #ccc;
    max-width: 24em;
    /* Approx 24 full-width chars */
    display: inline-block;
    /* Allows width to be respected */
}

.merit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.merit-card {
    background: #222;
    padding: 1.5rem;
    text-align: center;
    border-top: 3px solid var(--primary-red);
}

.merit-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
/* Safariでの右寄り・横揺れ対策セット */
@media screen and (max-width: 768px) {
    /* 1. 強制的に改行を許容する */
    .problem-card p, 
    .problem-card span {
        white-space: normal !important;
        word-break: break-all; /* 単語の途中でも改行させる */
    }

    /* 2. セクション全体ではみ出しをカット */
    .section-about {
        overflow: hidden;
    }

    /* 3. グリッドが3列のままなら1列にする（もし未設定なら） */
    .problem-grid-3col {
        display: block; /* スマホでは縦に並べる */
    }
    
    .problem-card {
        width: 100%;
        margin-bottom: 1.5rem;
    }
}

/* SECTION: WORKS */
.section-works {
    padding: 6rem 0;
    background: #080808;
    position: relative;
    z-index: 10;
}

.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile 1 col */
    gap: 2rem;
    margin-bottom: 3rem;
}

.work-card {
    background: #1a1a1a;
    border: 1px solid #333;
    transition: transform 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
    border-color: #666;
}

.work-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
    letter-spacing: 0.1em;
}

.work-body {
    padding: 1.5rem;
}

.work-cat {
    font-size: 0.8rem;
    color: var(--gold);
    display: block;
    margin-bottom: 0.5rem;
}

.work-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.work-card p {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.5;
}

.works-all-btn {
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    border: 1px solid #fff;
    color: #fff;
    padding: 1rem 3rem;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

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

/* SECTION: LINEUP */
.section-lineup {
    padding: 6rem 0;
    background: #000;
    position: relative;
    z-index: 10;
}

.lineup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: #111;
    border: 1px solid #333;
    padding: 1.2rem;
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* For image bleed */
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.lineup-img {
    aspect-ratio: 4 / 3;
    margin: -1.2rem -1.2rem 1rem -1.2rem;
    /* Bleed to edges */
    width: calc(100% + 2.4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.lineup-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.product-cat {
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 1rem;
    display: block;
    font-weight: bold;
}

.spec-table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
    margin-top: auto;
}

.spec-table th,
.spec-table td {
    padding: 0.4rem 0.2rem;
    border-bottom: 1px solid #333;
    text-align: left;
}

.spec-table th {
    color: #999;
    width: 35%;
}

.spec-table td {
    color: #fff;
}

/* Mobile for Lineup */
@media (max-width: 1024px) {
    .lineup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .lineup-img {
        aspect-ratio: 4 / 3;
        /* Mobile: Taller 4:3 horizontal ratio */
    }
}



/* SECTION: COMPANY */
.section-company {
    padding: 6rem 0;
    background: #111;
    position: relative;
    z-index: 10;
}

.company-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.company-list dt {
    font-weight: bold;
    color: var(--gold);
    display: flex;
    align-items: center;
}

.company-list dd {
    margin: 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
    line-height: 1.8;
}

/* Mobile responsive for Company */
@media (max-width: 767px) {
    .company-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .company-list dt {
        color: var(--gold);
        margin-top: 1.5rem;
    }

    .company-list dd {
        border-bottom: 1px solid #333;
        padding-bottom: 1.5rem;
    }
}

/* FOOTER / CONTACT */
.site-footer {
    background: #000;
    border-top: 1px solid #333;
    padding: 4rem 1rem 1rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.contact-cta {
    background: linear-gradient(135deg, #222, #111);
    padding: 3rem 1rem;
    border: 1px solid #333;
    margin-bottom: 4rem;
    border-left: 5px solid var(--primary-red);
}

.contact-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-desc {
    color: #ccc;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn-tel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    border: 1px solid #fff;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 300px;
}

.tel-num {
    font-size: 1.5rem;
    font-weight: bold;
}

.tel-time {
    font-size: 0.8rem;
    color: #ccc;
}

.btn-mail {
    display: block;
    background: var(--primary-red);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 300px;
    font-size: 1.1rem;
}

.footer-links {
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}

.copyright {
    color: #555;
    font-size: 0.8rem;
}

/* DESKTOP MEDIA QUERIES */
@media (min-width: 768px) {
    .site-nav {
        display: block;
    }

    .header-cta .btn-contact-header {
        display: inline-block;
    }

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

    .tech-block {
        flex-direction: row;
        align-items: center;
    }

    .tech-image {
        width: 50%;
        height: 400px;
    }

    .tech-content {
        width: 50%;
        padding: 3rem;
    }

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

    .works-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 cols for works */
    }

    .contact-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* NEW STYLES FOR REDESIGNED ABOUT SECTION */
.problem-grid-3col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.problem-card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    padding: 2rem;
    text-align: center;
    border-radius: 4px;
}

.p-icon-warning {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffcc00;
    /* Warning Yellow */
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.problem-card h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Utility: Desktop Only Line Breaks */
@media (max-width: 767px) {
    br.desktop-only {
        display: none;
    }
}

.solution-bridge {
    text-align: center;
    margin: 4rem 0;
}

.solution-bridge h3 {
    font-size: 1.8rem;
    font-weight: 900;
}

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

@media (min-width: 768px) {
    .problem-grid-3col {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* CONTACT FORM */
.contact-form {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: left;
    background: #0a0a0a;
    padding: 2.5rem;
    border: 1px solid #333;
    border-radius: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ccc;
}

.form-group .required {
    color: var(--primary-red);
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 0.8rem;
    color: #fff;
    font-family: inherit;
    border-radius: 4px;
    transition: border-color 0.3s;
}

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

.form-privacy {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

.form-privacy a {
    color: var(--gold);
    text-decoration: underline;
}

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

.btn-submit {
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    min-width: 250px;
}

.btn-submit:hover {
    background: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 0, 0, 0.4);
}

.btn-submit.loading .btn-text {
    visibility: hidden;
    opacity: 0;
}

.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

.btn-submit.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .contact-form {
        padding: 1.5rem;
    }
}

/* =========================================
   Safari 横揺れ防止の根本対策
   ========================================= */
html, body {
    /* 画面全体のオーバーフローをより厳格に制御 */
    overflow-x: hidden;
    position: relative;
    width: 100%;
    /* Safariでのバウンススクロールによる横揺れを抑制 */
    -webkit-overflow-scrolling: touch;
}

/* =========================================
   HERO SECTION 修正 (はみ出し要素の親をガード)
   ========================================= */
.top-banner-wrapper {
    /* 110%にする代わりに、親要素で絶対に見切れるように制御 */
    width: 120%; 
    margin-left: -10%;
    overflow: hidden; /* 自身の内部での予期せぬはみ出しをカット */
}

.product-img {
    /* width: 110% は Safari で不安定になりやすいため、max-width を併用 */
    max-width: 110vw; 
    height: auto;
    /* transform の影響を最小限にするため will-change を追加 */
    will-change: transform;
}

/* =========================================
   SIDE FLOATING BUTTON (iPhone 完全中央補正版)
   ========================================= */
.side-floating-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999; /* 重なり順を最優先に */
}

.side-floating-btn a {
    /* Flexbox設定 */
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
    
    background-color: var(--primary-red);
    color: #fff;
    text-decoration: none;
    
    /* 縦書き設定 */
    writing-mode: vertical-rl;
    -webkit-writing-mode: vertical-rl;
    
    /* 【重要】幅の確保とパディングの微調整 */
    width: 3.2em;      /* 少し幅を広げて中央に遊びを作る */
    height: auto;
    min-height: 120px;
    
    /* 【最重要】右側に強制的な余白を作る（これで右寄りを防ぐ） */
    padding: 20px 4px 20px 0; 
    
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.5;  /* 行間に余裕を持たせる */
    letter-spacing: 0.2em;
    border-radius: 8px 0 0 8px;
    box-shadow: -3px 0 15px rgba(0, 0, 0, 0.4);
    
    /* iOSでのレンダリング位置を強制中央へ */
    text-align: center;
}

/* スマホ版での最終微調整 */
@media (max-width: 767px) {
    .side-floating-btn a {
        width: 2.8em; 
        font-size: 0.9rem;
        /* 右端の「食い込み」を物理的にガードするパディング */
        padding-right: 6px !important; 
        letter-spacing: 0.15em;
    }
}