/* ========================================
   Opening Animation - Center Expansion
   ======================================== */

/* --- 親コンテナ --- */
.circle-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: auto;           /* 幅固定を外す */
    height: auto;          /* 高さ固定を外す */
    overflow: visible;     /* はみ出しを表示 */
    z-index: 100;
}

/* --- メインの円 --- */
.main-circle {
    position: fixed;                     /* 画面全体を基準に */
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border-radius: 1000px;              /* scaleしても正円を維持 */
    background-color: white;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;     /* 中心を基準に拡大 */
    animation: expandFromCenter 2s cubic-bezier(0.76, 0, 0.24, 1) 0.8s forwards;
}

/* --- 輪っかのアニメーション --- */
.pulse-ring {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border-radius: 1000px;              /* scaleしても正円 */
    border: 4px solid rgba(255, 255, 255, 0.3);
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    animation: expandRingFromCenter 2s cubic-bezier(0.76, 0, 0.24, 1) 0.8s forwards;
}

/* --- 内側のパルス --- */
.inner-pulse {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 1000px;
    background: rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes expandFromCenter {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) scale(5); /* 縦横同時に拡大 */
    }
}

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


/* Catch Copy Animation */
#catchCopy {
    transition: opacity 1s ease-out;
}

#catchCopy.show-catch-copy {
    opacity: 1 !important;
}

@keyframes expandFromCenter {
    0% {
        width: 120px;
        height: 120px;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        width: 5000px;
        height: 5000px;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes expandRingFromCenter {
    0% {
        width: 120px;
        height: 120px;
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        width: 300px;
        height: 300px;
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        width: 5000px;
        height: 5000px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

#openingAnimation {
    animation: fadeOutOpening 0.8s ease-out 2.8s forwards;
}

@keyframes fadeOutOpening {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* ========================================
   Navigation Bar Styles
   ======================================== */

#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#navbar a {
    position: relative;
}

#navbar a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: width 0.3s ease;
}

#navbar a:hover::after {
    width: 100%;
}

/* Mobile Menu Animation */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Hero Section
   ======================================== */

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation: float1 15s infinite linear;
}

.animated-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    top: 60%;
    right: 15%;
    animation: float2 18s infinite linear;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(50px, -50px) scale(1.2);
        opacity: 0.3;
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(-70px, 70px) scale(1.2);
        opacity: 0.3;
    }
}

.hero-content {
    opacity: 0;
    transform: translateX(100px);
    animation: slideInRight 1s ease-out 0.5s forwards;
}

.hero-content h1 {
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.hero-content p {
    animation: fadeInUp 0.8s ease-out 1.1s backwards;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    animation: bounce 2s infinite;
}

.scroll-dot {
    animation: scrollDot 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(12px);
    }
}

/* ========================================
   Services Section
   ======================================== */

.service-card {
    opacity: 0;
    transform: translateY(50px);
}

.service-card.visible {
    animation: fadeInSection 0.8s ease-out forwards;
}

.service-circle {
    opacity: 0;
}

.service-card.visible .service-circle {
    animation: rotateScaleIn 0.8s ease-out forwards;
}

.circle-wrapper {
    transition: transform 0.3s ease;
}

.circle-wrapper:hover {
    transform: scale(1.05) rotate(5deg);
}

@keyframes rotateScaleIn {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Particles Animation */
.particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particle1 3s infinite;
}

.particles::before {
    animation: particle1 3s infinite;
}

.particles::after {
    animation: particle2 3s 0.2s infinite;
}

@keyframes particle1 {
    0%, 100% {
        transform: translate(-6px, -6px) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(200px, 0) scale(1);
        opacity: 0.8;
    }
}

@keyframes particle2 {
    0%, 100% {
        transform: translate(-6px, -6px) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(0, 200px) scale(1);
        opacity: 0.8;
    }
}

.service-description {
    opacity: 0;
}

.service-card.visible .service-description {
    animation: slideInLeft 0.8s ease-out 0.2s forwards;
}

.service-card:nth-child(even).visible .service-description {
    animation: slideInRight 0.8s ease-out 0.2s forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-badge {
    opacity: 0;
}

.service-card.visible .service-badge {
    animation: scaleIn 0.5s ease-out 0.4s forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.service-item {
    opacity: 0;
    transform: translateX(20px);
}

.service-card.visible .service-item:nth-child(1) {
    animation: slideInItem 0.5s ease-out 0.8s forwards;
}

.service-card.visible .service-item:nth-child(2) {
    animation: slideInItem 0.5s ease-out 0.9s forwards;
}

.service-card.visible .service-item:nth-child(3) {
    animation: slideInItem 0.5s ease-out 1s forwards;
}

.service-card.visible .service-item:nth-child(4) {
    animation: slideInItem 0.5s ease-out 1.1s forwards;
}

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

/* ========================================
   Achievements Section
   ======================================== */

.partner-card {
    transition: all 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Company Section
   ======================================== */

.company-image {
    opacity: 0;
    transform: translateX(-100px);
}

.company-section.visible .company-image {
    animation: slideInLeft 0.8s ease-out forwards;
}

.company-info {
    opacity: 0;
    transform: translateX(100px);
}

.company-section.visible .company-info {
    animation: slideInRight 0.8s ease-out 0.2s forwards;
}

.info-item {
    opacity: 0;
    transform: translateY(20px);
}

.company-section.visible .info-item:nth-child(1) {
    animation: fadeInUp 0.5s ease-out 0.3s forwards;
}

.company-section.visible .info-item:nth-child(2) {
    animation: fadeInUp 0.5s ease-out 0.4s forwards;
}

.company-section.visible .info-item:nth-child(3) {
    animation: fadeInUp 0.5s ease-out 0.5s forwards;
}

.company-section.visible .info-item:nth-child(4) {
    animation: fadeInUp 0.5s ease-out 0.6s forwards;
}

.company-section.visible .info-item:nth-child(5) {
    animation: fadeInUp 0.5s ease-out 0.7s forwards;
}

.company-section.visible .info-item:nth-child(6) {
    animation: fadeInUp 0.5s ease-out 0.8s forwards;
}

.company-section.visible .info-item:nth-child(7) {
    animation: fadeInUp 0.5s ease-out 0.9s forwards;
}

.mission-text {
    opacity: 0;
    transform: translateY(20px);
}

.company-section.visible .mission-text {
    animation: fadeInUp 0.5s ease-out 1s forwards;
}

.decorative-blob-1 {
    animation: blobPulse1 4s infinite;
}

.decorative-blob-2 {
    animation: blobPulse2 5s infinite 1s;
}

@keyframes blobPulse1 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

@keyframes blobPulse2 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

/* ========================================
   Contact Section
   ======================================== */

.contact-bg::before,
.contact-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    animation: floatContact 15s infinite linear;
}

.contact-bg::before {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 5%;
    animation: floatContact1 15s infinite linear;
}

.contact-bg::after {
    width: 500px;
    height: 500px;
    bottom: 10%;
    right: 5%;
    animation: floatContact2 20s infinite linear;
}

@keyframes floatContact1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.05;
    }
    50% {
        transform: translate(100px, -100px) scale(1.3);
        opacity: 0.15;
    }
}

@keyframes floatContact2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.05;
    }
    50% {
        transform: translate(-150px, 150px) scale(1.3);
        opacity: 0.15;
    }
}

.contact-card {
    opacity: 0;
    transform: translateY(50px);
}

.contact-section.visible .contact-card {
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.mail-icon {
    animation: iconRotate 3s infinite;
}

@keyframes iconRotate {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-5deg);
    }
}

.contact-button {
    transition: all 0.3s ease;
}

.contact-button:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.contact-button:active {
    transform: scale(0.95);
}

.contact-button:hover .arrow-icon {
    transform: translateX(8px);
}

.arrow-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.contact-info {
    opacity: 0;
    transform: translateY(30px);
}

.contact-section.visible .contact-info {
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

/* ========================================
   Fade In Sections
   ======================================== */

.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
}

.fade-in-section.visible {
    animation: fadeInSection 0.8s ease-out forwards;
}

@keyframes fadeInSection {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Main Content Reveal
   ======================================== */

#mainContent {
    transition: opacity 0.8s ease-out;
}

#mainContent.show {
    opacity: 1;
}

/* ========================================
   Responsive Utilities
   ======================================== */

@media (max-width: 768px) {
    .service-card:nth-child(even).visible .service-description {
        animation: slideInLeft 0.8s ease-out 0.2s forwards;
    }
    
    #navbar {
        background: rgba(15, 23, 42, 0.95);
    }
}
/* ========================================
   Horizontal Scroll Fix
   ======================================== */

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

/* ========================================
   Team Section
   ======================================== */

.team-card {
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.team-member-image {
    transition: transform 0.3s ease;
}

.team-card:hover .team-member-image {
    transform: scale(1.05);
}