:root {
    /* Colors */
    --color-bg: #FFFFFF;
    --color-bg-sub: #F8F9FA;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-heading: #111111;
    --color-accent: #0f172a;
    /* Dark Navy for premium feel */
    --color-accent-light: #334155;
    --color-gold: #c4a05f;
    /* Subtle gold for premium accents */

    /* Typography */
    --font-base: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --line-height-base: 1.8;
    /* 読みやすさ向上のため広めに設定 */

    /* Spacing */
    --space-s: 8px;
    --space-m: 16px;
    --space-l: 32px;
    --space-xl: 64px;
    --space-xxl: 120px;
}

body {
    font-family: var(--font-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.05em;
    /* 文字間を少し広げて優雅に */
    font-feature-settings: "palt";
    /* プロポーショナルメトリクス有効化 */
}

a,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

/* Typography Utility */
h1,
h2,
h3 {
    color: var(--color-heading);
    line-height: 1.4;
    letter-spacing: 0.08em;
    margin-bottom: 1em;
}

.text-center {
    text-align: center;
}

.text-small {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.text-gold {
    color: var(--color-gold);
}

/* Layout Utility */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-m);
}

.section {
    padding: var(--space-xxl) 0;
}

.hidden {
    display: none;
}

/* Components: Button */
.btn {
    display: inline-block;
    padding: 12px 32px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: white;
}

/* Components: Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    /* 初期: 透明 */
    border-bottom: 1px solid transparent;
    height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* 滑らかなアニメーション */
}

.header.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 70px;
    /* スクロール時は少しコンパクトに */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--color-heading);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.nav-pc {
    display: none;
}

@media (min-width: 900px) {
    .nav-pc {
        display: flex;
        gap: 24px;
        align-items: center;
    }

    .nav-link {
        color: var(--color-text);
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s;
    }

    .nav-link:hover {
        color: var(--color-accent);
    }

    /* Transparent Header for Dark Backgrounds */
    .header.header-transparent .logo,
    .header.header-transparent .nav-link,
    .header.header-transparent .menu-toggle {
        color: white;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .header.header-transparent .btn-primary {
        background: white;
    }

    /* Scrolled state (Overrides transparent) */
    .header.header-transparent.header-scrolled .logo,
    .header.header-transparent.header-scrolled .nav-link,
    .header.header-transparent.header-scrolled .menu-toggle {
        color: var(--color-heading);
        /* Revert to dark */
        text-shadow: none;
    }

    .header.header-transparent.header-scrolled .btn-primary {
        background: var(--color-accent);
        color: white;
    }
}

/* Mobile Menu Button */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    position: relative;
    z-index: 1100;
    /* メニュー(1001)より上に絶対出す */
    transition: color 0.3s;
    padding: 8px;
    line-height: 1;
    color: var(--color-heading);
    /* 確実に黒系にする */
    appearance: none;
    -webkit-appearance: none;
    /* Safariの標準ボタン装飾を無効化 */
    -webkit-tap-highlight-color: transparent;
    /* タップ時の青い選択色を消す */
}

.menu-toggle .icon {
    color: inherit;
}

@media (min-width: 900px) {
    .menu-toggle {
        display: none;
    }
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 100px var(--space-l);
    z-index: 1001;
    /* Header(1000)より上に配置 */
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* メニュー展開時のヘッダー要素の色調整 */
body:has(.mobile-menu.active) .logo,
body:has(.mobile-menu.active) .menu-toggle,
body.menu-open .logo,
body.menu-open .menu-toggle {
    color: var(--color-heading) !important;
    text-shadow: none !important;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    text-align: center;
}

.mobile-nav-list .nav-link {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-heading);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.mobile-nav-list .nav-link:hover {
    color: var(--color-gold);
}

.mobile-nav-list .btn {
    margin-top: 16px;
    padding: 16px;
    font-size: 1.1rem;
}

/* Floating Button */
.float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    background: var(--color-accent);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: btn-pulse 3s infinite;
}

.float-btn:hover {
    transform: translateY(-4px);
    animation: none;
    /* ホバー時は止める */
}

/* モバイル版（固定フッターボタンがある時）は右下のバナーを非表示 */
@media (max-width: 768px) {
    .float-btn {
        display: none !important;
    }
}

@keyframes btn-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

/* Footer */
.footer {
    background: var(--color-accent);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xxl);
    color: #fff;
}

.footer h4,
.footer .footer-logo,
.footer p,
.footer li {
    color: #fff;
}

.footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--color-gold);
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    margin-right: 16px;
    font-size: 0.9rem;
}

/* Utility: Fade In */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
}

/* Animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes bounce-y {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Step Card (Responsiveness) */
.step-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    border-radius: 12px;
    position: relative;
}

@media (min-width: 768px) {
    .step-card {
        flex-direction: row;
    }
}

/* Micro-Interactions: Card Hover */
.card-hover {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* 画像を見やすくするための暗幕 */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: bold;
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    margin-bottom: 32px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Animations defined in main loop but ensuring existence */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease-out 1.0s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Flex Utility */
.flex-responsive-row {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .flex-responsive-row {
        flex-direction: row;
    }
}