/* =============================================================
   SAMEKORO LAB — style.css
   デザイントークンは docs/design-system.md と対応
   ============================================================= */

/* ---------- 1. デザイントークン ---------- */
:root {
  /* 深海のレイヤー */
  --bg-abyss: #030811;
  --bg-deep: #050d1a;
  --bg-mid: #0a1830;
  --surface: rgba(13, 33, 56, 0.55);
  --surface-solid: #0c1c30;

  /* 計器の光 */
  --cyan: #54d8e8;
  --cyan-bright: #8ef0fa;
  --blue: #4d9dff;
  --glow: rgba(84, 216, 232, 0.35);

  /* テキスト */
  --text: #dce9f5;
  --text-sub: #95acc2;
  --text-faint: #5f7891;

  /* 罫線 */
  --line: rgba(126, 200, 232, 0.14);
  --line-bright: rgba(126, 214, 240, 0.45);

  /* 形状・動き */
  --radius-card: 20px;
  --radius-thumb: 14px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --ease: 0.25s ease;

  /* 書体 */
  --font-ja: "Zen Kaku Gothic New", -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  --font-en: "Space Grotesk", "Zen Kaku Gothic New", sans-serif;
}

/* ---- 深度シーン用トークン（既定 = MIDNIGHT / -1,200m）----
   光がほとんど届かない層。ビネットと霧を強く、発光生物を多く、粒子は遅く。 */
:root {
  --ray-o: 0.3;          /* 光芒の強さ */
  --shark-o: 0.32;       /* サメシルエットの見えやすさ */
  --whale-o: 0.22;       /* 深海の大型生物シルエット */
  --fog-o: 0.5;          /* 霧・水圧レイヤー */
  --vignette-o: 0.78;    /* 画面周辺の暗がり */
  --gloworb-o: 1;        /* 生物発光の粒子 */
  --xbubble-o: 0;        /* 浅い深度用の追加気泡 */
  --ocean-speed: 1.35;   /* 粒子アニメの時間倍率（大きいほど遅い） */
  --scene-fade: 0.7s;    /* 深度切替時のレイヤーフェード時間 */
}

/* 深度切替: TWILIGHT（-400m / 光の届く浅い層）
   明るい青緑・上からの光・気泡多め・ビネット弱め・発光は控えめ。 */
:root[data-depth="twilight"] {
  --bg-abyss: #0c2b46;
  --bg-deep: #113a58;
  --bg-mid: #1c5e86;
  --surface: rgba(30, 68, 104, 0.55);
  --surface-solid: #1b3d5e;
  --glow: rgba(84, 216, 232, 0.22);
  --text-sub: #a7bdd2;
  --text-faint: #7c95ad;

  --ray-o: 1;
  --shark-o: 0.68;
  --whale-o: 0;
  --fog-o: 0.1;
  --vignette-o: 0.26;
  --gloworb-o: 0.15;
  --xbubble-o: 1;
  --ocean-speed: 1;
}

/* ---------- 2. リセット・ベース ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--font-ja);
  color: var(--text);
  background:
    radial-gradient(120% 60% at 50% -10%, var(--bg-mid) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-deep) 55%, var(--bg-abyss) 100%);
  background-color: var(--bg-deep);
  font-size: 16px;
  line-height: 1.85;
  overflow-x: hidden;
  transition: background-color 0.6s ease;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

::selection { background: rgba(84, 216, 232, 0.28); }

/* ---------- 3. 背景レイヤー（深海環境）---------- */
.ocean {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* 深度ごとの海の背景（2枚をクロスフェード） */
.ocean::before,
.ocean::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: opacity var(--scene-fade) ease;
}
/* MIDNIGHT: 濃紺〜ほぼ黒 */
.ocean::before {
  background:
    radial-gradient(120% 60% at 50% -10%, #0a1830 0%, transparent 60%),
    linear-gradient(180deg, #050d1a 0%, #040b16 55%, #030811 100%);
  opacity: 1;
}
/* TWILIGHT: 明るい青緑 + 上からの淡い光 */
.ocean::after {
  background:
    radial-gradient(130% 70% at 50% -12%, rgba(130, 215, 240, 0.42) 0%, transparent 55%),
    radial-gradient(120% 60% at 50% -10%, #1c5e86 0%, transparent 65%),
    linear-gradient(180deg, #17486b 0%, #113a58 55%, #0c2b46 100%);
  opacity: 0;
}
:root[data-depth="twilight"] .ocean::before { opacity: 0; }
:root[data-depth="twilight"] .ocean::after { opacity: 1; }

/* 差し込む光芒 */
.ocean__ray {
  position: absolute;
  top: -20%;
  width: 220px;
  height: 90vh;
  background: linear-gradient(180deg, rgba(110, 190, 235, 0.10), transparent 75%);
  filter: blur(28px);
  transform: rotate(16deg);
  opacity: var(--ray-o);
  transition: opacity var(--scene-fade) ease;
  animation: raySway 14s ease-in-out infinite alternate;
}
.ocean__ray--1 { left: 12%; }
.ocean__ray--2 { left: 58%; width: 320px; opacity: calc(var(--ray-o) * 0.7); animation-delay: -6s; }

@keyframes raySway {
  from { transform: rotate(14deg) translateX(-24px); }
  to   { transform: rotate(19deg) translateX(24px); }
}

/* 気泡（script.jsが .bubble を生成） */
.bubble {
  position: absolute;
  bottom: -24px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(180, 235, 250, 0.5), rgba(120, 200, 235, 0.08) 62%);
  border: 1px solid rgba(160, 225, 245, 0.18);
  animation: bubbleRise linear infinite;
  animation-duration: calc(var(--dur, 20s) * var(--ocean-speed, 1));
}

/* 浅い深度でのみ見える追加の気泡（script.jsが生成） */
.ocean__bubbles--extra {
  position: absolute;
  inset: 0;
  opacity: var(--xbubble-o);
  transition: opacity var(--scene-fade) ease;
}

@keyframes bubbleRise {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  8%   { opacity: var(--o, 0.5); }
  85%  { opacity: var(--o, 0.5); }
  100% { transform: translate(var(--sway, 24px), -110vh) scale(1.15); opacity: 0; }
}

/* 回遊するサメ */
.ocean__shark {
  position: absolute;
  top: 22%;
  left: -30%;
  width: clamp(280px, 34vw, 460px);
  opacity: var(--shark-o);
  transition: opacity var(--scene-fade) ease;
  animation: sharkSwim 52s linear infinite;
}

@keyframes sharkSwim {
  0%    { transform: translateX(-10vw) translateY(0) scaleX(1); }
  46%   { transform: translateX(120vw) translateY(5vh) scaleX(1); }
  50%   { transform: translateX(120vw) translateY(5vh) scaleX(-1); }
  96%   { transform: translateX(-10vw) translateY(0) scaleX(-1); }
  100%  { transform: translateX(-10vw) translateY(0) scaleX(1); }
}

/* 深海の大型生物シルエット（script.jsが挿入 / MIDNIGHTのみ薄く見える） */
.ocean__whale {
  position: absolute;
  top: 56%;
  left: -40%;
  width: clamp(360px, 46vw, 640px);
  opacity: var(--whale-o);
  filter: blur(2px);
  transition: opacity var(--scene-fade) ease;
  animation: whaleDrift 96s linear infinite;
}

@keyframes whaleDrift {
  0%   { transform: translateX(-15vw) translateY(0) scaleX(1); }
  48%  { transform: translateX(115vw) translateY(-6vh) scaleX(1); }
  50%  { transform: translateX(115vw) translateY(-6vh) scaleX(-1); }
  98%  { transform: translateX(-15vw) translateY(0) scaleX(-1); }
  100% { transform: translateX(-15vw) translateY(0) scaleX(1); }
}

/* 生物発光の粒子（script.jsが .glow-orb を生成 / MIDNIGHTで強く） */
.ocean__glowfield {
  position: absolute;
  inset: 0;
  opacity: var(--gloworb-o);
  transition: opacity var(--scene-fade) ease;
}
.glow-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 245, 250, 0.9), rgba(84, 216, 232, 0.25) 55%, transparent 72%);
  box-shadow: 0 0 10px rgba(84, 216, 232, 0.45);
  animation: orbFloat linear infinite;
  animation-duration: calc(var(--dur, 40s) * var(--ocean-speed, 1));
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: var(--o, 0.5); }
  50%  { opacity: calc(var(--o, 0.5) * 0.55); }
  88%  { opacity: var(--o, 0.5); }
  100% { transform: translate(var(--sway, 30px), -55vh); opacity: 0; }
}

/* 霧・水圧レイヤー（script.jsが挿入 / MIDNIGHTで強く） */
.ocean__fog {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(55% 40% at 28% 62%, rgba(2, 8, 18, 0.55), transparent 70%),
    radial-gradient(48% 36% at 74% 34%, rgba(3, 10, 22, 0.5), transparent 70%),
    radial-gradient(70% 45% at 50% 88%, rgba(1, 5, 12, 0.6), transparent 72%);
  opacity: var(--fog-o);
  transition: opacity var(--scene-fade) ease;
  animation: fogDrift 46s ease-in-out infinite alternate;
}

@keyframes fogDrift {
  from { transform: translateX(-2.5%); }
  to   { transform: translateX(2.5%); }
}

/* 画面周辺のビネット（script.jsが挿入） */
.ocean__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 95% at 50% 42%, transparent 52%, rgba(1, 4, 10, 0.9) 100%);
  opacity: var(--vignette-o);
  transition: opacity var(--scene-fade) ease;
}

/* 深度切替時の全画面ベール（script.jsが挿入・opacityのみ操作） */
.depth-veil {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgba(6, 18, 34, 0.92), rgba(2, 8, 18, 0.96));
  transition: opacity 0.3s ease;
}
.depth-veil--ascend {
  background: linear-gradient(180deg, rgba(130, 205, 235, 0.55), rgba(22, 62, 96, 0.88));
}
.depth-veil.is-active { opacity: 1; }

/* 深度切替の一時フィードバック表示（script.jsが挿入） */
.depth-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 400;
  transform: translate(-50%, -50%) translateY(8px);
  max-width: calc(100vw - 32px);
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  background: rgba(6, 18, 34, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-en);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
  color: var(--cyan-bright);
  text-shadow: 0 0 12px rgba(84, 216, 232, 0.35);
  box-shadow: 0 0 30px rgba(84, 216, 232, 0.18), 0 10px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.depth-toast.is-show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* ---------- 4. ヘッダー ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 13, 26, 0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease);
}
.header.is-scrolled {
  background: rgba(5, 13, 26, 0.78);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand__text { line-height: 1.15; }
.brand__ja { display: block; font-weight: 700; font-size: 0.98rem; letter-spacing: 0.04em; }
.brand__en {
  display: block;
  font-family: var(--font-en);
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  color: var(--text-faint);
}

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-sub);
  transition: color var(--ease), background var(--ease);
}
.nav__link:hover { color: var(--cyan-bright); background: rgba(84, 216, 232, 0.07); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: "";
  display: block;
  margin: 0 auto;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--glow);
}

.header__tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-sub);
  transition: color var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.tool-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.tool-btn:hover { color: var(--cyan-bright); border-color: var(--line-bright); box-shadow: 0 0 12px rgba(84, 216, 232, 0.15); }
.tool-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  color: var(--cyan-bright);
  border-color: var(--line-bright);
  box-shadow: 0 0 12px rgba(84, 216, 232, 0.25);
}
.tool-btn--depth span {
  font-family: var(--font-en);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}
/* 深度計アイコン: ゲージマーカーが現在深度の位置へスライドする */
.depth-icon__marker {
  fill: currentColor;
  stroke: none;
  transition: transform 0.6s ease;
}
:root[data-depth="twilight"] .depth-icon__marker { transform: translateY(-9.4px); }

/* ハンバーガーボタン（script.jsが生成 / 768px以下のみ表示） */
.tool-btn--menu { display: none; }
.menu-icon__bar {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.tool-btn--menu.is-open .menu-icon__bar--top { transform: translateY(4px) rotate(45deg); }
.tool-btn--menu.is-open .menu-icon__bar--mid { opacity: 0; }
.tool-btn--menu.is-open .menu-icon__bar--btm { transform: translateY(-4px) rotate(-45deg); }

/* モバイルメニュー本体（script.jsが生成 / ヘッダー直下のドロップダウン） */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(6, 15, 28, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-bright);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(84, 216, 232, 0.08);
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  /* 閉じるときだけvisibilityを遅らせ、開いた瞬間からフォーカス可能にする */
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
@supports not (backdrop-filter: blur(1px)) {
  .mobile-menu { background: #0a1a2e; }
}
.mobile-menu.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}
.mobile-menu ul {
  padding: 10px 16px 16px;
  display: grid;
  gap: 2px;
}
.mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-sub);
  transition: color var(--ease), background var(--ease);
}
/* 左側のアクセントバー（非選択時は透明のスペーサー） */
.mobile-menu__link::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 2px;
  margin-right: 12px;
  background: transparent;
  flex-shrink: 0;
}
.mobile-menu__link:hover { color: var(--cyan-bright); background: rgba(84, 216, 232, 0.07); }
.mobile-menu__link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
  color: var(--cyan-bright);
}
.mobile-menu__link.is-active {
  color: var(--text);
  background: rgba(84, 216, 232, 0.08);
}
.mobile-menu__link.is-active::before {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--glow);
}

/* メニュー展開中の背景（script.jsが生成 / ヘッダーより下層） */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(2, 6, 12, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s;
}
/* PC幅ではモバイルメニュー一式を常に無効化（PCナビと同時表示しない） */
@media (min-width: 769px) {
  .mobile-menu, .mobile-menu-backdrop { display: none; }
}

/* ---------- 5. ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
}

.hero__label {
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--cyan);
  margin-bottom: 20px;
}
.hero__label::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--cyan);
  vertical-align: middle;
  margin-right: 14px;
  box-shadow: 0 0 8px var(--glow);
}

.hero__title {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}
.hero__title-grad {
  background: linear-gradient(92deg, var(--cyan-bright) 0%, var(--cyan) 45%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 32px rgba(84, 216, 232, 0.22);
}

.hero__lead {
  color: var(--text-sub);
  font-size: 1.02rem;
  max-width: 620px;
  margin-bottom: 40px;
}

.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 56px; }

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), color var(--ease), background var(--ease);
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  color: #04121c;
  background: linear-gradient(115deg, var(--cyan-bright), var(--cyan) 55%, #3db9d6);
  box-shadow: 0 4px 24px rgba(84, 216, 232, 0.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(84, 216, 232, 0.45); }

.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-bright);
  background: rgba(84, 216, 232, 0.05);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(84, 216, 232, 0.2); transform: translateY(-2px); }

.btn--text { padding: 0 6px; color: var(--text-sub); font-family: var(--font-en); letter-spacing: 0.1em; }
.btn--text:hover { color: var(--cyan-bright); }

.btn--small { height: 40px; padding: 0 22px; font-size: 0.86rem; justify-content: center; }

/* 計器風ステータス行 */
.hero__status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}
.hero__status strong { color: var(--cyan); font-weight: 500; }
.hero__status-sep { width: 34px; height: 1px; background: var(--line); }
.hero__status-item { display: inline-flex; align-items: center; gap: 8px; }

.hero__status-link { color: var(--cyan); }
.hero__status-link:hover { color: var(--cyan-bright); text-shadow: 0 0 10px var(--glow); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--glow);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ヒーロー下端を次セクションへ溶かす */
.hero__fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(5, 13, 26, 0.55));
  pointer-events: none;
}

/* ---------- 6. セクション共通 ---------- */
.section { padding: 60px 0; }
.section + .section { padding-top: 60px; }
main .section:last-of-type { padding-bottom: 120px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}
.section__label {
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  color: var(--cyan);
  margin-bottom: 8px;
}
.section__title { font-size: 1.75rem; font-weight: 700; letter-spacing: 0.03em; }

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-sub);
  padding-bottom: 4px;
  transition: color var(--ease);
}
.more-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--ease); }
.more-link:hover { color: var(--cyan-bright); }
.more-link:hover svg { transform: translateX(3px); }

/* ---------- 7. カード共通（ガラスパネル）---------- */
.card {
  position: relative;
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
@supports not (backdrop-filter: blur(1px)) {
  .card { background: var(--surface-solid); }
}
/* 上辺のハイライト線（ガラスの反射） */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170, 230, 248, 0.35), transparent);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(84, 216, 232, 0.12);
}

/* カード全体リンク */
.card__link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }

.card__arrow {
  position: absolute;
  right: 26px; bottom: 24px;
  color: var(--text-faint);
  transition: color var(--ease), transform var(--ease);
}
.card__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card__arrow { color: var(--cyan-bright); transform: translateX(4px); }

/* チップ・タグ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.chip--status {
  font-family: var(--font-en);
  letter-spacing: 0.18em;
  color: var(--cyan);
  border: 1px solid rgba(84, 216, 232, 0.35);
  background: rgba(84, 216, 232, 0.07);
}
.chip--beta { color: #a8b8ff; border-color: rgba(140, 160, 255, 0.35); background: rgba(140, 160, 255, 0.07); }
.chip--beta .dot { background: #a8b8ff; box-shadow: 0 0 8px rgba(140, 160, 255, 0.4); }

.chip--planned {
  font-family: var(--font-en);
  letter-spacing: 0.14em;
  color: var(--text-sub);
  border: 1px solid var(--line);
  background: transparent;
}
.pending-note { color: var(--text-faint); font-family: var(--font-ja); letter-spacing: 0.02em; }

.chip--aws { color: #ffc46b; background: rgba(255, 170, 60, 0.1); }
.chip--ai  { color: #9db4ff; background: rgba(120, 150, 255, 0.12); }
.chip--iac { color: #7de8c0; background: rgba(70, 220, 165, 0.1); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 0.74rem;
  color: var(--text-sub);
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(126, 200, 232, 0.04);
}

/* ---------- 8. プロジェクトカード ---------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card { padding: 30px 30px 34px; }

.project-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}
.project-card__icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--cyan);
  background: rgba(84, 216, 232, 0.08);
  border: 1px solid rgba(84, 216, 232, 0.22);
  transition: box-shadow var(--ease);
}
.project-card__icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.project-card:hover .project-card__icon { box-shadow: 0 0 18px rgba(84, 216, 232, 0.25); }

.project-card__title {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 20px;
  padding-right: 20px;
}

/* ---------- 9. 記事カード ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card { display: flex; flex-direction: column; overflow: hidden; }

.article-card__thumb {
  position: relative;
  height: 150px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.thumb__glyph {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding-left: 0.22em; /* 字間の右余りを相殺 */
  color: rgba(220, 240, 250, 0.85);
  text-shadow: 0 0 22px rgba(84, 216, 232, 0.45);
}

/* カテゴリ別の抽象パターン */
.thumb--aws {
  background:
    repeating-radial-gradient(circle at 78% 120%, transparent 0 26px, rgba(255, 190, 90, 0.13) 26px 27px),
    linear-gradient(150deg, #102544 0%, #0a1830 70%);
}
.thumb--ai {
  background:
    radial-gradient(circle at 22% 30%, rgba(140, 160, 255, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle at 55% 68%, rgba(140, 160, 255, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 26%, rgba(140, 160, 255, 0.35) 0 3px, transparent 4px),
    linear-gradient(160deg, rgba(120, 150, 255, 0.16), transparent 60%),
    linear-gradient(150deg, #14204a 0%, #0a1430 70%);
}
.thumb--iac {
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(70, 220, 165, 0.10) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(70, 220, 165, 0.10) 23px 24px),
    linear-gradient(150deg, #0e2c33 0%, #081a26 70%);
}

.article-card__body { padding: 20px 22px 26px; display: flex; flex-direction: column; gap: 10px; }

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.article-card__meta .rt::before { content: "● "; font-size: 0.5em; vertical-align: 2px; }

.article-card__title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.6;
  transition: color var(--ease);
}
.article-card:hover .article-card__title { color: var(--cyan-bright); }

.article-card__desc {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 10. About / プロフィール ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.about-card { padding: 34px 36px; }
.about-card p { color: var(--text-sub); font-size: 0.94rem; }
.about-card p + p { margin-top: 16px; }
.about-card strong { color: var(--text); font-weight: 700; }

.about-layers { margin-top: 26px; display: grid; gap: 10px; }
.about-layers li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(126, 200, 232, 0.04);
}
.depth-tag {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  min-width: 62px;
}
/* 深く潜るほど濃く */
.about-layers li:nth-child(2) { background: rgba(126, 200, 232, 0.07); }
.about-layers li:nth-child(3) { background: rgba(126, 200, 232, 0.11); border-color: var(--line-bright); }

.profile-card {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.profile-card__avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #16324f, #0a1c30);
  border: 1px solid var(--line-bright);
  box-shadow: 0 0 22px rgba(84, 216, 232, 0.18);
  margin-bottom: 16px;
}
.profile-card__avatar svg { width: 42px; height: 42px; }
.profile-card__name { font-size: 1.15rem; font-weight: 700; }
.profile-card__role { font-size: 0.78rem; color: var(--cyan); letter-spacing: 0.08em; margin: 4px 0 14px; }
.profile-card__bio { font-size: 0.84rem; color: var(--text-sub); margin-bottom: 22px; }

.profile-card__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}
.profile-card__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-sub);
  transition: color var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.profile-card__links a:hover { color: var(--cyan-bright); border-color: var(--line-bright); box-shadow: 0 0 14px rgba(84, 216, 232, 0.15); }
.profile-card__links svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

.profile-card .btn { width: 100%; }

/* ---------- 11. フッター（最深部）---------- */
.footer {
  background: linear-gradient(180deg, transparent, rgba(3, 8, 17, 0.9) 30%, var(--bg-abyss));
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
}
.footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 48px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__name { font-family: var(--font-en); font-weight: 700; letter-spacing: 0.14em; font-size: 0.9rem; }
.footer__tag { font-size: 0.72rem; color: var(--text-faint); }

.footer__nav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-left: auto; }
.footer__nav a { font-size: 0.82rem; color: var(--text-sub); transition: color var(--ease); }
.footer__nav a:hover { color: var(--cyan-bright); }

.footer__copy {
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid rgba(126, 200, 232, 0.08);
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

/* ---------- 12. スクロール出現 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s ease,
              border-color var(--ease), box-shadow var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* hover の translateY と競合しないよう、表示後はカードの transform 遷移を戻す */
.card.reveal.is-visible { transition: opacity 0.7s ease, transform var(--ease), border-color var(--ease), box-shadow var(--ease); }
.card.reveal.is-visible:hover { transform: translateY(-4px); }

/* ---------- 13. レスポンシブ ---------- */
.pc-only { display: inline; }

@media (max-width: 992px) {
  .article-grid { grid-template-columns: 1fr 1fr; }
  .article-card:nth-child(3) { display: none; } /* 2列時は2件に絞る */
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; } /* PCナビ非表示。以下のハンバーガーメニューへ切替 */
  .tool-btn--menu { display: flex; }
  /* タップ領域44px以上を確保（検索・深度切替・メニューの押し分け） */
  .tool-btn { min-width: 44px; min-height: 44px; justify-content: center; }
  .section { padding: 44px 0; }
  main .section:last-of-type { padding-bottom: 72px; }
  .hero { min-height: auto; padding: 130px 0 60px; }
  .project-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card:nth-child(3) { display: flex; }
  .pc-only { display: none; }
  .hero__status { gap: 12px; }
  .hero__status-sep { display: none; }
  .footer__nav { margin-left: 0; }
}

@media (max-width: 560px) {
  .brand__en { display: none; }
  .tool-btn--depth span { display: none; }
  .header__inner { gap: 16px; }
  .hero__actions .btn--primary, .hero__actions .btn--ghost { width: 100%; justify-content: center; }
  .depth-toast { font-size: 0.76rem; letter-spacing: 0.14em; padding: 11px 20px; }
}

/* 320px級: ロゴ＋ボタン3つが重ならないよう詰める */
@media (max-width: 374px) {
  .header .container { padding: 0 14px; }
  .header__inner { gap: 10px; }
  .header__tools { gap: 6px; }
  .brand { gap: 8px; }
  .brand__mark { width: 28px; height: 28px; }
  .brand__ja { font-size: 0.88rem; }
}

/* ---------- 14. モーション配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ocean__ray, .ocean__shark, .bubble, .dot,
  .ocean__whale, .ocean__fog, .glow-orb { animation: none; }
  .bubble { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ocean::before, .ocean::after,
  .ocean__ray, .ocean__shark, .ocean__whale, .ocean__fog,
  .ocean__glowfield, .ocean__bubbles--extra, .ocean__vignette,
  .depth-icon__marker, .depth-veil,
  .menu-icon__bar, .mobile-menu, .mobile-menu-backdrop { transition: none; }
  .depth-toast { transition: opacity 0.2s ease; transform: translate(-50%, -50%); }
}
