/* ==========================================================================
   画面設計作るくん - Landing Page Custom Styles (Bootstrap 5 supplement)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables (Brand)
   -------------------------------------------------------------------------- */
:root {
  --bs-primary: #6366f1;
  --bs-primary-rgb: 99, 102, 241;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --bg: #fafbff;
  --text: #1e293b;
  --text-sub: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Override Bootstrap primary */
.btn-primary {
  --bs-btn-bg: #6366f1;
  --bs-btn-border-color: #6366f1;
  --bs-btn-hover-bg: #4f46e5;
  --bs-btn-hover-border-color: #4f46e5;
  --bs-btn-active-bg: #4338ca;
  --bs-btn-active-border-color: #4338ca;
  --bs-btn-disabled-bg: #6366f1;
  --bs-btn-disabled-border-color: #6366f1;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
  font-weight: 700;
  border-radius: 12px;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline-secondary {
  border-radius: 12px;
  font-weight: 700;
}

.bg-primary, .badge.bg-primary {
  background-color: #6366f1 !important;
}

.text-primary-custom { color: #6366f1; }

/* Form focus color */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  background: rgba(250, 251, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.navbar-brand {
  font-weight: 800;
  font-size: 16px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-sub) !important;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text) !important; }

/* --------------------------------------------------------------------------
   Section utilities
   -------------------------------------------------------------------------- */
.py-section { padding: 100px 0; }

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-sub);
  max-width: 640px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

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

.hero-desc {
  font-size: 18px;
  color: var(--text-sub);
  max-width: 540px;
  margin: 0 auto 40px;
}

.hero-image {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.6);
}

/* --------------------------------------------------------------------------
   Mockup
   -------------------------------------------------------------------------- */
.mockup { width: 100%; background: #1e293b; border-radius: 16px; overflow: hidden; }
.mockup-bar { height: 38px; background: #334155; display: flex; align-items: center; padding: 0 16px; gap: 8px; }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot.r { background: #ef4444; }
.mockup-dot.y { background: #f59e0b; }
.mockup-dot.g { background: #22c55e; }
.mockup-bar .title { flex: 1; text-align: center; font-size: 11px; color: #94a3b8; font-weight: 500; }
.mockup-bar-spacer { width: 48px; }
.mockup-body { padding: 20px; display: flex; gap: 12px; height: 480px; }
.mockup-sidebar { width: 180px; background: #f8fafc; border-radius: 10px; padding: 12px; flex-shrink: 0; }
.mockup-sidebar .item { padding: 8px 10px; border-radius: 6px; font-size: 11px; color: #64748b; margin-bottom: 2px; cursor: default; }
.mockup-sidebar .item.active { background: #eef2ff; color: var(--primary); font-weight: 600; }
.mockup-sidebar .label { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 10px 4px; }
.mockup-sidebar .label-parts { margin-top: 8px; }
.mockup-canvas { flex: 1; background: #f1f5f9; border-radius: 10px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mockup-frame { position: absolute; border: 2px solid rgba(236, 72, 153, 0.6); border-radius: 4px; background: rgba(236, 72, 153, 0.05); }
.mockup-frame .tag { position: absolute; top: -18px; left: 0; font-size: 9px; font-weight: 700; color: #ec4899; background: rgba(236, 72, 153, 0.1); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.mockup-group { position: absolute; border: 2px dashed rgba(99, 102, 241, 0.5); border-radius: 6px; background: rgba(99, 102, 241, 0.03); }
.mockup-group .tag { position: absolute; top: -18px; left: 0; font-size: 9px; font-weight: 700; color: var(--primary); background: rgba(99, 102, 241, 0.1); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.mockup-panel { width: 200px; background: #f8fafc; border-radius: 10px; padding: 14px; flex-shrink: 0; }
.mockup-panel .field { margin-bottom: 10px; }
.mockup-panel .field label { font-size: 9px; font-weight: 700; color: #94a3b8; display: block; margin-bottom: 3px; }
.mockup-panel .field .val { font-size: 11px; color: #334155; background: white; border: 1px solid #e2e8f0; border-radius: 5px; padding: 5px 8px; }
.mockup-panel-title { font-size: 10px; font-weight: 700; color: #94a3b8; margin-bottom: 10px; }

/* Mockup login card */
.mockup-login-card { width: 260px; background: white; border-radius: 12px; padding: 28px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); }
.mockup-login-header { text-align: center; margin-bottom: 20px; }
.mockup-login-logo { width: 36px; height: 36px; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 8px; margin: 0 auto 8px; }
.mockup-login-title { font-size: 14px; font-weight: 700; color: #1e293b; }
.mockup-field-group { margin-bottom: 10px; }
.mockup-field-group-last { margin-bottom: 14px; }
.mockup-field-label { font-size: 9px; color: #94a3b8; margin-bottom: 3px; }
.mockup-field-input { height: 28px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; }
.mockup-login-btn { height: 30px; background: linear-gradient(135deg, #6366f1, #4f46e5); border-radius: 6px; }

/* Mockup overlay positions */
.mockup-overlay-g1 { top: 14%; left: 16%; width: 68%; height: 72%; }
.mockup-overlay-f1 { top: 37%; left: 20%; width: 60%; height: 9%; }
.mockup-overlay-f2 { top: 46%; left: 20%; width: 60%; height: 9%; }
.mockup-overlay-f3 { top: 58%; left: 20%; width: 60%; height: 9%; }
.mockup-overlay-f4 { top: 67%; left: 20%; width: 60%; height: 9%; }
.mockup-overlay-f5 { top: 79%; left: 20%; width: 60%; height: 9%; }

/* --------------------------------------------------------------------------
   Feature cards
   -------------------------------------------------------------------------- */
.feature-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
}
.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon-primary { background: rgba(99, 102, 241, 0.1); }
.feature-icon-pink { background: rgba(236, 72, 153, 0.1); }
.feature-icon-cyan { background: rgba(6, 182, 212, 0.1); }
.feature-icon-amber { background: rgba(245, 158, 11, 0.1); }
.feature-icon-green { background: rgba(34, 197, 94, 0.1); }
.feature-icon-purple { background: rgba(139, 92, 246, 0.1); }

/* --------------------------------------------------------------------------
   Workflow
   -------------------------------------------------------------------------- */
.workflow-bg {
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}
.step-num {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step-illustration { margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   Export cards
   -------------------------------------------------------------------------- */
.export-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s;
}
.export-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.export-icon { margin-bottom: 10px; }

/* --------------------------------------------------------------------------
   AI Section
   -------------------------------------------------------------------------- */
.ai-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
  color: white;
  border-radius: 24px;
  padding: 64px;
}
.ai-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
  line-height: 1.8;
}
.ai-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px !important;
  font-size: 13px;
  font-weight: 600;
}
.ai-demo {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
}
.ai-demo-header {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-demo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 12px;
}
.ai-demo-num {
  width: 20px;
  height: 20px;
  background: var(--accent-pink);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.ai-demo-name { flex: 1; color: rgba(255, 255, 255, 0.9); }
.ai-demo-type {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Spec cards
   -------------------------------------------------------------------------- */
.spec-card {
  border: 1px solid var(--border);
  border-radius: 16px;
}
.spec-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
.spec-list li {
  font-size: 16px;
  color: var(--text-sub);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spec-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-light);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Interview
   -------------------------------------------------------------------------- */
.interview-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.interview-question {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.interview-answer {
  font-size: 17px;
  color: var(--text-sub);
  line-height: 1.9;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
}

/* --------------------------------------------------------------------------
   Chart
   -------------------------------------------------------------------------- */
.chart-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
}
.chart-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
}
.chart-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 48px;
  padding: 0 20px;
}
.chart-column { text-align: center; }
.chart-label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.chart-bar-container { position: relative; width: 80px; margin: 0 auto; }
.chart-bar-old {
  width: 80px;
  height: 200px;
  background: linear-gradient(180deg, #fca5a5 0%, #ef4444 100%);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-bar-old-bottom { width: 80px; height: 4px; background: #dc2626; border-radius: 0 0 8px 8px; }
.chart-bar-new-wrapper {
  width: 80px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.chart-bar-new {
  width: 80px;
  height: 67px;
  background: linear-gradient(180deg, #a5b4fc 0%, var(--primary) 100%);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-bar-new-bottom { width: 80px; height: 4px; background: var(--primary-dark); border-radius: 0 0 8px 8px; }
.chart-bar-number { font-size: 24px; font-weight: 900; color: white; }
.chart-stat { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.chart-stat-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.chart-arrow { padding-bottom: 40px; }
.chart-result {
  text-align: center;
  margin-top: 20px;
  padding: 12px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 10px;
}
.chart-result-number { font-size: 20px; font-weight: 900; color: var(--primary); }
.chart-result-text { font-size: 14px; font-weight: 600; color: var(--text-sub); margin-left: 4px; }

/* --------------------------------------------------------------------------
   CTA / Download
   -------------------------------------------------------------------------- */
.cta { padding: 100px 0 120px; }
.cta-version-info { font-size: 12px; color: var(--text-muted); }
.cta-notice-box {
  max-width: 580px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 24px 28px;
}
.cta-notice-title { font-size: 18px; font-weight: 800; color: #92400e; margin-bottom: 10px; }
.cta-notice-text { font-size: 16px; color: #78350f; line-height: 1.8; margin-bottom: 12px; }
.cta-notice-steps {
  font-size: 15px;
  color: #78350f;
  line-height: 2;
  padding-left: 20px;
  margin-bottom: 0;
}
.cta-notice-steps li { margin-bottom: 8px; }
.cta-notice-code {
  display: block;
  background: #451a03;
  color: #fbbf24;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  word-break: break-all;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Notice
   -------------------------------------------------------------------------- */
.notice-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.notice-card-beta {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 20px 24px;
}
.notice-card-beta .notice-card-title { color: #1e40af; }
.notice-card-beta .notice-card-text { font-size: 16px; color: #1e3a5f; line-height: 1.8; margin-bottom: 0; }
.notice-card-data {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 20px 24px;
}
.notice-card-data .notice-card-title { color: #166534; }
.notice-card-data .notice-card-text { font-size: 16px; color: #14532d; line-height: 1.8; margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Changelog
   -------------------------------------------------------------------------- */
.changelog-content { max-width: 720px; }
.changelog-entry { padding-left: 24px; margin-bottom: 32px; }
.changelog-entry-latest { border-left: 3px solid var(--primary); }
.changelog-entry-old { border-left: 3px solid var(--border); }
.changelog-version { font-size: 18px; font-weight: 900; }
.changelog-item {
  font-size: 14px;
  color: var(--text-sub);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.changelog-tag-fix { background-color: #ef4444 !important; font-size: 10px; font-weight: 700; }
.changelog-tag-improve { background-color: #6366f1 !important; font-size: 10px; font-weight: 700; }
.changelog-tag-new { background-color: #22c55e !important; font-size: 10px; font-weight: 700; }
.changelog-tag-perf { background-color: #06b6d4 !important; font-size: 10px; font-weight: 700; }

/* --------------------------------------------------------------------------
   Terms
   -------------------------------------------------------------------------- */
.terms-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.terms-heading { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.terms-text { font-size: 14px; color: var(--text-sub); line-height: 1.8; }
.terms-list { font-size: 14px; color: var(--text-sub); line-height: 1.8; padding-left: 20px; margin-top: 6px; }
.terms-list-nomargin { font-size: 14px; color: var(--text-sub); line-height: 1.8; padding-left: 20px; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-wrapper { max-width: 560px; }
.contact-success {
  display: none;
  text-align: center;
  padding: 40px 0;
}
.contact-success-icon {
  width: 56px;
  height: 56px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Download Modal
   -------------------------------------------------------------------------- */
#downloadConfirmBtn[disabled] {
  pointer-events: none;
  opacity: 0.65;
}
#downloadConfirmBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   Animations (scroll-triggered)
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero initial animations */
.fade-up { opacity: 0; animation: fadeUp 0.6s ease forwards; }
.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.2s; }
.fade-up.d3 { animation-delay: 0.3s; }
.fade-up.d4 { animation-delay: 0.4s; }

/* Scroll-triggered fade up */
.fade-up-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero h1 { font-size: 40px; }
  .section-title { font-size: 28px; }
  .ai-section { padding: 40px 28px; }
}

@media (max-width: 767.98px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 32px; }
  .hero-desc { font-size: 16px; }
  .py-section { padding: 60px 0; }
  .section-title { font-size: 24px; }
  .section-desc { font-size: 15px; }
  .mockup-body { height: 320px; }
  .mockup-sidebar, .mockup-panel { display: none; }
  .ai-section { padding: 32px 20px; }
  .chart-bars { gap: 24px; }
  .chart-bar-old, .chart-bar-new { width: 60px; }
  .chart-bar-container { width: 60px; }
  .chart-bar-new-wrapper { width: 60px; }
  .chart-bar-old-bottom, .chart-bar-new-bottom { width: 60px; }
  .cta { padding: 60px 0 80px; }
  .cta h2 { font-size: 28px; }
  .feature-card { padding: 24px 20px; }
  .spec-card { padding: 20px; }
  .interview-answer { padding: 16px 20px; }
  .cta-notice-box { padding: 20px; }
  .notice-card { padding: 20px; }
}
