/* ==========================================================================
   巴製作所 — Front page sections  (front.css / 旧 tomoe-front.css)
   ヒーロー / About / 選ばれる理由 / 業務案内 / 加工事例 / 設備・会社 / ギャラリー / News / 会社概要
   ========================================================================== */

/* --------------------------------------------------------------------------
   レガシー打ち消し:
   style.css に残る旧フロント用の同名クラス（.hero / .gallery-item / .news-* 等）が
   新マークアップにリークしないよう、トップページ（body.home）限定で上書きする。
   ※ Phase C で style.css の旧フロントCSSを整理したら不要になる。
   -------------------------------------------------------------------------- */
body.home .hero { height: auto; background: #0b0c0d; }
body.home .gallery-item { aspect-ratio: auto; border-radius: var(--r-sm); }
body.home .news-list { max-width: none; margin-left: 0; margin-right: 0; margin-top: 0; }
body.home .news-item { margin-bottom: 0; }
body.home .news-item::after { display: none; }
body.home .news-date { min-width: 0; padding: 0; background: none; border-radius: 0; text-align: left; margin-right: 0; }
body.home .news-title { flex-grow: 0; }

/* ==========================================================================
   HERO  — フルブリード写真 ＋ 端正なオーバーレイ ＋ 技術スペック帯
   ========================================================================== */
/* 注: style.css の global `section{display:flex;justify-content:center;align-items:center;
   flex-direction:column}` を上書きするため、向き・寄せを明示する。 */
.hero { position: relative; min-height: clamp(560px, 82vh, 760px); display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; overflow: hidden; background: #0b0c0d; }
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { /* 単色寄りのオーバーレイ（グラデは控えめ） */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,10,11,.82) 0%, rgba(8,10,11,.55) 46%, rgba(8,10,11,.18) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(48px, 7vw, 88px); padding-top: clamp(80px, 12vw, 120px); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--green); margin-bottom: 22px; }
.hero__eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--green); }
.hero__title { color: #fff; font-weight: var(--fw-black); font-size: var(--fs-display); line-height: 1.12; letter-spacing: .01em; margin: 0; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.hero__title .accent { color: var(--green); }
.hero__title .row2 { display: block; }
.hero__sub { color: rgba(255,255,255,.86); font-size: clamp(15px, 1.5vw, 19px); font-weight: var(--fw-med); line-height: 1.8; margin: 26px 0 0; letter-spacing: .04em; max-width: 620px; }
.hero__sub em { font-style: normal; color: var(--green); font-weight: var(--fw-bold); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ヒーロー下：技術スペック帯（mono・数字で実力を端的に） */
.hero-specs { position: relative; z-index: 2; background: var(--ink); border-top: 2px solid var(--green); }
.hero-specs__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.spec { padding: 22px 26px; border-right: 1px solid rgba(255,255,255,.10); }
.spec:last-child { border-right: 0; }
.spec__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.spec__v { color: #fff; font-weight: var(--fw-bold); font-size: clamp(16px, 1.4vw, 19px); margin-top: 7px; letter-spacing: .02em; white-space: nowrap; }
.spec__v .num { color: var(--green); font-weight: 700; }

/* ==========================================================================
   ABOUT — 中央寄せの宣言文（脱・放射グロー）。左右に細い罫の囲み。
   ========================================================================== */
.about__wrap { max-width: 1060px; margin: 0 auto; text-align: center; }
.about__statement { font-size: clamp(21px, 2.4vw, 31px); font-weight: var(--fw-x); line-height: 1.65; color: var(--ink); letter-spacing: .02em; text-wrap: balance; }
.about__statement .hl { color: var(--green-700); }
.about__body { margin: 26px auto 0; max-width: 800px; color: var(--ink-2); font-size: 16px; line-height: 2; text-wrap: pretty; }

/* ==========================================================================
   STRENGTHS — 選ばれる理由（連番01–03・ヘアラインのみ・脱カードシャドウ）
   ========================================================================== */
.strengths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.strength { padding: 38px 34px 42px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); transition: background .25s; }
.strength:hover { background: var(--paper-2); }
.strength__no { font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em; color: var(--green-700); }
.strength__no::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--green); margin-right: 10px; vertical-align: middle; }
.strength__title { font-weight: var(--fw-x); font-size: 21px; color: var(--ink); margin: 18px 0 12px; line-height: 1.4; letter-spacing: .02em; }
.strength__desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.95; }

/* ==========================================================================
   SERVICES — ショーケース（画像＋本文）。脱・丸み、ヘアライン枠。
   ========================================================================== */
.showcase { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.showcase__media { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; }
.showcase__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.showcase:hover .showcase__media img { transform: scale(1.04); }
.showcase__media::before { /* 角の技術ラベル */
  content: "CO\2082 / YAG LASER"; position: absolute; left: 0; top: 0; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: #0f1a08;
  background: var(--green); padding: 7px 12px;
}
.showcase__title { font-weight: var(--fw-x); font-size: clamp(22px, 2.2vw, 30px); color: var(--ink); line-height: 1.4; letter-spacing: .02em; margin: 0 0 20px; }
.showcase__body p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.95; }
.feature-list { list-style: none; margin: 24px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.feature-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; font-weight: var(--fw-med); color: var(--ink); }
.feature-list .tick { flex: none; width: 20px; height: 20px; margin-top: 2px; border: 1.5px solid var(--green); border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; }
.feature-list .tick svg { width: 12px; height: 12px; color: var(--green-700); }
.showcase__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ==========================================================================
   CASES — 加工事例カード（再構成：型番タグ＋仕様チップ＋データ）
   ========================================================================== */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.case-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; transition: border-color .25s, transform .25s var(--ease); }
.case-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.case-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-3); }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.case-card:hover .case-card__media img { transform: scale(1.05); }
.case-card__tag { position: absolute; left: 0; bottom: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: #fff; background: rgba(15,17,19,.86); padding: 6px 12px; }
.case-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.case-card__title { font-weight: var(--fw-bold); font-size: 17px; line-height: 1.55; color: var(--ink); letter-spacing: .01em; margin: 0 0 16px; }
.case-card__title a:hover { color: var(--green-800); }
.spec-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.spec-chips span { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); padding: 5px 9px; border-radius: var(--r-xs); white-space: nowrap; }
.case-card__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.case-card__foot .more { font-size: 13.5px; font-weight: var(--fw-bold); color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.case-card__foot .more .ar { width: 14px; height: 14px; color: var(--green-700); transition: transform .25s var(--ease); }
.case-card:hover .case-card__foot .more .ar { transform: translateX(4px); }
.cases-more { margin-top: 40px; text-align: center; }

/* ==========================================================================
   DUAL CTA — 設備案内 / 会社案内（脱・丸み、シャープなオーバーレイ）
   ========================================================================== */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dual__block { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-sm); display: flex; align-items: flex-end; }
.dual__block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.dual__block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,13,.82) 0%, rgba(10,12,13,.18) 60%, rgba(10,12,13,.05) 100%); }
.dual__block:hover img { transform: scale(1.05); }
.dual__content { position: relative; z-index: 2; padding: 32px; color: #fff; width: 100%; }
.dual__content .eyebrow { color: var(--green); }
.dual__content h3 { font-weight: var(--fw-black); font-size: clamp(22px, 2vw, 28px); margin: 10px 0 8px; letter-spacing: .03em; }
.dual__content p { color: rgba(255,255,255,.78); font-size: 14px; margin: 0 0 16px; }

/* ==========================================================================
   GALLERY — ベントー型モザイク（写真は全点維持、現代的な見せ方）
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(132px, 15vw, 200px); gap: 12px; counter-reset: g; }
.gallery-item { position: relative; overflow: hidden; cursor: pointer; border-radius: var(--r-sm); background: var(--paper-3); counter-increment: g; }
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }
.gallery-item:nth-child(5) { grid-column: span 2; }
.gallery-item:nth-child(6) { grid-column: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,13,.62) 0%, rgba(10,12,13,0) 46%); transition: opacity .3s; }
.gallery-item__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: baseline; gap: 10px; padding: 12px 15px; }
.gallery-item__no { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--green); flex: none; }
.gallery-item__no::before { content: counter(g, decimal-leading-zero); }
.gallery-item__cap { font-family: var(--font-jp); font-weight: 500; font-size: 13px; letter-spacing: .04em; color: #fff; }
.gallery-item:nth-child(1) .gallery-item__cap { font-size: 17px; font-weight: 700; }
.gallery-item__view { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.9); transition: opacity .3s, transform .3s; backdrop-filter: blur(2px); }
.gallery-item:hover .gallery-item__view { opacity: 1; transform: scale(1); }
.gallery-item__view svg { width: 16px; height: 16px; color: #fff; }

/* ライトボックスの共通スタイルは css/ui.css に移動（全ページでマークアップ出力のため） */

/* ==========================================================================
   NEWS — お知らせリスト（mono日付・ヘアライン区切り）
   ========================================================================== */
.news-list { border-top: 1px solid var(--line); }
.news-item a { display: grid; grid-template-columns: 130px 1fr 24px; align-items: center; gap: 20px; padding: 22px 8px; border-bottom: 1px solid var(--line); transition: background .2s, padding .2s; }
.news-item a:hover { background: var(--paper-2); padding-left: 16px; }
.news-date { font-family: var(--font-mono); font-size: 13px; color: var(--green-700); letter-spacing: .04em; }
.news-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line-2); padding: 3px 8px; margin-left: 12px; }
.news-title { font-size: 15.5px; font-weight: var(--fw-med); color: var(--ink); }
.news-item .ar { width: 16px; height: 16px; color: var(--ink-4); transition: transform .25s var(--ease), color .25s; }
.news-item a:hover .ar { color: var(--green-700); transform: translateX(4px); }
.news-more { margin-top: 36px; text-align: center; }

/* ==========================================================================
   COMPANY — 会社概要（端正なテーブル）＋地図
   ========================================================================== */
.company-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.spec-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.spec-table th, .spec-table td { text-align: left; padding: 18px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 150px; font-weight: var(--fw-bold); font-size: 14px; color: var(--ink); letter-spacing: .04em; }
.spec-table td { font-size: 15px; color: var(--ink-2); line-height: 1.85; }
.spec-table .num { color: var(--ink); }
.company-map { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; }
.company-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-specs__grid { grid-template-columns: repeat(2, 1fr); }
  .spec:nth-child(2) { border-right: 0; }
  .spec:nth-child(1), .spec:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .showcase { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid .case-card:last-child { display: none; } /* 2列時は2件 */
  .company-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .strengths { grid-template-columns: 1fr; border-left: 0; }
  .strength { border-left: 1px solid var(--line); }
  .case-grid { grid-template-columns: 1fr; }
  .case-grid .case-card:last-child { display: flex; }
  .dual { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(120px, 30vw, 165px); }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery-item:nth-child(4), .gallery-item:nth-child(5) { grid-column: span 1; }
  .gallery-item:nth-child(6) { grid-column: span 2; }
  .news-item a { grid-template-columns: 92px 1fr; grid-template-rows: auto auto; gap: 4px 14px; }
  .news-item .ar { display: none; }
  .news-cat { display: none; }
  .hero-specs__grid { grid-template-columns: 1fr 1fr; }
}
