/* =========================================================
   システム開発 概算見積もりシミュレーター
   ========================================================= */

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #dbeafe;
  --accent: #f59e0b;
  --ink: #1e293b;
  --ink-sub: #475569;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.14);
  --max: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--brand); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; }
.header-cta {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background .2s;
}
.header-cta:hover { background: var(--brand-dark); }

/* =========================================================
   Hero（シンプル・白基調）
   ========================================================= */
.hero {
  background: #fff;
  padding: 72px 0 80px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
}
.badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.4;
  margin: 18px 0 20px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink);
}
.hero h1 .hl {
  position: relative;
  white-space: nowrap;
}
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 3px;
  height: 11px;
  background: var(--accent);
  border-radius: 2px;
  z-index: -1;
  opacity: .85;
}
.hero .lead {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-sub);
  margin: 0 0 32px;
}
.hero .lead b { color: var(--ink); }
.note {
  font-size: 13px;
  color: var(--ink-sub);
  margin: 16px 0 0;
}
.hero-meta {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--ink-sub);
}
.hero-meta b {
  color: var(--ink);
  font-size: 16px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  padding: 16px 30px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .45);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary .arrow { transition: transform .2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-restart {
  background: none;
  border: none;
  color: var(--ink-sub);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  margin-top: 8px;
  text-decoration: underline;
}
.btn-restart:hover { color: var(--ink); }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: 56px 0; }
.section h2,
.final-cta h2 {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 8px;
}
.section .sub {
  text-align: center;
  color: var(--ink-sub);
  font-size: 15px;
  margin: 0 0 28px;
}

/* =========================================================
   Estimator card
   ========================================================= */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress {
  height: 6px;
  background: var(--line);
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  transition: width .4s ease;
}
.card-body { padding: 36px 32px; }

/* Quiz */
.q-step { animation: fade .35s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.q-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .04em;
}
.q-title {
  font-size: 21px;
  font-weight: 800;
  margin: 8px 0 22px;
  line-height: 1.5;
}
.q-options {
  display: grid;
  gap: 12px;
}
.q-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.q-option:hover {
  border-color: var(--brand);
  background: #f5f9ff;
}
.q-option:active { transform: scale(.99); }

/* 複数選択：選択中の見た目 */
.q-option.selected {
  border-color: var(--brand);
  background: var(--brand-light);
}
.q-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition: background .15s, border-color .15s;
}
.q-option.selected .q-check {
  background: var(--brand);
  border-color: var(--brand);
}
.q-option.selected .q-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.q-note {
  font-size: 13px;
  color: var(--ink-sub);
  margin: -10px 0 18px;
}

.q-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .3);
  transition: transform .15s, box-shadow .15s;
}
.q-next:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, .4); }
.q-next .arrow { transition: transform .2s; }
.q-next:hover .arrow { transform: translateX(4px); }
.q-option .q-ico {
  font-size: 24px;
  flex: 0 0 auto;
  width: 32px;
  text-align: center;
}
.q-option .q-label { flex: 1; }
.q-option .q-desc {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-sub);
  margin-top: 2px;
}
.q-back {
  background: none;
  border: none;
  color: var(--ink-sub);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  margin-top: 20px;
  padding: 4px;
}
.q-back:hover { color: var(--ink); }

/* Loading */
.q-loading {
  text-align: center;
  padding: 30px 0;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--brand-light);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   Result
   ========================================================= */
.result { display: none; }
.result.show { display: block; animation: fade .4s ease; }

.result-head {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 36px 24px 30px;
}
.result-head .label {
  font-size: 14px;
  opacity: .9;
  margin-bottom: 8px;
}
.price-range {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}
.price-range small { font-size: 20px; font-weight: 700; }
.price-range .price-tilde { font-size: 28px; padding: 0 4px; }
.period {
  margin-top: 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, .18);
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
}

.result-body { padding: 32px; }
.quote-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}
.quote { margin-bottom: 18px; }
.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.quote-row .q-name { color: var(--ink); font-weight: 600; }
.quote-row .q-val { color: var(--ink-sub); white-space: nowrap; }
.quote-row.total {
  border-bottom: none;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
}
.quote-row.total .q-val { color: var(--brand-dark); }

.effort-pill {
  display: inline-block;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  margin-top: 4px;
}

.disclaimer {
  font-size: 12px;
  color: var(--ink-sub);
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 24px 0;
  line-height: 1.6;
}

.result-cta {
  text-align: center;
  background: linear-gradient(160deg, #eff6ff, #f8fafc);
  border: 1px solid var(--brand-light);
  border-radius: var(--radius);
  padding: 30px 24px;
}
.result-cta h3 { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.result-cta p { font-size: 14px; color: var(--ink-sub); margin: 0 0 18px; }
.cta-points {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.cta-points span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
}

/* =========================================================
   Post-estimate (hidden until done)
   ========================================================= */
#postEstimate { display: none; }
#postEstimate.show { display: block; animation: fade .5s ease; }

/* Trust / examples */
.trust { background: #fff; }
.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ex {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.ex:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ex-thumb {
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
  overflow: hidden;
}
.ex-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ex-tag {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin: 16px 18px 0;
}
.ex-name { font-weight: 700; margin: 12px 18px 14px; font-size: 15px; }
.ex-meta { display: flex; justify-content: space-between; align-items: baseline; margin: 0 18px 18px; }
.ex-meta .price { font-weight: 800; color: var(--brand-dark); font-size: 18px; }
.ex-meta .term { font-size: 13px; color: var(--ink-sub); }

/* Flow */
.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.flow .f {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 18px;
}
.flow .ico {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow .f h4 { margin: 0 0 8px; font-size: 16px; }
.flow .f p { margin: 0; font-size: 13px; color: var(--ink-sub); }

/* Final CTA */
.final-cta {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #1e3a8a 100%);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: rgba(255, 255, 255, .9); font-size: 15px; margin: 0 0 26px; }

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  padding: 36px 0;
  line-height: 1.9;
}
.footer-logo {
  display: inline-block;
  margin-bottom: 14px;
  background: #fff;
  padding: 8px 16px;
  border-radius: 10px;
}
.footer-logo img { display: block; }
.site-footer a { color: #cbd5e1; }

/* Sticky mobile CTA */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
}
.sticky-cta .btn-primary { width: 100%; justify-content: center; font-size: 16px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 36px; }
}

@media (max-width: 640px) {
  .hero { padding: 44px 0 52px; }
  .hero h1 { font-size: 28px; line-height: 1.45; }
  .hero .lead { font-size: 15px; }
  .eyebrow { font-size: 12px; }
  .section { padding: 44px 0; }
  .section h2, .final-cta h2 { font-size: 22px; }
  .card-body { padding: 28px 20px; }
  .q-title { font-size: 18px; }
  .price-range { font-size: 38px; }
  .result-body { padding: 24px 20px; }
  .examples { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .sticky-cta { display: block; }
  body { padding-bottom: 76px; }
}
