/* Calpachi Landing Page — design tokens from app palette */
:root {
  --primary: #1E3A5F;
  --primary-light: #2F5A8C;
  --accent: #D4A017;
  --accent-hover: #B8860B;
  --win: #1B7A4E;
  --win-bg: #E4F4EB;
  --loss: #C0392B;
  --loss-bg: #FCECEA;
  --even: #6B7280;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --text: #1A1D21;
  --text-muted: #5C6370;
  --border: #D8DCE3;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 20px 60px rgba(30, 58, 95, 0.12);
  --font: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

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

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.container-narrow { width: min(720px, calc(100% - 48px)); }

/* Background */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(30, 58, 95, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(212, 160, 23, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(27, 122, 78, 0.06), transparent);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(30, 58, 95, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(244, 245, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216, 220, 227, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-sm { padding: 10px 18px; font-size: 0.875rem; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.25);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.3);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.35);
}

.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--primary); }

/* Hero */
.hero {
  padding: 80px 0 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(30, 58, 95, 0.08);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-trust svg { color: var(--primary); flex-shrink: 0; }

/* Phone mock */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.phone-frame {
  width: 280px;
  background: #1A1D21;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.phone-notch {
  width: 100px;
  height: 24px;
  background: #1A1D21;
  border-radius: 0 0 16px 16px;
  margin: -4px auto 8px;
  position: relative;
  z-index: 2;
}

.phone-screen {
  background: var(--bg);
  border-radius: 28px;
  padding: 20px 16px;
  min-height: 420px;
}

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

.mock-title { font-weight: 700; font-size: 0.9375rem; }

.mock-badge {
  background: var(--win-bg);
  color: var(--win);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.mock-calendar {
  background: var(--surface);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.mock-cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.mock-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.mock-cal-grid span {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.mock-cal-grid .win { background: var(--win-bg); color: var(--win); }
.mock-cal-grid .loss { background: var(--loss-bg); color: var(--loss); }
.mock-cal-grid .even { background: #F0F1F4; color: var(--even); }

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mock-stat {
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.mock-stat .label {
  display: block;
  font-size: 0.5625rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mock-stat .value {
  font-size: 0.8125rem;
  font-weight: 700;
}

.win-text { color: var(--win); }

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}

.floating-card strong { display: block; font-size: 0.875rem; }
.floating-card small { font-size: 0.75rem; color: var(--text-muted); }

.fc-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.125rem;
}

.win-bg { background: var(--win-bg); }
.accent-bg { background: #FEF3C7; }

.card-1 { top: 10%; right: -10px; animation-delay: 0s; }
.card-2 { bottom: 15%; left: -20px; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Sections */
.section { padding: 100px 0; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-head p { color: var(--text-muted); }

/* Features */
.features { background: var(--surface); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--icon-bg);
  color: var(--icon-color);
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Steps */
.how { background: var(--bg); }

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child { border-bottom: none; }

.step-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 56px;
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p { color: var(--text-muted); font-size: 0.9375rem; }

/* CTA */
.cta-box {
  text-align: center;
  padding: 64px 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-box h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 480px;
  margin-inline: auto;
}

/* FAQ */
.faq { background: var(--surface); }

.faq-list { display: flex; flex-direction: column; gap: 0; }

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-item dt {
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-item dd {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.footer-brand { flex: 1; min-width: 200px; }

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-copy {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.sp-only { display: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .floating-card { display: none; }
}

@media (max-width: 720px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .header.nav-open .header-cta {
    display: inline-flex;
    position: absolute;
    top: calc(var(--header-h) + 140px);
    left: 24px;
    right: 24px;
    justify-content: center;
  }

  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
  .section { padding: 64px 0; }
  .cta-box { padding: 40px 24px; }
  .sp-only { display: inline; }
  .container { width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
