/*
 * common.css - 次の灯 HP 共通CSS
 * Version: 3.0
 *
 * ベースリセット + ewrd- プロジェクト変数
 * ヘッダー/フッターは site-layout.css に分離（既存サイト準拠）
 *
 * v3.0 変更点:
 * - カラーパレット洗練化（エンタープライズBtoB品質）
 * - アクセントカラーをミュートゴールドへ変更
 * - タイポグラフィ階層の精緻化
 * - CTA・見出しの装飾を上品に抑制
 * - レインボーグラデーション廃止 → 単色アクセント
 */

/* ===================================
   プロジェクト用CSS変数（ewrd-コンテンツ用）
   日本BtoB製造業サイト参考 — 抑制された配色 + 高可読性
=================================== */
:root {
    /* ── Colors: Enterprise-grade palette ── */
    --primary-color: #1B5E20;          /* 深いグリーン（信頼・環境） */
    --primary-color-light: #2E7D32;
    --secondary-color: #1A2B48;        /* ディープネイビー（重厚感） */
    --secondary-color-light: #263B5E;
    --accent-color: #B8942E;           /* ミュートゴールド（抑制された高級感） */
    --accent-color-light: #D4AD3C;
    --accent-red: #D61518;             /* グロリオサレッド（差し色・2%以下） */
    --gradient-gloriosa: linear-gradient(90deg, #D61518 0%, #ffc107 25%, #28a745 50%, #ffc107 75%, #D61518 100%); /* グロリグラデ */
    --text-main: #2C2C2C;             /* ほぼ黒（高コントラスト） */
    --text-sub: #5A5A5A;              /* ミディアムグレー */
    --text-caption: #8A8A8A;          /* キャプション用 */
    --white: #ffffff;
    --bg-light: #F7F8FA;              /* わずかにブルーグレーがかった白 */
    --bg-warm: #FAFAF8;               /* ウォームオフホワイト */
    --border-light: #E8EBF0;          /* 繊細なボーダー */
    --border-medium: #D0D5DD;

    /* ── グロリオサグラデーション（グロリグラデ） ── */
    /* 企業カラー（赤→黄→緑→黄→赤）の連続グラデーション。グロリオサ（彼岸花）モチーフ */
    --gradient-gloriosa: linear-gradient(90deg, #D61518 0%, #ffc107 25%, #28a745 50%, #ffc107 75%, #D61518 100%);

    /* ── Typography: Enterprise-grade ── */
    --font-base: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Noto Sans JP", sans-serif;
    --font-japanese: 'Noto Sans JP', sans-serif;
    --font-serif: 'Noto Serif JP', serif;
    --font-english: 'Poppins', sans-serif;

    /* Font sizes — 精緻なスケール */
    --fs-hero: clamp(2.25rem, 3.5vw, 3.25rem);
    --fs-section-en: 0.6875rem;                    /* 11px: EN label - 控えめ */
    --fs-section-title: clamp(1.625rem, 2.5vw, 2.125rem); /* 26-34px */
    --fs-h2: clamp(1.375rem, 2vw, 1.75rem);
    --fs-h3: clamp(1.125rem, 1.5vw, 1.375rem);
    --fs-body: 0.9375rem;                          /* 15px: 本文基準 */
    --fs-body-s: 0.875rem;                         /* 14px */
    --fs-small: 0.8125rem;                         /* 13px */
    --fs-caption: 0.75rem;                         /* 12px */

    /* Line heights */
    --lh-heading: 1.5;
    --lh-body: 1.95;

    /* Letter spacing */
    --ls-heading: 0.06em;
    --ls-body: 0.04em;
    --ls-en-label: 0.2em;

    /* Spacing — ゆとりのあるリズム */
    --section-py: clamp(96px, 12vw, 140px);
    --section-py-sm: clamp(72px, 8vw, 96px);
    --content-gap: clamp(48px, 6vw, 72px);

    /* Shadows — 繊細な奥行き */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.4s var(--ease-out-expo);
}

/* ===================================
   ベースリセット
=================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: none;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-japanese);
    font-weight: 400;
    font-size: var(--fs-body);
    color: var(--text-main);
    line-height: var(--lh-body);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: var(--ls-body);
    font-feature-settings: "palt";
    position: relative;
}

/* Global noise texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

ul, ol {
    list-style: none;
}

img, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

button {
    all: unset;
    cursor: pointer;
}

/* ===================================
   共通ユーティリティ（ewrd-）
=================================== */
.ewrd-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px;
}

/* メインコンテンツ：固定ヘッダー分の余白 */
.main {
    padding-top: 0px;
}

/* ===================================
   タイポグラフィ基本階層
   日本BtoB製造業サイト参考 — 上品で読みやすい
=================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
}

h2 {
    font-family: var(--font-serif);
}

/* ===================================
   セクション見出しパターン
   EN label (控えめ) + JP title (端正)
   
   <div class="ewrd-heading">
     <span class="ewrd-heading-en">ABOUT US</span>
     <h2 class="ewrd-heading-jp">私たちについて</h2>
   </div>
=================================== */
.ewrd-heading {
    margin-bottom: 56px;
}

.ewrd-heading--center {
    text-align: center;
}

.ewrd-heading-en {
    display: block;
    font-family: var(--font-english);
    font-size: var(--fs-section-en);
    font-weight: 500;
    letter-spacing: var(--ls-en-label);
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 14px;
    position: relative;
}

/* ENラベル下の繊細なアクセントライン */
.ewrd-heading-en::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--accent-color);
    margin-top: 12px;
    transition: width var(--transition-base);
}

.ewrd-heading--center .ewrd-heading-en::after {
    margin-left: auto;
    margin-right: auto;
}

.ewrd-heading-jp {
    font-family: var(--font-serif);
    font-size: var(--fs-section-title);
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.45;
    letter-spacing: 0.08em;
}

/* 白背景バリエーション */
.ewrd-heading--light .ewrd-heading-en {
    color: rgba(255, 255, 255, 0.5);
}

.ewrd-heading--light .ewrd-heading-en::after {
    background: var(--accent-color);
}

.ewrd-heading--light .ewrd-heading-jp {
    color: #fff;
}

/* ===================================
   サブページ共通ヒーロー
   紺背景 + ノイズ + EN/JP heading
=================================== */
.ewrd-sub-hero {
    padding: 148px 0 56px;
    background: var(--secondary-color, #1A2B48);
    position: relative;
    overflow: hidden;
}

.ewrd-sub-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAAAi4wAAAAV0Uk5TABAQEBDQlXkAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAA0SURBVDjLY2AYBaNgOAMmBgYWBij4DwIMUMAEBQxQwAAFTFDABAWMUMCIAsAKUMG/UTDkAQAHLALRSN0r2AAAAABJRU5ErkJggg==");
    background-repeat: repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.ewrd-sub-hero > * {
    position: relative;
    z-index: 1;
}

.ewrd-sub-hero .ewrd-heading {
    margin-bottom: 0;
}

.ewrd-sub-hero .ewrd-heading-en {
    color: rgba(255, 255, 255, 0.5);
}

.ewrd-sub-hero .ewrd-heading-en::after {
    background: var(--accent-color);
}

.ewrd-sub-hero .ewrd-heading-jp {
    color: #fff;
}

@media (max-width: 850px) {
    .ewrd-sub-hero {
        padding: 110px 0 40px;
    }
}

/* 旧互換クラス */
.ewrd-section-label {
    font-family: var(--font-english);
    font-size: var(--fs-section-en);
    font-weight: 500;
    letter-spacing: var(--ls-en-label);
    text-transform: uppercase;
}

.ewrd-section-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: var(--fs-section-title);
    line-height: 1.45;
    letter-spacing: 0.08em;
}

/* ===================================
   CTA セクション
   エンタープライズ — 重厚かつ上品
=================================== */
.ewrd-cta {
    padding: var(--section-py) 0;
    background: var(--secondary-color);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 繊細なグラデーション装飾 */
.ewrd-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 100%, rgba(27, 94, 32, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 0%, rgba(184, 148, 46, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.ewrd-cta > * {
    position: relative;
    z-index: 1;
}

.ewrd-cta .ewrd-heading-en {
    color: rgba(255, 255, 255, 0.4);
}

.ewrd-cta .ewrd-heading-en::after {
    background: var(--accent-color);
    margin-left: auto;
    margin-right: auto;
}

.ewrd-cta .ewrd-heading-jp {
    color: #fff;
}

.ewrd-cta-lead {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0 auto 52px;
    letter-spacing: 0.04em;
}

.ewrd-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.ewrd-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    font-size: var(--fs-body-s);
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.06em;
    transition: all var(--transition-base);
    text-decoration: none;
}

.ewrd-cta-btn--primary {
    background: var(--accent-color);
    color: var(--white);
}

.ewrd-cta-btn--primary:hover {
    background: var(--accent-color-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(184, 148, 46, 0.25);
}

.ewrd-cta-btn--outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ewrd-cta-btn--outline:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.ewrd-cta-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

@media (max-width: 600px) {
    .ewrd-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .ewrd-cta-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ===================================
   ノイズテクスチャ ユーティリティ
=================================== */
.ewrd-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAAAi4wAAAAV0Uk5TABAQEBDQlXkAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAA0SURBVDjLY2AYBaNgOAMmBgYWBij4DwIMUMAEBQxQwAAFTFDABAWMUMCIAsAKUMG/UTDkAQAHLALRSN0r2AAAAABJRU5ErkJggg==");
    background-repeat: repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* ===================================
   共通セクション間の装飾ライン
=================================== */
.ewrd-section-divider {
    width: 1px;
    height: 64px;
    background: var(--border-light);
    margin: 0 auto;
}

/* ===================================
   フェードインアニメーション（IntersectionObserver用）
=================================== */
/* ===================================
   パンくずリスト
   ヒーロー内に配置 — 白系テキスト
=================================== */
.ewrd-breadcrumb {
    margin-top: 24px;
}

.ewrd-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
}

.ewrd-breadcrumb-item {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.03em;
}

.ewrd-breadcrumb-item + .ewrd-breadcrumb-item::before {
    content: '>';
    display: inline-block;
    margin: 0 10px;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.35);
}

.ewrd-breadcrumb-item a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color var(--transition-base);
}

.ewrd-breadcrumb-item a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.ewrd-breadcrumb-item[aria-current="page"] {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 600px) {
    .ewrd-breadcrumb-item {
        font-size: 0.75rem;
    }
}

/* ===================================
   フェードインアニメーション（IntersectionObserver用）
=================================== */
.ewrd-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.ewrd-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
