/* ==========================================================
 * SPOIDY NOIR SLATE BLUE SYSTEM — LIGHTER 60-30-10 PALETTE
 * Palette: #06141B, #11212D, #253745, #4A5C6A, #9BA8AB, #CCD0CF
 * ========================================================== */

:root {
  /* 60% DOMINANT SLATE-BLUE BASE & ILLUMINATED ATMOSPHERE */
  --c-base: #11212D;
  --c-surface: #253745;
  --c-deep: #06141B;

  /* 30% SECONDARY STRUCTURE, BORDERS, HAZE & SUBTITLES */
  --c-border: #4A5C6A;
  --c-muted: #4A5C6A;
  --c-text-sub: #9BA8AB;

  /* 10% ACCENT / FOCAL HIGHLIGHT */
  --c-accent: #CCD0CF;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Noto Serif JP', serif;

  --max-w: 960px;
  --radius: 16px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  color-scheme: dark;
  background-color: var(--c-base);
  min-height: 100vh;
}

body {
  font-family: var(--font-body);
  /* Lighter, illuminated Slate-Blue gradient matching the top of the reference image */
  background: 
    radial-gradient(130% 75% at 50% -5%, rgba(155, 168, 171, 0.3) 0%, rgba(74, 92, 106, 0.6) 35%, rgba(37, 55, 69, 0.85) 65%, #11212D 100%),
    linear-gradient(180deg, #4A5C6A 0%, #253745 40%, #11212D 85%, #06141B 100%);
  background-attachment: fixed;
  color: var(--c-text-sub);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle atmospheric texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  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");
  background-repeat: repeat;
  background-size: 128px 128px;
  transform: translateZ(0);
}

/* Canvases */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
}

#three-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
  transform: translateZ(0);
  opacity: 0.75;
}

/* Ambient Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(204, 208, 207, 0.12) 0%, rgba(155, 168, 171, 0.06) 45%, transparent 70%);
  transition: opacity 0.4s;
  will-change: transform;
}

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================
 * HEADER
 * ========================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.25rem 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(155, 168, 171, 0.2);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.15rem;
  background: rgba(37, 55, 69, 0.7);
  border: 1px solid rgba(155, 168, 171, 0.35);
  border-radius: 99px;
  font-size: 0.75rem;
  color: var(--c-accent);
  box-shadow: 0 4px 20px rgba(17, 33, 45, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.clock-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pill-sep {
  color: var(--c-text-sub);
  font-size: 0.7rem;
  opacity: 0.7;
}

.time-zone-tag {
  font-size: 0.65rem;
  color: var(--c-accent);
  font-family: var(--font-mono);
  background: rgba(74, 92, 106, 0.6);
  border: 1px solid rgba(155, 168, 171, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.header-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  background: rgba(37, 55, 69, 0.75);
  border: 1px solid rgba(155, 168, 171, 0.35);
  color: var(--c-accent);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.25s var(--ease-out);
}

.header-link-btn:hover {
  background: var(--c-muted);
  border-color: var(--c-accent);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================
 * HERO SECTION (REFINED SPACIOUS CENTERED LAYOUT)
 * ========================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  z-index: 2;
  text-align: center;
}

.hero-kanji-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: clamp(14rem, 28vw, 24rem);
  font-weight: 700;
  color: rgba(155, 168, 171, 0.08);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 660px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.hero-eyebrow-line {
  width: 44px;
  height: 1px;
  background: rgba(155, 168, 171, 0.5);
}

.hero-eyebrow-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--c-accent);
  opacity: 0.9;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.8rem, 9.5vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--c-accent);
}

.hero-title-line {
  display: block;
}

.hero-title-outline {
  -webkit-text-stroke: 1.5px rgba(204, 208, 207, 0.7);
  color: transparent;
  transition: color 0.5s var(--ease-out), -webkit-text-stroke 0.5s var(--ease-out);
}

.hero-title-outline:hover {
  color: var(--c-accent);
  -webkit-text-stroke: 0px transparent;
}

/* Glitch Role Pill */
.hero-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.3rem;
  border-radius: 99px;
  background: rgba(37, 55, 69, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(155, 168, 171, 0.45);
  margin-bottom: 1.6rem;
  box-shadow: 0 6px 30px rgba(17, 33, 45, 0.4);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero-role-pill:hover, .hero-role-pill.glitching {
  border-color: var(--c-accent);
  box-shadow: 0 0 25px rgba(204, 208, 207, 0.35);
}

.role-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-accent);
  user-select: none;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: 0.03em;
  min-height: 1.35em;
  white-space: nowrap;
}

.glitch-char {
  color: var(--c-accent);
  text-shadow: 0 0 8px rgba(204, 208, 207, 0.8);
  font-weight: 600;
}

.role-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--c-accent);
  border-radius: 1px;
  margin-left: 2px;
  animation: blinkCursor 1s step-end infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1.08rem;
  color: var(--c-accent);
  opacity: 0.92;
  max-width: 540px;
  margin: 0 auto 2.25rem;
  line-height: 1.8;
  font-weight: 400;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-base);
  box-shadow: 0 6px 20px rgba(204, 208, 207, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(204, 208, 207, 0.4);
  background: #ffffff;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: rgba(37, 55, 69, 0.7);
  border: 1px solid rgba(155, 168, 171, 0.45);
  color: var(--c-accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  border-color: var(--c-accent);
  color: #ffffff;
  background: rgba(74, 92, 106, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(17, 33, 45, 0.4);
}

.btn-ghost:active {
  transform: translateY(0) scale(0.98);
}

/* Bottom Status Indicator */
.bottom-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  border-radius: 99px;
  background: rgba(37, 55, 69, 0.7);
  border: 1px solid rgba(155, 168, 171, 0.35);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  user-select: none;
  backdrop-filter: blur(10px);
}

.indicator-kanji {
  font-family: var(--font-serif);
  color: var(--c-accent);
  font-weight: 700;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--c-surface);
  border: 1px solid rgba(155, 168, 171, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--c-accent);
  box-shadow: 0 12px 30px rgba(17, 33, 45, 0.6);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s var(--ease-out);
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    padding: 6.5rem 1.25rem 4rem;
  }
  .header-clock-pill {
    display: none;
  }
  .header-spacer {
    display: none;
  }
  .header-inner {
    justify-content: flex-end;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .btn {
    justify-content: center;
  }
}
