@charset "UTF-8";

/* =========================================
   1. 全体設定 (Base Styles)
   ========================================= */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8fbfe;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. ヘッダー (Header) - 固定
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 12px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 10px;
    z-index: 1002;
}

.logo-link img {
    height: 48px;
    display: block;
    mix-blend-mode: multiply;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: #005aa0;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* --- ナビゲーション --- */
nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; align-items: center; }

.nav-services {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-services-toggle {
    position: relative;
    display: block;
    border: none;
    background: transparent;
    color: #005aa0;
    font: inherit;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1.2;
    margin: 0;
    padding: 0 0 5px;
    appearance: none;
    -webkit-appearance: none;
}

.nav-services-caret {
    display: none;
}

.nav-services-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #005aa0;
    transition: width 0.3s ease;
}

.nav-services-dropdown {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    min-width: 240px;
    display: grid;
    gap: 2px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 90, 160, 0.08);
    box-shadow: 0 24px 54px rgba(0, 90, 160, 0.14);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
    z-index: 1005;
}

.nav-services-dropdown a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: #005aa0;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease;
}

.nav-services-dropdown a:hover {
    background: #edf6ff;
    transform: translateX(4px);
}

.nav-services.is-open .nav-services-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

nav a {
    text-decoration: none;
    color: #005aa0;
    font-weight: bold;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #005aa0;
    transition: width 0.3s ease;
}

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

.nav-services-toggle:hover,
.nav-services-toggle:focus-visible {
    color: #004488;
    outline: none;
}

.nav-services-toggle:hover::after,
.nav-services-toggle:focus-visible::after,
.nav-services.is-open .nav-services-toggle::after {
    width: 100%;
}

.btn-contact {
    background: #005aa0;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 90, 160, 0.2);
}

.btn-contact:hover {
    background: #004488;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 90, 160, 0.3);
}

/* スマホメニューボタン */
.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1002; }
.menu-btn span { display: block; width: 25px; height: 2px; background-color: #005aa0; margin: 5px 0; transition: 0.3s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); z-index: 999; opacity: 0; visibility: hidden; transition: 0.3s; }
.menu-open .menu-overlay { opacity: 1; visibility: visible; }

/* =========================================
   3. ヒーローエリア
   ========================================= */
#hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(6, 25, 52, 0.32) 0%, rgba(6, 25, 52, 0.12) 28%, rgba(6, 25, 52, 0.48) 100%),
        url("../images/offshore/offshore-hero-poster-clean.jpg") center center / cover no-repeat;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

body.hero-video-ready .hero-video {
    opacity: 1;
}

.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

#hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.28), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    pointer-events: none;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    text-shadow: 0 8px 24px rgba(0,0,0,0.28);
    animation: fadeInUp 1.2s ease-out;
}

#hero p {
    font-size: 1.3rem;
    opacity: 0.98;
    letter-spacing: 0.05em;
    text-shadow: 0 4px 12px rgba(0,0,0,0.24);
    animation: fadeInUp 1.2s ease-out 0.3s backwards;
}

body.hero-mobile-pending #hero h1,
body.hero-mobile-pending #hero p {
    animation: none;
    opacity: 0;
    transform: translateY(20px);
}

body.hero-mobile-ready #hero h1 {
    animation: fadeInUp 1.2s ease-out;
}

body.hero-mobile-ready #hero p {
    animation: fadeInUp 1.2s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =========================================
   4. 下のセクション (Services)
   ========================================= */
#services {
    position: relative;
    z-index: 10;
    margin-top: 100vh;
    background-color: #f8fbfe;
    padding-top: 80px;
    padding-bottom: 100px;
}

/* 波のエフェクト (スクリーンショットの曲線を正確に再現) */
#services::before {
    content: '';
    position: absolute;
    top: -199px;
    left: 0;
    width: 100%;
    height: 200px;
    /* 1枚目(水色): 左から中央へ深く沈み込み、右へ向かってなだらかに上昇するライン
       2枚目(白): 1枚目よりも低い位置から始まり、中央手前で交差して右上で背景へ消えるライン
    */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23aaddff' opacity='0.4' d='M0,120 C400,120 800,320 1440,180 L1440,320 L0,320 Z'/%3E%3Cpath fill='%23f8fbfe' d='M0,280 C600,280 1000,50 1440,150 L1440,320 L0,320 Z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}
.section-title {
    text-align: center;
    color: #005aa0;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 90, 160, 0.08);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 90, 160, 0.15); }
.card-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.img-wrapper { overflow: hidden; height: 200px; }
.card-img-photo { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.service-card:hover .card-img-photo { transform: scale(1.1); }

.card-text { padding: 30px; text-align: left; }
.card-text h3 { color: #005aa0; margin: 0; font-size: 0.9rem; font-weight: bold; border-bottom: 1px solid #eee; padding-bottom: 15px; letter-spacing: 0.1em; }
.card-text h3 span { display: block; font-size: 1.4rem; color: #333; margin-top: 10px; letter-spacing: 0; }
.card-text p { font-size: 0.95rem; color: #666; margin-top: 15px; line-height: 1.8; }
.card-link {
    color: #005aa0;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 12px;
    text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

.card-link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 14px;
}

.card-link-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 90, 160, 0.14);
    background: #f4f9ff;
    color: #005aa0;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.card-link-chip:hover {
    background: #eaf4ff;
    text-decoration: none;
}

/* =========================================
   5. 会社概要 ＆ 6. アニメーション
   ========================================= */
#company { background: #fff; position: relative; z-index: 11; padding: 100px 0; }
.profile-list { max-width: 800px; margin: 0 auto; border-top: 1px solid #eee; }
.profile-item { display: flex; border-bottom: 1px solid #eee; padding: 25px 0; }
.profile-item dt { width: 30%; font-weight: bold; color: #005aa0; padding-left: 10px; }
.profile-item dd { width: 70%; margin: 0; color: #444; }

.fade-in { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.2, 1, 0.3, 1); }
.fade-in.active { opacity: 1; transform: translateY(0); }

footer { background: #111; color: #aaa; text-align: center; padding: 40px 0; position: relative; z-index: 20; }

/* =========================================
   7. サイト内チャットボット
   ========================================= */
.site-chatbot {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    pointer-events: none;
}

.site-chatbot-panel {
    width: min(360px, calc(100vw - 28px));
    max-height: calc(100dvh - 44px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 90, 160, 0.12);
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(0, 42, 84, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.site-chatbot.is-open .site-chatbot-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.site-chatbot-head {
    position: relative;
    padding: 18px 20px 14px;
    padding-right: 56px;
    background: linear-gradient(135deg, #005aa0, #4ba3ff);
    color: #fff;
}

.site-chatbot-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.site-chatbot-head strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.site-chatbot-head span {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
}

.site-chatbot-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    min-height: 0;
}

.site-chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: clamp(210px, 36vh, 300px);
    overflow-y: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
}

.site-chatbot-msg {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.75;
    white-space: pre-line;
}

.site-chatbot-msg.bot {
    align-self: flex-start;
    background: #eef6ff;
    color: #24415d;
    border-bottom-left-radius: 6px;
}

.site-chatbot-msg.user {
    align-self: flex-end;
    background: #005aa0;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.site-chatbot-links {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-chatbot-links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(0, 90, 160, 0.08);
    color: #005aa0;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.site-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-chatbot-chip {
    border: 1px solid rgba(0, 90, 160, 0.16);
    background: #fff;
    color: #005aa0;
    border-radius: 999px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.site-chatbot-chip.primary {
    background: #005aa0;
    border-color: #005aa0;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 90, 160, 0.14);
}

.site-chatbot-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 90, 160, 0.12);
}

.site-chatbot-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.site-chatbot-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 90, 160, 0.14);
    border-radius: 14px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 16px;
    color: #24415d;
    outline: none;
    background: #fff;
}

.site-chatbot-input:focus {
    border-color: rgba(0, 90, 160, 0.36);
    box-shadow: 0 0 0 4px rgba(75, 163, 255, 0.12);
}

.site-chatbot-send {
    border: none;
    min-width: 52px;
    min-height: 46px;
    border-radius: 14px;
    background: #005aa0;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.site-chatbot-toggle {
    border: none;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005aa0, #4ba3ff);
    color: #fff;
    box-shadow: 0 18px 32px rgba(0, 90, 160, 0.26);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: auto;
}

.site-chatbot-toggle::before,
.site-chatbot-toggle::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    inset: -4px;
    border: 1px solid rgba(75, 163, 255, 0.34);
    animation: chatbotPulse 2.8s ease-out infinite;
}

.site-chatbot-toggle::after {
    inset: -12px;
    animation-delay: 0.9s;
}

.site-chatbot-toggle svg {
    width: 28px;
    height: 28px;
}

.site-chatbot-toggle-label {
    position: absolute;
    right: 74px;
    bottom: 12px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.86);
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

@keyframes chatbotPulse {
    0% { opacity: 0.65; transform: scale(0.92); }
    100% { opacity: 0; transform: scale(1.15); }
}

/* =========================================
   8. スマホ対応 (Mobile)
   ========================================= */
@media (max-width: 980px) {
    .container {
        padding: 0 16px;
    }

    .header-inner {
        min-width: 0;
        gap: 10px;
    }

    .logo-link {
        min-width: 0;
        max-width: calc(100% - 60px);
        gap: 8px;
    }

    .logo-link img { height: 36px; }
    .logo-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.9rem;
        letter-spacing: 0.02em;
    }
    
    #hero {
        height: 100vh;
        background:
            linear-gradient(180deg, rgba(6, 25, 52, 0.22) 0%, rgba(6, 25, 52, 0.1) 28%, rgba(6, 25, 52, 0.36) 100%),
            url("../images/offshore/offshore-hero-poster-clean.jpg") center center / cover no-repeat;
    }
    .hero-video {
        opacity: 0;
        transition: opacity 0.35s ease;
    }
    body.hero-mobile-ready .hero-video {
        opacity: 1;
    }
    body.hero-mobile-pending #hero .container {
        opacity: 0;
    }
    body.hero-mobile-ready #hero .container,
    body:not(.hero-mobile-pending) #hero .container {
        opacity: 1;
        transition: opacity 0.35s ease;
    }
    #services { margin-top: 100vh; }
    
    #hero h1 { 
        font-size: 2.2rem; 
        line-height: 1.3; 
        padding: 0 15px;
    }
    
    #hero p { 
        font-size: 1.1rem; 
        margin-top: 10px;
        letter-spacing: 0.05em;
    }

    #services::before { height: 100px; top: -99px; }
    
    .menu-btn {
        display: block;
        flex-shrink: 0;
    }
    nav {
        position: fixed; top: 0; right: 0; width: min(82vw, 320px); height: 100vh;
        background: rgba(255, 255, 255, 0.98); padding: 80px 24px;
        transform: translateX(100%); transition: transform 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 1001;
        box-sizing: border-box;
    }
    .menu-open nav { transform: translateX(0%); }
    nav ul { flex-direction: column; align-items: flex-start; gap: 25px; width: 100%; }
    nav li { width: 100%; }
    nav a { font-size: 1.2rem; display: block; width: 100%; border-bottom: 1px solid #eee; padding-bottom: 10px; box-sizing: border-box; }
    nav a::after { display: none; }
    .nav-services {
        width: 100%;
        display: block;
    }
    .nav-services-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        font-size: 1.2rem;
        line-height: 1.3;
        padding: 0 0 10px;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        gap: 10px;
        text-align: left;
    }
    .nav-services-toggle::after {
        display: none;
    }
    .nav-services-caret {
        display: inline-block;
        margin-left: auto;
        flex-shrink: 0;
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg) translateY(-1px);
        transition: transform 0.3s ease;
    }
    .nav-services-dropdown {
        position: relative !important;
        top: 0;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        min-width: 0;
        margin-top: 0;
        padding: 0 0 0 18px;
        border: none;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.2s ease, margin-top 0.2s ease;
        box-sizing: border-box;
    }
    .nav-services.is-open .nav-services-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 360px;
        margin-top: 12px;
    }
    .nav-services-dropdown a {
        min-height: 0;
        width: 100%;
        padding: 12px 0;
        border-radius: 0;
        border-bottom: 1px solid #edf1f5;
        background: transparent;
        font-size: 1rem;
        font-weight: 700;
        transform: none;
        box-sizing: border-box;
    }
    .nav-services-dropdown a:hover {
        background: transparent;
        transform: none;
    }
    .nav-services.is-open .nav-services-caret {
        transform: rotate(225deg) translateY(-1px);
    }
    nav a.btn-contact {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 14px 18px;
        border-bottom: none;
        text-align: center;
        white-space: normal;
    }
    
    .profile-item { display: block; }
    .profile-item dt { width: 100%; margin-bottom: 8px; padding-left: 0; }
    
    .card-text h3 span { font-size: 1.3rem; }

    .site-chatbot {
        right: 14px;
        bottom: 14px;
    }

    .site-chatbot-panel {
        width: min(100vw - 18px, 360px);
    }

    .site-chatbot-toggle {
        width: 58px;
        height: 58px;
    }

    .site-chatbot-toggle-label {
        display: none;
    }
}

@media (max-width: 420px) {
    .container {
        padding: 0 12px;
    }

    .logo-link img {
        height: 32px;
    }

    .logo-text {
        font-size: 0.78rem;
        letter-spacing: 0.01em;
    }

    .menu-btn {
        padding: 8px;
    }

    nav {
        width: min(88vw, 300px);
        padding: 74px 18px 26px;
    }

    nav ul {
        gap: 20px;
    }

    nav a {
        font-size: 1.05rem;
    }

    .nav-services-toggle {
        font-size: 1.05rem;
    }

    .nav-services-dropdown a {
        font-size: 0.95rem;
    }

    nav a.btn-contact {
        min-height: 46px;
        padding: 12px 14px;
        font-size: 1rem;
    }
}
