/* ========================================
   株式会社Codeforce トップページスタイル
   Goodpatch風デザイン準拠
   基調色: #096fc8
   ======================================== */

/* 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;

    /* スペーシングスケール */
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-7: 72px;
    --space-8: 96px;

    /* コンテナ幅 */
    --container-max: 1200px;
    --container-wide: 1400px;

    /* フォント */
    --font-jp: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    --font-en: 'Poppins', sans-serif;
}

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

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: var(--font-jp);
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-white);
}

/* メインコンテンツ */
.main {
    padding-top: 0;
    margin-top: 0;
}

/* ヒーローセクションがヘッダーの下に表示されるように調整 */
.hero {
    margin-top: 0;
}

/* ========================================
   ① ヒーローセクション - ガチキャリアサイトから流用
   ======================================== */
.hero {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 100px; /* ヘッダー分のスペース */
    padding-bottom: clamp(16px, 3vh, 40px);
}

@media (max-width: 640px) {
    .hero {
        height: 100vh;
        min-height: 100vh;
        align-items: center;
        padding-top: 80px; /* モバイルヘッダー分のスペース */
    }
}

/* 背景（白基調 + 同心円 + ドット） */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bg-grad {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%,
            #ffffff 0% 14%,
            #f4f6f8 14% 48%,
            #eef2f5 48% 84%,
            #e6eaee 84% 100%);
}

.bg-rings {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(9, 111, 200, .08) 24%, transparent 24%),
        radial-gradient(circle at center, rgba(9, 111, 200, .06) 48%, transparent 48%),
        radial-gradient(circle at center, rgba(9, 111, 200, .04) 72%, transparent 72%),
        radial-gradient(circle at center, rgba(9, 111, 200, .02) 92%, transparent 92%);
    mix-blend-mode: multiply;
    opacity: .9;
}

.hero__dots {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: block;
    width: 100%;
    height: 100%;
}

/* コンテンツ */
.hero__content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: clamp(16px, 4vw, 40px) 16px;
}

/* 浮遊カード */
.hero__cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.hero__cards .card {
    position: absolute;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(9, 111, 200, 0.15), rgba(9, 111, 200, 0.05));
    box-shadow: 0 8px 32px rgba(9, 111, 200, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(9, 111, 200, 0.1);
    animation: float 6s ease-in-out infinite;
}

.hero__cards .card.c1 {
    width: 120px;
    height: 80px;
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.hero__cards .card.c2 {
    width: 100px;
    height: 100px;
    top: 25%;
    right: 12%;
    animation-delay: 1s;
}

.hero__cards .card.c3 {
    width: 90px;
    height: 110px;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.hero__cards .card.c4 {
    width: 130px;
    height: 90px;
    bottom: 15%;
    right: 5%;
    animation-delay: 1.5s;
}

.hero__cards .card.c5 {
    width: 80px;
    height: 80px;
    top: 45%;
    right: 8%;
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* スクロールインジケーター */
.scroll-indicator {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.scroll-indicator .label {
    color: #000000 !important;
    font-size: clamp(25px, 3.5vw, 50px) !important;
    font-weight: 700 !important;
    font-family: var(--font-jp) !important;
    line-height: 1.4;
    display: block;
    margin-bottom: 1.0rem;
}

.scroll-indicator .label-en {
    font-family: var(--font-en) !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em;
    line-height: 1.08;
    font-size: clamp(26px, 4vw, 64px) !important;
}

.scroll-indicator .label-jp {
    font-size: clamp(12px, 1.5vw, 18px) !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    margin-top: .35rem;
    color: rgba(0, 0, 0, .92);
}

/* ========================================
   ② Vision・Mission セクション
   ======================================== */
.vision-mission-section {
    position: relative;
    background: var(--c-white);
    padding: var(--space-8) 0;
    overflow: hidden;
}

.vision-mission-intersection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
}

.center-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.company-statement {
    padding: var(--space-6) 0;
}

.stack-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.statement-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-7);
    align-items: center;
}

.statement-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    max-width: 800px;
}

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

.statement-content {
    text-align: center;
}

.statement-label {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--c-primary);
    margin-bottom: var(--space-3);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.statement-body {
    font-size: clamp(20px, 2.8vw, 32px);
    font-weight: 700;
    line-height: 1.6;
    color: var(--c-secondary);
    display: block;
}

.inline-block {
    display: inline-block;
    margin-right: 0.3em;
}

.statement-description {
    margin-top: var(--space-5);
}

.statement-lede {
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.9;
    color: var(--c-text);
    margin-bottom: var(--space-5);
    text-align: center;
}

.sm-inline-block {
    display: inline-block;
}

@media (min-width: 640px) {
    .sm-inline-block {
        display: inline;
    }
}

/* ========================================
   ③ Services セクション
   ======================================== */
.services-section {
    position: relative;
    background: var(--c-gray-light);
    padding: var(--space-8) 0;
    overflow: hidden;
}

.services-intersection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
}

.center-container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.services-teaser {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    align-items: center;
}

@media (max-width: 1024px) {
    .services-teaser {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
}

.services-media-block {
    width: 100%;
    height: 500px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="400" height="400" fill="%23096fc8"/><rect width="400" height="400" fill="url(%23grid)"/><circle cx="100" cy="100" r="60" fill="rgba(255,255,255,0.1)"/><circle cx="300" cy="200" r="80" fill="rgba(255,255,255,0.1)"/><circle cx="200" cy="320" r="50" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 60px rgba(9, 111, 200, 0.2);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.services-media-block.is-inview {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .services-media-block {
        height: 350px;
    }
}

.services-text-block {
    padding: var(--space-5);
}

.stack-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.subhead-small {
    font-family: var(--font-en);
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.subhead-brand {
    color: var(--c-primary);
}

.services-title {
    font-size: clamp(24px, 3.5vw, 42px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-secondary);
    margin: 0 0 var(--space-4) 0;
}

.services-lede {
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.9;
    color: var(--c-text);
    margin: 0;
}

.text-center-md-left {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-md-left {
        text-align: left;
    }
}

/* ========================================
   ④ Work セクション（事例紹介）
   ======================================== */
.work-section {
    position: relative;
    background: var(--c-white);
    padding: var(--space-8) 0;
    overflow: hidden;
}

.work-intersection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
}

.work-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.subhead-jp-medium {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 500;
    color: var(--c-secondary);
    margin-top: var(--space-2);
}

.mt-spacer {
    margin-top: var(--space-5);
}

.work-grid-container {
    position: relative;
}

.work-grid-base {
    position: relative;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

.work-card {
    background: var(--c-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.work-card.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(9, 111, 200, 0.15);
}

.work-card-media {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
    background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?q=80&w=800');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.work-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(9, 111, 200, 0.4), rgba(11, 127, 230, 0.2));
    transition: opacity 0.3s ease;
}

.work-card:hover .work-card-media::after {
    opacity: 0.6;
}

.work-card-media-2 {
    background-image: url('https://images.unsplash.com/photo-1557804506-669a67965ba0?q=80&w=800');
}

.work-card-media-3 {
    background-image: url('https://images.unsplash.com/photo-1553877522-43269d4ea984?q=80&w=800');
}

.work-card-media-4 {
    background-image: url('https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=800');
}

.work-card-text {
    padding: var(--space-4);
}

.work-card-expertises {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-3) 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.work-expertise {
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 600;
    color: var(--c-primary);
    background: rgba(9, 111, 200, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

.work-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 var(--space-2) 0;
    line-height: 1.4;
}

.work-card-link {
    color: var(--c-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.work-card-link:hover {
    color: var(--c-primary);
}

.work-card-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-text);
    margin: 0;
}

.mt-large {
    margin-top: var(--space-7);
}

.text-center {
    text-align: center;
}

/* ========================================
   ⑤ Recruit セクション（採用）
   ======================================== */
.recruit-section {
    position: relative;
    background: transparent;
    color: var(--c-white);
    padding: 0;
    overflow: hidden;
}

/* 円弧状の背景 */
.recruit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--c-primary);
    clip-path: ellipse(120% 120% at 50% 100%);
    z-index: 1;
}

.recruit-ripple-wrap {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    z-index: 2;
}

.recruit-ripple-wrap.before {
    margin-bottom: -1px;
}

.recruit-ripple-wrap.after {
    margin-top: -1px;
}

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

.recruit-ripple-wrap.before .recruit-ripple-circle {
    top: -100%;
}

.recruit-ripple-wrap.after .recruit-ripple-circle {
    bottom: -100%;
}

.recruit-background {
    position: relative;
    padding: var(--space-8) 0;
}

.recruit-body {
    position: relative;
    padding: var(--space-7) 0;
    z-index: 3;
}

.recruit-leftbleed {
    width: 100%;
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 3;
}

.recruit-leftbleed-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.recruit-leftbleed-image {
    width: 100%;
    height: 400px;
    border-radius: 24px;
    background: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=1200');
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: -200px;
    position: relative;
    z-index: 4;
}

.recruit-leftbleed-image.is-inview {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .recruit-leftbleed-image {
        height: 300px;
        margin-top: -150px;
    }
    
    .recruit-section::before {
        clip-path: ellipse(100% 100% at 50% 100%);
    }
}

.mt-spacer-recruit {
    margin-top: var(--space-5);
}

.recruit-statement {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 3;
}

.recruit-statement.is-inview {
    opacity: 1;
    transform: translateY(0);
}

.stack-recruit {
    margin-bottom: var(--space-6);
}

.recruit-item p {
    margin: 0 0 var(--space-4) 0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.recruit-label {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--c-white);
    margin-right: 8px;
}

.recruit-body-text {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--c-white);
    display: block;
    margin: var(--space-4) 0;
}

.recruit-description {
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.95);
    margin-top: var(--space-4);
}

.recruit-cta {
    margin-top: var(--space-6);
}

/* ========================================
   共通ボタンスタイル
   ======================================== */
.btn-arrow,
.btn-arrow-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-family: var(--font-jp);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-arrow {
    background: var(--c-primary);
    color: var(--c-white);
    border: 2px solid var(--c-primary);
}

.btn-arrow:hover {
    background: var(--c-white);
    color: var(--c-black);
    border-color: var(--c-white);
    transform: translateY(-2px);
}

.btn-arrow-white {
    background: var(--c-white);
    color: var(--c-primary);
    border: 2px solid var(--c-white);
}

.btn-arrow-white:hover {
    background: transparent;
    color: var(--c-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.icon-arrow {
    display: flex;
    align-items: center;
    width: 20px;
    height: 20px;
}

.icon-arrow svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* ========================================
   アニメーション定義
   ======================================== */
[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="fade-left"] {
    opacity: 0;
    transform: translateX(-30px);
}

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

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

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

/* アニメーション遅延 */
[data-ani-delay] {
    transition-delay: var(--ani-delay-custom, 0s);
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 1024px) {
    .hero__content {
        padding: clamp(20px, 5vw, 40px) 16px;
    }

    .statement-body {
        font-size: clamp(18px, 2.5vw, 28px);
    }

    .statement-label {
        font-size: clamp(16px, 2vw, 20px);
    }

    .services-title {
        font-size: clamp(22px, 3vw, 36px);
    }
}

@media (max-width: 768px) {
    .hero {
        height: 100vh;
        min-height: 100vh;
    }

    .hero__content {
        padding: clamp(24px, 6vw, 32px) 16px;
    }

    .scroll-indicator {
        bottom: 8vh;
    }

    .statement-items {
        gap: var(--space-6);
    }

    .statement-body {
        font-size: clamp(16px, 2.2vw, 24px);
    }

    .statement-label {
        font-size: clamp(14px, 1.8vw, 18px);
    }

    .services-teaser {
        grid-template-columns: 1fr;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .recruit-body-text {
        font-size: clamp(24px, 3.5vw, 36px);
    }
}

@media (max-width: 640px) {
    .hero__cards .card {
        display: none;
    }

    .statement-items {
        gap: var(--space-4);
    }

    .work-card-media {
        height: 200px;
    }
}

/* ========================================
   アクセシビリティ
   ======================================== */
@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;
}

/* CLS防止 */
.hero,
.vision-mission-section,
.services-section,
.work-section,
.recruit-section {
    contain: layout style paint;
}

