/* =========================================================
   WHABITAT 広報ページ — ミニマル / モノトーン デザイン (landing.css)
   - style.css を土台に広報ページ(index / activity_* / blog / 404)だけを上書き。
   - 会員ページ(dashboard 等)はこのファイルを読み込まないため影響しない。
   - 配色は「墨・オフホワイト・グレー」のみ。色は写真にのみ持たせる。
   ========================================================= */

:root {
    /* 広報ページではブランドの原色アクセントをすべて墨へ寄せる（会員ページには非影響） */
    --accent-green: #1a1a1a;
    --accent-blue: #1a1a1a;
    --accent-red: #1a1a1a;
    --accent-orange: #1a1a1a;
    --text-color: #1a1a1a;
    --text-light: #8d877c;

    --lp-ink: #1a1a1a;
    --lp-ink-2: #2a2a2a;
    --lp-paper: #faf9f6;     /* 温かいオフホワイト */
    --lp-paper-2: #f2f0ea;   /* セクション交互の微差 */
    --lp-line: #e6e2d9;      /* 細いボーダー */
    --lp-muted: #8d877c;
    --lp-radius: 4px;
    --lp-max: 1120px;
    --lp-ease: cubic-bezier(.16, .84, .44, 1);
}

html { scroll-behavior: smooth; }
body { background: var(--lp-paper); color: var(--lp-ink); }
section[id] { scroll-margin-top: 80px; }
.container { max-width: var(--lp-max); }

section { padding: 8rem 0; }
.bg-light { background: var(--lp-paper-2); }
.bg-white { background: var(--lp-paper); }

/* 見出し：小さく、上品に、細い区切り線のみ */
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: clamp(1.55rem, 3.5vw, 2.1rem);
    letter-spacing: .01em;
    color: var(--lp-ink);
}
.section-title span::after {
    content: ""; display: block;
    width: 30px; height: 1px; margin: 1.2rem auto 0;
    background: var(--lp-ink); opacity: .28;
}

/* =========================================================
   ヒーロー（4バリアント比較: full / split / grid / typo）
   ?hero=full|split|grid|typo で切替
   ========================================================= */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: var(--lp-paper-2);
}
.hero::before, .hero::after { content: none; }

/* 共通コンテンツ（既定は明るい地＝墨文字。full のみ白に上書き） */
.hero-content { position: relative; z-index: 2; text-align: center; color: var(--lp-ink); padding: 6rem 1.5rem; max-width: 760px; }
.hero-logo-main { width: 66px; height: auto; margin: 0 auto 1.8rem; }
.hero-title { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: clamp(2.6rem, 8vw, 4.8rem); letter-spacing: .14em; color: var(--lp-ink); margin: 0; }
.hero-catch { font-size: clamp(.98rem, 2vw, 1.15rem); font-weight: 500; line-height: 1.95; margin: 1.8rem auto 0; max-width: 30em; color: var(--lp-muted); }
.hero-subtitle-wrapper { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.6rem; opacity: .85; }
.hero-logo-sub { height: 18px; width: auto; filter: grayscale(1); opacity: .7; }
.hero-subtitle-wrapper .hero-subtitle { font-family: 'Montserrat', sans-serif; font-size: .68rem; letter-spacing: .26em; font-weight: 500; color: var(--lp-muted); margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 2.8rem; }
.btn-hero { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 2rem; font-size: .88rem; font-weight: 500; letter-spacing: .03em; text-decoration: none; border-radius: var(--lp-radius); transition: transform .3s var(--lp-ease), background .3s, color .3s, border-color .3s; }
.btn-hero-primary { background: var(--lp-ink); color: #fff; }
.btn-hero-primary:hover { background: var(--lp-ink-2); transform: translateY(-2px); }
.btn-hero-ghost { background: transparent; color: var(--lp-ink); border: 1px solid var(--lp-line); }
.btn-hero-ghost:hover { background: rgba(26,26,26,.04); border-color: var(--lp-ink); transform: translateY(-2px); }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 22px; height: 36px; border: 1px solid rgba(26,26,26,.25); border-radius: 12px; z-index: 3; }
.hero-scroll span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--lp-ink); animation: lpScroll 1.9s var(--lp-ease) infinite; }
@keyframes lpScroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* --- full: 全面写真＋白文字 --- */
.hero--full { background: #2a2a2a; }
.hero--full .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); }
.hero--full .hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,20,22,.30) 0%, rgba(18,20,22,.34) 45%, rgba(18,20,22,.58) 100%); }
.hero--full .hero-content, .hero--full .hero-title, .hero--full .hero-subtitle { color: #fff; }
.hero--full .hero-catch { color: #fff; text-shadow: 0 1px 16px rgba(0,0,0,.6); }
.hero--full .hero-title { text-shadow: 0 2px 28px rgba(0,0,0,.45); }
.hero--full .hero-logo-main { filter: drop-shadow(0 3px 14px rgba(0,0,0,.35)); }
.hero--full .hero-logo-sub { filter: brightness(0) invert(1); opacity: .85; }
.hero--full .btn-hero-primary { background: #fff; color: #1a1a1a; }
.hero--full .btn-hero-primary:hover { background: rgba(255,255,255,.88); }
.hero--full .btn-hero-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.6); }
.hero--full .btn-hero-ghost:hover { background: rgba(255,255,255,.18); }
.hero--full .hero-scroll { border-color: rgba(255,255,255,.6); }
.hero--full .hero-scroll span { background: #fff; }

/* --- split: 左テキスト / 右写真 --- */
.hero--split { flex-direction: row; align-items: stretch; }
.hero--split .hero-content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; max-width: none; padding: 4rem clamp(2rem, 5vw, 5rem); }
.hero--split .hero-subtitle-wrapper, .hero--split .hero-cta { justify-content: flex-start; }
.hero--split .hero-side-img { flex: 1; background-size: cover; background-position: center; min-height: 50vh; }
@media (max-width: 768px) {
    .hero--split { flex-direction: column; }
    .hero--split .hero-content { align-items: center; text-align: center; padding: 5rem 1.5rem 3rem; }
    .hero--split .hero-subtitle-wrapper, .hero--split .hero-cta { justify-content: center; }
    .hero--split .hero-side-img { width: 100%; min-height: 42vh; }
}

/* --- grid: 活動写真フィルムストリップ（自動で流れ・ドラッグ/ホイールで手動送り） --- */
.hero--grid { flex-direction: column; justify-content: center; gap: 3rem; padding: 6rem 0 0; }
.hero--grid .hero-content { padding: 0 1.5rem; }
.hero--grid .hero-scroll { display: none; }

.hero-strip {
    width: 100%;
    overflow: hidden;
    padding-bottom: 10px;
    cursor: grab;
    touch-action: pan-y; /* 縦スクロールは妨げず、横ドラッグだけ拾う */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.hero-strip:active { cursor: grabbing; }
.hero-strip-track { display: flex; width: max-content; will-change: transform; }

.strip-item {
    position: relative; flex: none;
    height: clamp(240px, 34vh, 380px);
    aspect-ratio: 3 / 2; /* 全タイル同寸に統一 */
    margin: 0 8px 0 0;
    border-radius: var(--lp-radius);
    overflow: hidden;
}
.strip-item img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block;
    user-select: none; -webkit-user-drag: none;
    pointer-events: none; /* ドラッグ操作を妨げない */
}

@media (max-width: 768px) {
    .hero--grid { gap: 2rem; }
    .strip-item { height: clamp(160px, 24vh, 240px); }
}

/* --- typo: 写真なし・タイポ主体 --- */
.hero--typo { background: var(--lp-paper-2); }

/* =========================================================
   下層ページ共通の帯ヒーロー（写真＋白文字）＋パンくず
   activity_* / 各下層ページで使用。固定ヘッダー直下に密着。
   ========================================================= */
.page-hero { position: relative; margin-top: var(--header-height, 80px); min-height: clamp(320px, 46vh, 460px); display: flex; align-items: flex-end; justify-content: center; text-align: center; overflow: hidden; background: var(--lp-paper-2); }
.page-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,20,22,.16) 0%, rgba(18,20,22,.32) 50%, rgba(18,20,22,.68) 100%); }
.page-hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--lp-max); margin: 0 auto; padding: 0 1.5rem 2.8rem; color: #fff; }
.page-hero-eyebrow { font-family: 'Montserrat', sans-serif; font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; opacity: .9; margin: 0 0 .7rem; color: #fff; }
.page-hero-title { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: clamp(1.9rem, 5vw, 2.9rem); letter-spacing: .04em; line-height: 1.15; margin: 0; color: #fff; }
.page-hero-sub { margin: .8rem auto 0; font-size: .92rem; font-weight: 400; line-height: 1.7; letter-spacing: .04em; opacity: .92; color: #fff; max-width: 40em; }
.page-crumb { max-width: var(--lp-max); margin: 0 auto; padding: 1.4rem 1.5rem 0; font-size: .78rem; color: var(--lp-muted); letter-spacing: .04em; }
.page-crumb a { color: var(--lp-muted); text-decoration: none; transition: color .2s; }
.page-crumb a:hover { color: var(--lp-ink); }
.page-crumb span { margin: 0 .55em; opacity: .55; }
@media (max-width: 768px) {
    .page-hero { min-height: clamp(260px, 50vh, 380px); }
    /* 狭い画面では写真の情報量が増えるためサブ文の足元を少し暗く */
    .page-hero-overlay { background: linear-gradient(180deg, rgba(18,20,22,.18) 0%, rgba(18,20,22,.36) 50%, rgba(18,20,22,.74) 100%); }
}

/* 記事本文: エディタ不具合で保存された空画像(src="#")を表示しない */
.article-content img[src="#"], .article-content img[src=""] { display: none; }

/* =========================================================
   数字：墨地に白、区切り線のみ
   ========================================================= */
.stats-section { background: var(--lp-paper); color: var(--lp-ink); padding: 5rem 0; border-top: 1px solid var(--lp-line); border-bottom: 1px solid var(--lp-line); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;                       /* タイル間1px＋下地の罫線色で共有1本線に見せる */
    max-width: var(--lp-max);
    margin: 0 auto;
    background: var(--lp-line);
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    overflow: hidden;
}
.stat-item {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; text-align: left;
    padding: 2.1rem 1.6rem 1.9rem;
    background: var(--lp-paper);
    transition: background .4s var(--lp-ease);
}
/* hoverで内側に墨の細枠（レイアウトを動かさない繊細な反応） */
.stat-item::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; transition: border-color .4s var(--lp-ease); pointer-events: none; }
.stat-item:hover { background: var(--lp-paper-2); }
.stat-item:hover::after { border-color: var(--lp-ink); }

.stat-index { font-family: 'Montserrat', sans-serif; font-size: .68rem; font-weight: 600; letter-spacing: .22em; color: var(--lp-muted); margin-bottom: 1.4rem; }

.stat-figure-line { display: flex; align-items: baseline; gap: .12em; margin: 0; min-height: clamp(2.6rem, 4.6vw, 3.1rem); line-height: 1; white-space: nowrap; }
.stat-prefix { font-size: .92rem; font-weight: 500; color: var(--lp-muted); align-self: baseline; }
.stat-figure { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: clamp(2.4rem, 4.6vw, 3.1rem); line-height: 1; color: var(--lp-ink); font-feature-settings: "tnum" 1; }
.stat-figure--word { font-size: clamp(2.1rem, 3.8vw, 2.6rem); }
.stat-figure--ratio { font-size: clamp(2.2rem, 4.2vw, 2.85rem); letter-spacing: .01em; }
.stat-suffix { font-family: 'Montserrat', sans-serif; font-size: .8rem; font-weight: 500; letter-spacing: .04em; color: var(--lp-muted); }

.stat-label { margin: 1.1rem 0 0; font-size: .82rem; font-weight: 500; color: var(--lp-ink); letter-spacing: .03em; line-height: 1.5; }
.stat-en { margin-top: .85rem; padding-top: .7rem; border-top: 1px solid var(--lp-line); width: 100%; font-family: 'Montserrat', sans-serif; font-size: .6rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--lp-muted); }

@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
    .stats-section { padding: 3.5rem 0; }
    .stats-grid { grid-template-columns: 1fr; max-width: 420px; }
    .stat-item { flex-direction: row; flex-wrap: wrap; align-items: baseline; padding: 1.5rem 1.4rem; column-gap: 1rem; }
    .stat-index { margin-bottom: 0; align-self: center; }
    .stat-figure-line { min-height: 0; margin-left: auto; }
    .stat-label { margin-top: .4rem; flex-basis: 100%; }
    .stat-en { margin-top: .6rem; padding-top: .6rem; flex-basis: 100%; }
    .stat-item:hover::after { border-color: transparent; }
}

/* =========================================================
   About：エディトリアル（左ステートメント / 右概要リスト）
   ========================================================= */
.about-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4.5rem; align-items: start; max-width: 1040px; margin: 0 auto; }
.about-label { font-family: 'Montserrat', sans-serif; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--lp-muted); display: block; margin-bottom: 1.4rem; }
.about-statement { font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 600; line-height: 1.55; letter-spacing: .01em; color: var(--lp-ink); margin: 0 0 1.6rem; text-wrap: balance; }
.about-lead { font-size: 1rem; line-height: 1.95; color: var(--lp-muted); margin: 0; }
.fact-list { margin: 0; border-top: 1px solid var(--lp-line); }
.fact-row { display: grid; grid-template-columns: 4.5em 1fr; gap: 1.2rem; padding: 1.05rem 0; border-bottom: 1px solid var(--lp-line); }
.fact-row dt { font-size: .8rem; font-weight: 600; color: var(--lp-muted); letter-spacing: .06em; padding-top: .15rem; }
.fact-row dd { font-size: .94rem; color: var(--lp-ink); margin: 0; line-height: 1.65; }
@media (max-width: 768px) {
    .about-layout { grid-template-columns: 1fr; gap: 2.5rem; }
    /* PC用の改行は幅が狭いと孤立行を作るため無効化 */
    .about-statement br { display: none; }
}

/* =========================================================
   Activities カード：グレースケール写真→ホバーで発色
   ========================================================= */
.activity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 980px; margin: 0 auto; }
.activity-card { background: var(--lp-paper); border: 1px solid var(--lp-line); border-radius: var(--lp-radius); overflow: hidden; box-shadow: none; transition: border-color .35s var(--lp-ease), transform .35s var(--lp-ease); }
.activity-card:hover { border-color: var(--lp-ink); transform: translateY(-4px); }
.activity-img { height: 240px; background-size: cover; background-position: center; transition: transform .7s var(--lp-ease); }
.activity-card:hover .activity-img { transform: scale(1.04); }
.activity-content { padding: 1.8rem; }
.activity-content h3 { font-size: 1.18rem; font-weight: 600; color: var(--lp-ink); margin-bottom: .6rem; }
.activity-tag {
    display: inline-block; font-size: .66rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--lp-muted);
    border: 1px solid var(--lp-line); background: transparent;
    padding: .25rem .7rem; border-radius: 999px; margin-bottom: .9rem;
}
/* 地名などインライン色指定を控えめなグレーへ */
.activity-content [style*="color"] { color: var(--lp-muted) !important; }
@media (max-width: 680px) { .activity-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Join Us：入会の流れ（番号付きステップ・罫線基調）
   ========================================================= */
.join-lead { text-align: center; color: var(--lp-muted); margin: -2.4rem auto 3.4rem; max-width: 40em; font-size: .98rem; line-height: 1.95; }
.join-steps { list-style: none; max-width: 760px; margin: 0 auto; padding: 0; border-top: 1px solid var(--lp-line); }
.join-step { display: grid; grid-template-columns: 3.2em 1fr; gap: 1.2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--lp-line); }
.join-num { font-family: 'Montserrat', sans-serif; font-size: .8rem; font-weight: 600; letter-spacing: .18em; color: var(--lp-muted); padding-top: .2rem; }
.join-step h3 { font-size: 1.02rem; font-weight: 600; color: var(--lp-ink); margin: 0 0 .4rem; }
.join-step p { margin: 0; color: var(--lp-muted); font-size: .92rem; line-height: 1.85; }
.join-cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 2.8rem; }
.join-cta .btn-secondary, .join-cta .btn-hero { font-size: .9rem; }
@media (max-width: 680px) {
    .join-lead { margin-top: -1.6rem; }
    .join-step { grid-template-columns: 2.4em 1fr; gap: .9rem; padding: 1.3rem 0; }
    .join-cta { flex-direction: column; align-items: stretch; text-align: center; }
    .join-cta .btn-secondary, .join-cta .btn-hero { justify-content: center; }
}

/* =========================================================
   Blog カード
   ========================================================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.blog-card { display: block; text-decoration: none; color: inherit; background: var(--lp-paper); border: 1px solid var(--lp-line); border-radius: var(--lp-radius); overflow: hidden; transition: border-color .35s var(--lp-ease), transform .35s var(--lp-ease); }
.blog-card:hover { border-color: var(--lp-ink); transform: translateY(-4px); }
.blog-card-img { width: 100%; height: 180px; background-size: cover; background-position: center; }
.blog-card-body { padding: 1.3rem 1.4rem; }
.blog-card-body h3 { font-size: 1.02rem; font-weight: 600; color: var(--lp-ink); line-height: 1.5; margin-bottom: .5rem; }

/* =========================================================
   ボタン：墨ソリッド↔アウトライン
   ========================================================= */
.btn-secondary { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.9rem; border-radius: var(--lp-radius); background: var(--lp-ink); color: #fff; font-weight: 500; font-size: .9rem; letter-spacing: .02em; text-decoration: none; border: 1px solid var(--lp-ink); transition: background .3s, color .3s, transform .3s var(--lp-ease); }
.btn-secondary:hover { background: transparent; color: var(--lp-ink); transform: translateY(-2px); }
.btn-submit { background: var(--lp-ink); color: #fff; border: 1px solid var(--lp-ink); border-radius: var(--lp-radius); font-weight: 500; padding: .95rem 2rem; transition: background .3s, color .3s; }
.btn-submit:hover { background: transparent; color: var(--lp-ink); }

/* =========================================================
   Contact フォーム
   ========================================================= */
.contact-form { max-width: 580px; margin: 0 auto; background: var(--lp-paper); padding: 2.5rem; border: 1px solid var(--lp-line); border-radius: var(--lp-radius); box-shadow: none; }
.form-input { border-radius: var(--lp-radius); border: 1px solid var(--lp-line); background: #fff; transition: border-color .25s; }
.form-input:focus { border-color: var(--lp-ink); box-shadow: none; outline: none; }

/* =========================================================
   フッター
   ========================================================= */
.footer { background: var(--lp-ink); padding: 3.5rem 0 2.5rem; }

/* =========================================================
   スクロール演出
   ========================================================= */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--lp-ease), transform .9s var(--lp-ease); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger-children > *:nth-child(2) { transition-delay: .08s; }
.stagger-children > *:nth-child(3) { transition-delay: .16s; }
.stagger-children > *:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    .hero-scroll span { animation: none; }
    .fade-in { transition: none; opacity: 1; transform: none; }
    .activity-img, .blog-card-img { filter: none; }
    html { scroll-behavior: auto; }
}

@media (max-width: 768px) {
    section { padding: 5rem 0; }
    .hero-content { padding: 5rem 1.2rem; }
    .btn-hero { padding: .8rem 1.7rem; }
}

/* 320px級の極小幅: WHABITAT見出しがはみ出さないように */
@media (max-width: 360px) {
    .hero-title { font-size: 2.2rem; letter-spacing: .1em; }
}
