/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #12151A;
  background: #FAFAF8;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font: inherit; border: none; background: none; }
input[type="range"] { -webkit-appearance: none; appearance: none; touch-action: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Tokens — navy + gold "authority" palette =====
   Replaces the earlier generic SaaS-blue (#3d61ff literally matched the
   "SaaS General" bucket in the design database, not "Finance/Advisory").
   Navy+gold matches Legal Services / Banking-Traditional-Finance patterns —
   the register this project has been aiming for since the "audience
   tension" discussion (older, non-tech, trust-a-person-with-money). */
:root {
  --blue: #1E3A8A;
  --blue-deep: #142863;
  --badge-blue: #142863;
  --badge-check: #3B66F0;
  --gold: #B45309;
  --gold-bright: #F0B429;
  --green: #17A34A;
  --ink: #12151A;
  --ink-soft: #3C4150;
  --gray-text: #6B7280;
  --card-bg: rgba(233, 235, 238, 0.50);
  --card-border: #cecece;
  --track: #D6D9DF;
  --star: #B45309;
}

/* ===== Page shell ===== */
.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-color: #FAFAF8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 7vw, 72px) clamp(16px, 4vw, 32px);
  overflow: hidden;
}

/* Photo sits underneath; a radial-gradient fade (same tone as the page
   background) is layered on top of it so the image is strongest at the
   sides and fades out toward the center, where the card/content sits. */
.page__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 72% 84% at center, #FAFAF8 0%, #FAFAF8 32%, rgba(250, 248, 244, 0.88) 50%, rgba(250, 248, 244, 0.55) 68%, rgba(250, 248, 244, 0.1) 88%, rgba(250, 248, 244, 0) 100%),
    url('../images/construction-background.png');
  background-size: cover, cover;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
}

.page__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 940px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.page__inner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--badge-blue);
  border-radius: 999px;
  padding: 8px 20px 8px 14px;
  margin-bottom: clamp(16px, 4vw, 24px);
  box-shadow: 0 6px 16px -8px rgba(14, 21, 18, 0.5);
}

.badge__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--badge-check);
  flex-shrink: 0;
}

.badge {
  color: #FFFFFF;
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ===== Headline ===== */
.headline {
  margin: 0;
  text-align: center;
  font-size: clamp(32px, 6.2vw, 48px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 900px;
}

.headline__accent {
  color: var(--blue);
}

/* ===== Layered card wrap ===== */
.wrap {
  position: relative;
  width: min(820px, 94vw);
  margin-top: 1;
}

.pill {
  background: transparent;
  border-radius: 28px;
  padding: clamp(18px, 3vw, 22px) clamp(24px, 6vw, 40px) clamp(56px, 9vw, 76px);
  text-align: center;
}

.pill__text {
  margin: 0;
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.45;
  white-space: nowrap;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  position: relative;
  margin: clamp(-52px, -8vw, -40px) auto 0;
  width: min(660px, 90vw);
  background: var(--card-bg);
  border: 3px solid var(--card-border);
  border-radius: 28px;
  padding: clamp(26px, 5vw, 40px) clamp(20px, 5vw, 40px) clamp(22px, 4vw, 32px);
  box-shadow: 0 24px 48px -20px rgba(15, 17, 23, 0.22);
  text-align: center;
}

.card__label {
  margin: 0;
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 600;
  color: var(--ink-soft);
}

/* ===== Result ===== */
.result {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: clamp(20px, 4vw, 28px);
}

.result__value {
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result__suffix {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
  color: var(--green);
}

/* ===== Estimator label ===== */
.estimator__label {
  margin: 0 0 6px 2px;
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 700;
  color: var(--ink-soft);
  text-align: left;
}

/* ===== Slider (custom-drawn track + invisible native input) ===== */
.slider-wrap {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--track);
}

.slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  width: 50%;
  transition: width 0.2s ease;
}

.slider-tick {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 12px;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%);
  border-radius: 1px;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #FFFFFF;
  border: 5px solid var(--blue);
  box-shadow: 0 2px 6px rgba(15, 17, 23, 0.25);
  transition: left 0.2s ease, box-shadow 0.15s ease;
  pointer-events: none;
}

.slider-thumb.is-focused {
  box-shadow: 0 0 0 5px rgba(59, 102, 240, 0.30), 0 2px 6px rgba(15, 17, 23, 0.25);
}

.slider {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.slider__scale {
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(14px, 2.4vw, 18px);
}

.slider__scale span {
  font-size: clamp(11px, 1.6vw, 14px);
  font-weight: 600;
  color: var(--ink-soft);
}

/* ===== CTA ===== */
.btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--blue);
  color: #FFFFFF;
  font-family: inherit;
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 700;
  padding: clamp(14px, 3vw, 18px) 20px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 10px 20px -8px rgba(59, 102, 240, 0.55);
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover { background: var(--blue-deep); }
.btn:active { transform: scale(0.98); }

.disclaimer {
  margin: 10px 0 0;
  text-align: center;
  font-size: clamp(11px, 1.5vw, 13px);
  color: var(--gray-text);
  line-height: 1.4;
}

/* ===== Stats ===== */
.stats {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  margin-top: clamp(22px, 4vw, 30px);
  padding-top: clamp(18px, 3vw, 24px);
  border-top: 1px solid var(--track);
}

.stats__item {
  flex: 1;
  text-align: center;
  padding: 0 6px;
}

.stats__item:not(:first-child) {
  border-left: 1px solid var(--track);
}

.stats__value {
  margin: 0;
  font-size: clamp(20px, 3.6vw, 28px);
  font-weight: 800;
  color: var(--ink);
}

.stats__label {
  margin: 4px 0 0;
  font-size: clamp(11px, 1.5vw, 13px);
  color: var(--gray-text);
  line-height: 1.3;
}

.stars {
  margin: 2px 0 0;
  font-size: clamp(13px, 2vw, 16px);
  color: var(--star);
  letter-spacing: 1px;
}

.stats__item .stars + .stats__label { margin-top: 2px; }

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .pill__text { white-space: normal; }
}

/* Phone-only fixes: headline was hitting its 32px clamp floor and
   wrapping to 4 lines on real phones, and the CTA button text was
   overflowing to 2 lines. Scoped to max-width so desktop is untouched. */
@media (max-width: 600px) {
  .headline { font-size: clamp(24px, 7.4vw, 30px); }
  .btn { font-size: 12.5px; padding: 14px 10px; }
}

@media (max-width: 480px) {
  .badge { font-size: 11px; padding: 7px 14px 7px 10px; }
  .badge__check { width: 14px; height: 14px; }
}

@media (max-width: 380px) {
  .btn { font-size: 11px; padding: 13px 6px; }
}

/* ===== Footer ===== */
.site-footer {
  background: #FAFAF8;
  border-top: 1px solid var(--track);
  padding: clamp(20px, 4vw, 28px) clamp(16px, 4vw, 32px);
  text-align: center;
}

.site-footer__disclaimer {
  max-width: 640px;
  margin: 0 auto 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--gray-text);
}

.site-footer__copyright {
  font-size: 12px;
  color: var(--gray-text);
}
