/* =========================
   Design Tokens（共通変数）
========================= */
:root {
    /* カラー */
    --color-accent: #33BFD2;
    --color-text: #222;
    --color-text-sub: #666;
    --color-text-muted: #888;
    --color-text-333: #333;
    --color-bg-light: #f7f9fa;
    --color-bg-gray: #fafafa;
    --color-bg-cta: #f5f5f5;
    --color-border: #e0e0e0;
    --color-white: #ffffff;
    --color-black: #000000;

    /* ヘッダー背景 */
    --header-bg-dark: rgba(0,0,0,0.25);
    --header-bg-light: rgba(255,255,255,0.95);
    --nav-bg-mobile: rgba(0,0,0,0.95);

    /* シャドウ */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-card: 0 5px 20px rgba(0,0,0,0.25);
    --shadow-btn: 0 10px 30px rgba(0,0,0,0.2);
    --shadow-img: 0 10px 30px rgba(0,0,0,0.7);

    /* レイアウト */
    --container-width: 960px;
    --content-width: 840px;
    --header-height: 100px;
    --header-height-sm: 80px;

    /* フォント */
    --font-serif: serif;
    --font-sans: sans-serif;

    /* トランジション */
    --transition: 0.3s;
    --transition-fast: 0.2s;
}

/* =========================
   リセット
========================= */
body, h1, h2, p, ul {
    margin: 0;
    padding: 0;
}
body {
    font-family: var(--font-sans);
}

/* =========================
   Header
========================= */
.header {
    /* デフォルト（トップページ用：暗ヘッダー） */
    --header-bg: var(--header-bg-dark);
    --header-text: var(--color-white);
    --header-hamburger: var(--color-white);

    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    background: var(--header-bg);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

/* ロゴ */
.logo {
    color: var(--header-text);
    font-weight: bold;
    height: 80px;
    width: auto;
    padding: 10px;
}
.logo-area {
    display: flex;
    align-items: center;
}
.logo-area h1 {
    color: var(--header-text);
    font-size: 24px;
    margin-left: 15px;
}
.logo-area h1 a {
    text-decoration: none;
    color: inherit;
}

/* ナビ */
nav a {
    position: relative;
    color: var(--header-text);
    margin-left: 20px;
    text-decoration: none;
}
/* 下線（最初は見えない） */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}
/* ホバー時 */
nav a:hover::after {
    width: 100%;
    transform: translateY(-2px);
    transition: var(--transition-fast);
}
/* 現在地ナビの下線（全ページ共通） */
.global-nav a.current::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
}

/* ハンバーガー */
#menu-toggle {
    display: none;
}
.hamburger {
    display: none;
}

/* ---- サブページ用：ヘッダーテーマを上書き ---- */
.header-sub {
    --header-bg: var(--header-bg-light);
    --header-text: var(--color-text);
    --header-hamburger: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* =========================
   Hero（トップ）
========================= */
.hero {
    height: 100vh;
    background-image: url("../img/hero.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-text {
    position: absolute;
    top: 35%;
    left: 25%;
    transform: translate(-50%, -50%);
    color: var(--color-white);
    text-align: left;
    font-size: 60px;
    font-family: var(--font-serif);
}
.hero-text h1 {
    font-size: 72px;
}

/* =========================
   Company（トップ内）
========================= */
.company {
    height: 100vh;
    background-image: url("../img/old_hero.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.company-text {
    max-width: var(--content-width);
    position: absolute;
    margin-top: 100px;
    color: var(--color-black);
    text-align: left;
    font-size: 20px;
}

/* =========================
   Section
========================= */
.section-title {
    width: 100%;
    font-size: 36px;
    text-align: left;
    padding: 100px 0 0 50px;
}
.section {
    display: flex;
    align-items: center;
    min-height: 80vh;
}
.section img {
    width: 60%;
    margin-left: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-img);
}
.section .text {
    width: 40%;
    padding-left: 10%;
}
.section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.section p {
    font-size: 18px;
    line-height: 1.8;
    max-width: 400px;
}
.section.area {
    padding: 0px 0 200px;
    background: var(--color-white);
}
/* 左右反転 */
.image-right {
    padding-right: 50px;
}
/* フル画像 */
.full-img img {
    width: 100%;
    display: block;
}

/* =========================
   NEWS
========================= */
.news-section {
    padding: 120px 50px;
    background: var(--color-white);
}
.news-title h2 {
    font-size: 36px;
    margin-bottom: 50px;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.news-card {
    background: var(--color-white);
    text-decoration: none;
    color: var(--color-black);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.news-card:hover {
    transform: translateY(-8px);
}
.news-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.news-content {
    padding: 30px;
}
.news-date {
    color: var(--color-text-muted);
    font-size: 14px;
}
.news-content h3 {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 24px;
}
.news-content p {
    line-height: 1.8;
}
.news-more {
    margin-top: 50px;
    text-align: center;
}
.news-more .link-btn {
    font-size: 18px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}
.news-more .link-btn::after {
    content: "→";
    margin-left: 8px;
    transition: var(--transition);
}
.news-more .link-btn:hover::after {
    margin-left: 15px;
}

/* =========================
   CTA
========================= */
.cta {
    text-align: center;
    padding: 80px 20px;
    background: var(--color-bg-cta);
    color: var(--color-black);
}

/* =========================
   Buttons
========================= */
.buttons {
    margin-top: 30px;
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    margin-right: 0px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid var(--color-black);
    box-shadow: var(--shadow-btn);
    color: var(--color-black);
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: var(--transition);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--color-black);
    color: var(--color-black);
}
.btn:hover,
.btn-outline:hover {
    background: var(--color-black);
    color: var(--color-white);
}
.link-btn {
    display: inline-block;
    margin-top: 30px;
    color: var(--color-black);
    text-decoration: none;
    border: none;
    border-bottom: 1px solid var(--color-black);
    padding-bottom: 3px;
    font-size: 16px;
    transition: var(--transition);
}
.link-btn:hover {
    opacity: 0.6;
}

/* =========================
   Footer
========================= */
.footer {
    text-align: center;
    padding: 20px;
    background: var(--color-black);
    color: var(--color-white);
}

/* =========================
   Sub Page 共通
========================= */
/* サブページヒーロー */
.sub-hero {
    height: 45vh;
    min-height: 280px;
    margin-top: var(--header-height);
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
                url("../img/hero.png") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
}
.sub-hero-inner h1 {
    font-size: 56px;
    font-family: var(--font-serif);
    letter-spacing: 6px;
    margin-bottom: 12px;
}
.sub-hero-inner p {
    font-size: 16px;
    letter-spacing: 4px;
    opacity: 0.9;
}

/* パンくず */
.breadcrumb {
    max-width: var(--container-width);
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 13px;
    color: var(--color-text-sub);
}
.breadcrumb a {
    color: var(--color-text-sub);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--color-accent);
}

/* 本文コンテナ */
.sub-content {
    max-width: var(--container-width);
    margin: 40px auto 100px;
    padding: 0 20px;
    line-height: 1.9;
    color: var(--color-text);
}

.sub-block {
    margin-bottom: 80px;
}

/* h2 = 章タイトル */
.sub-block h2 {
    font-size: 30px;
    border-left: 4px solid var(--color-accent);
    padding-left: 16px;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

/* h3 = サブタイトル */
.sub-block h3,
.tech-section h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.sub-block p {
    font-size: 16px;
    margin-bottom: 16px;
}

.sub-block img{
    width: 100%;
    margin: 20px 0;
}

.signature {
    text-align: right;
    margin-top: 20px;
    font-weight: bold;
}

/* =========================
   Company
========================= */
/* 経営理念 */
.philosophy {
    background: var(--color-bg-light);
    padding: 50px 40px;
    text-align: center;
    border-radius: 8px;
}
.philosophy-lead {
    font-size: 32px;
    font-family: var(--font-serif);
    letter-spacing: 4px;
    color: var(--color-accent);
    margin-bottom: 20px;
}

/* 会社情報テーブル */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}
.info-table th,
.info-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}
.info-table th {
    width: 160px;
    background: var(--color-bg-gray);
    font-weight: bold;
    color: var(--color-text-333);
}

/* 沿革タイムライン */
.timeline {
    list-style: none;
    padding: 0;
    border-left: 2px solid var(--color-accent);
    margin-left: 20px;
}
.timeline li {
    position: relative;
    padding: 0 0 30px 30px;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 50%;
}
.tl-year {
    display: inline-block;
    width: 90px;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-accent);
}
.tl-text {
    font-size: 16px;
}

/* 地図 */
.map-wrap {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* =========================
   Technology
========================= */
.tech-intro{
    padding:80px 0;
}

.application-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:30px;
    margin-top:40px;
}

.app-card{
    background:white;
    padding:40px 30px;
    text-align:center;
    border-radius:10px;
    box-shadow:var(--shadow-card);
}

.app-card h3{
    margin-bottom:15px;
    color:var(--color-accent);
}

.app-table{
    width:100%;
    border-collapse:collapse;
    margin-top:0px;
}

.app-table th,
.app-table td{
    padding: 12px 15px;
    text-align:left;
    border-bottom:1px solid var(--color-border);
}

.app-table th{
    width:100px;
    background:var(--color-bg-gray);
    font-weight:bold;
    color:var(--color-text-333);
}

/* =========================
   Responsive - PC〜Tablet境界
========================= */
@media (max-width: 1000px) {
    .logo-area h1 {
        display: none;
    }
}

@media (max-width: 992px) {
    .logo-area h1 {
        display: none;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        cursor: pointer;
    }
    .hamburger span {
        height: 2px;
        background: var(--header-hamburger);
        display: block;
    }
    .global-nav {
        position: fixed;
        top: 80px;
        right: 0;
        width: min(200px, 85vw);
        height: calc(100vh - 80px);
        background: var(--nav-bg-mobile);
        display: flex;
        flex-direction: column;
        transform: translateX(120%);
        opacity: 0;
        transition:
            transform 0.35s ease,
            opacity 0.35s ease;
        pointer-events: none;
    }
    #menu-toggle:checked ~ .global-nav {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    /* モバイルメニュー内は常に白文字（黒背景ドロップダウン用） */
    .global-nav a {
        display: block;
        margin: 0;
        padding: 20px 40px;
        color: var(--color-white);
    }
    .header {
        height: var(--header-height-sm);
    }
    .logo {
        height: 60px;
    }
}

/* =========================
   Responsive - Tablet
========================= */
@media (max-width: 1024px) {
    .hero-text {
        left: 15%;
    }
    .hero-text h1 {
        font-size: 56px;
    }
    .section img {
        width: 55%;
        margin-left: 30px;
    }
    .section .text {
        padding-left: 5%;
    }
}

/* =========================
   Responsive - Smartphone
========================= */
@media (max-width: 768px) {
    /* ヘッダー */
    .header {
        height: var(--header-height-sm);
    }
    .header-inner {
        padding: 0 20px;
    }
    .logo {
        height: 60px;
    }
    .logo-area h1 {
        font-size: 16px;
        white-space: nowrap;
    }
    /* ヒーロー */
    .hero-text {
        left: 10%;
        top: 40%;
        transform: translateY(-50%);
    }
    .hero-text h1 {
        font-size: 40px;
        line-height: 1.4;
    }
    /* 会社説明 */
    .company-text {
        width: 90%;
        font-size: 16px;
    }
    /* Section タイトル */
    .section-title {
        font-size: 24px;
        padding: 50px 20px;
    }
    /* 画像＋文字 */
    .section {
        flex-direction: column;
        padding: 40px 20px;
        min-height: auto;
    }
    .section img {
        width: 100%;
        margin: 0;
    }
    .section .text {
        width: 100%;
        padding: 30px 0 0;
    }
    .section h2 {
        font-size: 28px;
    }
    .section p {
        max-width: 100%;
        font-size: 16px;
    }
    /* image-right対応 */
    .image-right {
        flex-direction: column;
        padding-right: 0;
    }
    /* ボタン */
    .btn {
        font-size: 16px;
        padding: 10px 24px;
    }
    /* サブページ */
    .sub-hero {
        margin-top: var(--header-height-sm);
        height: 35vh;
    }
    .sub-hero-inner h1 {
        font-size: 36px;
        letter-spacing: 3px;
    }
    .sub-hero-inner p {
        font-size: 14px;
    }
    .sub-block h2 {
        font-size: 22px;
    }
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
        padding: 12px 15px;
    }
    .info-table th {
        border-bottom: none;
        padding-bottom: 4px;
    }
    .philosophy {
        padding: 30px 20px;
    }
    .philosophy-lead {
        font-size: 22px;
    }
    .tl-year {
        display: block;
        width: auto;
    }
    /* Technology */
    .application-grid{
        grid-template-columns:1fr;
    }
}