/* ==========================================================================
   site.css — 現場AIサポート
   corporate-trust-design 準拠・infcurion.com の構造文法に揃えた版。
   ・見出しは「欧文ディスプレイが主役＋和文ラベルを添える」二層
   ・ヘッダーはナビ主導（CTAボタンで押さない）
   ・MVは全画面スライダー＋短いキャッチ
   ・News は 日付→カテゴリ→タイトル の罫線リスト
   ・グレーは tokens.css の8段のみ。動きは0.3s・easeOutCubic・40px以内
   ========================================================================== */

@import url("./tokens.css");

[data-brand="genba"] {
  --color-brand: #14476b;
  --color-brand-hover: #0e3550;
  --color-brand-tint: #eef3f7;
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: var(--step-0);
  line-height: 2;
  color: var(--color-ink);
  background: var(--color-paper);
  padding-bottom: var(--sp-bar-space, 0);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.4; }

.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.wrap--narrow { width: min(100% - 3rem, 46rem); margin-inline: auto; }

/* --------------------------------------------------------------- 見出し二層（欧文が主役） */
.sec-head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.sec-head__en {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: var(--step-5);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.sec-head__ja {
  display: block;
  font-size: var(--step--1);
  color: var(--color-muted);
  margin-top: 0.6rem;
  font-weight: 500;
}
.sec-head__ja::before {
  content: "";
  display: inline-block;
  width: 1.75rem; height: 1px;
  background: var(--color-brand);
  vertical-align: middle;
  margin-right: 0.65rem;
}

/* --------------------------------------------------------------- View More（テキストリンク型） */
.more {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-family: var(--font-en);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: var(--tracking-en);
  text-decoration: none;
  color: var(--color-ink);
}
.more::after {
  content: "";
  width: 3.5rem; height: 1px;
  background: currentColor;
  transition: width var(--dur-ui) var(--ease-corp);
}
.more:hover { color: var(--color-brand); }
.more:hover::after { width: 5rem; }
.more--light { color: var(--color-paper); }
.more--light:hover { color: var(--color-paper); opacity: 0.8; }

/* --------------------------------------------------------------- header（ナビ主導） */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.header__inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: 4.5rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; line-height: 1.25; }
.brand > span { display: flex; flex-direction: column; }
.brand__logo { width: 2.25rem; height: 2.25rem; object-fit: contain; flex: none; }
.brand__name { font-weight: 700; font-size: var(--step-1); letter-spacing: 0.03em; }
.brand__by { font-size: 0.68rem; color: var(--color-muted); letter-spacing: 0.05em; }

.gnav { display: none; margin-left: auto; }
@media (min-width: 64rem) {
  .gnav { display: flex; gap: 1.9rem; align-items: center; }
}
.gnav a {
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur-ui) var(--ease-corp), color var(--dur-ui) var(--ease-corp);
}
.gnav a:hover { color: var(--color-brand); border-bottom-color: var(--color-brand); }

.header__tel {
  margin-left: auto;
  font-family: var(--font-en); font-weight: 600; font-size: var(--step-0);
  letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
}
@media (min-width: 64rem) { .header__tel { margin-left: 0; } }
.header__tel small {
  display: block; font-family: var(--font-ja); font-weight: 400;
  font-size: 0.65rem; color: var(--color-muted); letter-spacing: 0;
}

/* --------------------------------------------------------------- MV（全画面スライダー） */
.mv {
  position: relative;
  min-height: max(34rem, 88svh);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--gray-100);
}
.mv__slide {
  position: absolute; inset: 0;
  display: block;
  opacity: 0;
  animation: mv-fade 16s infinite;
}
.mv__slide img { width: 100%; height: 100%; object-fit: cover; }
.mv__slide:nth-child(1) { animation-delay: 0s; }
.mv__slide:nth-child(2) { animation-delay: 8s; }
@keyframes mv-fade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  45%  { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mv__slide { animation: none; }
  .mv__slide:nth-child(1) { opacity: 1; }
}
.mv::after { /* コピーの可読性を守る薄幕 */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.35) 45%, rgba(255,255,255,0) 75%);
}
.mv__inner { position: relative; z-index: 1; width: 100%; padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.mv__copy {
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.9rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.55;
}
.mv__sub {
  margin-top: 1.25rem;
  font-size: var(--step-0);
  color: var(--gray-700);
  font-weight: 500;
}
.mv__scroll {
  position: absolute; right: 1.5rem; bottom: 1.5rem; z-index: 1;
  font-family: var(--font-en); font-size: 0.7rem; letter-spacing: 0.25em;
  color: var(--color-muted);
  writing-mode: vertical-rl;
}
.mv__scroll::after {
  content: ""; display: block; width: 1px; height: 3rem;
  background: var(--color-muted); margin-top: 0.6rem; margin-inline: auto;
}

/* --------------------------------------------------------------- TOPICS帯 */
.topics { border-bottom: 1px solid var(--color-line); }
.topics__inner {
  display: flex; align-items: center; gap: 1.25rem;
  padding-block: 1rem;
  font-size: var(--step--1);
}
.topics__label {
  font-family: var(--font-en); font-weight: 600; letter-spacing: var(--tracking-en);
  color: var(--color-brand);
  flex: none;
}
.topics__inner a {
  text-decoration: none;
  display: flex; gap: 1rem; align-items: baseline; min-width: 0;
}
.topics__inner a:hover .topics__title { color: var(--color-brand); }
.topics__date { font-family: var(--font-en); color: var(--color-muted); flex: none; }
.topics__title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--dur-ui) var(--ease-corp);
}

/* --------------------------------------------------------------- section 共通 */
.section { padding-block: clamp(4rem, 3rem + 4.5vw, 7.5rem); }
.section--surface { background: var(--color-surface); }
.lead { color: var(--gray-700); max-width: 44rem; }

/* --------------------------------------------------------------- What we do（宣言） */
.statement {
  font-size: clamp(1.35rem, 1rem + 1.7vw, 2.3rem);
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: 0.02em;
  max-width: 46rem;
}
.statement em { font-style: normal; color: var(--color-brand); }

/* --------------------------------------------------------------- Services（2カテゴリ） */
.svc { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .svc { grid-template-columns: 1fr 1fr; } }
.svc__item {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  padding: clamp(1.75rem, 1.25rem + 2vw, 3rem);
  display: flex; flex-direction: column; gap: 1rem;
}
.svc__en {
  font-family: var(--font-en); font-weight: 500;
  font-size: var(--step-3); letter-spacing: 0.02em; line-height: 1.15;
}
.svc__ja { font-size: var(--step-0); font-weight: 700; color: var(--color-brand); }
.svc__body { margin: 0; color: var(--gray-700); }
.svc__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.svc__list li {
  position: relative; padding-left: 1.1rem;
  font-size: var(--step--1); font-weight: 500;
}
.svc__list li::before {
  content: ""; position: absolute; left: 0; top: 0.85em;
  width: 0.55rem; height: 1px; background: var(--color-brand);
}
.svc__note { font-size: var(--step--1); color: var(--color-muted); margin: 0; }

/* --------------------------------------------------------------- Price */
.price-rows { border-top: 1px solid var(--color-line); }
.price-row {
  display: grid; gap: 0.35rem 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--color-line);
}
@media (min-width: 56rem) {
  .price-row { grid-template-columns: 1fr auto; align-items: baseline; }
}
.price-row__name { font-weight: 700; font-size: var(--step-1); }
.price-row__desc { color: var(--gray-700); font-size: var(--step--1); margin: 0.25rem 0 0; max-width: 38rem; }
.price-row__amount {
  font-family: var(--font-en); font-weight: 600;
  font-size: var(--step-4); color: var(--color-brand); line-height: 1.1;
  white-space: nowrap;
}
.price-row__amount small { font-family: var(--font-ja); font-size: var(--step--1); font-weight: 400; color: var(--color-ink); }
.price-note { font-size: var(--step--1); color: var(--color-muted); margin-top: 1.25rem; }

/* --------------------------------------------------------------- About（3カード） */
.about { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .about { grid-template-columns: repeat(3, 1fr); } }
.about__card {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
}
.about__en {
  font-family: var(--font-en); font-weight: 500; font-size: var(--step-1);
  letter-spacing: var(--tracking-en); color: var(--color-brand);
}
.about__title { font-size: var(--step-1); font-weight: 700; margin: 0.4rem 0 0.75rem; }
.about__card p { margin: 0; color: var(--gray-700); font-size: var(--step--1); }
.about__avatar { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.about__card dl { margin: 0.75rem 0 0; font-size: var(--step--1); }
.about__card dt { color: var(--color-muted); }
.about__card dd { margin: 0 0 0.5rem; color: var(--gray-700); }

/* 責任分界の表 */
.scope-list { margin: 0.75rem 0 0; font-size: var(--step--1); }
.scope-list dt { font-weight: 700; color: var(--color-ink); }
.scope-list dd { margin: 0.1rem 0 0.7rem; color: var(--gray-700); }

/* --------------------------------------------------------------- News（罫線リスト） */
.news { border-top: 1px solid var(--color-line); }
.news__row {
  display: grid; gap: 0.4rem 1.5rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--color-line);
  text-decoration: none;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
}
@media (max-width: 40rem) {
  .news__row { grid-template-columns: auto auto; }
  .news__title { grid-column: 1 / -1; }
}
.news__date { font-family: var(--font-en); font-size: var(--step--1); color: var(--color-muted); letter-spacing: 0.04em; }
.news__cat {
  font-family: var(--font-en); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid var(--color-brand); color: var(--color-brand);
  padding: 0.1rem 0.65rem;
  white-space: nowrap;
}
.news__title { font-size: var(--step-0); font-weight: 500; transition: color var(--dur-ui) var(--ease-corp); }
.news__row:hover .news__title { color: var(--color-brand); }

/* --------------------------------------------------------------- FAQ（Contact内・控えめ） */
.faq details { border-bottom: 1px solid var(--color-line); padding-block: 1.1rem; }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: var(--step-0);
  list-style: none; display: flex; gap: 0.8rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; font-family: var(--font-en); font-weight: 600; color: var(--color-brand); }
.faq details[open] summary { margin-bottom: 0.4rem; }
.faq p { margin: 0 0 0 1.8rem; color: var(--gray-700); font-size: var(--step--1); }

/* --------------------------------------------------------------- Contact（全面bg＋タグライン → フォーム） */
.contact-hero {
  position: relative;
  background:
    linear-gradient(rgba(18, 20, 23, 0.72), rgba(18, 20, 23, 0.72)),
    var(--contact-bg, var(--gray-800));
  background-size: cover; background-position: center;
  color: var(--color-paper);
  padding-block: clamp(4.5rem, 3.5rem + 5vw, 8rem);
  text-align: center;
}
.contact-hero__en {
  font-family: var(--font-en); font-weight: 500;
  font-size: var(--step-5); letter-spacing: 0.03em; line-height: 1.1;
}
.contact-hero__ja { margin: 1rem auto 0; max-width: 34rem; color: var(--gray-200); }
.contact-hero__tel {
  margin-top: 2rem;
  font-family: var(--font-en); font-weight: 600; font-size: var(--step-4);
}
.contact-hero__tel a { color: inherit; text-decoration: none; }
.contact-hero__hours { font-size: var(--step--1); color: var(--gray-300); margin-top: 0.5rem; }

/* form */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; font-size: var(--step--1); }
.field .req { color: var(--color-brand); font-size: 0.7rem; margin-left: 0.4rem; }
.field input, .field textarea {
  font: inherit; font-size: var(--step-0);
  padding: 0.8rem; border: 1px solid var(--color-line); border-radius: 2px;
  background: var(--color-paper); color: var(--color-ink);
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--color-brand); outline-offset: 1px;
}
.checks { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.check { display: flex; gap: 0.5rem; align-items: center; font-size: var(--step--1); }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--color-brand); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2.5rem;
  background: var(--color-brand); color: #fff;
  border: 0; border-radius: 2px;
  font: inherit; font-weight: 700; font-size: var(--step-0);
  cursor: pointer;
  transition: background-color var(--dur-ui) var(--ease-corp);
}
.btn:hover { background: var(--color-brand-hover); }

/* --------------------------------------------------------------- SP固定バー */
.spbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--color-paper);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
.spbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.1rem; padding: 0.65rem 0.5rem;
  text-decoration: none; font-weight: 700; font-size: var(--step--1);
}
.spbar a + a { border-left: 1px solid var(--color-line); }
.spbar .is-primary { background: var(--color-brand); color: #fff; }
.spbar small { font-weight: 400; opacity: 0.85; font-size: 0.65rem; }
@media (min-width: 64rem) { .spbar { display: none; } }
@media (max-width: 63.99rem) { body { --sp-bar-space: 4.25rem; } }

/* --------------------------------------------------------------- footer（縦積み） */
.footer {
  background: var(--gray-900); color: var(--gray-300);
  padding-block: clamp(3rem, 2.5rem + 2vw, 5rem) 2rem;
  font-size: var(--step--1);
}
.footer__brand { color: var(--color-paper); font-weight: 700; font-size: var(--step-2); }
.footer__by { color: var(--gray-500); margin-top: 0.25rem; }
.footer__nav {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 0.7rem;
}
.footer__nav a { color: var(--gray-300); text-decoration: none; transition: color var(--dur-ui) var(--ease-corp); }
.footer__nav a:hover { color: var(--color-paper); }
.footer__meta { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-800); color: var(--gray-500); }
.footer__meta a { color: var(--gray-300); }

/* --------------------------------------------------------------- reveal（0.3s規範・40px以内） */
.reveal {
  --transition-progress: clamp(0, var(--scroll-progress, 1), 1);
  --opacity-progress: clamp(0, calc((var(--transition-progress) - 0.2) / 0.3), 1);
  opacity: var(--opacity-progress);
  transform: translate3d(0, calc((1 - var(--transition-progress)) * var(--reveal-shift)), 0);
  will-change: opacity, transform;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 1; transform: none; will-change: auto;
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 55%;
    }
    @keyframes reveal-in {
      from { opacity: 0; transform: translate3d(0, var(--reveal-shift), 0); }
      to   { opacity: 1; transform: none; }
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* --------------------------------------------------------------- Contact CTAカード */
.cta-card {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  padding: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  text-align: center;
}
.cta-card__lead { margin: 0 0 1.5rem; font-weight: 700; font-size: var(--step-1); }
.cta-card__note {
  margin: 1.5rem 0 0; font-size: var(--step--1); color: var(--color-muted);
  line-height: 1.9; text-align: left;
}
