/* ========================================
   Services Page Styles
   株式会社Codeforce サービス紹介ページ
   ======================================== */

/* CSS変数（トップページと統一） */
:root {
    --c-primary: #096fc8;
    --c-primary-dark: #065299;
    --c-primary-light: #0b7fe6;
    --c-secondary: #111318;
    --c-white: #ffffff;
    --c-black: #000000;
    --c-gray-dark: #1a1c22;
    --c-gray-medium: #2a2d36;
    --c-gray-light: #eceff4;
    --c-text: #333333;
    --c-text-light: #666666;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 96px;

    --font-family-sans: 'Zen Kaku Gothic New', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 基本リセット */
* {
    box-sizing: border-box;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* セクション共通 */
.section {
    padding: var(--spacing-4xl) 0;
}

/* ========================================
   1️⃣ 枕詞セクション（Goodpatch模写）
   ======================================== */
.services-intro-section {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-white);
    padding-top: 100px; /* ヘッダー分のスペース */
}

.services-intro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    text-align: center;
}

.services-intro-content {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.services-intro-headline {
    font-family: var(--font-family-display);
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--c-secondary);
    margin: 0;
}

.services-intro-em {
    color: var(--c-primary);
}

/* ========================================
   2️⃣ ざっくり事業紹介セクション（Goodpatch模写）
   ======================================== */
.services-our-work-section {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    background: var(--c-primary);
    color: var(--c-white);
    overflow: hidden;
}

.backdrop-scroll-static {
    position: relative;
    padding: var(--spacing-4xl) 0;
}

.backdrop-scroll-static-ripple-wrap {
    position: absolute;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.backdrop-scroll-static-ripple-wrap.before {
    top: 0;
}

.backdrop-scroll-static-ripple-wrap.after {
    bottom: 0;
}

.backdrop-scroll-static-ripple {
    position: absolute;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    background: var(--c-primary);
    left: 50%;
    transform: translateX(-50%);
}

.backdrop-scroll-static-ripple.before {
    top: -100%;
}

.backdrop-scroll-static-ripple.after {
    bottom: -100%;
}

.backdrop-scroll-static-background {
    position: relative;
    z-index: 2;
}

.services-our-work-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.services-our-work-intro {
    text-align: center;
}

.services-our-work-title {
    font-family: var(--font-family-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 var(--spacing-xl) 0;
}

.services-our-work-description {
    margin-bottom: var(--spacing-4xl);
}

.services-our-work-description p {
    font-size: clamp(16px, 1.8vw, 18px);
    line-height: 1.8;
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

.services-our-work-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-our-work-summary-item {
    display: flex;
    justify-content: center;
}

.services-our-work-summary-circle {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.services-our-work-circle-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    opacity: 0.9;
}

.services-our-work-circle-text {
    margin: 0;
}

.services-our-work-circle-text-num {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
}

.services-our-work-circle-text-unit {
    font-size: 24px;
    font-weight: 700;
    margin-left: 4px;
}

.services-our-work-circle-text-more {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
}

/* ========================================
   3️⃣ 自分たちの強みセクション
   ======================================== */
.our-strengths-section {
    padding: var(--spacing-4xl) 0;
    background: var(--c-white);
}

.our-strengths-content {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-family-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--c-secondary);
    text-align: center;
    margin: 0 0 var(--spacing-4xl) 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.strengths-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2xl);
}

.strength-item {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--c-gray-light);
    border-radius: 16px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.strength-item.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.strength-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: var(--c-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-white);
}

.strength-icon svg {
    width: 40px;
    height: 40px;
}

.strength-title {
    font-family: var(--font-family-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--c-primary);
    margin: 0 0 var(--spacing-lg) 0;
}

.strength-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-text);
    margin: 0;
}

/* ========================================
   4️⃣ 私たちのクライアントへの向き合い方セクション（Goodpatch模写）
   ======================================== */
.services-empowering-clients-section {
    padding: var(--spacing-4xl) 0;
    background: var(--c-gray-light);
}

.empowering-clients-content {
    max-width: 1000px;
    margin: 0 auto;
}

.empowering-clients-title-block {
    text-align: center;
    margin-bottom: var(--spacing-4xl);
}

.empowering-clients-title-en {
    font-family: var(--font-family-display);
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    color: var(--c-primary);
    margin: 0 0 var(--spacing-sm) 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.empowering-clients-title-jp {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    color: var(--c-secondary);
    margin: 0;
}

.empowering-clients-entries {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4xl);
}

.services-labelled-entry {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.services-labelled-entry.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.services-labelled-entry-label {
    font-family: var(--font-family-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--c-primary);
    margin: 0;
    text-align: center;
    padding-top: var(--spacing-md);
}

.services-labelled-entry-body {
    background: var(--c-white);
    border-radius: 16px;
    padding: var(--spacing-2xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.services-labelled-entry-image-block {
    width: 80px;
    height: 80px;
    background: var(--c-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-white);
    margin-bottom: var(--spacing-lg);
}

.services-labelled-entry-image-block svg {
    width: 40px;
    height: 40px;
}

.services-labelled-entry-title {
    font-family: var(--font-family-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--c-secondary);
    margin: 0 0 var(--spacing-sm) 0;
}

.services-labelled-entry-lede {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-primary);
    margin: 0 0 var(--spacing-lg) 0;
}

.services-labelled-entry-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-text);
    margin: 0;
}

/* ========================================
   5️⃣ サービス紹介セクション（NEXTAS模写）
   ======================================== */
.services-list-section {
    padding: var(--spacing-4xl) 0;
    background: var(--c-white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-4xl);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.section-title-en {
    font-family: var(--font-family-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    color: var(--c-secondary);
    margin: 0 0 var(--spacing-md) 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
}

.section-title-en::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--c-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: clamp(16px, 1.8vw, 18px);
    color: var(--c-text-light);
    margin: 0;
    font-weight: 500;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4xl);
    max-width: 1000px;
    margin: 0 auto;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-item.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.service-item:nth-child(even) {
    direction: rtl;
}

.service-item:nth-child(even) .service-content {
    direction: ltr;
}

.service-title {
    font-family: var(--font-family-display);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--c-primary);
    margin: 0 0 var(--spacing-lg) 0;
    grid-column: 1 / -1;
    text-align: center;
}

.service-thumbnail {
    position: relative;
}

.service-photo {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.service-photo img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.service-photo:hover img {
    transform: scale(1.05);
}

/* AEO Insight画像の位置調整 */
.aeo-insight-photo img {
    object-position: top center;
}

.service-content {
    padding: var(--spacing-lg);
}

.service-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--c-text);
    margin: 0;
}

/* ========================================
   アニメーション定義
   ======================================== */
[data-ani] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-ani].is-inview {
    opacity: 1;
    transform: translateY(0);
}

[data-ani="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

[data-ani="fade-up"].is-inview {
    opacity: 1;
    transform: translateY(0);
}

[data-ani-delay] {
    transition-delay: var(--ani-delay-custom, 0s);
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 1024px) {
    .services-our-work-summary {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .strengths-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .services-labelled-entry {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .services-labelled-entry-label {
        text-align: left;
        padding-top: 0;
    }
    
    .service-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .service-item:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .services-intro-section {
        min-height: 50vh;
        padding-top: 80px; /* モバイルヘッダー分のスペース */
    }
    
    .backdrop-scroll-static {
        padding: var(--spacing-2xl) 0;
    }
    
    .services-our-work-summary {
        gap: var(--spacing-lg);
    }
    
    .services-our-work-summary-circle {
        width: 150px;
        height: 150px;
    }
    
    .services-our-work-circle-text-num {
        font-size: 36px;
    }
    
    .services-our-work-circle-text-unit {
        font-size: 18px;
    }
    
    .strengths-grid {
        gap: var(--spacing-lg);
    }
    
    .strength-item {
        padding: var(--spacing-lg);
    }
    
    .empowering-clients-entries {
        gap: var(--spacing-2xl);
    }
    
    .services-labelled-entry-body {
        padding: var(--spacing-lg);
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    .section-title-en {
        font-size: clamp(28px, 3.5vw, 40px);
    }
    
    .section-subtitle {
        font-size: clamp(14px, 1.6vw, 16px);
    }
    
    .services-list {
        gap: var(--spacing-2xl);
    }
    
    .service-photo img {
        height: 250px;
    }
    
    .service-content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 640px) {
    .services-intro-section {
        padding-top: 70px; /* 小さなモバイル画面用 */
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .services-intro-container {
        padding: 0 var(--spacing-md);
    }
    
    .services-our-work-content {
        padding: 0 var(--spacing-md);
    }
    
    .services-our-work-summary-circle {
        width: 120px;
        height: 120px;
    }
    
    .services-our-work-circle-text-num {
        font-size: 28px;
    }
    
    .services-our-work-circle-text-unit {
        font-size: 16px;
    }
    
    .services-our-work-circle-title {
        font-size: 12px;
    }
    
    .strength-icon {
        width: 60px;
        height: 60px;
    }
    
    .strength-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .service-photo img {
        height: 200px;
    }
    
    .services-labelled-entry-image-block {
        width: 60px;
        height: 60px;
    }
    
    .services-labelled-entry-image-block svg {
        width: 30px;
        height: 30px;
    }
}

/* ========================================
   アクセシビリティ
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* フォーカス表示 */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* 高コントラストモード */
@media (prefers-contrast: high) {
    .strength-item,
    .services-labelled-entry-body {
        border: 2px solid var(--c-primary);
    }
}

/* 印刷用 */
@media print {
    .services-our-work-section {
        background: white !important;
        color: black !important;
    }
    
    .services-our-work-summary-circle {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }
}
