/* ============================================
   合同会社紺屋 コーポレートサイト
   カラーシステム: ネイビー × ブルー × ティール
   ============================================ */

/* --- CSS変数 --- */
:root {
    --color-primary: #1e293b;
    --color-secondary: #3b82f6;
    --color-accent: #14b8a6;
    --color-bg: #fafafa;
    --color-bg-alt: #f1f5f9;
    --color-bg-dark: #0f172a;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --container-max: 1200px;
    --header-height: 72px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- リセット・ベース --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #2563eb;
}

/* フォーカス表示 */
:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- コンテナ --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- ヘッダー --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

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

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

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

/* ハンバーガーメニュー（モバイル用） */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--color-primary);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

nav a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

nav a:hover {
    background: var(--color-bg-alt);
    color: var(--color-secondary);
}

nav .nav-cta {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
}

nav .nav-cta:hover {
    background: #334155;
    color: var(--color-white);
}

/* --- ヒーローセクション --- */
#hero {
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1e3a5f 100%);
    color: var(--color-white);
    padding: 120px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#hero .container {
    position: relative;
    z-index: 1;
}

#hero h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
    border-bottom: none;
    padding-bottom: 0;
}

#hero .hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--color-white);
}

#hero .hero-sub {
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.hero-cta:hover {
    background: #2563eb;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* --- セクション共通 --- */
section {
    padding: 80px 0;
}

section .container {
    max-width: var(--container-max);
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
    line-height: 1.4;
}

.section-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 640px;
    line-height: 1.8;
}

/* 交互背景色 */
section:nth-of-type(even) {
    background: var(--color-bg-alt);
}

/* --- 会社概要 --- */
#about dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
    margin-top: 32px;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

#about dt {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

#about dd {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

#about dt:last-of-type,
#about dd:last-of-type {
    border-bottom: none;
}

/* --- PoC支援 --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.service-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.service-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.service-card .card-icon.blue {
    background: #eff6ff;
    color: var(--color-secondary);
}

.service-card .card-icon.teal {
    background: #f0fdfa;
    color: var(--color-accent);
}

.service-card .card-icon.navy {
    background: #f1f5f9;
    color: var(--color-primary);
}

.service-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* --- CTA セクション --- */
#start {
    background: var(--color-bg-alt);
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.cta-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: box-shadow var(--transition);
}

.cta-card:hover {
    box-shadow: var(--shadow-md);
}

.cta-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.cta-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* --- ボタン --- */
.button-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    min-height: 48px;
}

.button-link:hover {
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: #2563eb;
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

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

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

.btn-teal:hover {
    background: #0d9488;
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.25);
}

.cta-card .button-link {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* --- 事業セクション --- */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.business-card {
    position: relative;
    border-radius: var(--radius);
    padding: 40px 32px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.business-card.robotics {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.business-card.health {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1px solid #99f6e4;
}

.business-card .card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.business-card.robotics .card-badge {
    background: var(--color-secondary);
    color: var(--color-white);
}

.business-card.health .card-badge {
    background: var(--color-accent);
    color: var(--color-white);
}

.business-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.business-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* --- フッター --- */
footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 32px;
}

footer .container {
    max-width: var(--container-max);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

.footer-brand img {
    height: auto;
    width: 160px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal {
    display: flex;
    gap: 20px;
}

/* --- 法的ページ共通（プライバシー、外部送信） --- */
.legal-page main {
    padding: 40px 0 80px;
}

.legal-page section {
    padding: 0;
    background: none;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 48px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-primary);
}

.legal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-content p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    line-height: 1.8;
}

.legal-content ul {
    padding-left: 24px;
    margin-bottom: 12px;
}

.legal-content li {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    line-height: 1.7;
}

.legal-content .enactment-date {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* --- レスポンシブ: タブレット (1024px以下) --- */
@media (max-width: 1024px) {
    .business-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        gap: 32px;
    }
}

/* --- レスポンシブ: タブレット小 (768px以下) --- */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    /* ハンバーガー表示 */
    .menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
        padding: 16px 24px;
        z-index: 99;
    }

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

    nav ul {
        flex-direction: column;
        gap: 4px;
    }

    nav a {
        display: block;
        padding: 12px 16px;
        font-size: 1rem;
    }

    /* ヒーロー */
    #hero {
        padding: 80px 24px 60px;
    }

    /* セクション */
    section {
        padding: 60px 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .cta-grid {
        grid-template-columns: 1fr;
    }

    /* フッター */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* 法的ページ */
    .legal-content {
        padding: 32px 24px;
    }

    #about dl {
        grid-template-columns: 1fr;
    }

    #about dt {
        border-bottom: none;
        padding-bottom: 4px;
    }

    #about dd {
        padding-top: 4px;
    }
}

/* --- レスポンシブ: モバイル (480px以下) --- */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .logo img {
        height: 32px;
    }

    .business-card {
        padding: 28px 24px;
    }

    .button-link {
        width: 100%;
        justify-content: center;
    }

    .cta-card .button-link {
        margin-right: 0;
    }
}
