/* Custom Styles for REGIS Website */

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #1C1C1C;
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* ヒーローセクションの背景パターン */
.hero-bg {
    background-color: #d8ebde;
    background-image: radial-gradient(#309038 0.5px, transparent 0.5px), radial-gradient(#309038 0.5px, #d8ebde 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.6;
}

/* カードのホバーエフェクト */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ヘッダーのスクロール時のスタイル変更 */
#header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* パララックス効果 */
.parallax-bg {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ヒーローセクション - フルスクリーン */
#hero-section {
    min-height: 100vh;
    position: relative;
}

/* 無限スクロール背景 */
.infinite-scroll-bg {
    overflow: hidden;
}

.infinite-scroll-container {
    width: 200%;
    height: 100%;
    animation: infiniteScroll 30s linear infinite;
}

.infinite-scroll-image {
    height: 100%;
    width: auto;
    flex-shrink: 0;
}

/* ============================
   News Article Styles
   ============================ */

/* 新機能タイトル（Feature） */
.article-content h3.news-feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1C1C1C;
    border-left: 3px solid #309038;
    padding-left: 1rem;
    margin: 2rem 0 0.75rem 0;
}

/* 不具合修正タイトル（Bug Fix） */
.article-content h3.news-bugfix-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1C1C1C;
    border-left: 3px solid #959595;
    padding-left: 1rem;
    margin: 2rem 0 0.75rem 0;
}

@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Hero Highlight */
.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(216, 235, 222, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-highlight-number {
    font-size: clamp(2.5rem, 4vw, 3.75rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.05em;
}

.hero-highlight-tag {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.85);
}

.marker-highlight {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0 0.6rem;
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.impact-number {
    font-size: 1em;
    font-weight: 900;
    color: #ffffff;
}

.hero-subtext {
    display: inline-block;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
}

.heading-wave {
    width: 180px;
    height: 8px;
    background: linear-gradient(90deg, #309038, #3F7BEB);
    border-radius: 999px;
    position: relative;
}

.heading-wave::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: rotate(-2deg);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

/* PROBLEMS Section - Red Theme */
.problems-wave {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.problems-wave::after {
    background: rgba(255, 255, 255, 0.35);
}

.speech-bubble {
    position: relative;
    padding: 1.75rem;
    border-radius: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* 三角形のボーダー（外側、少し大きめ）- border-red-200 */
.speech-bubble::before {
    content: "";
    position: absolute;
    bottom: -14px;
    left: calc(25% - 1px);
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 14px solid rgb(254, 202, 202);
}

/* 三角形の背景（内側、少し小さめ）- bg-red-50 */
.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 25%;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid rgb(254, 242, 242);
}

/* 下向きの吹き出し（画像の上に配置、三角形は下向き） */
.speech-bubble-top::before {
    bottom: -14px;
    top: auto;
    border-bottom: none;
    border-top: 14px solid rgb(254, 202, 202);
}

.speech-bubble-top::after {
    bottom: -12px;
    top: auto;
    border-bottom: none;
    border-top: 12px solid rgb(254, 242, 242);
}

/* スマホモックアップスタイル */
.phone-mockup {
    position: relative;
    width: 280px;
    height: 560px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .phone-mockup {
        width: 320px;
        height: 640px;
    }
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.phone-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.phone-slide.active {
    opacity: 1;
    z-index: 2;
}

.phone-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #d8ebde 0%, #309038 100%);
}

/* 画像が読み込まれない場合のフォールバック */
.phone-slide img:not([src]),
.phone-slide img[src=""] {
    background: linear-gradient(135deg, #d8ebde 0%, #309038 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-slide img:not([src])::after,
.phone-slide img[src=""]::after {
    content: "画像を配置";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* スマホモックアップ用吹き出しコンテナ（スタック型） */
.phone-tooltip-container {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    align-items: center;
    max-width: 600px;
    height: calc(100% + 4rem);
    top: -2rem;
}

/* PC表示時：スマホの上から下まで広く使う */
@media (min-width: 768px) {
    .phone-tooltip-right,
    .phone-tooltip-left {
        top: -2rem;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        align-items: center;
        height: calc(100% + 4rem);
    }
}

/* スロット（固定位置を確保、常に3つの位置を維持） */

.phone-tooltip-slot {
    flex: 1 1 0;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    min-height: 60px;
}

/* 個別の吹き出し（丸いデザイン、半透明） */
.phone-tooltip-item {
    position: relative;
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    max-width: 260px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: tooltipSlideIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    background: rgba(48, 144, 56, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: 
        0 12px 32px rgba(48, 144, 56, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 左側の吹き出し */
.phone-tooltip-slot .phone-tooltip-item.tooltip-left {
    margin-right: auto;
    margin-left: 0;
}

/* 右側の吹き出し */
.phone-tooltip-slot .phone-tooltip-item.tooltip-right {
    margin-left: auto;
    margin-right: 0;
}

/* アニメーション */
@keyframes tooltipSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.85);
    }
    60% {
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* モバイル時は吹き出しを非表示 */
@media (max-width: 767px) {
    .phone-tooltip-container {
        display: none !important;
    }
}

/* 背景装飾 */
.feature-bg-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(216, 235, 222, 0.5);
    filter: blur(60px);
    z-index: 0;
}

.feature-bg-decoration-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.feature-bg-decoration-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -150px;
}

/* Solution Section - Glassmorphism */
.solution-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

/* モバイルではパララックス効果を無効化（パフォーマンス向上） */
@media (max-width: 768px) {
    .solution-section {
        background-attachment: scroll;
    }
}

.solution-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.solution-content {
    position: relative;
    z-index: 2;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

/* ローディング画面 */
body.loading {
    overflow: hidden;
    height: 100vh;
}

body.loading > header,
body.loading > section,
body.loading > footer {
    visibility: hidden;
    opacity: 0;
}

body:not(.loading) > header,
body:not(.loading) > section,
body:not(.loading) > footer {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #309038;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    visibility: visible;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-reskyun {
    margin-bottom: 0.5rem;
    animation: reskyunFloat 3s ease-in-out infinite;
}

.loading-reskyun-img {
    height: 200px;
    width: auto;
}

.loading-text-container {
    position: relative;
    min-height: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
}

.loading-text {
    position: absolute;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.6;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    text-align: center;
    white-space: nowrap;
    padding: 0 1rem;
    box-sizing: border-box;
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* モバイル用のスタイル */
@media (max-width: 767px) {
    .loading-reskyun-img {
        height: 120px;
        will-change: transform;
    }
    
    .loading-reskyun {
        will-change: transform;
    }
    
    .loading-text-container {
        min-height: 80px;
        height: 80px;
        padding: 0 2rem;
        max-width: 90%;
    }
    
    .loading-text {
        font-size: 0.875rem;
        white-space: normal;
        word-wrap: break-word;
        max-width: 100%;
        width: 100%;
        padding: 0 1rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .loading-content {
        gap: 0.75rem;
        padding: 0 1rem;
        width: 100%;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        margin-top: 0.5rem;
    }
}

.loading-text.active {
    opacity: 1;
    transform: translateY(0);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

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

@keyframes reskyunFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -10px, 0);
    }
}
