/* ============================================
   合同会社パピヨン - Base Styles
   ============================================
   リセット、CSS変数、基本タイポグラフィ
   ============================================ */

/* -----------------------------------------
   CSS Custom Properties (Design Tokens)
   ----------------------------------------- */
:root {
    /* 和風カラーパレット（伝統色） */
    --color-konai: #0f2350;      /* 紺藍 - メインカラー */
    --color-kachi: #181B26;      /* 勝色 - ダークカラー */
    --color-matsuba: #42602D;    /* 松葉色 - アクセント */
    --color-kitsune: #B68E55;    /* 狐色 - ゴールド */
    --color-gochun: #E6E5D1;     /* 五穀 - ベージュ */
    --color-shira: #fcfcf9;      /* 白磁 - 背景 */
    --color-cream: #F5F5F0;      /* クリーム */
    --color-gray: #8C8C8C;       /* グレー */

    /* セマンティックカラー */
    --color-primary: var(--color-konai);
    --color-primary-dark: var(--color-kachi);
    --color-accent: var(--color-kitsune);
    --color-background: var(--color-shira);
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-text-muted: #666666;
    --color-text-light: #999999;
    --color-border: #e5e5e5;
    --color-border-light: #f0f0f0;

    /* タイポグラフィ */
    --font-sans: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    --font-serif: 'Shippori Mincho', 'Yu Mincho', serif;
    
    /* スペーシング */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;

    /* ボーダーラディウス */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 9999px;

    /* シャドウ */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* トランジション */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* コンテナ幅 */
    --container-max: 1280px;
    --container-padding: 1rem;
}

@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
    }
}

/* -----------------------------------------
   CSS Reset (Modern Minimal)
   ----------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* 和紙風テクスチャ背景 */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* -----------------------------------------
   Typography
   ----------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-primary-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

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

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

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

/* フォーカス表示（アクセシビリティ） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* -----------------------------------------
   Utility Classes
   ----------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -----------------------------------------
   Custom Scrollbar
   ----------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}
