/* =================================
   RESET
================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
    color: var(--text);
    background-color: var(--bg);
    overflow-y: auto;
    line-height: 1.8;
}

/* =================================
   DESIGN SYSTEM
================================= */
:root {
    /* Technovation風の、鮮やかで力強いブランドカラー */
    --primary: #25c2cc;     /* 鮮やかなシアン（メイン） */
    --secondary: #76C724;   /* 鮮やかなグリーン */
    --accent: #e5a400;      /* 鮮やかなイエロー */
    
    /* 基本のテキストと背景 */
    --text: #1a1a1a;        /* 視認性を最高レベルにする深い黒 */
    --text-muted: #555555;  /* 少し柔らかい黒 */
    --bg: #ffffff;          /* 基本は白ベース */

    /* 黄金比を意識した、縮小しすぎない洗練されたサイズ設計 */
    --fs-hero: clamp(2.6rem, 5.5vw, 4.5rem);
    --fs-h1: clamp(2.2rem, 4vw, 3.5rem);
    --fs-h2: clamp(1.8rem, 3vw, 2.6rem);
    --fs-h3: clamp(1.3rem, 2vw, 1.6rem);
    --fs-h4: clamp(1.2rem, 2vw, 1.4rem);
    --fs-body: clamp(1rem, 1.2vw, 1.1rem);      /* スマホでも読みやすい16px〜 */
    --fs-small: clamp(0.875rem, 1vw, 0.95rem);   /* メニューや注記用 */
    
    /* 一貫性のある余白システム */
    --space-xs: clamp(8px, 1vw, 10px);
    --space-sm: clamp(16px, 2vw, 24px);
    --space-md: clamp(32px, 4vw, 48px);
    --space-lg: clamp(56px, 6vw, 88px);
    --space-xl: clamp(80px, 8vw, 140px);
}

/* =================================
   TYPOGRAPHY
================================= */
h1 {
    font-size: var(--fs-h1);
    line-height: 1.3;
    font-weight: 800;
}

h2 {
    font-size: var(--fs-h2);
    line-height: 1.3;
    text-align: center;
    font-weight: 700;
}

h2.alignleft {
    text-align: left;
}

h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}
h4 {
    font-size: var(--fs-h4);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

p {
    font-size: 1.05rem;
    color: var(text-muted);
    line-height: 1.95 !important;
    margin-bottom: 1.8rem !important;
    text-align: justify;
}
.bg-green p {
    color: #555;
}

/* =================================
   LEAD TEXT (h2の下の目立つテキスト)
================================= */
.lead-text {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem); 
    font-weight: 700;            
    text-align: center;
    line-height: 1.8;            
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md); 
    color: #4a4a4a; 
}

.bg-green .lead-text {
    color: #ffffff;
}

/* =================================
   HEADER
================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(20px, 5vw, 80px);
    z-index: 9999;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .03);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px; 
    width: auto;
}

nav {
    display: flex;
    gap: clamp(16px, 2.5vw, 40px);
    align-items: center; 
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-size: var(--fs-body);
    font-weight: 700;        
    transition: color 0.25s ease;
}

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

/* ヘッダー専用のフラットボタン */
nav a.nav-btn {
    background: var(--primary);
    color: #ffffff;             
    padding: 5px 20px;         
    border-radius: 999px;       
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease;
}

nav a.nav-btn:hover {
    background: #1da8b1; 
    color: #ffffff;
}

/* =================================
   SECTION
================================= */
.section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(100px, 12vh, 140px) 24px;
    position: relative;
}

.section-inner {
    width: 100%;
    max-width: 1200px; /* 横幅を少し引き締めて読みやすく */
    margin: auto;
}

/* 2カラムレイアウト（Aboutセクションなど） */
.feature {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    align-items: center;
}

.feature-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px; /* 角を少し丸めてモダンに */
}

.feature-content h2 {
    margin-bottom: var(--space-sm);
}

.feature-content p {
    margin-bottom: var(--space-xs);
}

/* =================================
   HERO
================================= */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(30px, 5vw, 80px);
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: var(--fs-hero);
}

.hero-text p {
    margin-top: var(--space-sm);
    font-size: var(--fs-body);
    color: var(--text-muted);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.8;
    color: var(--text-muted);
}

/* =================================
   GRID & LAYOUT
================================= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

/* =================================
   CARD (白背景ベースに統一)
================================= */
.card {
    background: #ffffff;
    border: 1px solid #eef2f6; /* 目立ちすぎない繊細な境界線 */
    border-radius: 24px;       /* 柔らかく今風な角丸 */
    padding: clamp(24px, 3vw, 40px);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); /* ほんの少しの高級シャドウ */
}

.card h3 {
    margin-bottom: var(--space-xs);
    color: var(--text);
}

.card p {
    font-size: var(--fs-body);
    color: var(--text-muted);
}

.card li {
    font-size: var(--fs-body);
    line-height: 1.7;
    margin-left: 1.2em;
    margin-bottom: var(--space-xs);
    color: var(--text-muted);
}

/* =================================
   COLOR SECTIONS
================================= */
/* 白をベースにするため、bg-blue は超淡い爽やかなグレーに変更 */
.bg-blue {
    background-color: #f8fafc; 
}

/* 唯一の見せ場セクション（プロダクト）は鮮やかにベタ塗り */
.bg-green {
    background-color: var(--secondary);
    color: #ffffff;
}

.bg-green h2, 
.bg-green p {
    color: #ffffff;
}

/* グリーンセクション内のカード：白ベースにして強烈に目立たせる */
.bg-green .card {
    background: #ffffff;
    color: var(--text);
    border: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.bg-green .card h3 {
    color: var(--text);
}

/* タイトルカラーの変数紐付け */
.title-blue { 
    color: #25c2cc !important; /* 鮮やかな「青（ロイヤルブルー）」に変更し、最優先にする */
    font-weight: 700; 
}
.title-green { 
    color: var(--secondary) !important; 
    font-weight: 700;
}
.title-yellow { 
    color: var(--accent) !important; 
}
/* =================================
   BUTTONS (完全フラット・モダンテック)
================================= */
.buttons {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.btn-container-center {
    display: flex;
    justify-content: center; 
    width: 100%;
    margin-top: var(--space-xs); /* リード文やコンテンツとの間の綺麗なマージン */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 38px;   
    border-radius: 999px; 
    text-decoration: none;
    font-size: var(--fs-body); /* バグ修正: 未定義だった--fs-middleから--fs-bodyに変更 */
    font-weight: 700;     
    letter-spacing: 0.05em;
    box-shadow: none;     
    border: 2px solid transparent; 
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

/* プライマリーボタン */
.btn-primary {
    background: var(--primary); 
    color: #fff;
}

.btn-primary:hover {
    background: var(--text); /* ホバー時に黒に変わる、海外テック風の超おしゃれな仕様 */
    transform: translateY(-1px);
}

/* セカンダリーボタン */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary); 
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary); 
    color: #fff;
    transform: translateY(-1px);
}

/* グリーンセクション（Miruum）専用の反転フラットボタン */
.bg-green .btn-primary {
    background: #ffffff;      
    color: var(--secondary);  
}

.bg-green .btn-primary:hover {
    background: var(--text);
    color: #ffffff;
}

/* カード内のテキストリンク（詳細を読む→） */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: var(--fs-body);
    font-weight: 700;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: var(--text);
}

.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.text-link:hover .arrow {
    transform: translateX(4px); /* ホバー時に矢印がピコッと右に動く仕掛け */
}

/* スクロールアイコン */
.scroll-next {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: var(--fs-small);
    animation: float 2s infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* =================================
   FOOTER & OTHER
================================= */
footer {
    padding: 60px 24px;
    background: #111111; 
}

.copyright {
    color: #888888;
    font-size: var(--fs-small);
    text-align: center;
}

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

/* =================================
   RESPONSIVE (タブレット・スマホ)
================================= */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-md);
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image {
        order: -1;
    }

    .feature {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 20px;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .buttons {
        justify-content: center;
    }

    /* --- 1. スマホ用ハンバーガーボタン（三）のスタイル --- */
    .menu-trigger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10000; /* メニューより手前に配置 */
        padding: 0;
    }

    .menu-trigger span {
        width: 100%;
        height: 3px;
        background-color: var(--text);
        border-radius: 4px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* ボタンがクリックされて「X」に変化する時の動き */
    .menu-trigger.active span:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }
    .menu-trigger.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-trigger.active span:nth-child(3) {
        transform: translateY(-9.5px) rotate(-45deg);
    }

    /* --- 2. スマホ用ナビゲーションのスタイル（隠しておく） --- */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* 画面いっぱいに広げる */
        background-color: rgba(255, 255, 255, 0.98); /* 背景は白 */
        backdrop-filter: blur(10px);
        flex-direction: column; /* 縦並びにする */
        justify-content: center;
        gap: 32px;
        
        /* 初期状態は画面の上に隠して透明にする */
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.3s ease;
        z-index: 9998;
    }

    /* メニューが開いた時（JSでactiveクラスがついた時） */
    nav.active {
        transform: translateY(0);
        opacity: 1;
    }

    nav a {
        font-size: 1.3rem; /* スマホでタップしやすいように文字を大きく */
        font-weight: 700;
    }

    /* お問い合わせボタンもスマホ用に幅を調整 */
    nav a.nav-btn {
        width: 80%;
        max-width: 300px;
        padding: 14px 24px;
    }
}

/* PC表示ではハンバーガーボタンを非表示にする */
@media (min-width: 769px) {
    .menu-trigger {
        display: none;
    }
}