@charset "UTF-8";

/* ==========================================================================
   Pattern 46: Cleaning
   Designer: "機能美を追求するUIスペシャリスト"
   Concept: モダンなWebアプリ風UI、データ属性(data-*)による状態・レイアウト管理、即応的なホバー
   ========================================================================== */

:root {
    /* UI System Colors */
    --ui-primary: #2563EB;
    /* ブルー（信頼感・清潔感） */
    --ui-primary-hover: #1D4ED8;
    --ui-surface: #F8FAFC;
    /* 背景よりわずかに暗い面 */
    --ui-surface-hover: #F1F5F9;
    --ui-background: #FFFFFF;
    --ui-border: #E2E8F0;

    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-inverse: #FFFFFF;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;

    /* Metrics */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =========================================
   # Reset & Base
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body[data-theme="clean"] {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    background-color: var(--ui-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-xs {
    font-size: 0.75rem;
}

.text-gray {
    color: var(--text-muted);
}

.mt-32 {
    margin-top: 2rem;
}

.bg-surface {
    background-color: var(--ui-surface);
}

/* =========================================
   # UI Components
========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease;
    /* アニメーションは短く即応的に */
    border: 1px solid transparent;
}

.btn--primary {
    background-color: var(--ui-primary);
    color: var(--text-inverse);
}

.btn--primary:hover {
    background-color: var(--ui-primary-hover);
}

.btn--outline {
    background-color: transparent;
    border-color: var(--ui-border);
    color: var(--text-main);
}

.btn--outline:hover {
    background-color: var(--ui-surface);
}

.btn--large {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.badge[data-color="blue"] {
    background-color: #EFF6FF;
    color: var(--ui-primary);
}

/* =========================================
   # Layout Container
========================================= */
.ui-section {
    padding: 100px 0;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* =========================================
   # Header (Data Attribute State)
========================================= */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

/* 属性による状態管理 */
.app-header[data-scroll-state="scrolled"] {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-color: var(--ui-border);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ui-primary);
}

.primary-nav {
    display: flex;
    gap: 32px;
}

.nav-item {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s;
}

.nav-item:hover {
    color: var(--text-main);
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.menu-trigger {
    display: none;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    flex-direction: column;
    justify-content: space-around;
}

.menu-trigger .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
}

/* =========================================
   # Hero Section
========================================= */
.hero-section[data-layout="split"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding: 0;
    align-items: center;
}

.hero-content {
    padding: 120px 80px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.trust-indicators {
    display: flex;
    flex-direction: column;
}

.rating {
    color: var(--color-warning);
    font-size: 1.2rem;
}

.rating-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-visual {
    position: relative;
    height: 100%;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating UI Element */
.floating-ui-card {
    position: absolute;
    background: var(--ui-background);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
}

.floating-ui-card[data-pos="bottom-left"] {
    bottom: 60px;
    left: -40px;
    /* 画像外へはみ出させる */
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator[data-status="success"] {
    background-color: var(--color-success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.ui-card-text {
    display: flex;
    flex-direction: column;
}

.ui-card-text strong {
    font-size: 0.875rem;
}

.ui-card-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================
   # Services (Grid UI)
========================================= */
.grid-cards {
    display: grid;
    gap: 24px;
}

.grid-cards[data-cols="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.service-card {
    background-color: var(--ui-background);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.service-card[data-interactable="true"]:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--ui-primary);
    transform: translateY(-2px);
    /* 控えめなフィードバック */
}

.card-visual {
    height: 200px;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ui-primary);
}

/* =========================================
   # Before/After Slider UI Component
========================================= */
.comparison-container {
    max-width: 800px;
    margin: 0 auto;
}

.comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: #000;
    /* ローディング時のベース */
    cursor: col-resize;
    user-select: none;
}

.image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* After画像を上から重ねて、widthでクリップする */
.image-after-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    /* widthはJSで動かす (style="width: 50%;") */
}

.image-after {
    /* 画像自体はsliderと同じ絶対幅を維持するよう少しテクニック */
    height: 100%;
    width: 100vw;
    max-width: 800px;
    /* .comparison-containerのmax-widthと同じ */
    object-fit: cover;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--ui-background);
    /* leftはJSで動かす */
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: var(--ui-background);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.slider-handle svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    color: var(--ui-primary);
    pointer-events: none;
}

.label-before,
.label-after {
    position: absolute;
    bottom: 20px;
    padding: 4px 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    pointer-events: none;
}

.label-before {
    right: 20px;
}

.label-after {
    left: 20px;
}

.slider-caption {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =========================================
   # Stepper UI
========================================= */
.stepper-ui {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.stepper-ui::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--ui-border);
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    text-align: center;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--ui-surface);
    border: 2px solid var(--ui-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 16px;
    transition: 0.3s;
}

.step-item[data-status="completed"] .step-icon {
    background-color: var(--ui-primary);
    border-color: var(--ui-primary);
    color: white;
}

.step-item[data-status="active"] .step-icon {
    border-color: var(--ui-primary);
    color: var(--ui-primary);
    background-color: var(--ui-background);
}

.step-content h4 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =========================================
   # FAQ
========================================= */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--ui-background);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.faq-item:hover {
    border-color: var(--ui-primary);
    box-shadow: var(--shadow-sm);
}

.faq-summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-icon {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-muted);
    border-radius: 2px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.faq-icon::before {
    width: 14px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 14px;
}

.faq-item:hover .faq-icon::before,
.faq-item:hover .faq-icon::after {
    background-color: var(--ui-primary);
}

details[open] .faq-icon::after {
    transform: rotate(90deg) scaleY(0);
}

details[open] .faq-summary {
    border-bottom: 1px solid var(--ui-border);
    color: var(--ui-primary);
}

.faq-content {
    padding: 20px 24px;
    color: var(--text-muted);
    background-color: var(--ui-surface);
}

.faq-content p {
    margin: 0;
    line-height: 1.6;
}

/* =========================================
   # Footer
========================================= */
.app-footer {
    background-color: var(--text-main);
    color: var(--ui-border);
    padding: 80px 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: flex;
    justify-content: space-between;
}

.footer-brand {
    width: 30%;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-title {
    color: white;
    font-size: 1rem;
    margin-bottom: 12px;
}

.link-group a {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.link-group a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================
   # Responsive
========================================= */
@media (max-width: 900px) {
    .menu-trigger {
        display: flex;
    }

    .header-actions .btn {
        display: none;
    }

    .primary-nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--ui-background);
        border-bottom: 1px solid var(--ui-border);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: 0.2s;
    }

    .primary-nav[data-menu-state="open"] {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hero-section[data-layout="split"] {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 120px 24px 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .floating-ui-card {
        display: none;
    }

    .grid-cards[data-cols="3"] {
        grid-template-columns: 1fr;
    }

    .stepper-ui {
        flex-direction: column;
        gap: 40px;
    }

    .stepper-ui::before {
        top: 0;
        left: 24px;
        width: 2px;
        height: 100%;
    }

    .step-item {
        width: 100%;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    }

    .footer-container {
        flex-direction: column;
        gap: 40px;
    }

    .footer-brand {
        width: 100%;
    }
}