/**
 * Base CSS - リセット・変数・基本スタイル
 *
 * @package Morikawa_Modern
 */

/* ========================================
   CSS変数
======================================== */
:root {
    /* カラー */
    --color-primary: #0c539c;
    --color-primary-dark: #083d73;
    --color-primary-light: #eff7ff;
    --color-accent: #ee6514;
    --color-accent-hover: #f9a000;

    /* テキスト */
    --color-text: #1a1a2e;
    --color-text-light: #666;
    --color-text-white: #fff;

    /* 背景 */
    --color-bg: #fff;
    --color-bg-light: #f8fafc;
    --color-bg-blue: #eff7ff;
    --color-bg-gray: #f4f4f4;

    /* ボーダー */
    --color-border: #ddd;
    --color-border-dark: #161616;

    /* フォント */
    --font-family: "Noto Sans JP", sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* 行間 */
    --line-height: 1.8;
    --line-height-tight: 1.4;

    /* スペーシング */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;
    --spacing-3xl: 6.25rem;

    /* コンテナ */
    --container-max: 1200px;
    --container-padding: 20px;

    /* ヘッダー */
    --header-height: 80px;
    --header-height-sp: 60px;

    /* トランジション */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* シャドウ */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* z-index */
    --z-header: 100;
    --z-mobile-nav: 200;
    --z-overlay: 150;
    --z-page-top: 90;
}

/* ========================================
   リセット
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: var(--header-height-sp);
    }
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* リスト */
ul,
ol {
    list-style: none;
}

/* リンク */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

/* 画像 */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* テーブル */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ボタン */
button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* フォーム要素 */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   ユーティリティ
======================================== */

/* 表示切替 */
.pc-only {
    display: inline;
}

.sp-only {
    display: none;
}

@media (max-width: 767px) {
    .pc-only {
        display: none;
    }

    .sp-only {
        display: inline;
    }
}

/* スクリーンリーダー用 */
.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;
}

/* コンテナ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
}

/* ========================================
   アニメーション
======================================== */

/* フェードイン */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* スクロールアニメーション用 */
.js-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js-animate-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-animate-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 遅延アニメーション */
.js-animate-item:nth-child(1) { transition-delay: 0.1s; }
.js-animate-item:nth-child(2) { transition-delay: 0.2s; }
.js-animate-item:nth-child(3) { transition-delay: 0.3s; }
.js-animate-item:nth-child(4) { transition-delay: 0.4s; }
.js-animate-item:nth-child(5) { transition-delay: 0.5s; }
.js-animate-item:nth-child(6) { transition-delay: 0.6s; }

/* ========================================
   パララックス
======================================== */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
    z-index: -2;
}

@media (max-width: 767px) {
    .parallax-bg {
        background-attachment: scroll;
        top: 0;
        height: 100%;
    }
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 83, 156, 0.7);
    z-index: -1;
}

.parallax-overlay--dark {
    background: rgba(0, 0, 0, 0.5);
}

/* ========================================
   タイポグラフィ
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--line-height-tight);
}

p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

strong {
    font-weight: 700;
}

/* アイコン */
.icon {
    display: inline-block;
    vertical-align: middle;
}
