/* ════════════════════════════════════════════════
   うっかり企画 — 共有スタイル
   works.html / contact.html で使用
   ════════════════════════════════════════════════ */

:root {
  --void: #030409;
  --abyss: #07090f;
  --deep: #0d1117;
  --surface: #111620;
  --panel: #161c2a;
  --border: #1e2840;
  --accent: #4a90e8;
  --accent2: #7b5ea7;
  --gold: #c8a84b;
  --crimson: #8b1a2e;
  --text-primary: #e8eaf2;
  --text-secondary: #8892a4;
  --text-muted: #3d4558;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text-primary);
  font-family: 'Noto Serif JP', serif;
  overflow-x: hidden;
  cursor: crosshair;
}

/* ── 宇宙背景（星雲＋星＋流れ星） ── */
.cosmic-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.cosmic-nebula {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 60% 50% at 15% 25%, rgba(123, 94, 167, 0.20) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 80% 75%, rgba(74, 144, 232, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 65% 30%, rgba(139, 26, 46, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 30% 70%, rgba(200, 168, 75, 0.06) 0%, transparent 55%);
  animation: nebula-drift 90s ease-in-out infinite alternate;
  filter: blur(2px);
}
@keyframes nebula-drift {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(-4%, -3%) scale(1.06) rotate(2deg); }
}
.cosmic-stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── スキャンライン ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.07) 2px,
    rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── ノイズ ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* ── ナビ ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(3,4,9,0.95), transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(74,144,232,0.08);
}
.nav-logo {
  font-family: 'Zen Old Mincho', serif;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
}
.nav-logo a { color: inherit; text-decoration: none; }
.nav-logo span {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.5em;
  display: block;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a.active { color: var(--accent); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active::after { width: 100%; }

/* ── ページヒーロー（軽量版） ── */
.page-hero {
  position: relative;
  padding: 200px 48px 80px;
  text-align: center;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(74,144,232,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(123,94,167,0.05) 0%, transparent 60%);
}
.page-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 0 L56 14 L56 42 L28 56 L0 42 L0 14 Z' fill='none' stroke='%234a90e8' stroke-width='0.5'/%3E%3Cpath d='M28 44 L56 58 L56 86 L28 100 L0 86 L0 58 Z' fill='none' stroke='%234a90e8' stroke-width='0.5'/%3E%3C/svg%3E");
}
.page-hero-content {
  position: relative;
  z-index: 10;
}
.page-hero-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.page-hero-eyebrow::before { content: '▸ '; }
.page-hero-eyebrow::after { content: ' ◂'; }
.page-hero-title {
  font-family: 'Zen Old Mincho', serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e8eaf2 0%, #8892a4 50%, #4a90e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(13px, 1.8vw, 20px);
  letter-spacing: 0.6em;
  color: var(--text-muted);
  margin-top: 16px;
}
.page-hero-tagline {
  margin-top: 40px;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  line-height: 2;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.page-hero-tagline strong {
  color: var(--text-primary);
  font-weight: 400;
}

/* ── セクション ── */
section.content {
  padding: 80px 48px 120px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── ボタン ── */
.btn-primary {
  display: inline-block;
  padding: 16px 48px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}
.btn-primary:hover { color: var(--void); }
.btn-primary:hover::before { transform: translateX(0); }

.btn-ghost {
  display: inline-block;
  padding: 16px 48px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ── カーソルグロウ ── */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,144,232,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ── スクロールアニメ ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── フッター ── */
footer {
  border-top: 1px solid var(--border);
  padding: 64px 48px 48px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.footer-brand .name {
  font-family: 'Zen Old Mincho', serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.footer-brand .desc {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.footer-brand .tagline {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 2.2;
  letter-spacing: 0.05em;
}
.footer-nav h4, .footer-contact h4 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 12px; }
.footer-nav a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}
.footer-nav a::before {
  content: '— ';
  color: var(--text-muted);
  font-size: 10px;
}
.footer-nav a:hover { color: var(--text-primary); }
.footer-contact p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 2.5;
  letter-spacing: 0.05em;
}
.footer-contact a {
  color: var(--accent);
  text-decoration: none;
}
.access-sub {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.15em;
}
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

/* ── アニメーション ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── ハンバーガーメニュー ── */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: 'Share Tech Mono', monospace;
  transition: all 0.3s;
}
.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── レスポンシブ — タブレット・スマホ（〜900px） ── */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-logo { font-size: 12px; letter-spacing: 0.25em; }
  .nav-logo span { font-size: 9px; }
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: rgba(3,4,9,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .nav-links.open { max-height: 60vh; }
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 18px 24px;
    width: 100%;
  }
  .nav-links a::after { display: none; }

  .page-hero { padding: 130px 20px 60px; }
  .page-hero-eyebrow { font-size: 10px; letter-spacing: 0.4em; }
  .page-hero-title { font-size: clamp(44px, 11vw, 72px); }
  .page-hero-subtitle { font-size: 12px; letter-spacing: 0.5em; }
  .page-hero-tagline { font-size: 12px; line-height: 1.9; margin-top: 32px; }

  section.content { padding: 50px 20px 80px; }

  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  footer { padding: 48px 20px 32px; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    align-items: center;
  }
}

/* ── スマホ（小・〜600px） ── */
@media (max-width: 600px) {
  .page-hero { padding: 110px 16px 48px; }
  .page-hero-title { font-size: clamp(38px, 13vw, 60px); }
  .page-hero-subtitle { font-size: 11px; letter-spacing: 0.4em; }
  .page-hero-tagline { font-size: 11px; padding: 0 8px; }
  .page-hero-tagline br { display: none; }

  section.content { padding: 40px 16px 60px; }

  .btn-primary, .btn-ghost {
    padding: 14px 28px;
    font-size: 10px;
    letter-spacing: 0.3em;
  }
}

/* ── タッチデバイス：カーソル装飾を無効化 ── */
@media (hover: none) and (pointer: coarse) {
  body { cursor: default; }
  .cursor-glow { display: none; }
}
