/**
 * Avnator - メインスタイルシート
 *
 * デザインコンセプト：
 * - ラグジュアリー: ダークトーン + ゴールド/ローズピンク
 * - エロティック: グラデーション、曲線
 * - 親しみやすさ: 絵文字、柔らかい言葉遣い
 */

/* ==========================================
   CSS変数定義 - 官能的デザインシステム
========================================== */
:root {
    /* プライマリカラー（深みのある成熟した色調） */
    --primary-deepcrimson: #8B0A50;
    --primary-violet: #2D0B3D;
    --primary-midnight: #0A0E27;
    --primary-burgundy: #722F37;

    /* アクセントカラー（洗練された官能性） */
    --accent-lavender: #C9A0DC;
    --accent-rose: #FFD9E8;
    --accent-wine: #8B2E5F;

    /* メタリックカラー（高級感） */
    --metallic-gold: #D4AF37;
    --metallic-rosegold: #E8C4B8;
    --metallic-champagne: #F7E7CE;

    /* ニュートラルカラー */
    --neutral-light: #f8f9fa;
    --neutral-medium: #a8a8a8;
    --neutral-dark: #1a1a1a;

    /* グラデーション（複雑で深い） */
    --gradient-sensual: linear-gradient(135deg, #8B0A50 0%, #2D0B3D 50%, #0A0E27 100%);
    --gradient-silk: linear-gradient(120deg, #C9A0DC 0%, #FFD9E8 100%);
    --gradient-metallic: linear-gradient(135deg, #D4AF37 0%, #E8C4B8 50%, #F7E7CE 100%);
    --gradient-depth: radial-gradient(ellipse at center, #2D0B3D 0%, #0A0E27 100%);
    --gradient-card: linear-gradient(135deg, rgba(139,10,80,0.08) 0%, rgba(45,11,61,0.08) 100%);

    /* フォント（官能的タイポグラフィ） */
    --font-display: 'Cormorant Garamond', serif;
    --font-accent: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Cormorant Garamond', serif;

    /* フォントサイズ */
    --fs-xl: 2.5rem;    /* 40px */
    --fs-lg: 2rem;      /* 32px */
    --fs-md: 1.5rem;    /* 24px */
    --fs-base: 1rem;    /* 16px */
    --fs-sm: 0.875rem;  /* 14px */
    --fs-xs: 0.75rem;   /* 12px */

    /* レタースペーシング（官能的な間隔） */
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.05em;
    --letter-spacing-luxury: 0.15em;

    /* スペーシング */
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-sm: 0.75rem;  /* 12px */
    --spacing-md: 1.25rem;  /* 20px */
    --spacing-lg: 2rem;     /* 32px */
    --spacing-xl: 3rem;     /* 48px */
    --spacing-xxl: 4rem;    /* 64px */

    /* ボーダーラジウス */
    --radius-sm: 0.75rem;   /* 12px */
    --radius-md: 1rem;      /* 16px */
    --radius-lg: 1.25rem;   /* 20px */
    --radius-xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* シャドウ */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow-pink: 0 0 20px rgba(233, 30, 99, 0.3);
    --shadow-glow-gold: 0 0 20px rgba(255, 215, 0, 0.4);

    /* トランジション */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* ブレークポイント */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
}

/* ==========================================
   リセット & 基本スタイル
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #8B0A50 0%, #2D0B3D 50%, #0A0E27 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--neutral-light);
    background: linear-gradient(135deg, #8B0A50 0%, #2D0B3D 50%, #0A0E27 100%);
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* 流れるグラデーションアニメーション */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 微細なノイズテクスチャオーバーレイ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4"/></filter><rect width="300" height="300" filter="url(%23noise)" opacity="0.05"/></svg>');
    pointer-events: none;
    z-index: -2;
}

/* パーティクル背景 */
#particles-js {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* ==========================================
   タイポグラフィ - 官能的な美しさ
========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    letter-spacing: var(--letter-spacing-tight);
}

h1 {
    font-size: var(--fs-xl);
    letter-spacing: var(--letter-spacing-wide);
}
h2 {
    font-size: var(--fs-lg);
}
h3 {
    font-size: var(--fs-md);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--accent-rose);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-pink);
}

/* ==========================================
   ボタン
========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 1rem 2rem;
    font-size: var(--fs-base);
    font-weight: 700;
    font-family: var(--font-primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-silk);
    color: var(--primary-midnight);
    font-weight: 700;
    box-shadow: 0 0 30px rgba(201, 160, 220, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmerBtn 3s infinite;
}

@keyframes shimmerBtn {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(201, 160, 220, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

/* ==========================================
   コンテナ & レイアウト
========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: var(--spacing-xl) 0;
    position: relative;
    z-index: 1;
}

/* ==========================================
   カード
========================================== */
.card {
    background: rgba(45, 11, 61, 0.85);
    border: 1px solid rgba(201, 160, 220, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
    position: relative;
    transform-style: preserve-3d;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.card:hover {
    background: rgba(139, 10, 80, 0.9);
    border-color: var(--accent-lavender);
    box-shadow: 0 15px 50px rgba(139, 10, 80, 0.5);
    transform: translateY(-8px) rotateX(2deg);
}

.card:hover::before {
    opacity: 1;
}

/* ==========================================
   フッター
========================================== */
.site-footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xxl);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.footer-content {
    text-align: center;
}

.footer-disclaimer {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

.footer-copyright {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   デバッグバナー
========================================== */
.debug-banner {
    background: rgba(255, 215, 0, 0.2);
    border-bottom: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    text-align: center;
    padding: var(--spacing-xs);
    font-size: var(--fs-sm);
    font-weight: 700;
}

/* ==========================================
   ユーティリティクラス
========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.hidden { display: none; }

/* ==========================================
   レスポンシブ
========================================== */
@media (max-width: 768px) {
    :root {
        --fs-xl: 2rem;
        --fs-lg: 1.75rem;
        --fs-md: 1.25rem;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }

    /* モバイル: 軽量版背景 */
    body {
        background-size: 200% 200%;
    }
}

/* ==========================================
   官能的グローエフェクト
========================================== */
.glow-effect {
    filter: drop-shadow(0 0 10px currentColor);
    animation: breathingGlow 3s ease-in-out infinite;
}

@keyframes breathingGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px currentColor)
                drop-shadow(0 0 20px currentColor);
    }
    50% {
        filter: drop-shadow(0 0 20px currentColor)
                drop-shadow(0 0 40px currentColor)
                drop-shadow(0 0 60px currentColor);
    }
}

/* キーボードフォーカスの美しい視覚化 */
:focus-visible {
    outline: 3px solid var(--accent-lavender);
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(201, 160, 220, 0.2);
    border-radius: var(--radius-sm);
}

/* アクセシビリティ: 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body {
        animation: none !important;
    }
}

/* スクリーンリーダー専用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   カーソル追従グローエフェクト
========================================== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(201, 160, 220, 0.25) 0%,
        rgba(139, 10, 80, 0.15) 30%,
        transparent 70%
    );
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
    filter: blur(60px);
    transition: opacity 0.3s ease;
}

/* モバイルでは非表示 */
@media (max-width: 768px) {
    .cursor-glow {
        display: none;
    }
}
