/* =========================================
   CSS Variables & Reset
   ========================================= */
   :root {
    --color-bg-light: #ffffff;
    --color-bg-dark: #111111;
    --color-text-main: #333333;
    --color-text-white: #ffffff;
    --color-accent-start: #00c6ff; /* Cyan */
    --color-accent-end: #0072ff;   /* Blue */
    --font-en: 'Montserrat', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --header-height: 80px;
}

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

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-family: var(--font-jp);
    color: var(--color-text-main);
    line-height: 1.8;
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; vertical-align: bottom; }

/* Typography */
h1, h2, h3 { 
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-family: var(--font-en); 
    letter-spacing: 0.05em; 
}
.en-font { 
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-family: var(--font-en); 
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--color-accent-start), var(--color-accent-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0; /* Animation init */
    transform: translateY(20px);
}

.section-lead {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(20px);
}

/* Animation Utility */
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* =========================================
   Header (Sticky)
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    transition: background-color 0.4s, backdrop-filter 0.4s, color 0.4s, box-shadow 0.4s;
    color: var(--color-text-white); /* Initial state on dark hero */
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--color-text-main);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a {
    font-family: var(--font-en);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent-start), var(--color-accent-end));
    transition: width 0.3s;
}

nav ul li a:hover::after { width: 100%; }

/* Mobile Menu Button */
.hamburger { 
    display: none; 
    cursor: pointer; 
    z-index: 1001;
    padding: 8px;
    margin: -8px;
    -webkit-tap-highlight-color: transparent;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.hamburger div { 
    width: 28px; 
    height: 3px; 
    background: currentColor; 
    margin: 6px 0; 
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 2px;
}

/* Hamburger animation when active */
.hamburger.active div:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active div:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Navigation Menu */
nav ul {
    display: flex;
    gap: 2rem;
}

#nav-menu {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@media (max-width: 900px) {
    .hamburger {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 60px 20px 40px;
        gap: 0;
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.4s ease,
                    visibility 0.4s ease;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    #nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    #nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    #nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
    #nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
    #nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }
    #nav-menu.active li:nth-child(5) { transition-delay: 0.3s; }
    #nav-menu.active li:nth-child(6) { transition-delay: 0.35s; }
    
    nav ul li a {
        display: block;
        padding: 20px 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--color-text-main);
        position: relative;
        -webkit-tap-highlight-color: rgba(0, 198, 255, 0.2);
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    nav ul li a::after {
        display: none;
    }
    
    nav ul li a::before {
        content: '';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 60px;
        height: 2px;
        background: linear-gradient(90deg, var(--color-accent-start), var(--color-accent-end));
        transition: transform 0.3s ease;
    }
    
    nav ul li a:active,
    nav ul li a:hover {
        color: var(--color-accent-start);
    }
    
    nav ul li a:active::before,
    nav ul li a:hover::before {
        transform: translateX(-50%) scaleX(1);
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* =========================================
   Hero Area
   ========================================= */
#hero {
    height: 100vh;
    background-color: #050a15; /* より深い宇宙のような紺色 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-text-white);
    position: relative;
    overflow: hidden;
}

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

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 20%, rgba(5, 10, 21, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    padding: 0 20px;
}

.hero-main-copy {
    font-family: var(--font-en);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    min-height: 2.4em; /* 表示崩れ防止のための高さ確保 */
}

.hero-sub-copy {
    font-size: 1.4rem;
    height: 2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* タイプライター内の日本語強調用クラス */
.highlight-text {
    background: linear-gradient(90deg, var(--color-accent-start), var(--color-accent-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

#hero::before { display: none; } /* 以前の静止画背景を無効化 */

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.7;
    font-size: 0.8rem;
    font-family: var(--font-en);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

/* =========================================
   Section: What we do (Mission)
   ========================================= */
#what-we-do {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 160px 20px;
    min-height: 70vh;
    overflow: hidden;
    z-index: 0;
    background-color: #f9f9f9;
}

.bg-container-advanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

.sharp-shape {
    position: absolute;
    filter: blur(0px); 
    opacity: 0.4;
    mix-blend-mode: multiply; 
}

.shape-1 {
    top: -50%;
    left: -20%;
    width: 80%;
    height: 150%;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 80%);
    background: linear-gradient(45deg, #e6e6e6, #ffffff);
    animation: rotate-slow 60s infinite linear;
    transform-origin: 50% 50%;
}

.shape-2 {
    bottom: -40%;
    right: -30%;
    width: 100%;
    height: 120%;
    clip-path: polygon(20% 0%, 100% 20%, 100% 100%, 0% 80%);
    background: linear-gradient(-45deg, #ebebeb, #f5f5f5);
    animation: rotate-slow-reverse 75s infinite linear;
    transform-origin: 60% 40%;
    opacity: 0.3;
}

.shape-3 {
    top: 40%;
    left: -50%;
    width: 200%;
    height: 200px;
    clip-path: polygon(0 40%, 100% 0%, 100% 60%, 0% 100%);
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
    transform: rotate(-15deg);
    animation: slide-across 40s infinite ease-in-out;
    opacity: 0.6;
}

.mission-container {
    max-width: 840px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.mission-title-large {
    font-family: var(--font-jp);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 70px;
    letter-spacing: 0.08em;
    line-height: 1.4;
    color: #111;
    min-height: 2.8em;
}

.char-span { opacity: 0; display: inline-block; }
.char-span.is-typed { animation: charFadeIn 0.1s ease-out forwards; }
@keyframes charFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.mission-text {
    font-size: 16px;
    margin-bottom: 40px;
    color: #333;
    font-weight: 400;
    letter-spacing: 0.02em;
}
.mission-text:last-child { margin-bottom: 0; }

.fade-up-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lead-container.is-active .fade-up-item { opacity: 1; transform: translateY(0); }
.lead-container.is-active .fade-up-item:nth-child(1) { transition-delay: 0.1s; }
.lead-container.is-active .fade-up-item:nth-child(2) { transition-delay: 0.4s; }
.lead-container.is-active .fade-up-item:nth-child(3) { transition-delay: 0.7s; }

@keyframes rotate-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes rotate-slow-reverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}
@keyframes slide-across {
    0%, 100% { transform: translateX(0) rotate(-15deg); }
    50% { transform: translateX(-50px) translateY(30px) rotate(-15deg); }
}

/* =========================================
   Section: Services (Apple Style Slide)
   ========================================= */
#services {
    padding: 100px 0;
    background-color: #fbfbfd;
}

.services-header {
    text-align: center;
    padding: 80px 0 10px;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
    background-color: #fbfbfd;
    margin-bottom: 0;
}

.apple-section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    overflow: visible;
}

/* 左右の配置ロジック */
.apple-section:nth-of-type(odd) {
    flex-direction: row;
}

.apple-section:nth-of-type(even) {
    flex-direction: row-reverse;
}

.text-content {
    flex: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-section .section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
    color: #1d1d1f;
    position: relative;
    display: inline-block;
    text-align: left;
    background: none;
    -webkit-text-fill-color: initial;
    opacity: 1;
    transform: none;
    width: 400px;
}

.apple-section .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #0071e3;
    margin-top: 15px;
    border-radius: 2px;
}

.section-desc {
    font-size: 17px;
    color: #424245;
    margin-top: 30px;
    line-height: 1.8;
    text-align: left;
    max-width: 400px;
    width: 100%;
}

.image-content {
    flex: 1.2;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* 縦横比を固定して潰れを防止 */
    aspect-ratio: 16 / 10;
    background-color: #f5f5f7; /* 読み込み前の背景色 */
}

.image-content img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* 枠に合わせて切り抜き表示 */
    transition: transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.1);
}

/* アニメーションの方向制御 */
.apple-section:nth-of-type(odd) .text-content {
    /* Base translateY handles it */
}
.apple-section:nth-of-type(odd) .image-content {
    /* Base translateY handles it */
}

.apple-section:nth-of-type(even) .text-content {
    /* Base translateY handles it */
}
.apple-section:nth-of-type(even) .image-content {
    /* Base translateY handles it */
}

/* 可視化クラスが付いた時の状態 */
.apple-section.is-visible .text-content {
    opacity: 1;
    transform: translateY(0);
}
.apple-section.is-visible .image-content {
    opacity: 1;
    transform: translateY(0);
}
.apple-section.is-visible .image-content img {
    transform: scale(1.0);
}

/* =========================================
   Section: Feature Bridge
   ========================================= */
#feature-bridge {
    height: 60vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=2070&auto=format&fit=crop');
    background-attachment: fixed; /* Parallax */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.bridge-copy {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* =========================================
   Section: 3 Features (Sticky Scroll Animation)
   ========================================= */
#three-features {
    position: relative;
    width: 100%;
    padding-bottom: 0;
    background-color: #ffffff;
}

.features-header {
    text-align: center;
    padding: 80px 0 10px;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111;
    background-color: #fff;
    margin-bottom: 0;
}

.sticky-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

.text-column {
    padding: 50vh 5% 70vh 8%;
    position: relative;
    z-index: 10;
}

.feature-block {
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 40px; 
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.feature-block.active {
    opacity: 1;
}

.feature-number {
    font-family: var(--font-en);
    font-size: 80px;
    font-weight: 800;
    color: #e8e8ed;
    line-height: 1;
    margin-bottom: -20px;
    position: relative;
    z-index: -1;
    transition: color 0.5s ease, transform 0.5s ease;
}

.feature-block.active .feature-number {
    color: #003399;
    opacity: 0.3;
    transform: translateX(-10px);
}

.feature-block .feature-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-align: left;
}

.feature-desc {
    font-size: 16px;
    color: #424245;
    text-align: justify;
}

.visual-column {
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
    z-index: 5;
}

.visual-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 540px;
    max-height: 80vh;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    background: #fff;
    z-index: 1; /* Ensure images stay inside */
}

.feature-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    transform: scale(1.1);
}

.feature-image.active {
    opacity: 1;
    transform: scale(1);
}

.mobile-image {
    display: none;
}

/* =========================================
   Section: Company (Modern Left Aligned)
   ========================================= */
#company {
    padding: 140px 5%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    background-color: #ffffff;
}

.bg-decoration {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,113,227,0.03) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

#company .section-header {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

#company.is-visible .section-header {
    opacity: 1;
    transform: translateY(0);
}

#company .section-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    background: none;
    -webkit-text-fill-color: initial;
    opacity: 1;
    transform: none;
    text-align: center;
}

.company-container {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 80px;
    align-items: start;
    position: relative;
    z-index: 2;
}

.info-list {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    padding: 24px 0;
    border-bottom: 1px solid #e5e5e5;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: #86868b;
    width: 140px; 
    flex-shrink: 0;
}

.info-value {
    font-size: 16px;
    font-weight: 400;
    color: #1d1d1f;
    text-align: left; 
    flex: 1;
    line-height: 1.8;
}

.copy-trigger {
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    display: inline-block;
}
.copy-trigger:hover { color: #0071e3; }
.copy-trigger:active { transform: scale(0.98); }

.tooltip {
    position: absolute;
    top: -34px;
    left: 0;
    transform: translateY(10px);
    background: #1d1d1f;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.tooltip.show {
    opacity: 1;
    transform: translateY(0);
}
.tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10px;
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: #1d1d1f transparent transparent transparent;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    opacity: 0;
    transform: scale(0.95);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-frame {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.map-wrapper:hover .map-frame {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.map-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    pointer-events: none;
}
.map-pin-icon { color: #ea4335; margin-right: 6px; }

#company.is-visible .info-item { opacity: 1; transform: translateY(0); }
#company.is-visible .map-wrapper { opacity: 1; transform: scale(1); }

.info-item:nth-child(1) { transition-delay: 0.1s; }
.info-item:nth-child(2) { transition-delay: 0.2s; }
.info-item:nth-child(3) { transition-delay: 0.3s; }
.info-item:nth-child(4) { transition-delay: 0.4s; }
.info-item:nth-child(5) { transition-delay: 0.5s; }
.info-item:nth-child(6) { transition-delay: 0.6s; }

/* =========================================
   Section: Contact & Footer (Premium Dark)
   ========================================= */
#contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 60px;
    min-height: 80vh;
    background: radial-gradient(circle at 50% 30%, #1a1a1a 0%, #000000 70%);
    color: #f5f5f7;
    text-align: center;
}

#contact .section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
    background: none;
    -webkit-text-fill-color: initial;
    opacity: 1;
    transform: none;
}

.section-desc {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 60px;
    text-align: left;
}

.form-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.input-group {
    position: relative;
    width: 100%;
}

.form-input, 
.form-textarea {
    width: 100%;
    padding: 24px 16px 10px;
    font-size: 16px;
    color: #fff;
    background-color: rgba(28, 28, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    font-family: inherit;
}

.form-textarea {
    min-height: 160px;
    resize: vertical;
}

.form-label {
    position: absolute;
    top: 20px;
    left: 16px;
    font-size: 16px;
    color: #86868b;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left top;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #0071e3;
    background-color: rgba(28, 28, 30, 1);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.form-input:focus ~ .form-label,
.form-textarea:focus ~ .form-label,
.form-input.has-value ~ .form-label,
.form-textarea.has-value ~ .form-label {
    transform: translateY(-12px) scale(0.75);
    color: #0071e3;
}

.submit-btn {
    margin-top: 20px;
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #0071e3;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-btn:hover {
    background-color: #0077ed;
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 113, 227, 0.3);
}

.submit-btn:active {
    transform: scale(0.98);
}

.btn-text {
    transition: opacity 0.3s;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    opacity: 0;
}

@keyframes spin { 
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.submit-btn.is-loading .btn-text { opacity: 0; }
.submit-btn.is-loading .btn-loader { opacity: 1; }
.submit-btn.is-loading { pointer-events: none; background-color: #333; }

footer {
    background: #000;
    color: #424245;
    text-align: center;
    padding: 2rem 2rem 4rem;
    font-size: 12px;
    font-family: var(--font-en);
}

/* =========================================
   Custom Modal
   ========================================= */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.custom-modal.show {
    display: flex;
}

.custom-modal-content {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.custom-modal-message {
    font-size: 16px;
    color: #1d1d1f;
    line-height: 1.8;
    margin-bottom: 30px;
    font-family: var(--font-jp);
}

.custom-modal-btn {
    background-color: #0071e3;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-jp);
}

.custom-modal-btn:hover {
    background-color: #0077ed;
    transform: scale(1.05);
}

.custom-modal-btn:active {
    transform: scale(0.98);
}

/* =========================================
   Responsive Design (Final Optimization)
   ========================================= */
@media (max-width: 900px) {
    .section-title { font-size: 2.2rem; }
    .apple-section { 
        flex-direction: column !important; 
        padding: 60px 24px; 
        gap: 40px; 
        overflow: visible;
    }
    .apple-section .section-title { font-size: 32px; }
    .text-content { 
        opacity: 1 !important; 
        transform: none !important; 
        width: 100%;
        flex: none;
    }
    .section-desc {
        width: 100% !important;
        max-width: 100%;
        margin-top: 20px;
    }
    .image-content { 
        opacity: 1 !important; 
        transform: none !important; 
        width: 100%;
        flex: none;
        max-width: 100%;
        aspect-ratio: 16 / 10;
        min-height: 200px;
    }
    .image-content img { 
        transform: none !important; 
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .sticky-container { display: block; }
    .visual-column { display: none; }
    .mobile-image { display: block !important; width: 100%; border-radius: 16px; margin-top: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .text-column { 
        padding: 40px 24px; 
        margin: 0 auto;
        max-width: 100%;
    }
    .feature-block { 
        height: auto; 
        min-height: auto; 
        margin-bottom: 60px; 
        opacity: 1 !important;
        padding-right: 0;
        padding-left: 0;
    }
    .feature-number { font-size: 60px; }
    .feature-title {
        text-align: left;
    }
    .feature-desc {
        text-align: left;
    }
    
    /* Bridge copy (キャッチコピー) */
    .bridge-copy {
        font-size: 1.5rem;
        letter-spacing: 0.05em;
        line-height: 1.6;
        padding: 0 20px;
    }
    
    #feature-bridge {
        height: 50vh;
        background-attachment: scroll; /* Parallaxを無効化してパフォーマンス向上 */
    }
    
    /* Contact section */
    #contact .section-desc {
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* iPhone SE & Small Devices */
    body { font-size: 14px; }
    header { padding: 0 15px; }
    .logo { font-size: 1.2rem; }
    
    /* Hamburger menu adjustments for small devices */
    .hamburger {
        padding: 10px;
        margin: -10px;
    }
    
    .hamburger div {
        width: 24px;
        height: 2.5px;
        margin: 5px 0;
    }
    
    nav ul li a {
        font-size: 1rem;
        padding: 18px 0;
    }
    
    .hero-main-copy { font-size: 1.6rem; min-height: auto; margin-bottom: 1rem; }
    .hero-sub-copy { font-size: 0.9rem; }

    .mission-title-large { font-size: 20px; margin-bottom: 24px; }
    .mission-text { font-size: 13px; line-height: 1.6; }
    
    /* Bridge copy (キャッチコピー) - 小さいデバイス用 */
    .bridge-copy {
        font-size: 1.2rem;
        letter-spacing: 0.03em;
        line-height: 1.7;
        padding: 0 16px;
    }
    
    #feature-bridge {
        height: 45vh;
    }

    .apple-section { 
        padding: 40px 16px; 
        gap: 30px;
    }
    .apple-section .section-title { font-size: 22px; }
    .section-desc { 
        font-size: 13px; 
        margin-top: 15px;
        width: 100% !important;
        max-width: 100%;
        line-height: 1.7;
    }
    .text-content {
        width: 100%;
    }
    .image-content {
        width: 100%;
        aspect-ratio: 16 / 10;
        max-width: 100%;
        min-height: 180px;
    }
    .image-content img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .features-header { font-size: 26px; padding: 40px 20px 20px; }
    .services-header { font-size: 26px; padding: 40px 20px 20px; }
    .text-column {
        padding: 40px 16px;
    }
    .feature-block .feature-title { 
        font-size: 18px; 
        margin-bottom: 15px;
        text-align: left;
    }
    .feature-desc { 
        font-size: 13px;
        text-align: left;
    }
    .feature-block {
        padding-right: 0;
        padding-left: 0;
    }

    #company { padding: 40px 16px; }
    #company .section-title { font-size: 26px; margin-bottom: 30px; }
    .company-container { gap: 30px; display: block; }
    .info-item { padding: 15px 0; border-bottom: 1px solid #eee; }
    .info-label { font-size: 11px; margin-bottom: 4px; color: #888; }
    .info-value { font-size: 14px; }
    .map-wrapper { height: 200px; margin-top: 20px; }

    #contact { padding: 50px 16px; }
    #contact .section-title { font-size: 24px; }
    #contact .section-desc {
        text-align: center;
    }
    .form-container { gap: 15px; }
    .form-input, .form-textarea { 
        -webkit-appearance: none;
        appearance: none;
        padding: 20px 12px 6px; 
        font-size: 14px;
        background-color: #1c1c1e; /* 背景を確実に暗く */
        border: 1px solid #333;
    }
    .form-label { font-size: 13px; top: 16px; left: 12px; }
    .submit-btn { padding: 14px; font-size: 14px; border-radius: 25px; }
    
    .custom-modal-content {
        padding: 30px 20px;
        max-width: 90%;
    }
    .custom-modal-message {
        font-size: 14px;
        margin-bottom: 25px;
    }
    .custom-modal-btn {
        padding: 10px 30px;
        font-size: 14px;
    }
}