/* ========================================
   HabitFlow — style.css
   ======================================== */

/* ===== リセット・ベース ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080b10;
  --bg2: #0d1117;
  --surface: #111620;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8eaf0;
  --muted: #5a6070;
  --accent1: #4f8eff;
  --accent2: #a56bff;
  --grad: linear-gradient(135deg, var(--accent1), var(--accent2));
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== レイアウト ===== */
.page-wrap {
  max-width: 500px;
  margin: 0 auto;
}

/* ===== 共通 ===== */
.section-label {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 32px;
  border-radius: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  gap: 4px;
  transition: color 0.2s;
}

.btn-secondary:hover {
  color: var(--text);
}

/* ===== 1. ヒーロー ===== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 28px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 340px;
  height: 340px;
  background: radial-gradient(
    circle,
    rgba(79, 142, 255, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(165, 107, 255, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent1);
  background: rgba(79, 142, 255, 0.08);
  border: 1px solid rgba(79, 142, 255, 0.2);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 32px;
  width: fit-content;
  animation: fadeUp 0.5s ease both;
}

.hero-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent1);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeUp 0.5s 0.1s ease both;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 40px;
  font-weight: 300;
  animation: fadeUp 0.5s 0.2s ease both;
}

.cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp 0.5s 0.3s ease both;
}

.hero-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* ===== 2. モックセクション ===== */
.mock-section {
  padding: 0 28px 64px;
  text-align: center;
  animation: fadeUp 0.5s 0.4s ease both;
}

.mock-screen {
  background: #000;
  border-radius: 36px;
  border: 12px solid #1a1a1a;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  margin: 0 auto;
  max-width: 320px;
  overflow: hidden;
}

.mock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.mock-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 142, 255, 0.4),
    transparent
  );
}

.mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mock-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  letter-spacing: 0.05em;
}

.mock-streak {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #ff8c42;
}

.streak-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.streak-day {
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
}

.streak-day.done {
  background: rgba(79, 142, 255, 0.15);
  border-color: rgba(79, 142, 255, 0.3);
  color: var(--accent1);
}

.streak-day.today {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}

.mock-habit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.mock-habit-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock-habit-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(79, 142, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.mock-habit-name {
  font-size: 14px;
  font-weight: 500;
}

.mock-habit-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.mock-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* ===== 3. フィーチャー ===== */
.features {
  padding: 0 28px 64px;
}

.features h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 40px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid transparent;
  transition:
    background 0.2s,
    border-color 0.2s;
  cursor: default;
}

.feature-item:hover {
  background: var(--surface);
  border-color: var(--border);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.fi-blue {
  background: rgba(79, 142, 255, 0.1);
}
.fi-orange {
  background: rgba(255, 140, 66, 0.1);
}
.fi-purple {
  background: rgba(165, 107, 255, 0.1);
}

.feature-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.feature-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== 区切り線 ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 28px 64px;
}

/* ===== 4. ナンバーズ ===== */
.numbers {
  padding: 0 28px 64px;
}

.numbers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.number-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

.number-card::after {
  content: "";
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(79, 142, 255, 0.06);
}

.number-val {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.number-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ===== 5. CTAセクション ===== */
.cta-section {
  padding: 0 28px 80px;
}

.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(79, 142, 255, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.cta-card h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 12px;
}

.cta-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.cta-card .btn-primary {
  width: 100%;
}

/* ===== 6. フッター ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 28px;
  text-align: center;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 11px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
}

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

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

/* ===== アクセシビリティ ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
