/* connection.css */

.connection-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--light-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
}

.connection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.connection-content-wrapper {
    position: relative;
    z-index: 5;
    padding: 80px 0;
}

.connection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.connection-content {
    max-width: 600px;
}

.connection-tagline {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
    padding-left: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.connection-tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
}

.connection-hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.2s;
}

.connection-hero h1 span {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.connection-hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(224, 32, 32, 0.2);
    z-index: -1;
}

.connection-hero p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.3s;
}

.connection-buttons {
    display: flex;
    gap: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.4s;
}

.connection-illustration {
    position: relative;
    height: 550px;
    transform: translateX(30px);
    opacity: 0;
    animation: fadeInRight 0.8s ease forwards 0.5s;
}

.connection-illustration-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.connection-people {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 共通アイコン */
.connection-person,
.connection-client {
    position: absolute;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 3px solid white;
    z-index: 4;
    animation: float 6s ease-in-out infinite;
}

.connection-person::after,
.connection-client::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}


/* === 人 === */
.connection-person.person-a {
    top: 7%;
    left: 60%;
    animation-delay: 0s;
    width: 210px;
    height: 210px;
}

.connection-person.person-b {
    top: 28%;
    right: 6%;
    animation-delay: 6s;
    width: 230px;
    height: 230px;
}

.connection-person.person-c {
    bottom: 45%;
    left: 52%;
    animation-delay: 2s;
    width: 200px;
    height: 200px;
}

/* === クライアント === */
.connection-client.client-a {
    top: 55%;
    right: 8%;
    animation-delay: 1s;
    width: 230px;
    height: 230px;
}

.connection-client.client-b {
    top: 75%;
    left: 74%;
    width: 170px;
    height: 170px;
}

.connection-client.client-c {
    top: 53%;
    left: 60%;
    animation-delay: 2s;
    width: 270px;
    height: 270px;
}


.connection-client.client-d {
    top: 5%;
    right: 17%;
    animation-delay: 5s;
    width: 170px;
    height: 170px;
}


.company-hub {
    position: absolute;
    top: 50%;
    left: 75%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 5px 30px rgba(224, 32, 32, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    animation: pulse 3s infinite ease-in-out;
    border: 4px solid rgba(224, 32, 32, 0.3);
    overflow: hidden;
}


.pulse-ring {
    position: absolute;
    top: 50%;
    left: 75%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(224, 32, 32, 0.1);
    transform: translate(-50%, -50%) scale(1);
    animation: pulseWave 6s infinite;
    z-index: 1;
}

.pulse-ring.delay-1 {
    animation-delay: 2s;
}

.pulse-ring.delay-2 {
    animation-delay: 4s;
}

@media (max-width: 1440px) {

    /* === 人 === */
    .connection-person.person-a {
        top: 8%;
        left: 60%;
        width: 120px;
        height: 120px;
    }

    .connection-person.person-b {
        top: 25%;
        right: 6%;
        width: 130px;
        height: 130px;
    }

    .connection-person.person-c {
        bottom: 45%;
        left: 50%;
        width: 110px;
        height: 110px;
    }

    /* === クライアント === */
    .connection-client.client-a {
        top: 55%;
        right: 10%;
        width: 130px;
        height: 130px;
    }

    .connection-client.client-b {
        top: 75%;
        left: 70%;
        width: 90px;
        height: 90px;
    }

    .connection-client.client-c {
        top: 55%;
        left: 55%;
        width: 170px;
        height: 170px;
    }

    .connection-client.client-d {
        top: 7%;
        right: 14%;
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 1025px) {

    /* === 人 === */
    .connection-person.person-a {
        top: 1%;
        left: 68%;
        width: 110px;
        height: 110px;
    }

    .connection-person.person-b {
        top: 22%;
        left: 84%;
        width: 120px;
        height: 120px;
    }

    .connection-person.person-c {
        display: none;
    }

    /* === クライアント === */
    .connection-client.client-a {
        top: 58%;
        left: 86%;
        width: 120px;
        height: 120px;
    }

    .connection-client.client-b {
        display: none;
    }

    .connection-client.client-c {
        top: 63%;
        left: 63%;
        width: 130px;
        height: 130px;
    }

    .connection-client.client-d {
        display: none;
    }
}

@media (max-width: 768px) {
    .connection-person.person-a {
        top: 0.5%;
        left: 65%;
        width: 90px;
        height: 90px;
    }

    .connection-person.person-b {
        top: 35%;
        left: 83%;
        width: 75px;
        height: 75px;
    }

    .connection-client.client-a {
        top: 80%;
        left: 80%;
        width: 90px;
        height: 90px;
    }

    .connection-client.client-c {
        top: 85%;
        left: 45%;
        width: 130px;
        height: 130px;
    }

    .connection-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .connection-content {
        max-width: 100%;
        padding: 0 20px;
    }

    .connection-illustration {
        transform: none;
        margin-top: 40px;
    }

    .connection-hero {
        padding-left: 0;
        padding-right: 0;
    }

    .company-hub {
        display: none;
    }

}

.company-hub img {
    width: 110px;
    height: auto;
}

.company-hub::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.connection-ring,
.middle-ring,
.outer-ring {
    position: absolute;
    top: 50%;
    left: 75%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed;
    animation: rotate 60s linear infinite;
}

.connection-ring {
    width: 320px;
    height: 320px;
    border-color: rgba(224, 32, 32, 0.3);
}

.middle-ring {
    width: 400px;
    height: 400px;
    border-color: rgba(224, 32, 32, 0.2);
    animation-duration: 80s;
    animation-direction: reverse;
}

.outer-ring {
    width: 480px;
    height: 480px;
    border-color: rgba(224, 32, 32, 0.1);
    animation-duration: 100s;
}

/* ラベル */
.connection-label {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 6;
    pointer-events: none;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
}

.connection-person:hover .connection-label,
.connection-client:hover .connection-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}



/* アニメーション */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 5px 30px rgba(224, 32, 32, 0.2);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 5px 30px rgba(224, 32, 32, 0.4);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(3px, -5px);
    }

    50% {
        transform: translate(-3px, 5px);
    }

    75% {
        transform: translate(3px, 5px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes pulseWave {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3.5);
    }
}