/* ==========================================================
   下層ページ（SERVICE / WORKS / COMPANY / CONTACT）共通スタイル
   ヘッダー・ページ見出し・フッターなど4ページで同じ部分。
   各ページの css/style.css より先に読み込みます
   ========================================================== */
/* --- 基本設定（リセット・共通） --- */
:root {
  --red: #e00016;
  --black: #090909;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: #111;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}

/* --- ヘッダー（メニューバー） --- */
.header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 82px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.logo-real img {
  width: 185px;
  max-height: 52px;
  display: block;
  filter: brightness(0) invert(1);
}
.header nav {
  display: flex;
  gap: 42px;
}
.header nav a {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-align: center;
  position: relative;
  padding: 8px 3px;
}
.header nav small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
.header nav a:after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--red);
  left: 50%;
  right: 50%;
  bottom: 0;
  transition:
    left 0.28s,
    right 0.28s;
}
.header nav a:hover:after {
  left: 0;
  right: 0;
}
.header nav a:hover {
  color: var(--red);
}

/* --- ページ見出し（イントロ） --- */
.intro {
  min-height: 100vh;
  background: #0a0a0a;
  color: #fff;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 8vw 75px;
}
.intro-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.92%, rgba(255, 255, 255, 0.05) 50%, transparent 50.08%),
    linear-gradient(0deg, transparent 49.92%, rgba(255, 255, 255, 0.04) 50%, transparent 50.08%);
  background-size: 120px 120px;
  mask-image: linear-gradient(90deg, transparent, #000);
  animation: gridDrift 24s linear infinite;
}
.intro-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  margin: auto;
}
.eyebrow {
  font: 11px Arial;
  letter-spacing: 0.25em;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow i {
  width: 32px;
  height: 2px;
  background: var(--red);
}
.intro h1 {
  margin: 30px 0;
  font:
    700 clamp(90px, 16vw, 230px)/0.86 Arial,
    sans-serif;
  letter-spacing: -0.09em;
}
.intro h1 span {
  display: block;
  animation: arrive 1.1s both;
}
.intro h1 em {
  display: block;
  font:
    400 clamp(24px, 3vw, 42px)/1.4 "Yu Mincho",
    serif;
  letter-spacing: 0.2em;
  margin-top: 30px;
  font-style: normal;
}
.intro-lead {
  font-size: clamp(15px, 1.6vw, 21px);
  line-height: 2.2;
  margin: 30px 0 55px;
}
.intro-numbers {
  display: flex;
  gap: 0;
  max-width: 930px;
  border-top: 1px solid #444;
}
.intro-numbers a {
  flex: 1;
  padding: 24px 15px 20px 0;
  font: 10px Arial;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #444;
  transition: color 0.25s;
}
.intro-numbers a + a {
  padding-left: 25px;
}
.intro-numbers a:hover {
  color: var(--red);
}
.intro-numbers b {
  font: 25px Georgia;
  display: block;
  color: var(--red);
  margin-bottom: 10px;
}
.intro-numbers span {
  margin-left: 12px;
}
.intro-vertical {
  position: absolute;
  right: 3vw;
  bottom: 45px;
  font: 9px Arial;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}
.intro-vertical span {
  color: var(--red);
  font-size: 20px;
  margin-top: 14px;
}

/* --- フッター --- */
footer {
  background: #090909;
  color: #fff;
  padding: 30px 6vw;
  display: flex;
  justify-content: space-between;
}
footer small {
  color: #777;
}

/* --- スクロールで表示するアニメーション --- */
.reveal {
  opacity: 0;
  transform: translateY(65px);
  transition:
    opacity 0.9s,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- アニメーション定義（@keyframes） --- */
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(55px);
    letter-spacing: -0.13em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -0.09em;
  }
}
@keyframes gridDrift {
  to {
    background-position: 120px 120px;
  }
}

/* --- スマホ・タブレット（画面幅 900px 以下） --- */
@media (max-width: 900px) {
  .header {
    height: 66px;
    padding: 0 20px;
  }
  .logo-real img {
    width: 145px;
  }
  .header nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: #080808;
    padding: 25px;
    flex-direction: column;
    gap: 12px;
  }
  .header nav a {
    text-align: left;
  }
  .intro {
    padding: 115px 7vw 80px;
  }
  .intro h1 {
    font-size: clamp(65px, 14vw, 120px);
  }
  .intro-numbers {
    flex-direction: column;
  }
  .intro-numbers a,
  .intro-numbers a + a {
    padding: 14px 0;
  }
  .intro-numbers b {
    display: inline-block;
    margin: 0 20px 0 0;
  }
  .intro-vertical {
    display: none;
  }
}

/* --- OSで「動きを減らす」設定にしている人向け：アニメーションを止める --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
