/* ============================================================
   合同会社SIAN 会社サイト — 深海イマーシブ
   漆黒〜深紺の海に光がゆらめく世界観。明朝×セリフの高級タイポ
   ============================================================ */

:root {
  --ink: #030612;          /* 漆黒の深海 */
  --ink-2: #050a24;        /* 深紺 */
  --ink-3: #0a1440;        /* 上層の海 */
  --fg: #eaf2ff;           /* 基本文字色 */
  --fg-soft: rgba(234, 242, 255, 0.78);
  --fg-mute: rgba(234, 242, 255, 0.45);
  --aqua: #7fd8e8;         /* 生物発光のシアン */
  --aqua-dim: rgba(127, 216, 232, 0.65);
  --hairline: rgba(234, 242, 255, 0.10);
  --glass: rgba(234, 242, 255, 0.04);
  --amber: #e8c15a;        /* 要記入プレースホルダ */

  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --mincho: "Shippori Mincho", "Yu Mincho", "游明朝", serif;
  --sans: "Noto Sans JP", "Yu Gothic", "游ゴシック", sans-serif;
  --max-width: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--fg);
  line-height: 2.1;
  font-size: 15px;
  letter-spacing: 0.05em;
  /* 下へスクロールするほど深く暗く潜る */
  background: linear-gradient(180deg, var(--ink-3) 0%, var(--ink-2) 30%, var(--ink) 100%) var(--ink);
}

/* 粒状ノイズで奥行きを出す */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: var(--aqua); text-decoration-color: rgba(127, 216, 232, 0.4); }

main { position: relative; z-index: 2; }

/* ---------------- 深海の背景（漂う光） ---------------- */

.sea {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.orb-1 {
  width: 620px; height: 620px;
  left: -140px; top: -180px;
  background: radial-gradient(circle, rgba(38, 84, 255, 0.32), transparent 65%);
  animation: drift1 34s ease-in-out infinite alternate;
}

.orb-2 {
  width: 460px; height: 460px;
  right: -120px; top: 22%;
  background: radial-gradient(circle, rgba(127, 216, 232, 0.16), transparent 65%);
  animation: drift2 42s ease-in-out infinite alternate;
}

.orb-3 {
  width: 540px; height: 540px;
  left: 18%; bottom: -220px;
  background: radial-gradient(circle, rgba(27, 60, 255, 0.20), transparent 65%);
  animation: drift3 38s ease-in-out infinite alternate;
}

.orb-4 {
  width: 300px; height: 300px;
  right: 26%; top: 58%;
  background: radial-gradient(circle, rgba(127, 216, 232, 0.10), transparent 65%);
  animation: drift1 28s ease-in-out infinite alternate-reverse;
}

@keyframes drift1 { to { transform: translate(80px, 60px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-70px, 90px) scale(0.92); } }
@keyframes drift3 { to { transform: translate(60px, -80px) scale(1.08); } }

/* ---------------- 現在深度メーター ---------------- */

.depth {
  position: fixed;
  left: 28px;
  bottom: 32px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--serif-en);
  color: var(--fg-mute);
}

.depth-label {
  font-size: 10px;
  letter-spacing: 0.35em;
  writing-mode: vertical-rl;
}

.depth-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--aqua-dim));
}

.depth-value {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--aqua-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------------- ヘッダー ---------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(3, 6, 18, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-family: var(--serif-en);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.34em;
  color: var(--fg);
  text-decoration: none;
}

.global-nav { display: flex; gap: 30px; }

.global-nav a {
  position: relative;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--fg-soft);
  text-decoration: none;
  padding: 6px 0;
}

.global-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--aqua);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}

.global-nav a:hover { color: var(--fg); }
.global-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------------- ヒーロー ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* 水面から差し込む光 */
  background: radial-gradient(ellipse 120% 60% at 50% -18%, rgba(140, 190, 255, 0.16), transparent 62%);
}

/* 差し込む光の筋 */
.rays { position: absolute; inset: 0; pointer-events: none; }

.rays span {
  position: absolute;
  top: -12%;
  width: 180px;
  height: 75%;
  background: linear-gradient(180deg, rgba(170, 210, 255, 0.10), transparent 78%);
  filter: blur(12px);
  transform-origin: top center;
  animation: sway 11s ease-in-out infinite alternate;
}

.rays span:nth-child(1) { left: 22%; rotate: 14deg; }
.rays span:nth-child(2) { left: 47%; width: 260px; rotate: -6deg; animation-delay: -4s; }
.rays span:nth-child(3) { left: 68%; rotate: 20deg; animation-delay: -8s; }

@keyframes sway {
  from { transform: rotate(-2.5deg); opacity: 0.65; }
  to   { transform: rotate(2.5deg);  opacity: 1; }
}

/* 立ちのぼる泡 */
.bubbles { position: absolute; inset: 0; pointer-events: none; }

.bubbles i {
  position: absolute;
  bottom: -20px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(190, 230, 255, 0.35);
  box-shadow: 0 0 8px rgba(140, 210, 255, 0.5);
  animation: rise 14s linear infinite;
}

.bubbles i:nth-child(1) { left: 12%; animation-duration: 16s; }
.bubbles i:nth-child(2) { left: 28%; width: 3px; height: 3px; animation-delay: -6s; }
.bubbles i:nth-child(3) { left: 45%; animation-delay: -11s; animation-duration: 19s; }
.bubbles i:nth-child(4) { left: 63%; width: 4px; height: 4px; animation-delay: -3s; }
.bubbles i:nth-child(5) { left: 78%; animation-delay: -9s; animation-duration: 17s; }
.bubbles i:nth-child(6) { left: 90%; width: 3px; height: 3px; animation-delay: -13s; }

@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 0.8; }
  100% { transform: translateY(-105vh) translateX(26px); opacity: 0; }
}

.hero-inner { position: relative; text-align: center; padding: 0 32px; }

.hero-tagline {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(20px, 3.2vw, 30px);
  letter-spacing: 0.22em;
  color: var(--fg);
  text-shadow: 0 0 40px rgba(120, 180, 255, 0.35);
}

/* タグライン下のひとこと（タイプ完了後に浮かび上がる） */
.hero-sub {
  margin-top: 30px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--fg-soft);
}

.js .hero-sub {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.js .hero-sub.is-visible { opacity: 1; transform: none; }

/* タイプ演出のカーソル */
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 8px;
  vertical-align: -0.12em;
  background: var(--aqua);
  box-shadow: 0 0 14px rgba(127, 216, 232, 0.9);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.type-cursor.is-done {
  animation: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-scroll {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-scroll-text {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--fg-mute);
}

.hero-scroll-line {
  width: 1px;
  height: 72px;
  background: rgba(234, 242, 255, 0.4);
  animation: scrollline 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollline {
  0% { transform: scaleY(0); transform-origin: top; }
  48% { transform: scaleY(1); transform-origin: top; }
  52% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------------- セクション共通 ---------------- */

.section { position: relative; padding: 150px 0; }

.section-head { margin-bottom: 64px; }

.section-no {
  font-family: var(--serif-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--aqua-dim);
}

.section-no::after {
  content: "";
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--aqua-dim);
  margin-left: 14px;
  vertical-align: 4px;
}

.section-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.28em;
  color: var(--fg-mute);
  margin-top: 14px;
}

.section-title {
  font-family: var(--mincho);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0.14em;
  line-height: 1.6;
  margin-top: 10px;
}

/* ---------------- 会社概要 ---------------- */

.company-list { max-width: 860px; border-top: 1px solid var(--hairline); }

.company-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--hairline);
}

.company-row dt {
  font-family: var(--mincho);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--fg-mute);
  padding-top: 2px;
}

.company-row dd { font-size: 14.5px; color: var(--fg-soft); }

/* ---------------- フッター ---------------- */

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hairline);
  text-align: center;
  padding: 56px 0;
}

.footer-brand {
  font-family: var(--serif-en);
  font-size: 20px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--fg-soft);
}

.footer-copy {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  margin-top: 10px;
}

/* ---------------- フェードイン ---------------- */

/* JS有効時のみ初期非表示にする（JS無効でも全文が読める） */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero-sub { opacity: 1; transform: none; transition: none; }
  .orb, .rays span, .bubbles i, .hero-scroll-line, .type-cursor { animation: none; }
}

/* ---------------- レスポンシブ ---------------- */

@media (max-width: 860px) {
  .section { padding: 96px 0; }
  .company-row { grid-template-columns: 120px 1fr; gap: 16px; }
  .depth { display: none; }
}

@media (max-width: 600px) {
  .container { padding: 0 22px; }
  .hero-tagline { font-size: 17px; letter-spacing: 0.12em; }
  .hero-sub { font-size: 11.5px; letter-spacing: 0.12em; }
  .company-row { grid-template-columns: 1fr; gap: 4px; padding: 20px 4px; }
}
