/* ===========================================================
   cyberagent.css — トップページ ヒーロー「CyberAgent型」拡張
   3日でええやん 公式HP / 2026-06 追加
   既存 components.css は無改変。本ファイルで上書き・追加のみ。
   =========================================================== */

:root {
  /* 特大タイポ（日本語の見出し長を考慮し、横はみ出しが出ない安全上限） */
  --text-hero:       clamp(2.75rem, 7.4vw, 6rem);   /* 44px → 96px */
  --text-section-xl: clamp(2rem,    5vw,   4rem);    /* 32px → 64px */
}

/* ====================================================
   Hero — Cinema（フルブリード・特大タイポ・映像的）
   ==================================================== */
.hero.hero--cinema {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: start;
  justify-items: start;
  padding: clamp(104px, 13vw, 150px) var(--container-px) clamp(60px, 8vw, 100px);
  background: linear-gradient(168deg, #14171e 0%, #0d0f14 100%);  /* 画像読込前の中立な暗色フォールバック（青みなし） */
  overflow: hidden;
  isolation: isolate;
}
/* 背景写真は複数枚をクロスフェードで切り替え（スライドショー）。
   文字側（左）は深紺でくっきり、反対側（右）に写真を上品に見せる「編集的」高級ヒーロー。
   濃い方向性グラデーションのため、全面が透ける雑然さは出さない。 */
.hero--cinema .hero-bg__overlay {
  display: block;
  /* 青みを排し、文字がのる左下だけ中立の黒で沈める。画像本来の色は右上に活かす */
  background:
    linear-gradient(180deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.40) 30%, rgba(0,0,0,0.18) 58%, rgba(0,0,0,0.42) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.66) 0%, rgba(0,0,0,0.30) 44%, transparent 72%);
}
.hero--cinema .hero-bg__grain { opacity: 0.04; }

/* 背景レイヤー */
.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-bg__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
  transform: translateZ(0);          /* GPU合成でクロスフェードを滑らかに */
  backface-visibility: hidden;
}
.hero-bg__slide--active { opacity: 1; }
.hero-bg__slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transform: scale(1.04);            /* 静的に微かに寄せる（カクつき源のKen Burnsズームは廃止） */
}

.hero-bg__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(27,42,74,0.74) 0%, rgba(27,42,74,0.50) 42%, rgba(27,42,74,0.86) 100%),
    linear-gradient(90deg, rgba(27,42,74,0.55) 0%, rgba(27,42,74,0.10) 60%);
}
.hero-bg__grain {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* コンテンツ */
.hero--cinema .hero__inner {
  position: relative; z-index: 3;
  max-width: min(880px, 100%);
}

.hero--cinema .hero__eyebrow {
  display: block;
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: clamp(0.75rem, 1.2vw, 0.9375rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: clamp(14px, 2vw, 24px);
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease-out-expo), transform .8s var(--ease-out-expo);
}

.hero--cinema .hero__title {
  font-family: var(--font-serif-ja);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: #FDFAF5;
  font-feature-settings: "palt" 1;
  margin: 0 0 clamp(18px, 2.4vw, 30px);
  text-shadow: 0 2px 6px rgba(0,0,0,0.85), 0 6px 30px rgba(0,0,0,0.7);
}
.hero--cinema .hero__title-line {
  display: block;
  opacity: 0; transform: translateY(0.42em);
  transition: opacity .9s var(--ease-out-expo), transform .9s var(--ease-out-expo);
}
.hero--cinema .hero__title-line--gold { color: #FDFAF5; }

.hero--cinema .hero__sub-en {
  font-family: var(--font-serif-en);
  font-size: clamp(0.875rem, 1.6vw, 1.25rem);
  letter-spacing: 0.04em;
  color: rgba(253,250,245,0.72);
  margin: 0 0 clamp(10px, 1.4vw, 16px);
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease-out-expo), transform .8s var(--ease-out-expo);
}
.hero--cinema .hero__sub {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  line-height: 1.95;
  color: rgba(253,250,245,0.88);
  margin: 0 0 clamp(26px, 3vw, 40px);
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease-out-expo), transform .8s var(--ease-out-expo);
}
.hero--cinema .hero__cta-wrap {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease-out-expo), transform .8s var(--ease-out-expo);
}
@media (max-width: 539px) {
  .hero--cinema .hero__cta-wrap { flex-direction: column; align-items: stretch; }
  .hero--cinema .hero__cta-wrap .btn { width: 100%; }
}

/* 入場（.is-entered をJSが hero に付与） */
.hero--cinema.is-entered .hero__eyebrow,
.hero--cinema.is-entered .hero__sub-en,
.hero--cinema.is-entered .hero__sub,
.hero--cinema.is-entered .hero__cta-wrap { opacity: 1; transform: none; }
.hero--cinema.is-entered .hero__sub-en   { transition-delay: .42s; }
.hero--cinema.is-entered .hero__sub      { transition-delay: .54s; }
.hero--cinema.is-entered .hero__cta-wrap { transition-delay: .66s; }
.hero--cinema .hero__note {
  font-size: 0.75rem; line-height: 1.7; max-width: 660px;
  color: rgba(253,250,245,0.55);
  margin: clamp(18px, 2.2vw, 26px) 0 0;
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s var(--ease-out-expo), transform .8s var(--ease-out-expo);
}
.hero--cinema.is-entered .hero__note { opacity: 1; transform: none; transition-delay: .78s; }
.hero--cinema.is-entered .hero__title-line { opacity: 1; transform: none; }
.hero--cinema.is-entered .hero__title-line:nth-child(1) { transition-delay: .12s; }
.hero--cinema.is-entered .hero__title-line:nth-child(2) { transition-delay: .26s; }

/* ダーク背景で映えるボタン上書き */
.hero--cinema .btn-primary {
  background: var(--color-gold); color: var(--color-on-gold); border-color: var(--color-gold);
}
.hero--cinema .btn-primary:hover {
  background: #FDFAF5; color: #1B2A4A; border-color: #FDFAF5;
}
.hero--cinema .btn-ghost {
  color: #FDFAF5; border-color: rgba(253,250,245,0.55); background: transparent;
}
.hero--cinema .btn-ghost:hover {
  background: #FDFAF5; color: #1B2A4A; border-color: #FDFAF5;
}

/* スクロール誘導 */
.hero__scroll-hint {
  position: absolute; z-index: 3;
  bottom: clamp(20px, 3.5vw, 40px);
  left: var(--container-px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-serif-en); font-style: italic;
  font-size: 0.6875rem; letter-spacing: 0.2em;
  color: rgba(253,250,245,0.6);
}
.hero__scroll-hint::after {
  content: ''; width: 1px; height: 42px; background: var(--color-gold);
  transform-origin: top; animation: hero-scroll-line 1.8s var(--ease-in-out-quart) infinite;
}
@keyframes hero-scroll-line {
  0%   { transform: scaleY(0); opacity: 1; }
  55%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* 検索バー（ヒーローから移設） */
.hero-search-bar {
  background: var(--color-bg-alt);
  border-bottom: var(--border-thinner);
  padding: clamp(18px, 3vw, 28px) 0;
}
.hero-search-bar .site-search { max-width: 560px; margin: 0 auto; }

/* ====================================================
   選ばれる仕組み（アイコン主体・ダーク・最小テキスト）
   ==================================================== */
.section--mechanism {
  position: relative; overflow: hidden;
  background: var(--color-navy);
  padding-block: var(--space-section-md);
}
.mech-deco {
  position: absolute; top: clamp(8px, 2vw, 24px); right: 2vw; z-index: 0;
  font-family: var(--font-serif-en); font-style: italic;
  font-size: clamp(5rem, 14vw, 13rem); line-height: 1;
  color: rgba(184,151,106,0.06); pointer-events: none; user-select: none;
}
.section--mechanism .container { position: relative; z-index: 1; }
.section-head--center { text-align: center; margin-bottom: clamp(40px, 6vw, 76px); }
.section--mechanism .section-head__num { color: rgba(184,151,106,0.30); }
.section--mechanism .section-head__eyebrow { color: var(--color-gold); }
.section--mechanism .section-head__title {
  color: var(--color-warm-white);
  font-size: var(--text-section-xl); line-height: 1.25;
}
.mech-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: clamp(14px, 2vw, 28px); max-width: 1040px; margin: 0 auto;
}
.mech-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: clamp(22px, 3vw, 36px) 14px;
  border: 1px solid rgba(184,151,106,0.20);
  background: rgba(253,250,245,0.015);
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}
.mech-card:hover { transform: translateY(-6px); border-color: var(--color-gold); background: rgba(184,151,106,0.05); }
.mech-card__icon { width: clamp(44px, 6vw, 58px); height: clamp(44px, 6vw, 58px); color: var(--color-gold); }
.mech-card__icon svg { width: 100%; height: 100%; display: block; }
.mech-card__label {
  font-family: var(--font-serif-ja); font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.25rem); color: var(--color-warm-white); line-height: 1.4;
}
.mech-card__sub { font-size: 0.8125rem; letter-spacing: 0.04em; color: rgba(253,250,245,0.6); }
.mech-note { text-align: center; margin-top: clamp(26px, 4vw, 44px); font-size: 0.75rem; color: rgba(253,250,245,0.45); }

/* ====================================================
   なぜ選ばれるか（統合・エディトリアル・ダーク・最小テキスト）
   ==================================================== */
.section--why { position: relative; overflow: hidden; background: var(--color-bg); border-top: 1px solid var(--color-border); padding-block: var(--space-section-md); }
.why-watermark {
  position: absolute; top: clamp(8px,3vw,40px); right: -1vw; z-index: 0;
  font-family: var(--font-serif-en); font-style: italic; font-weight: 300;
  font-size: clamp(6rem, 18vw, 17rem); line-height: 1; letter-spacing: 0.02em;
  color: rgba(184,151,106,0.05); pointer-events: none; user-select: none;
}
.section--why .container { position: relative; z-index: 1; }
.why-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.why-eyebrow {
  display: inline-block; font-family: var(--font-serif-en); font-style: italic;
  font-size: clamp(0.75rem, 1.2vw, 0.9375rem); letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--color-gold-text); margin-bottom: clamp(14px, 2vw, 22px);
}
.why-title {
  font-family: var(--font-serif-ja); font-weight: 300; letter-spacing: -0.005em;
  font-size: var(--text-section-xl); line-height: 1.22; color: var(--color-navy);
  margin: 0 0 clamp(18px, 2.4vw, 28px);
}
.why-lead { font-size: clamp(0.9375rem, 1.5vw, 1.125rem); line-height: 1.9; color: var(--color-text-muted); margin: 0; }
.why-lead em { font-style: normal; color: var(--color-gold-text); font-weight: 400; }

.why-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(184,151,106,0.2); }
.why-row {
  display: grid; align-items: center;
  grid-template-columns: auto auto 1fr auto; gap: clamp(16px, 3vw, 40px);
  padding: clamp(20px, 3vw, 32px) clamp(4px, 1vw, 16px);
  border-bottom: 1px solid rgba(184,151,106,0.2);
  transition: background var(--transition-base), padding-left var(--transition-base);
}
.why-row:hover { background: rgba(184,151,106,0.05); padding-left: clamp(12px, 2vw, 28px); }
.why-row__num { font-family: var(--font-serif-en); font-style: italic; font-weight: 300; font-size: clamp(1.75rem, 4vw, 3rem); color: var(--color-gold-text); opacity: 0.85; line-height: 1; }
.why-row__icon { width: clamp(30px, 4vw, 42px); height: clamp(30px, 4vw, 42px); color: var(--color-gold-text); }
.why-row__icon svg { width: 100%; height: 100%; display: block; }
.why-row__label { font-family: var(--font-serif-ja); font-weight: 400; font-size: clamp(1.125rem, 2.4vw, 1.75rem); color: var(--color-navy); line-height: 1.3; }
.why-row__sub { font-size: clamp(0.75rem, 1.2vw, 0.875rem); color: var(--color-text-muted); text-align: right; letter-spacing: 0.03em; white-space: nowrap; }
.why-note { margin-top: clamp(24px, 4vw, 40px); font-size: 0.75rem; line-height: 1.7; color: var(--color-text-muted); }

@media (max-width: 600px) {
  .why-row {
    grid-template-columns: auto auto 1fr;
    grid-template-areas: "num icon label" ".   .    sub";
    gap: 2px 14px;
  }
  .why-row__num { grid-area: num; }
  .why-row__icon { grid-area: icon; }
  .why-row__label { grid-area: label; }
  .why-row__sub { grid-area: sub; text-align: left; white-space: normal; padding-top: 3px; }
}

/* ====================================================
   金色テキストの視認性改善（明背景で薄い金→AA準拠の濃い金）
   ※ダーク面（.section--navy）の見出しラベルは既存の明るい金を維持
   ==================================================== */
.section-head__eyebrow { color: var(--color-gold-text); }
.milestone__icon { color: var(--color-gold-text); }
.milestone__note { color: var(--color-gold-text); }
.hero-marquee__eyebrow { color: var(--color-gold-text); }
.marquee__cat { color: var(--color-gold-text); }
.gallery-card__cat { color: var(--color-gold-text); }
.plan__name-en { color: var(--color-gold-text); }

/* ====================================================
   業種タブ：各業種の画像＋テキスト 2カラム
   ==================================================== */
.tabs__panel .ind-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) 1.08fr;
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
}
.ind-grid__media {
  display: block; overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  box-shadow: 0 18px 48px rgba(27,42,74,0.14);
}
.ind-grid__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease-out-expo); }
.ind-grid__media:hover img { transform: scale(1.04); }
.tabs__panel .ind-grid .ind-grid__text p { margin: 0; }
@media (max-width: 720px) {
  .tabs__panel .ind-grid { grid-template-columns: 1fr; gap: 18px; }
  .ind-grid__media { aspect-ratio: 16 / 10; }
}

/* 動きに敏感な方への配慮 */
@media (prefers-reduced-motion: reduce) {
  .ind-grid__media:hover img { transform: none; }
  .hero--cinema .hero__eyebrow,
  .hero--cinema .hero__title-line,
  .hero--cinema .hero__sub-en,
  .hero--cinema .hero__sub,
  .hero--cinema .hero__note,
  .hero--cinema .hero__cta-wrap { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-bg__slide--active img { animation: none; }
  .hero__scroll-hint::after { animation: none; opacity: 0.4; }
}
