/* =========================================
   Base (Design Tokens)
   Discordのブランドカラー（Blurple）ベース。Disco勤怠・SlashClockとは
   別カラー系統にして、3製品目としてのブランドの違いを出す
========================================= */
:root {
  --blurple: #5865F2;
  --blurple-dark: #3C45A5;
  --blurple-light: #EEF0FD;
  --blurple-rgb: 88, 101, 242;

  --gold: #F0B232;

  --bg: #FBFBFE;
  --bg-dark: #0B0E18;
  --bg-card: #F1F2FC;

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(var(--blurple-rgb), 0.12);

  --text-main: #1B1D2A;
  --text-sub: #5C6070;

  --radius: 14px;
  --radius-lg: 20px;

  --shadow-soft: 0 8px 26px rgba(var(--blurple-rgb), 0.1);
  --shadow-card: 0 12px 38px rgba(var(--blurple-rgb), 0.16);
  --shadow-float: 0 30px 70px -20px rgba(var(--blurple-rgb), 0.3), 0 8px 22px rgba(var(--blurple-rgb), 0.1);

  --border-soft: rgba(var(--blurple-rgb), 0.12);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-heading, -apple-system), -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, "Helvetica Neue",
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none !important; color: inherit; }

.container { width: 90%; max-width: 1100px; margin: auto; }

h1, h2, h3 { font-weight: 800; color: var(--text-main); line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 4.6vw, 52px); }
h2 { font-size: clamp(26px, 3.4vw, 32px); margin-bottom: 20px; position: relative; padding-bottom: 18px; }
h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 4px;
  border-radius: 2px;
  background: var(--blurple);
}
.on-dark h2 { color: #fff; }
.on-dark h2::after { background: #fff; }
h3 { font-size: 20px; margin-bottom: 10px; }
p { margin-bottom: 18px; color: var(--text-sub); font-size: 17px; }

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blurple);
  margin-bottom: 12px;
}
.section-eyebrow-on-dark { color: #C3C9FF; }

section { padding: 84px 0; }
.section-bg-1 { background: #fff; }

/* fade-up scroll reveal */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s var(--ease-out-expo); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   Header
========================================= */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 999;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 20px; font-weight: 900; }
.logo-link { display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; }

header nav { display: flex; align-items: center; }
header nav a { margin-left: 24px; font-size: 15px; color: var(--text-sub); font-weight: 600; transition: 0.2s; }
header nav a:hover { color: var(--blurple); }

@media (max-width: 700px) {
  header nav a { display: none; }
}

.nav-cta {
  margin-left: 24px;
  background: var(--blurple);
  padding: 9px 20px;
  border-radius: 999px;
  color: #fff !important;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-size: 15px;
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s ease;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* =========================================
   Hero
========================================= */
.hero { position: relative; text-align: center; padding: 56px 0 64px; overflow: hidden; }

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(var(--blurple-rgb), 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 90%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 90%);
}

.hero .container { position: relative; z-index: 1; }

.hero h1 { max-width: 780px; margin: 0 auto 22px; }
.hero h1 .highlight { color: var(--blurple); }

.hero-sub { max-width: 560px; margin: 0 auto 32px; font-size: 18px; color: var(--text-sub); line-height: 1.8; }

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

.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  background: var(--blurple);
  border: 2px solid transparent;
  color: white;
  box-shadow: 0 10px 28px rgba(var(--blurple-rgb), 0.35);
  transition: 0.25s ease;
}
.cta-button:hover { background: var(--blurple-dark); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(var(--blurple-rgb), 0.45); }

.hero-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1.5px solid transparent;
  transition: 0.2s ease;
}
.hero-secondary-link:hover { border-bottom-color: var(--text-main); }
.hero-secondary-link svg { transition: transform 0.2s var(--ease-out-expo); }
.hero-secondary-link:hover svg { transform: translateX(3px); }

/* =========================================
   Problems
========================================= */
.problems { position: relative; overflow: hidden; }
.problems .container { position: relative; z-index: 1; }

.problems-header { margin-bottom: 44px; }

.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  text-align: left;
}

.problem-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 26px 26px;
  transition: background-color 0.3s ease;
}

/* わずかな傾きで手作り感を出す。ホバーで水平に戻る */
.problem-card:nth-child(5n+1) { --tilt: -1.4deg; }
.problem-card:nth-child(5n+2) { --tilt: 1.1deg; }
.problem-card:nth-child(5n+3) { --tilt: -0.9deg; }
.problem-card:nth-child(5n+4) { --tilt: 1.4deg; }
.problem-card:nth-child(5n+5) { --tilt: -1.1deg; }

.problems-grid .problem-card.fade-up {
  /* スプリング風のバウンスカーブ。着地時に少しオーバーシュートしてから戻ることで「ヌルッ」と収まる質感を出す */
  transition: opacity 0.6s ease-out, transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, background-color 0.3s ease;
}

.problems-grid .problem-card.fade-up.visible {
  transform: translateY(0) rotate(var(--tilt, 0deg));
  animation-name: problem-card-float;
  animation-duration: 5s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.problems-grid .problem-card.fade-up.visible:hover {
  animation-play-state: paused;
  transform: translateY(-6px) rotate(0deg) scale(1.02);
  background: #fff;
  box-shadow: var(--shadow-card);
}

/* IntersectionObserverの発火は同時でも、1件ずつ時間差で現れるように見せる。
   visible後もこの遅延を引き継ぎ、常時フロートのタイミングをずらす */
.problem-card:nth-child(1) { transition-delay: 0s; animation-delay: 0s; }
.problem-card:nth-child(2) { transition-delay: 0.08s; animation-delay: 0.4s; }
.problem-card:nth-child(3) { transition-delay: 0.16s; animation-delay: 0.8s; }
.problem-card:nth-child(4) { transition-delay: 0.24s; animation-delay: 1.2s; }
.problem-card:nth-child(5) { transition-delay: 0.32s; animation-delay: 1.6s; }
.problem-card:nth-child(6) { transition-delay: 0.4s; animation-delay: 2s; }

@keyframes problem-card-float {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  50% { transform: translateY(-6px) rotate(var(--tilt, 0deg)); }
}

.problem-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.problem-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--blurple); }
.problem-heading h3 { margin: 0; font-size: 17px; }
.problem-card p { margin: 0; font-size: 15px; }
.problem-card .stat {
  display: inline-block;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blurple);
  background: var(--blurple-light);
  padding: 3px 10px;
  border-radius: 999px;
}

/* =========================================
   Incident callout
========================================= */
.incident {
  background: var(--bg-dark);
  color: #fff;
}
.incident .container { max-width: 760px; text-align: center; }
.incident .section-eyebrow { color: #C3C9FF; }
.incident blockquote {
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.6;
  margin: 24px 0;
  color: #fff;
}
.incident .source { font-size: 14px; color: #9AA0C2; }

/* =========================================
   Features (roadmap)
========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
  text-align: left;
}
.feature-block {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, background-color 0.3s ease;
}
.feature-block:hover { transform: translateY(-3px); background: #fff; box-shadow: var(--shadow-card); }
.feature-block.votable { overflow: hidden; padding-bottom: 68px; }

.feature-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.feature-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--blurple); }
.feature-icon svg { width: 20px; height: 20px; }
.feature-heading h3 { margin: 0; font-size: 18px; }
.feature-block p { margin: 0; font-size: 15px; }
.roadmap-intro { max-width: 560px; margin-top: -6px; }

.leader-tag {
  display: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.feature-block.is-leading .leader-tag { display: inline-block; }

/* YouTubeの高評価ボタンのような、アイコン+数字だけのシンプルな投票ボタン。カード右下に固定 */
.vote-btn {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blurple);
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-expo), background-color 0.2s ease, box-shadow 0.2s ease;
}
.vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--blurple-rgb), 0.3);
}
/* 未投票はアウトライン、投票済みは塗りつぶしのサムズアップ（YouTubeの高評価と同じ見せ方） */
.vote-arrow { width: 14px; height: 14px; fill: none; transition: fill 0.15s ease; }

.vote-btn.voted {
  background: var(--bg-card);
  color: var(--text-sub);
  border: 1.5px solid var(--border-soft);
  padding: 7.5px 16.5px;
}
.vote-btn.voted:hover { background: #fff; border-color: var(--blurple); color: var(--blurple); }
.vote-btn.voted .vote-arrow { fill: currentColor; }

.vote-btn.just-voted .vote-arrow { animation: vote-arrow-bump 0.4s var(--ease-out-expo); }
.vote-btn.just-voted { animation: vote-btn-pop 0.4s var(--ease-out-expo); }

@keyframes vote-arrow-bump {
  0% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(-3px) rotate(-12deg); }
  100% { transform: translateY(0) rotate(0); }
}
@keyframes vote-btn-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.vote-plus-one {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 800;
  color: var(--blurple);
  pointer-events: none;
  animation: vote-plus-float 0.9s ease-out forwards;
}
@keyframes vote-plus-float {
  0% { opacity: 0; transform: translateX(-50%) translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-26px); }
}

/* 投票した瞬間だけ飛ばす紙吹雪 */
.vote-confetti {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 5;
  animation: vote-confetti-burst 0.7s ease-out forwards;
}
@keyframes vote-confetti-burst {
  0% { transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.4); opacity: 0; }
}

.vote-num { color: inherit; }

@media (max-width: 700px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* =========================================
   FAQ
========================================= */
.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.faq-item { background: var(--bg-card); border-radius: var(--radius); padding: 6px 22px; }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question h3 { margin: 0; font-size: 16px; font-weight: 700; }
.faq-toggle-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-toggle-icon::before, .faq-toggle-icon::after {
  content: "";
  position: absolute;
  background: var(--blurple);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.faq-toggle-icon::before { width: 16px; height: 2px; top: 7px; left: 0; }
.faq-toggle-icon::after { width: 2px; height: 16px; top: 0; left: 7px; }
.faq-item[open] .faq-toggle-icon::after { transform: rotate(90deg); }
.faq-answer { padding: 0 0 20px; font-size: 15px; color: var(--text-sub); }

/* =========================================
   Request (dark CTA band)
========================================= */
.request-dark { background: var(--bg-dark); color: #fff; text-align: center; }
.request-dark p { color: #C3C9D9; }

/* =========================================
   Footer
========================================= */
footer { padding: 40px 0; text-align: center; color: var(--text-sub); font-size: 13px; border-top: 1px solid var(--border-soft); }

.mt-40 { margin-top: 40px; }
