/**
 * トップページ CSS
 */

/* ============================================================
   ヒーロー — モザイク/コラージュレイアウト
   ============================================================ */
.p-hero {
    position: relative;
    z-index: 1;
    height: auto;
    min-height: 400px;
    overflow: hidden;
    background: #fff;
}

/* --- モザイクコンテナ --- */
.p-hero__mosaic {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* --- 共通パネルスタイル --- */
.p-hero__panel {
    position: absolute;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: hero-panel-in 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.p-hero__panel--left   { animation-delay: 0.1s; }
.p-hero__panel--center { animation-delay: 0.3s; }
.p-hero__panel--right-top    { animation-delay: 0.5s; }
.p-hero__panel--right-bottom { animation-delay: 0.7s; }

@keyframes hero-panel-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 画像パネル共通 --- */
.p-hero__panel-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
}

.p-hero__panel:hover .p-hero__panel-img {
    transform: scale(1.05);
}

/* --- モバイルデフォルト: 縦積み --- */
.p-hero__mosaic {
    display: flex;
    flex-direction: column;
}

.p-hero__panel--left,
.p-hero__panel--center,
.p-hero__panel--right-top,
.p-hero__panel--right-bottom {
    position: relative;
    width: 100%;
}

.p-hero__panel--left {
    height: 280px;
    flex-shrink: 0;
}

.p-hero__panel--center {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.97);
    flex-shrink: 0;
}

.p-hero__panel--right-top,
.p-hero__panel--right-bottom {
    display: none;
}

/* --- 中央テキストパネル --- */
.p-hero__panel-text {
    text-align: center;
}

.p-hero__catch {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: 0.08em;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.p-hero__sub {
    font-size: 0.875rem;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

/* --- NEWSバー --- */
.p-hero__news-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    z-index: 10;
    gap: 0.75rem;
    flex-shrink: 0;
}

.p-hero__news-label {
    font-family: var(--font-family-en);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-accent-green);
    letter-spacing: 0.1em;
    flex-shrink: 0;
    padding: 0.25em 0.75em;
    border: 2px solid var(--color-accent-green);
    border-radius: var(--radius-sm);
    line-height: 1;
}

.p-hero__news-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-base);
}

a.p-hero__news-content:hover {
    color: var(--color-primary);
}

.p-hero__news-date {
    font-family: var(--font-family-en);
    font-size: 0.8125rem;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.p-hero__news-title {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-hero__news-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    flex-shrink: 0;
    transition: background-color var(--transition-base), transform var(--transition-pop);
    text-decoration: none;
}

.p-hero__news-arrow:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
    color: #fff;
}

/* --- デスクトップ: モザイクレイアウト + clip-path --- */
@media (min-width: 1024px) {
    .p-hero {
        height: 80vh;
        min-height: 550px;
        max-height: 800px;
    }

    .p-hero__news-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        backdrop-filter: blur(8px);
        padding: 0.75rem 1.25rem;
        gap: 1rem;
    }

    .p-hero__mosaic {
        display: block;
    }

    .p-hero__panel--left,
    .p-hero__panel--center,
    .p-hero__panel--right-top,
    .p-hero__panel--right-bottom {
        position: absolute;
        display: block;
    }

    .p-hero__panel--left {
        top: 0;
        left: 0;
        width: 44%;
        height: 100%;
        clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
    }

    .p-hero__panel--center {
        top: 0;
        left: 30%;
        width: 40%;
        height: 100%;
        background: rgba(255, 255, 255, 0.96);
        clip-path: polygon(12% 0, 88% 0, 72% 100%, 28% 100%);
        z-index: 2;
        padding: 0;
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    .p-hero__catch {
        writing-mode: vertical-rl;
        font-size: 2rem;
        letter-spacing: 0.15em;
        line-height: 2;
        margin-bottom: 0;
        position: relative;
        padding: 0 1.5rem;
    }

    .p-hero__catch::before,
    .p-hero__catch::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 6px;
        background-image: radial-gradient(circle, var(--color-text-light) 2px, transparent 2px);
        background-size: 6px 14px;
        background-repeat: repeat-y;
        opacity: 0.35;
    }

    .p-hero__catch::before {
        right: 0;
    }

    .p-hero__catch::after {
        left: 0;
    }

    .p-hero__sub {
        display: none;
    }

    .p-hero__panel--right-top {
        top: 0;
        right: 0;
        width: 44%;
        height: 55%;
        clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 80%);
    }

    .p-hero__panel--right-bottom {
        bottom: 0;
        right: 0;
        width: 44%;
        height: 50%;
        clip-path: polygon(0 22%, 100% 0, 100% 100%, 14% 100%);
    }

    .p-hero__panel--right-bottom .p-hero__panel-img {
        background-position: 70% 90%;
    }
}

/* --- タブレット: 簡易2カラム --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .p-hero {
        height: 60vh;
        min-height: 450px;
    }

    .p-hero__mosaic {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto;
        height: 100%;
    }

    .p-hero__panel--left {
        grid-row: 1 / 3;
        min-height: 0;
    }

    .p-hero__panel--center {
        padding: 1.5rem 1rem;
    }

    .p-hero__panel--right-top,
    .p-hero__panel--right-bottom {
        display: block;
        width: 100%;
        height: 100%;
    }

    .p-hero__catch {
        font-size: 1.375rem;
    }
}

/* ============================================================
   会社紹介セクション — クリエイティブレイアウト
   ============================================================ */
.p-home-about {
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #f8fbff 0%, #fff 40%, #f0faf4 100%);
}

/* 浮遊する装飾円 */
.p-home-about::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 216, 77, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: about-float-1 15s ease-in-out infinite;
}

.p-home-about::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45, 190, 110, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: about-float-2 20s ease-in-out infinite;
}

@keyframes about-float-1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 40px); }
}

@keyframes about-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}

.p-home-about__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
}

/* About セクション見出しを大きく */
.p-home-about .c-section-heading {
    margin-bottom: var(--spacing-xl);
}

.p-home-about .c-section-heading__en {
    font-size: 3.5rem;
}

.p-home-about .c-section-heading__ja {
    font-size: 2rem;
}

.p-home-about__content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

/* --- 画像エリア：大きく、立体的に --- */
.p-home-about__image {
    position: relative;
}

/* 装飾フレーム */
.p-home-about__image::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: 12px;
    bottom: 12px;
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* ドットパターン装飾 */
.p-home-about__image::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--color-primary) 1.5px, transparent 1.5px);
    background-size: 10px 10px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.p-home-about__image img {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-lg);
    width: 100%;
    box-shadow: 0 20px 60px rgba(13, 79, 140, 0.15);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.p-home-about__image:hover img {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(13, 79, 140, 0.2);
}

/* --- テキストエリア --- */
.p-home-about__text {
    position: relative;
}

.p-home-about__text p {
    margin-bottom: 1.75rem;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--color-text);
    /* 文節単位で改行し、最終行が1文字だけになるのを防ぐ */
    word-break: auto-phrase;
    text-wrap: pretty;
    overflow-wrap: anywhere;
}

/* 最初の段落を大きく・太く */
.p-home-about__text p:first-of-type {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.9;
    position: relative;
    padding-left: 1.25rem;
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, var(--color-primary), var(--color-accent-green)) 1;
}

.p-home-about__text .c-button {
    margin-top: 0.5rem;
    font-size: 1rem;
    padding: 1rem 2rem;
}

/* ============================================================
   事業紹介セクション — 不均一クリエイティブレイアウト
   ============================================================ */
.p-home-business {
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-bg-light);
    position: relative;
    overflow: hidden;
}

/* 背景ドットパターン + 半透明オーバーレイ */
.p-home-business::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--color-primary) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.06;
    pointer-events: none;
}

/* 斜めストライプ装飾 */
.p-home-business::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(26, 111, 196, 0.03) 60deg, transparent 120deg);
    border-radius: 50%;
    pointer-events: none;
    animation: biz-rotate 40s linear infinite;
}

@keyframes biz-rotate {
    to { transform: rotate(360deg); }
}

.p-home-business__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
    z-index: 1;
}

/* 見出しを大きく */
.p-home-business .c-section-heading {
    margin-bottom: var(--spacing-xl);
}

.p-home-business .c-section-heading__en {
    font-size: 3.5rem;
}

.p-home-business .c-section-heading__ja {
    font-size: 2rem;
}

/* --- グリッド：モバイルは縦積み --- */
.p-home-business__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

/* --- カード共通 --- */
.p-home-business__card {
    display: block;
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

/* 左サイドにカラーバー */
.p-home-business__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    z-index: 2;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.p-home-business__card:nth-child(1)::before {
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-light));
}

.p-home-business__card:nth-child(2)::before {
    background: linear-gradient(180deg, var(--color-accent), var(--color-accent-yellow));
}

.p-home-business__card:nth-child(3)::before {
    background: linear-gradient(180deg, var(--color-accent-green), var(--color-accent-green-light));
}

/* ナンバリングバッジ */
.p-home-business__card::after {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--font-family-en);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    z-index: 3;
    pointer-events: none;
    opacity: 0.08;
}

.p-home-business__card:nth-child(1)::after { content: '01'; color: var(--color-primary); }
.p-home-business__card:nth-child(2)::after { content: '02'; color: var(--color-accent); }
.p-home-business__card:nth-child(3)::after { content: '03'; color: var(--color-accent-green); }

.p-home-business__card:hover {
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.12);
    transform: translateY(-10px);
    color: inherit;
}

.p-home-business__card-image {
    overflow: hidden;
    aspect-ratio: 640 / 400;
}

.p-home-business__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.p-home-business__card:hover .p-home-business__card-image img {
    transform: scale(1.1);
}

.p-home-business__card-body {
    padding: 1.5rem 1.75rem;
}

.p-home-business__card-title {
    font-size: 1.375rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.p-home-business__card-text {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.p-home-business__card-more {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: gap var(--transition-base);
}

.p-home-business__card:hover .p-home-business__card-more {
    gap: 1em;
}

/* ============================================================
   お知らせセクション
   ============================================================ */
.p-home-news {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-blue);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(26, 111, 196, 0.02) 40px,
            rgba(26, 111, 196, 0.02) 80px
        );
    position: relative;
}

.p-home-news__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.p-home-news__list {
    margin-bottom: var(--spacing-md);
}

.p-home-news__item {
    border-bottom: 1px solid var(--color-border);
}

.p-home-news__item:first-child {
    border-top: 1px solid var(--color-border);
}

.p-home-news__link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 1rem 0;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.p-home-news__link:hover {
    color: var(--color-primary);
}

.p-home-news__date {
    font-family: var(--font-family-en);
    font-size: 0.8125rem;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.p-home-news__category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    padding: 0.2em 0.875em;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
}

.p-home-news__title {
    font-size: 0.9375rem;
    flex: 1;
    min-width: 0;
}

.p-home-news__more {
    margin-top: var(--spacing-md);
}

/* ============================================================
   採用情報セクション
   ============================================================ */
.p-home-recruit {
    position: relative;
    padding: var(--spacing-xxl) 0;
    overflow: hidden;
}

.p-home-recruit__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.p-home-recruit__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 79, 140, 0.8) 0%, rgba(45, 190, 110, 0.7) 100%);
}

.p-home-recruit__overlay::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 7s ease-in-out infinite;
    pointer-events: none;
}

.p-home-recruit__overlay::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 10%;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 5s ease-in-out infinite reverse;
    pointer-events: none;
}

.p-home-recruit__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.p-home-recruit__text {
    font-size: 1.125rem;
    color: var(--color-text-white);
    margin-bottom: var(--spacing-md);
}

/* ============================================================
   レスポンシブ（トップページ）
   ============================================================ */
@media (min-width: 768px) {
    .p-home-about__content {
        grid-template-columns: 55% 1fr;
        gap: var(--spacing-lg);
    }

    .p-home-business__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    .p-home-news__link {
        flex-wrap: nowrap;
    }
}

