:root {
    --color-primary: #0F172A;
    --color-primary-light: #1E293B;
    --color-accent: #C5A059;
    --color-accent-hover: #D6B36A;
    --color-text: #334155;
    --color-text-light: #64748B;
    --color-bg: #F8FAFC;
    --color-white: #FFFFFF;

    --font-sans: 'Noto Sans JP', sans-serif;
    --font-serif: 'Noto Serif JP', serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --footer-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-subtitle {
    color: var(--color-accent);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary-outline {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-primary-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    gap: 0.5rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-primary);
}

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

/* Hero */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--color-white);
    overflow: hidden;
}

.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    will-change: transform;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.hero-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4));
    z-index: -1;
}

.hero-content {
    width: 100%;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
}

/* About */
.about {
    background-color: var(--color-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.125rem;
    line-height: 2;
    color: var(--color-text);
}

/* Services */
.services {
    background-color: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-body {
    padding: 2rem;
}

.service-body h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.service-body p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Achievements */
.achievements {
    background-color: var(--color-white);
}

.achievements-content {
    max-width: 800px;
    margin: 0 auto;
}

.achievements-list {
    list-style: none;
    padding: 0;
}

.achievements-list li {
    display: flex;
    align-items: baseline;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.achievements-list li:first-child {
    border-top: 1px solid #e2e8f0;
}

.achievement-date {
    font-weight: 700;
    color: var(--color-accent);
    min-width: 180px;
    flex-shrink: 0;
}

.achievement-detail {
    color: var(--color-text);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .achievements-list li {
        flex-direction: column;
        gap: 0.5rem;
    }

    .achievement-date {
        min-width: auto;
    }
}

/* Contact */
.contact {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.contact .section-title {
    color: var(--color-white);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background-color: var(--color-primary-light);
    color: var(--color-text-light);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
}

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

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-accent);
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;
        /* Adjust for sticky footer */
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav ul {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-bg img {
        opacity: 0.6;
        /* Darken bg image slightly more on mobile for text readability if needed */
    }

    /* =========================================
           ここから スティッキーフッター (スマホ用)
           ========================================= */

    .sticky-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 12px 16px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        display: none;
        /* デフォルトは非表示 */
        backdrop-filter: blur(5px);
        /* アニメーション用 */
        transform: translateY(100%);
        transition: transform 0.3s ease-out;

        /* Flexbox for 2 buttons */
        display: none;
        /* Hidden by default, shown in media query */
        gap: 10px;
        justify-content: space-between;
    }

    /* スティッキーフッター内のボタン */
    .sticky-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 12px;
        font-weight: 700;
        border-radius: 8px;
        font-size: 0.9rem;
        gap: 6px;
        text-decoration: none;
        transition: opacity 0.3s;
    }

    .sticky-btn-tel {
        background-color: var(--color-white);
        color: var(--color-primary);
        border: 2px solid var(--color-primary);
    }

    .sticky-btn-form {
        background-color: var(--color-accent);
        color: var(--color-white);
        border: 2px solid var(--color-accent);
    }

    .sticky-btn:hover {
        opacity: 0.9;
    }

    /* =========================================
           レスポンシブ設定 (スマホサイズ)
           ========================================= */

    @media (max-width: 768px) {

        /* ヒーローエリアの調整 */
        .hero-title {
            font-size: 2rem;
        }

        /* 本文の下部余白 (フッターが被らないように) */
        body {
            padding-bottom: var(--footer-height);
        }

        /* スティッキーフッターを表示 */
        .sticky-footer {
            display: flex;
            /* Changed from block to flex */
            transform: translateY(0);
            /* スライドイン */
        }

        /* 通常のヘッダーナビを非表示にしてロゴのみにする等は上の.nav設定で対応済み */

        /* フッターコピーライトの余白調整 */
        .footer {
            padding-bottom: calc(40px + var(--footer-height));
            /* スティッキーフッターの裏に隠れないように念のため */
        }
    }
}