:root {
    --primary-color: #476c9b;      /* 落ち着いたブルー */
    --secondary-color: #274060;    /* ネイビー */
    --accent-color: #8692a6;       /* 青みグレー */
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --text-color: #495057;
    --white-color: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: var(--dark-color);
    overflow-x: hidden;
    background-color: var(--light-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    transition: all 0.4s ease-in-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
    letter-spacing: -0.8px;
    transition: color 0.3s ease;
}
.logo:hover { color: var(--primary-color); }
nav ul {
    display: flex;
    list-style: none;
    gap: 2.8rem;
}
nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    font-size: 1.05rem;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}
nav a:hover {
    color: var(--primary-color);
}
nav a:hover::after {
    width: 100%;
}

/* メインビジュアル */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('main.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white-color);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: heroBackgroundZoom 20s infinite alternate ease-in-out;
    z-index: 1;
}
@keyframes heroBackgroundZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1); }
}
.hero-content {
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeInUp 1.2s ease-out;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
}
.hero p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    animation: fadeInUp 1.2s ease-out 0.3s both;
}
.cta-button {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: fadeInUp 1.2s ease-out 0.6s both;
    box-shadow: 0 8px 25px rgba(71, 108, 155, 0.25);
    letter-spacing: 0.5px;
}
.cta-button:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 45px rgba(39, 64, 96, 0.33);
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}

/* セクション共通 */
section {
    padding: 7rem 0;
    position: relative;
    overflow: hidden;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section-title {
    text-align: center;
    font-size: 3.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 700;
    position: relative;
    letter-spacing: -0.5px;
}
.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.section-title::after {
    content: '';
    display: block;
    width: 90px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.8rem auto;
    border-radius: 3px;
}

/* 事業内容 */
.services {
    background: var(--light-color);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}
.service-card {
    background: var(--white-color);
    border-radius: 20px;
    box-shadow: 0 15px 40px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.service-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 70px var(--shadow-medium);
}
.service-card:hover .service-card-image {
    transform: scale(1.08);
}
.service-card-content {
    padding: 2.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.service-card h3 {
    font-size: 1.7rem;
    margin-bottom: 1.2rem;
    color: var(--dark-color);
    font-weight: 600;
}
.service-card p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.05rem;
    flex-grow: 1;
}

/* サービス詳細オーバーレイ */
.service-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.service-detail-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.service-detail-content {
    background: var(--white-color);
    border-radius: 20px;
    box-shadow: 0 25px 80px var(--shadow-heavy);
    width: 90%;
    max-width: 800px;
    padding: 3rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
}
.service-detail-overlay.is-active .service-detail-content {
    opacity: 1;
    transform: scale(1);
}
.service-detail-content h3 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    text-align: center;
}
.service-detail-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.9;
    margin-bottom: 2rem;
}
.service-detail-content .detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 2rem;
}
.service-detail-close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--accent-color);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}
.service-detail-close-button:hover {
    transform: rotate(90deg);
    color: var(--primary-color);
}

/* 会社概要（テーブル：罫線のみシンプル版） */
.company-info {
    background: var(--white-color);
}
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin: 3rem auto 0;
    max-width: 900px;
    background: none;
    box-shadow: none;
    border-radius: 0;
}
.company-table th,
.company-table td {
    border: 1px solid #bbb;
    padding: 1.2rem 2rem;
    text-align: left;
    background: #fff;
    color: var(--text-color);
    font-weight: normal;
}
.company-table th {
    background: #f7f7f7;
    font-weight: 600;
    color: var(--dark-color);
    width: 200px;
    border-right: 1px solid #bbb;
}
.company-table tr {
    background: none;
    transition: none;
    box-shadow: none;
}
.company-table tr:hover {
    background: none;
    transform: none;
    box-shadow: none;
}

/* 特徴セクション */
.features {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    position: relative;
    overflow: hidden;
}
.features::before, .features::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    filter: blur(50px);
    z-index: 0;
}
.features::before {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: bubble1 15s infinite ease-in-out alternate;
}
.features::after {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -150px;
    animation: bubble2 18s infinite ease-in-out alternate-reverse;
}
@keyframes bubble1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.05; }
    50% { transform: translate(50px, -20px) scale(1.1); opacity: 0.1; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.05; }
}
@keyframes bubble2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.05; }
    50% { transform: translate(-30px, 40px) scale(0.9); opacity: 0.1; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.05; }
}
.features .section-title, .features .section-subtitle {
    color: var(--white-color);
    position: relative;
    z-index: 1;
}
.features .section-subtitle {
    color: rgba(255, 255, 255, 0.85);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3.5rem;
    position: relative;
    z-index: 1;
}
.feature-item {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}
.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.feature-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.feature-number::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}
.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white-color);
}
.feature-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
}

/* アクセスマップ */
#access {
    padding-top: 7rem;
    padding-bottom: 0;
}
.map-container {
    width: 100%;
    height: 500px;
    margin-top: 3rem;
    box-shadow: 0 15px 40px var(--shadow-light);
    border-radius: 16px;
    overflow: hidden;
}
.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* フッター */
footer {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 5rem 0 2rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}
.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}
.footer-text {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2.5rem;
}
.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .hero p { font-size: 1.2rem; }
    .section-title { font-size: 2.5rem; }
    .section-subtitle { font-size: 1.1rem; }
    .services-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .service-detail-content {
        width: 95%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; }
    nav ul { gap: 1.5rem; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; }
    .section-title { font-size: 2.2rem; }
    section { padding: 4rem 0; }
    .services-grid, .features-grid { grid-template-columns: 1fr; }

    /* テーブル・モバイルシンプル */
    .company-table, .company-table tbody, .company-table tr, .company-table th, .company-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .company-table th {
        border-top: 1px solid #bbb;
        border-left: 1px solid #bbb;
        border-right: 1px solid #bbb;
        background: #f7f7f7;
    }
    .company-table td {
        border-bottom: 1px solid #bbb;
        border-left: 1px solid #bbb;
        border-right: 1px solid #bbb;
        background: #fff;
    }

    #access {
        padding-top: 4rem;
    }
    .map-container {
        height: 350px;
    }
    .feature-item {
        padding: 2rem;
    }
    .service-detail-content {
        padding: 1.5rem;
    }
    .service-detail-content h3 {
        font-size: 1.8rem;
    }
    .service-detail-content p {
        font-size: 1rem;
    }
    .service-detail-close-button {
        font-size: 1.5rem;
        top: 1rem;
        right: 1rem;
    }
}

/* スクロールアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}
.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* モバイルナビゲーション開閉 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        transform: translateY(-200%);
        opacity: 0;
        transition: all 0.4s ease;
        pointer-events: none;
        z-index: 1000;
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        padding: 1.8rem;
    }

    .company-table,
    .company-table tbody,
    .company-table tr,
    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background: #f7f7f7;
        border-top: 1px solid #bbb;
        border-left: 1px solid #bbb;
        border-right: 1px solid #bbb;
    }

    .company-table td {
        border-bottom: 1px solid #bbb;
        border-left: 1px solid #bbb;
        border-right: 1px solid #bbb;
    }

    .map-container {
        height: 300px;
    }

    .footer-content {
        padding: 0 1rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    .footer-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

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

    .section-subtitle {
        font-size: 0.95rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.9rem;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .footer-text {
        font-size: 0.9rem;
    }

    .footer-bottom p {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
  nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white-color);
    transform: translateY(-200%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    z-index: 999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  }

  nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  nav ul {
    flex-direction: column;
    gap: 1.2rem;
    padding: 2rem 0;
    width: 100%;
    text-align: center;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    display: block;
    padding: 1rem 0;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border-top: 1px solid #eee;
    transition: background 0.3s ease, color 0.3s ease;
  }

  nav ul li:first-child a {
    border-top: none;
  }

  nav ul li a:hover {
    background: var(--light-color);
    color: var(--primary-color);
  }
}
