/* =============================================
   CSS変数・リセット
   ============================================= */
:root {
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --cyan-light: #cffafe;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    overflow-x: hidden;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; background: none; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }

/* =============================================
   ユーティリティ
   ============================================= */
.hidden { display: none !important; }
.text-cyan { color: var(--cyan); }
.text-emerald { color: var(--emerald); }
.text-dark { color: var(--gray-900); }
.sp-only { display: none; }
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-lg { width: 40px; height: 40px; }
.service-icon { width: 32px; height: 32px; color: var(--cyan); margin-bottom: 1rem; }
.w-full { width: 100%; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.link-cyan { color: var(--cyan); text-decoration: underline; }
.link-cyan:hover { color: var(--cyan-dark); }
.bg-slate { background: #f8fafc; }

/* =============================================
   イントロアニメーション
   ============================================= */
#intro-screen {
    position: fixed; inset: 0; z-index: 100;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff;
    transition: opacity 0.8s ease-out;
}
#intro-screen.fade-out { opacity: 0; pointer-events: none; }

.mission-text {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--emerald);
    font-weight: 600;
    text-align: center;
    padding: 0 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: float-up 1s ease-out forwards 0.5s;
}

.intro-logo-wrap {
    margin-top: 3rem;
    width: 100%;
    max-width: 700px;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
}

.intro-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.intro-svg-text {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-weight: 800;
    font-size: 80px;
}

.animate-stroke {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    stroke-width: 2px;
    fill-opacity: 0;
    animation:
        draw-stroke 3s ease-in-out forwards,
        fill-in 1s ease-out 3s forwards;
}
.stroke-dark { stroke: var(--gray-900); fill: var(--gray-900); }
.stroke-emerald { stroke: var(--emerald-dark); fill: var(--emerald-dark); }
.stroke-cyan { stroke: var(--cyan-dark); fill: var(--cyan-dark); }
.fill-dark { fill: var(--gray-900); }
.fill-emerald { fill: var(--emerald-dark); }
.fill-cyan { fill: var(--cyan-dark); }

@keyframes draw-stroke {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}
@keyframes fill-in {
    0% { fill-opacity: 0; }
    100% { fill-opacity: 1; }
}
@keyframes float-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.loading-bar {
    margin-top: 3rem;
    width: 4rem; height: 4px;
    background: var(--cyan-dark);
    border-radius: 99px;
    opacity: 0;
    animation:
        float-up 0.5s forwards 4.8s,
        pulse 1s infinite 4.8s;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =============================================
   フェードインアニメーション
   ============================================= */
.fade-in-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   メインレイアウト (フェードイン)
   ============================================= */
#main-layout {
    opacity: 0;
    transition: opacity 1s ease-out;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
#main-layout.visible { opacity: 1; }

/* =============================================
   ヘッダー
   ============================================= */
#site-header {
    position: sticky; top: 0; z-index: 50;
    background: #fff;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--gray-200);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-btn {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--gray-900);
    padding: 0;
    white-space: nowrap;
}
#main-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.25rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#main-nav::-webkit-scrollbar { display: none; }

.nav-link {
    font-size: clamp(0.7rem, 1.5vw, 0.875rem);
    font-weight: 500;
    color: var(--gray-600);
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--cyan); }
.nav-link.active { color: var(--cyan-dark); font-weight: 700; border-bottom-color: var(--cyan); }

/* =============================================
   メインコンテンツ
   ============================================= */
#page-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
    flex: 1;
    width: 100%;
}

/* =============================================
   セクション共通
   ============================================= */
.section-block { padding: 3rem 0; }
.border-top { border-top: 1px solid var(--gray-200); }

.section-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}
.section-lead {
    max-width: 48rem;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: clamp(0.9rem, 2vw, 1.125rem);
    color: var(--gray-600);
    padding: 0 1rem;
}

/* =============================================
   ボタン
   ============================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--cyan);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(6,182,212,0.4);
    transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--cyan-dark); transform: scale(1.02); }

/* =============================================
   ヒーローセクション
   ============================================= */
.hero-section {
    position: relative;
    background: #fff;
    border-radius: 0.75rem;
    padding: clamp(1.5rem, 4vw, 4rem);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(6,182,212,0.2);
    overflow: hidden;
    text-align: center;
    margin-top: 1rem;
}
#hero-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0.8;
    z-index: 0;
}
.hero-content { position: relative; z-index: 1; max-width: 56rem; margin: 0 auto; }

.hero-eyebrow {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--cyan);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hero-title {
    font-size: clamp(1.75rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}
.hero-desc {
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    color: var(--gray-700);
    margin-bottom: 2rem;
}

/* =============================================
   サービスカード
   ============================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.service-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
    transition-delay: var(--delay, 0ms);
}
.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--cyan);
    transform: translateY(-2px);
}
.service-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.service-card p { color: var(--gray-600); font-size: 0.95rem; }

/* =============================================
   Sticky Scroll (Solutions)
   ============================================= */
.sticky-scroll-wrap {
    display: flex;
    gap: 2.5rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: flex-start;
}

/* デスクトップ：Stickyビジュアル */
.sticky-visual-col {
    display: none;
    width: 50%;
    flex-shrink: 0;
    position: sticky;
    top: 5rem;
    height: 70vh;
    min-height: 400px;
    background: var(--gray-100);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    border: 2px solid rgba(6,182,212,0.4);
    overflow: hidden;
    flex-direction: column;
}

.sticky-visual-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(8,145,178,0.95);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.4s;
}

.sticky-visual-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}
.sticky-visual-icon {
    width: 48px; height: 48px;
    color: var(--cyan);
    margin-bottom: 1rem;
    transition: transform 0.3s;
}
.sticky-visual-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}
.sticky-visual-placeholder {
    width: 100%;
    min-height: 9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--cyan);
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.8);
    padding: 1rem;
}
#sticky-content-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cyan-dark);
    text-align: center;
}
.placeholder-note { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.5rem; }

/* ステップリスト */
.steps-col { flex: 1; display: flex; flex-direction: column; gap: 2rem; }

.step-block {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: opacity 0.5s, box-shadow 0.3s, border-color 0.3s;
}
.step-block.step-active {
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--cyan);
    opacity: 1 !important;
}
.step-block.step-inactive { opacity: 0.5; }

.step-field-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--emerald);
    margin-bottom: 0.25rem;
}
.step-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}
.step-title {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}
.step-desc {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.75;
}

/* モバイル用インラインビジュアル */
.step-mobile-visual {
    display: none;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border: 1px dashed rgba(6,182,212,0.4);
    text-align: center;
}
.step-mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.75rem;
    font-weight: 700;
}

/* =============================================
   取引先
   ============================================= */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.client-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, border-color 0.3s;
}
.client-card:hover { box-shadow: var(--shadow-md); border-color: var(--emerald); }
.client-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}
.client-card:hover .client-name { color: var(--emerald-dark); }
.client-desc { font-size: 0.875rem; color: var(--gray-500); margin-top: auto; }

/* =============================================
   CTAセクション
   ============================================= */
.cta-section {
    padding: 4rem 2rem;
    text-align: center;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(6,182,212,0.2);
}
.cta-section h2 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.cta-section p {
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    color: var(--gray-700);
    margin-bottom: 2rem;
}

/* =============================================
   代表挨拶
   ============================================= */
.message-card {
    max-width: 56rem;
    margin: 0 auto;
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border-left: 8px solid var(--cyan);
}
.message-quote {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: var(--cyan);
    margin-bottom: 1.5rem;
}
.message-body { display: flex; flex-direction: column; gap: 1rem; }
.message-body p { color: var(--gray-700); font-size: clamp(0.875rem, 1.5vw, 1rem); line-height: 1.8; }
.message-sign { text-align: right; margin-top: 2rem; }
.message-sign p { font-size: 0.95rem; font-weight: 600; }
.sign-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--cyan);
}

/* =============================================
   会社概要
   ============================================= */
.company-card {
    max-width: 48rem;
    margin: 0 auto 4rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}
.company-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}
.company-icon-wrap { text-align: center; margin-bottom: 1.5rem; }
.profile-dl { display: flex; flex-direction: column; }
.profile-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-row dt { color: var(--gray-500); font-weight: 500; }
.profile-row dd { color: var(--gray-900); }

.quals-section { max-width: 64rem; margin: 0 auto; }
.quals-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}
.quals-desc {
    text-align: center;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--gray-700);
    margin-bottom: 2.5rem;
}
.quals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.qual-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
    font-weight: 500;
}
.star { font-size: 1.25rem; color: var(--emerald); flex-shrink: 0; }

/* =============================================
   お問い合わせ
   ============================================= */
.contact-card {
    max-width: 48rem;
    margin: 0 auto;
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--cyan);
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--gray-700); }
.required { color: #ef4444; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--gray-900);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}
.form-group textarea { resize: vertical; }

#form-status { margin-bottom: 1rem; text-align: center; font-weight: 500; font-size: 0.95rem; border-radius: 0.375rem; }
.status-success { padding: 1rem; background: #d1fae5; color: #065f46; border-radius: 0.375rem; }
.status-error   { padding: 1rem; background: #fee2e2; color: #991b1b; border-radius: 0.375rem; }
.status-loading { padding: 1rem; background: var(--cyan-light); color: var(--cyan-dark); border-radius: 0.375rem; }

/* =============================================
   画像スタイル
   ============================================= */
/* Sticky ビジュアルパネル内の画像 */
.sticky-img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}
.sticky-img + .sticky-img { margin-top: 0.5rem; }

/* モバイル用インライン画像 */
.step-img {
    width: 100%;
    border-radius: 0.5rem;
    display: block;
    margin-bottom: 0.5rem;
}
.step-img:last-child { margin-bottom: 0; }

/* =============================================
   フッター
   ============================================= */
#site-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (min-width: 1024px) {
    .sticky-visual-col { display: flex; }
    .sticky-scroll-wrap { flex-direction: row; }
    .steps-col { width: 50%; }
    .step-block { min-height: 560px; }
}

@media (max-width: 640px) {
    .sp-only { display: inline; }
    .step-mobile-visual { display: flex; flex-direction: column; align-items: center; }
    .step-mobile-header { display: flex; }
    .step-field-label, .step-num { display: none; }
    .profile-row { grid-template-columns: 1fr; gap: 0.25rem; }
}
