/* ===== 色やサイズの基本設定 ===== */
:root {
  --bg: #07060f;
  --text: #f4f1ff;
  --muted: #a9a3c7;
  --orange: #f38020; /* Cloudflare オレンジ */
  --pink: #ff4fa3;
  --violet: #7b5cff;
  --cyan: #2ee6d6;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== 背景：星空キャンバス＋オーロラ ===== */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: -2;
  filter: blur(80px);
  opacity: 0.55;
  background:
    radial-gradient(40% 35% at 20% 30%, var(--violet), transparent 70%),
    radial-gradient(35% 30% at 80% 20%, var(--pink), transparent 70%),
    radial-gradient(45% 40% at 60% 85%, var(--orange), transparent 70%),
    radial-gradient(30% 30% at 10% 90%, var(--cyan), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(4%, -3%) rotate(8deg) scale(1.08); }
  100% { transform: translate(-3%, 4%) rotate(-6deg) scale(1); }
}

/* ===== レイアウト ===== */
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12vh 20px 40px;
}

/* ===== ヒーロー ===== */
.hero { text-align: center; }

.eyebrow {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 0.8s ease-out both;
}

.title {
  margin: 0;
  font-size: clamp(3.5rem, 13vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.title .line {
  display: block;
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) both;
}
.title .line:nth-child(2) { animation-delay: 0.15s; }

.gradient {
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--violet), var(--cyan), var(--orange));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) 0.15s both, flow 8s linear infinite;
}

@keyframes flow { to { background-position: 300% 0; } }

@keyframes rise {
  from { opacity: 0; transform: translateY(30px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.lead {
  max-width: 40rem;
  margin: 2rem auto 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  animation: rise 1s ease-out 0.35s both;
}

/* ===== ライブ接続情報 ===== */
.live {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  animation: rise 1s ease-out 0.5s both;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3dff8a;
  box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 12px rgba(61, 255, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}

/* ===== 3ステップのカード ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 14vh;
}

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(40px);
}

/* スクロールで見えたときに script.js が .show を付ける */
.card.show {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease calc(var(--i) * 0.15s),
              transform 0.8s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 0.15s),
              border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(243, 128, 32, 0.6);
  box-shadow: 0 20px 60px -20px rgba(243, 128, 32, 0.5);
}

.num {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.card h2 {
  margin: 0.4rem 0 0.3rem;
  font-size: 1.35rem;
}

.card p { margin: 0; color: var(--muted); }

code {
  padding: 0.1em 0.45em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  color: var(--text);
}

/* ===== 数字 ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 80px;
  text-align: center;
}

.stat .value {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat .unit {
  margin-left: 0.15em;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--orange);
}

.stat .label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  padding: 60px 20px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.7;
}

@media (max-width: 640px) {
  .pc { display: none; }
}

/* 動きを減らす設定の人にはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card { opacity: 1; transform: none; }
}
