/* =============================================================
   新大人総研 共通デザインシステム v2（2026-07-17 刷新）
   白 #FFFFFF × 黒 #111111 × 朱赤 #F04A2F（brand/brand-colors.md 準拠）
   ルール: 朱赤は大面積・大型文字・バーのみ（小さい文字に使わない=コントラスト対策）
   ============================================================= */

:root {
  --red: #F04A2F;
  --black: #111111;
  --white: #FFFFFF;
  --muted: #595959;            /* 白地の補助文字 7.0:1 */
  --muted-inv: rgba(255, 255, 255, 0.72);
  --line: #E5E5E5;

  /* 8px倍数スペーシング */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s6: 48px; --s8: 64px; --s10: 80px; --s12: 96px; --s16: 128px;

  --container: 1000px;
  --section-y: clamp(72px, 9vw, 128px);
  --header-h: 72px;
  --gutter: clamp(20px, 5vw, 48px);

  --font-ja: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  --font-en: "Inter", "Noto Sans JP", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-md: 0 16px 40px rgba(17, 17, 17, 0.10), 0 4px 10px rgba(17, 17, 17, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-family: var(--font-ja);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- ヘッダー（下スクロールで隠れ・上スクロールで出る） ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transform: translateY(0);
  transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-110%); }

.logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  background: var(--red);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a { position: relative; padding: 6px 0; }
.site-nav a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.28s var(--ease);
}
.site-nav a:not(.button):hover::after,
.site-nav a.is-current::after { width: 100%; }

main { padding-top: var(--header-h); }

/* ---------- 見出し二段構え（EN大型 + JA） ---------- */
.sec-en {
  display: block;
  font-family: var(--font-en);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--black);
}
.sec-en::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: var(--s2);
  background: var(--red);
}
.sec-ja {
  display: block;
  margin-top: var(--s3);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.4;
}
.sec-head { margin: 0 0 var(--s6); }
.sec-head p.sec-lead {
  max-width: 640px;
  margin: var(--s3) 0 0;
  color: var(--muted);
  line-height: 1.8;
}
/* 黒地セクション用の反転 */
.inv, .inv .sec-en, .inv .sec-ja { color: var(--white); }
.inv p.sec-lead { color: var(--muted-inv); }

/* ---------- ボタン ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--black);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  background: var(--white);
  color: var(--black);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s, color 0.25s;
}
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.button-dark { background: var(--black); border-color: var(--black); color: var(--white); }
.button-dark:hover { background: #2b2b2b; }
/* 朱赤ボタン=大型CTA専用（19px bold以上でWCAG Large Text 3:1を満たす） */
.button-red {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-size: 19px;
  padding: 18px 40px;
}
.button-red:hover { background: #d63d24; border-color: #d63d24; }
/* ヘッダー内の問い合わせは黒（小さくてもAA適合） */
.site-header .button {
  font-size: 14px;
  padding: 10px 20px;
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
.site-header .button:hover { background: var(--red); border-color: var(--red); transform: none; box-shadow: none; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: var(--s10) var(--gutter) var(--s6);
}
.site-footer .footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
}
.site-footer .footer-brand strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.site-footer .footer-brand span {
  display: block;
  margin-top: var(--s1);
  font-size: 13px;
  color: var(--muted-inv);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  font-size: 14px;
  font-weight: 500;
}
.site-footer nav a { opacity: 0.85; transition: opacity 0.2s; }
.site-footer nav a:hover { opacity: 1; }
.site-footer .copyright {
  max-width: var(--container);
  margin: var(--s6) auto 0;
  padding-top: var(--s3);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  color: var(--muted-inv);
}

/* ---------- 双方向スクロールreveal（.jsゲート=JS無効でも全文可視） ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- スマホ追従CTA ---------- */
.sp-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 15;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--red);
  color: var(--white);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-md);
  transform: translateY(120%);
  transition: transform 0.4s var(--ease);
}
.sp-cta.is-on { transform: translateY(0); }
@media (max-width: 720px) {
  .sp-cta { display: flex; }
}

/* ---------- 段階的強化: CSS Scroll-driven Animations（装飾のみ・Firefoxはガード外） ---------- */
@supports (animation-timeline: view()) {
  .drift-img img {
    animation: sd-drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes sd-drift {
    from { transform: translateY(2.5%) scale(1.06); }
    to { transform: translateY(-2.5%) scale(1.06); }
  }
}

/* ---------- reduced motion: 動きを全停止 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .site-header, .sp-cta, .button { transition: none; }
  .drift-img img { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- 汎用 ---------- */
.m-br { display: none; }
@media (max-width: 720px) {
  .m-br { display: inline; }
  .site-nav a:not(.button) { display: none; }
}
