/* ============================================================
   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, 3.5vw, 48px);
  --content-max: 1440px;
}

* { 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); }
img { display: block; max-width: 100%; }
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);
}
.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;
}
/* 発光は「線」で表現する（塗り面は規律違反） */
.nav-cta:hover {
  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%;
}
.hero > * { position: relative; }
.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.6; margin-top: 32px;
}
.hero-sub {
  font-family: var(--font-mono); font-size: 13px;
  color: 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;
}
.statement-copy {
  font-size: var(--fs-h2); font-weight: 600;
  line-height: 1.5; letter-spacing: 0.02em;
  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;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  padding: 28px 24px;
  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) 88%, transparent);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 32px;
}
.tech-panel h2 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(24px, 3vw, 40px); line-height: 1.4;
  margin-bottom: 16px;
}
.tech-panel p { color: var(--ink-muted); }

/* ============================================================
   S6 METRICS — 100vh
   ============================================================ */
.metrics {
  padding: clamp(96px, 12vh, 128px) var(--pad-x);
  max-width: var(--content-max); margin: 0 auto;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border: 1px solid var(--line);
}
.metric {
  padding: 40px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line); /* 2×2 折返し時の行罫線 */
  margin-bottom: -1px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.metric:last-child { border-right: none; }
.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, 12vh, 128px) 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.6s cubic-bezier(.2,.6,.2,1), transform 0.6s cubic-bezier(.2,.6,.2,1);
}
.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: 18px; letter-spacing: 0.02em;
}
.case p { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }

/* ============================================================
   S8 CTA
   ============================================================ */
.cta {
  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 h2 {
  font-family: var(--font-head); font-weight: 700;
  font-size: var(--fs-h2); line-height: 1.2;
  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);
  transition: box-shadow 0.25s ease, letter-spacing 0.25s 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);
  letter-spacing: 0.16em;
}

/* ---- 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);
}
.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;
}


/* ── 本文書体の適用を確実にする ──
   サイト側に .card p のような具体的な指定があると本文書体が上書きされてしまうため、
   html body を前置きして優先度を上げる。等幅を意図した要素は除外する。 */
html body :is(p, li, dd, td, .note, .desc, .caption, figcaption, .body, .txt, .text):not(code):not(pre):not([class*="mono"]):not([class*="code"]) {
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}
