/* ==================== */
/* CSS Variables        */
/* ==================== */
:root {
    /* Colors - Instagram Pink Theme */
    --color-primary: #E1306C;
    --color-primary-hover: #C13584;
    --color-primary-light: #FDEEF3;
    --color-background: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-text-primary: #262626;
    --color-text-secondary: #8E8E8E;
    --color-text-tertiary: #C7C7C7;
    --color-border-light: #DBDBDB;
    --color-border-medium: #B2B2B2;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-section: 80px;
    --spacing-section-mobile: 60px;
    --spacing-element: 32px;
    --spacing-element-mobile: 20px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ==================== */
/* Base Styles          */
/* ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: var(--color-text-primary);
    background-color: var(--color-background);
}

/* ==================== */
/* Typography           */
/* ==================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

/* ==================== */
/* Header Styles        */
/* ==================== */
#header {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

#header.scrolled {
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover:after {
    width: 100%;
}

/* ==================== */
/* Button Styles        */
/* ==================== */
.btn-primary {
    background: var(--color-primary);
    color: #FFFFFF;
    padding: 16px 40px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 168, 117, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    padding: 16px 40px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

/* ==================== */
/* Hero Section         */
/* ==================== */
.bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==================== */
/* Card Styles          */
/* ==================== */
.problem-card,
.solution-card,
.product-card,
.strength-card {
    transition: all 0.3s ease;
}

.problem-card:hover,
.solution-card:hover,
.product-card:hover,
.strength-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card .product-image {
    overflow: hidden;
}

.product-card .product-image img {
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-card:hover .product-image {
    transform: scale(1.02);
}

/* ==================== */
/* Badge Styles         */
/* ==================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ==================== */
/* FAQ Accordion        */
/* ==================== */
.faq-item {
    border-bottom: 1px solid var(--color-border-light);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(201, 168, 117, 0.05);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-item.open .faq-icon:before {
    content: '\f068'; /* Font Awesome minus icon */
}

.faq-icon:before {
    content: '\f067'; /* Font Awesome plus icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* ==================== */
/* Form Styles          */
/* ==================== */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: 'Noto Sans JP', sans-serif;
    transition: border 0.3s ease;
}

.form-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 168, 117, 0.1);
}

.form-input.error {
    border-color: #F44336;
}

.error-message {
    color: #F44336;
    font-size: 14px;
    margin-top: 4px;
}

.success-message {
    color: #4CAF50;
    font-size: 14px;
    margin-top: 4px;
}

/* ==================== */
/* Process Timeline     */
/* ==================== */
.process-step {
    position: relative;
}

@media (max-width: 768px) {
    .process-step .text-3xl {
        transform: rotate(90deg);
        margin: 20px 0;
    }
}

/* ==================== */
/* Specialty Badges     */
/* ==================== */
.specialty-badge {
    animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4);
    }
}


/* ==================== */
/* Scroll Animations    */
/* ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== */
/* Focus Styles         */
/* ==================== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ==================== */
/* Mobile Menu          */
/* ==================== */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.active {
    display: block;
}

/* ==================== */
/* Utility Classes      */
/* ==================== */
.text-balance {
    text-wrap: balance;
}

/* ==================== */
/* Responsive Spacing   */
/* ==================== */
@media (max-width: 768px) {
    :root {
        --spacing-section: var(--spacing-section-mobile);
        --spacing-element: var(--spacing-element-mobile);
    }
    
    h1 {
        font-size: 36px !important;
    }
    
    h2 {
        font-size: 28px !important;
    }
    
    h3 {
        font-size: 20px !important;
    }
}

/* ==================== */
/* Print Styles         */
/* ==================== */
@media print {
    #header,
    #mobile-menu-btn,
    .btn-primary,
    .btn-secondary {
        display: none;
    }
}

/* ==================== */
/* Animation Utilities  */
/* ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ==================== */
/* Loading States       */
/* ==================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* ==================== */
/* High Contrast Mode   */
/* ==================== */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #A67C52;
        --color-text-primary: #000000;
    }
}

/* ==================== */
/* Reduced Motion       */
/* ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================== */
/* Mobile Optimization  */
/* ==================== */

/* スマホ向け最適化 (〜767px) */
@media (max-width: 767px) {
    /* 基本フォントサイズ */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* セクション余白 */
    section {
        padding-top: var(--spacing-section-mobile) !important;
        padding-bottom: var(--spacing-section-mobile) !important;
    }
    
    /* 見出しサイズ調整 */
    h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* ボタンサイズ調整 */
    .btn-primary,
    .btn-secondary {
        padding: 12px 24px !important;
        font-size: 14px !important;
        width: 100%;
        text-align: center;
    }
    
    /* カード余白調整 */
    .problem-card,
    .solution-card,
    .product-card,
    .strength-card {
        padding: 24px !important;
    }
    
    /* 画像高さ調整 */
    .product-image {
        height: 200px !important;
    }
    
    /* バッジサイズ調整 */
    .specialty-badge {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }
    
    .specialty-badge i {
        font-size: 16px !important;
    }
    
    /* Heroセクション調整 */
    #hero {
        min-height: 100vh;
        padding: 80px 20px 60px !important;
    }
    
    #hero h1 {
        font-size: 2rem !important;
        margin-bottom: 16px !important;
    }
    
    #hero p {
        font-size: 1rem !important;
        margin-bottom: 24px !important;
    }
    
    /* 証拠ポイント調整 */
    #hero .flex.items-center {
        font-size: 0.875rem;
    }
    
    /* KPIカード調整 */
    .kpi-card {
        font-size: 2rem !important;
    }
    
    /* FAQ調整 */
    .faq-question {
        padding: 16px !important;
        font-size: 1rem !important;
    }
    
    .faq-answer {
        font-size: 0.875rem !important;
    }
    
    /* フォーム調整 */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px !important; /* iOSのズーム防止 */
    }
    
    /* ヘッダー調整 */
    header {
        padding: 12px 16px !important;
    }
    
    /* グリッド調整 */
    .grid {
        gap: 16px !important;
    }
    
    /* マージン・パディング調整 */
    .px-6 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .px-8 {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .py-20 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    .mb-16 {
        margin-bottom: 40px !important;
    }
    
    .mb-12 {
        margin-bottom: 32px !important;
    }
    
    /* タッチターゲットサイズ確保 */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* タブレット向け調整 (768px〜1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    section {
        padding-top: 70px !important;
        padding-bottom: 70px !important;
    }
}
