/* ============================================================
   AZIMUTH — Dark HUD 3D Site Template
   規律: 発光は線・点・数値のみ。面は無彩色。accent 使用面積 5% 以下。
   純黒・純白・彩度100%の面は禁止。角丸 0〜2px。
   ============================================================ */

:root {
  --bg: #0A0E14;
  --surface: #10161F;
  --ink: #E8ECF2;
  --ink-muted: #8B95A6;
  --line: #232D3D;
  --accent: #38E1FF;
  --accent2: #7C6BFF;

  --font-head: "Archivo", "IBM Plex Sans JP", sans-serif;
  --font-body: "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --fs-display: clamp(48px, 9vw, 144px);
  --fs-h2: clamp(32px, 5vw, 72px);
  --fs-h3: clamp(20px, 2.4vw, 32px);
  --fs-body: clamp(15px, 0.4vw + 13px, 17px);
  --fs-label: 12px;

  --pad-x: clamp(20px, 5vw, 64px);
  --content-max: 1440px;

  /* モーション: power4.out 相当を基準イージングにする（linear は使わない） */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }
/* height:auto を落とすと width/height 属性がそのまま効いて写真が縦に伸びる */
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: fixed; top: -56px; left: 16px; z-index: 100;
  padding: 10px 20px; background: var(--accent); color: var(--bg);
  font-weight: 600; text-decoration: none; font-size: 13px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- WebGL canvas + フィルムグレイン ---- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.no-webgl #gl { display: none; }
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { position: relative; z-index: 1; }

/* ---- セクションラベル（HUD インデックス） ---- */
.sec-label {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 32px;
}
.sec-label .idx { color: var(--accent); }
.sec-label .coord { margin-left: auto; font-size: 10px; opacity: 0.7; }

/* ---- Header ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
}
.logo {
  font-family: var(--font-head); font-weight: 800;
  font-size: 18px; letter-spacing: 0.22em; text-decoration: none;
  text-transform: uppercase;
}
.site-header nav { display: flex; gap: clamp(14px, 2vw, 32px); align-items: center; }
.site-header nav a {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-muted);
  transition: color 0.3s var(--ease);
}
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--ink); }
.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 8px 18px;
  transition: box-shadow 0.3s var(--ease);
}
/* 発光は「線」で表現する（塗り面は規律違反） */
.nav-cta:hover, .nav-cta:focus-visible {
  box-shadow: 0 0 18px rgba(56, 225, 255, 0.35), inset 0 0 8px rgba(56, 225, 255, 0.15);
}

/* ============================================================
   S1 HERO — 140vh
   ============================================================ */
.hero {
  height: 140vh; position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad-x);
  max-width: var(--content-max); margin: 0 auto; width: 100%;
}
/* ── 見出しスクリム（品質仕様 A: テキスト可読性）──────────────
   夜の海のワイヤーフレームは「背景」、見出しが常に主役。
   見出しブロックが載る帯だけ深色（--bg）を敷いて輝線を沈める。
   inset の左右は 100vw ぶん逃がして、max-width で切れないようにする。 */
.hero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset: 0 calc(50% - 50vw);
  background:
    linear-gradient(180deg,
      transparent 22%,
      color-mix(in srgb, var(--bg) 62%, transparent) 30%,
      color-mix(in srgb, var(--bg) 90%, transparent) 36%,
      color-mix(in srgb, var(--bg) 90%, transparent) 66%,
      color-mix(in srgb, var(--bg) 40%, transparent) 74%,
      transparent 82%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--bg) 55%, transparent) 0%,
      color-mix(in srgb, var(--bg) 22%, transparent) 46%,
      transparent 70%);
}
.hero > * { position: relative; z-index: 1; }
.display {
  font-family: var(--font-head); font-weight: 800;
  font-size: var(--fs-display);
  line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase;
}
.hero-copy {
  font-size: var(--fs-h3); font-weight: 600;
  line-height: 1.35; letter-spacing: 0.04em; margin-top: 32px;
}
.hero-sub {
  font-family: var(--font-mono); font-size: clamp(12px, 0.9vw, 14px);
  /* 背景が最も明るい帯に載るため、通常の muted より一段上げる */
  color: color-mix(in srgb, var(--ink) 70%, var(--ink-muted));
  margin-top: 16px; letter-spacing: 0.06em;
}
.js .hero-copy, .js .hero-sub { opacity: 0; }

/* ============================================================
   S2 TICKER — 40vh 相当の帯
   ============================================================ */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.ticker-track {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.12em;
  color: var(--ink-muted);
  will-change: transform;
}
.ticker-track span { padding-right: 2em; }

/* ============================================================
   S3 STATEMENT — 250vh / カメラ降下 + 行 blur reveal
   ============================================================ */
.statement { height: 250vh; position: relative; }
.statement-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--pad-x) 0; /* 固定ヘッダーとの交差を避ける */
  max-width: var(--content-max); margin: 0 auto;
}
/* ステートメントも 3D の上に載るため、左側にスクリムを敷く */
.statement-sticky::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset: 0 calc(50% - 50vw);
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--bg) 88%, transparent) 0%,
    color-mix(in srgb, var(--bg) 72%, transparent) 34%,
    color-mix(in srgb, var(--bg) 24%, transparent) 58%,
    transparent 76%);
}
.statement-sticky > * { position: relative; z-index: 1; }
.statement-copy {
  font-size: var(--fs-h2); font-weight: 600;
  line-height: 1.35; letter-spacing: 0.03em;
  max-width: 22em;
}
.statement-copy .st-line { display: block; }
.js .statement-copy .st-line { opacity: 0; filter: blur(4px); }

/* ============================================================
   S4 CAPABILITIES — 300vh / 横スクラブ
   ============================================================ */
.capabilities { height: 300vh; position: relative; }
.cap-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  padding: 0 0 0 var(--pad-x);
}
.cap-track { display: flex; gap: 20px; width: max-content; will-change: transform; }
.cap-card {
  width: min(400px, 80vw);
  min-height: 320px;
  /* 波形が透けると見出しが読めなくなるため、面は 95% まで詰める */
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  padding: clamp(28px, 2.4vw, 36px) clamp(24px, 2.2vw, 32px);
  display: flex; flex-direction: column;
}
.cap-no {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.16em; color: var(--accent);
  margin-bottom: 48px;
}
.cap-card h3 {
  font-family: var(--font-head); font-weight: 700;
  font-size: var(--fs-h3); letter-spacing: 0.01em;
  margin-bottom: 12px; text-transform: uppercase;
}
.cap-card p:last-child { color: var(--ink-muted); font-size: 0.9375rem; margin-top: auto; }

/* ============================================================
   S5 TECHNOLOGY — 200vh / リング主役
   ============================================================ */
.technology { height: 200vh; position: relative; }
.tech-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--pad-x) 10vh;
  max-width: var(--content-max); margin: 0 auto;
}
.tech-panel {
  max-width: 34em;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 36px 32px;
}
.tech-panel h2 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(24px, 3vw, 40px); line-height: 1.3;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.tech-panel p { color: var(--ink-muted); }

/* ============================================================
   S6 METRICS — 100vh
   ============================================================ */
.metrics {
  padding: clamp(96px, 10vw, 168px) var(--pad-x);
  max-width: var(--content-max); margin: 0 auto;
}
/* 罫線は gap を地色で透かす方式。border 方式だと auto-fit の折り返し時に
   右端だけ 2px になる（外枠と重なる）ため、疑似罫線に統一した */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.metric {
  padding: clamp(32px, 3.5vw, 48px) 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(4px);
}
.metric dt {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.16em; color: var(--ink-muted);
  margin-bottom: 24px;
}
.metric dd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(40px, 4.5vw, 72px);
  line-height: 1; color: var(--accent);
}
.metric .unit { font-size: 0.4em; color: var(--ink-muted); margin-left: 6px; }

/* ============================================================
   S7 CASES — 写真 3 枚（デュオトーン → hover 解除）
   ============================================================ */
.cases {
  padding: clamp(96px, 10vw, 168px) var(--pad-x);
  max-width: var(--content-max); margin: 0 auto;
}
.cases-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.case-photo {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
}
.case-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(0.82) contrast(1.18);
  transition: filter 0.4s var(--ease), transform 0.4s var(--ease);
}
.case-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(10,14,20,0.7), transparent 40%),
    linear-gradient(160deg, rgba(56,225,255,0.14), rgba(124,107,255,0.10));
  mix-blend-mode: screen;
}
/* 露出の低い夜景写真の持ち上げ用 */
.case-photo--lift img { filter: grayscale(1) brightness(1.25) contrast(1.05); }
.case:hover img, .case:focus-within img {
  filter: grayscale(0.2) brightness(0.95) contrast(1.05);
  transform: scale(1.04);
}
.case h3 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(17px, 1.2vw, 21px); line-height: 1.3;
  letter-spacing: 0.02em;
}
.case p { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }

/* ============================================================
   S8 CTA
   ============================================================ */
.cta {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad-x);
  max-width: var(--content-max); margin: 0 auto; width: 100%;
}
.cta::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset: 0 calc(50% - 50vw);
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--bg) 88%, transparent) 0%,
    color-mix(in srgb, var(--bg) 70%, transparent) 32%,
    color-mix(in srgb, var(--bg) 22%, transparent) 56%,
    transparent 74%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 {
  font-family: var(--font-head); font-weight: 700;
  font-size: var(--fs-h2); line-height: 1.25;
  margin-bottom: 20px;
}
.cta-copy { color: var(--ink-muted); margin-bottom: 40px; max-width: 34em; }
/* 発光は線・点・数値のみ: ボタンも塗り面ではなく発光する罫線で作る */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  width: fit-content;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.1em;
  text-decoration: none; text-transform: uppercase;
  color: var(--accent); background: transparent;
  border: 1px solid var(--accent);
  padding: 16px 32px;
  box-shadow: 0 0 24px rgba(56, 225, 255, 0.25);
  /* letter-spacing をトランジションするとボタン幅が動いて隣接要素が揺れる。
     発光（box-shadow）と罫線の色だけを動かす */
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover, .btn:focus-visible {
  box-shadow: 0 0 36px rgba(56, 225, 255, 0.45), inset 0 0 12px rgba(56, 225, 255, 0.15);
  border-color: color-mix(in srgb, var(--accent) 70%, #FFFFFF);
}

/* ---- Footer ---- */
.site-footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 24px var(--pad-x);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; color: var(--ink-muted);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---- モバイルドロワー（≤860px のみ表示） ---- */
.mnav { display: none; position: relative; }
.mnav summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.16em; color: var(--ink);
  border: 1px solid var(--line); padding: 8px 14px;
}
.mnav summary::-webkit-details-marker { display: none; }
.mnav[open] summary { border-color: var(--accent); color: var(--accent); }
.mnav-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 200px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.mnav-panel a {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease);
}
.mnav-panel a:last-child { border-bottom: none; }
.mnav-panel a:hover { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .site-header nav { display: none; }
  .mnav { display: block; }
  .statement-copy { font-size: clamp(24px, 6.4vw, 32px); }
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { transform: none !important; }
  #gl { opacity: 0.4; }
}

/* ──────────────────────────────────────────────────────────────
   和文タイポグラフィ調整
   1. palt        … 句読点・括弧まわりの余分なアキを詰める
   2. auto-phrase … 文節単位で折り返す（「書」「く。」のような分断を防ぐ）
   3. balance     … 見出しの行長を揃え、1文字だけ落ちる行を作らない
   4. strict      … 禁則処理を厳密にし、行頭に 。 、 」 が来ないようにする
   auto-phrase / balance / pretty は非対応ブラウザでは無視されるだけで、
   崩れることはない（プログレッシブ・エンハンスメント）。
   ────────────────────────────────────────────────────────────── */
body {
  font-feature-settings: "palt" 1;
  font-kerning: normal;
  line-break: strict;
  word-break: normal;
}
h1, h2, h3, h4, h5, .kicker, dt {
  word-break: auto-phrase;
  text-wrap: balance;
}
p, li, dd, td, .note, .desc, .caption,
.lede, .lead, .statement, blockquote, figcaption {
  word-break: auto-phrase;
  text-wrap: pretty;
}
/* 手動改行は広い画面でのみ効かせ、狭い画面では自動折り返しに任せる */
@media (max-width: 640px) {
  h1 br, h2 br, h3 br,
  .lede br, .lead br, .statement br { display: none; }
}


/* ── 書体設計（見出し＝個性 / 本文＝可読性） ──────────────────────
   見出し: Murecho
   本文  : BIZ UDPGothic（Google Fonts の和文で palt が効く数少ない書体。
           読点のあとのアキが締まり、Mac / Windows で見え方が揃う）
   欧文は先頭に置いた書体から取り、和文だけが差し替わる。 */
h1, h2, h3, h4, .lede, .lead, .kicker, .statement, blockquote {
  font-family: "Archivo", "Murecho", sans-serif;
}
p, li, dd, td, .note, .desc, .caption, figcaption, small {
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}


/* ── 本文書体の取りこぼし防止（2026-08-05 に対象を縮小）──
   旧版は html body :is(p, li, dd, td, .note, …) で詳細度 (0,3,4) を持たせていたため、
   .sec-label / .cap-no / .hero-sub / .metric dd といった IBM Plex Mono 指定を
   問答無用で潰し、HUD の等幅表現が本文ゴシックに化けていた
   （同じセル内で dt=Mono / dd=Gothic の書体割れまで起きていた）。
   → class を持たない「素の本文」だけに絞る。class 付き要素は上の
     `p, li, dd, td, …` ルール（詳細度 0,0,1）でゴシックが当たり、
     サイト固有の指定があればそちらが正しく勝つ。 */
/* dd / td はここから外す。数値表示（.num dd / .metric dd）は dd 自身に class が付かないため、
   :not([class]) を抜けてこの規則に捕まり、巨大数字が本文書体に化けていた。 */
html body :is(p, li, figcaption):not([class]):not(code):not(pre) {
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}
