/* ==========================================
   PHP Rescue Division — ページ固有スタイル
   共通スタイルは /css/site.css を参照
   ========================================== */

/* ==========================================
   ヒーローセクション
   ========================================== */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    padding-top: 80px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin-bottom: 3rem;
}

/* ルビ風サービス説明 */
.hero-service-ruby {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 3rem;
    letter-spacing: 0.08em;
}

/* 組織名（nanomix.ltd） */
.hero-org {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.org-name-main {
    color: var(--text-primary);
}

/* 部門名（PHP Legacy Solutions） */
.division-name {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0;
    line-height: 1.2;
}

.division-label {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

/* 旧スタイルは削除 */
.company-name {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.name-main {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    margin: 3rem 0;
}

.tagline-item {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    margin: 1rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s forwards;

    &:nth-child(1) {
        animation-delay: 0.2s;
    }

    &:nth-child(2) {
        animation-delay: 0.4s;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    &:nth-child(3) {
        animation-delay: 0.6s;
    }
}

.hero-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-bottom: 8rem;

    & p {
        margin: 0.5rem 0;
    }
}

.hero-tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.05rem, 2.2vw, 1.55rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.hero-sub-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1rem, 1.9vw, 1.2rem);
    color: rgba(255, 255, 255, 0.55);
    margin: 1rem 0;
    font-weight: 400;
}

.hero-sub-text-mini {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1.5rem;
    font-weight: 400;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.3s ease;

    &:hover {
        color: var(--secondary-color);
        transform: translateX(-50%) scale(1.1);
    }

    & span {
        text-transform: uppercase;
        font-family: 'Orbitron', sans-serif;
    }
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--secondary-color), transparent);
    position: relative;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 8px;
        height: 8px;
        background: var(--secondary-color);
        border-radius: 50%;
        box-shadow: 0 0 10px var(--secondary-color);
        animation: scrollDot 2s infinite;
    }
}

@keyframes scrollDot {
    0%, 100% {
        top: 0;
        opacity: 1;
    }
    50% {
        top: 50px;
        opacity: 0.3;
    }
}

/* セクション共通: site.css で定義済み */

/* ==========================================
   技術スタックセクション
   ========================================== */
.tech-section {
    background: transparent;
}

/* ==========================================
   強みセクション
   ========================================== */
/* ==========================================
   Strength カード — per-card カラーオーバーライド
   ベース定義は site.css
   ========================================== */
.strength-section {
    padding: 5rem 2rem;
}

/* 3枚構成: タブレット2列、デスクトップ3列固定 */
@media (768px <= width <= 959px) {
    .strength-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (width >= 960px) {
    .strength-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.strength-card {
    &:nth-child(1) { --card-color: #60a5fa; } /* ブルー */
    &:nth-child(2) { --card-color: #a78bfa; } /* パープル */
    &:nth-child(3) { --card-color: #34d399; } /* グリーン */
}

/* ==========================================
   移行の流れセクション（flow-step）
   ========================================== */
.flow-section {
    background: transparent;
    padding: 5rem 2rem;
}

.flow-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
    position: relative;

    &:not(:last-child) {
        border-left: 2px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
        margin-left: 28px;
        padding-left: 2.5rem;
    }

    &:last-child {
        border-left: 2px solid transparent;
        margin-left: 28px;
        padding-left: 2.5rem;
    }
}

.flow-number {
    position: absolute;
    left: -29px;
    top: 2rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 30%, transparent), color-mix(in srgb, var(--secondary-color) 20%, transparent));
    border: 2px solid color-mix(in srgb, var(--primary-color) 50%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
    flex-shrink: 0;
}

.flow-content {
    flex: 1;
    padding-top: 0.5rem;

    & h3 {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: #fff;
    }

    & p {
        font-size: 0.95rem;
        color: var(--text-secondary);
        line-height: 1.7;
    }
}

/* タブレット: nav.css が 768px+ でハンバーガーを無効化。ここはコンテンツ縮小のみ */
@media (768px <= width <= 1100px) {
    .hero-subtitle {
        margin-bottom: 4rem;
    }

    .strength-card {
        padding: 1.8rem;

        & h3 {
            font-size: 1.3rem;
        }

        & p {
            font-size: 0.9rem;
        }
    }

    .strength-icon {
        font-size: 2.8rem;
    }
}

@media (width <= 767px) {
    .flow-step {
        &:not(:last-child),
        &:last-child {
            margin-left: 22px;
            padding-left: 2rem;
        }
    }

    .flow-number {
        width: 46px;
        height: 46px;
        font-size: 0.9rem;
        left: -23px;
    }
}

/* ==========================================
   FAQ Section
   ========================================== */
.faq-section {
    background: transparent;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;

    &:hover {
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 8px 30px color-mix(in srgb, var(--secondary-color) 10%, transparent);
        transform: translateY(-5px);
    }
}

.faq-question {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.6;

    & i {
        color: var(--secondary-color);
        font-size: 1.1rem;
        margin-top: 0.2rem;
        flex-shrink: 0;
    }
}

.faq-answer {
    padding-left: 2rem;

    & p {
        font-size: clamp(0.9rem, 1.8vw, 1rem);
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.8;
    }
}

@media (width <= 767px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .faq-answer {
        padding-left: 0;
    }
}



/* ハイライトテキスト - スクロールで下線が伸びる + バネ効果 + 一文字ずつ浮かび上がり */
.highlight-text {
    position: relative;
    display: inline;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    padding-bottom: 2px;
    transform-origin: center;
    will-change: transform;

    & .char {
        display: inline-block;
        transition: opacity 0.05s ease;
    }

    &::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0%;
        height: 2px;
        background: linear-gradient(90deg, #3e5e9b 0%, #6a9dff 50%, #ff20ca 100%);
        transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 8px rgba(100, 150, 255, 0.5);
    }

    &.active::after {
        width: 100%;
    }
}

/* 実例セクションは削除済み */

/* ==========================================
   技術スタックセクション
   ========================================== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* タブレット: 2列維持 */
@media (768px <= width <= 1099px) {
    #tech .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 8枚構成: 4列×2行（tech-cardはコンパクトなので4列が最適） */
@media (width >= 1100px) {
    #tech .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;

    &:hover {
        transform: translateY(-10px);
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        box-shadow: 0 10px 40px color-mix(in srgb, var(--secondary-color) 20%, transparent);
        border: 1px solid rgba(255, 255, 255, 0.25);

        & .tech-icon {
            transform: scale(1.1);
            background: #ffffff;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
    }

    & h3 {
        font-family: 'Orbitron', sans-serif;
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
        letter-spacing: 0.05em;
    }

    & p {
        color: var(--text-secondary);
    }
}

.tech-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.tech-label {
    font-size: 0.85rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem !important;
}

/* ==========================================
   開発ツールセクション
   ========================================== */

.tools-section {
    padding: 6rem 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* タブレット: 2列維持 */
@media (768px <= width <= 959px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 6枚構成: 3列×2行固定 */
@media (width >= 960px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tool-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;

    &:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(-5px);
        border-color: rgba(100, 150, 255, 0.3);
        box-shadow: 0 10px 30px rgba(100, 150, 255, 0.2);

        & .tool-icon {
            color: var(--secondary-color);
            transform: scale(1.1);
        }
    }

    & h3 {
        font-family: 'Orbitron', sans-serif;
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

    & p:not(.tool-label) {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

.tool-icon {
    font-size: 3rem;
    color: #5080c0;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tool-label {
    font-size: 0.85rem;
    background: linear-gradient(135deg, #5080c0 0%, #70a0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.tool-notice {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
}

/* ==========================================
   CTA セクション
   ========================================== */
.cta-section {
    padding: 8rem 2rem 12rem;
    background: transparent;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-heading {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.cta-text {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3e5e9b 0%, #ff20ca 100%);
    border: none;
    border-radius: 60px;
    padding: 1.2rem 3.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px color-mix(in srgb, var(--secondary-color) 30%, transparent);

    &:hover {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 8px 40px color-mix(in srgb, var(--secondary-color) 50%, transparent);
    }

    & i {
        font-size: 1.2em;
    }
}

@media (width <= 767px) {
    .cta-section {
        padding: 5rem 1.5rem;
    }

    .cta-button {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }

    .cta-text br {
        display: none;
    }
}

/* フッター・scroll-top-btn・View Transitions・scroll-padding: site.css で定義済み */

/* ==========================================
   アニメーション（ページ固有）
   fadeInUp / .fade-in-up は site.css で定義済み
   ========================================== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================
   レスポンシブデザイン（ページ固有）
   ナビ・フッターMQは site.css / nav.css で定義済み
   ========================================== */
@media (width <= 767px) {
    .hero-org {
        font-size: clamp(0.95rem, 4.2vw, 1.4rem);
    }

    .hero-service-ruby {
        font-size: clamp(0.95rem, 4.2vw, 1.4rem);
        letter-spacing: 0.03em;
    }

    .division-name {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info-card,
    .contact-form-card {
        padding: 2rem 1.5rem;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .strength-grid {
        grid-template-columns: 1fr;
    }

    .recruit-highlight {
        grid-template-columns: 1fr;
    }

    section {
        padding: 3rem 1rem;
    }
}

@media (width <= 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .recruit-notice {
        flex-direction: column;
        padding: 1.5rem;
    }

    .notice-text {
        font-size: 1.1rem;
    }
}
