/* ============================================================
   Moment of Truth — Calculator Hero + Result
   Brand: orange #F96815 · sage #7A8B7E · forest #3D5A3D
          sand #E8DED2 · clay #C9A88C · cream #F8F5F1 · charcoal #2C2C2C
   Font:  Inter only
============================================================ */

.mot-hero {
  --orange: #F96815;
  --sage: #7A8B7E;
  --forest: #3D5A3D;
  --sand: #E8DED2;
  --clay: #C9A88C;
  --cream: #F8F5F1;
  --charcoal: #2C2C2C;
  --green-good: #3D5A3D;
  --amber-warn: #C9A88C;
  --red-soft: #B14545;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  padding: 64px 24px 80px;
  -webkit-font-smoothing: antialiased;
}
.mot-hero *, .mot-hero *::before, .mot-hero *::after { box-sizing: border-box; }

.mot-hero-inner {
  max-width: 880px;
  margin: 0 auto;
}

.mot-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
}
.mot-hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
}

.mot-h1 {
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--charcoal);
}
.mot-sub {
  font-size: clamp(16px, 1.7vw, 18px);
  color: var(--sage);
  margin: 0 0 32px;
  line-height: 1.5;
}

/* ────── Form ────── */
.mot-form {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(44,44,44,0.04), 0 8px 24px rgba(44,44,44,0.06);
}
.mot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 18px;
}
.mot-field { display: flex; flex-direction: column; gap: 6px; }
.mot-field-fixed { grid-column: 1 / -1; }
.mot-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.2px;
}
.mot-field input,
.mot-field select {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid #e3dccf;
  border-radius: 8px;
  background: #fff;
  color: var(--charcoal);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.mot-field input:focus,
.mot-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,104,21,0.15);
}
.mot-field input.mot-error,
.mot-field select.mot-error {
  border-color: #c25a3a;
  background: #fef6f3;
}

.mot-help {
  display: block;
  margin-top: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #6b6b6b;
  letter-spacing: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Placeholder hints inside number fields. The polish round replaced
   the .mot-help blocks below each input with these — same size as
   the typed value, faded so it reads as "example, not your input". */
.mot-field input::placeholder {
  color: #B5B0A5;
  font-weight: 400;
  font-family: inherit;
  opacity: 1; /* override Firefox's default fade */
}

/* Tooltip on the Fixed-costs label. The trigger is a small (?) circle
   next to the label text. Hover (desktop) or tap (mobile) reveals
   the explanation. Click-outside to close on mobile is wired in JS. */
.mot-label {
  position: relative;
}
.mot-tip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #6b6b6b;
  background: #fff;
  border: 1px solid #b8b8b8;
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
  transition: color .15s ease, border-color .15s ease;
}
.mot-tip-trigger:hover,
.mot-tip-trigger[aria-expanded="true"] {
  color: var(--orange);
  border-color: var(--orange);
}
.mot-tip {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  display: block;
  max-width: 260px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d9d3c4;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--charcoal);
  box-shadow: 0 4px 14px rgba(44,44,44,0.12);
  white-space: normal;
  pointer-events: auto;
}
.mot-tip[hidden] { display: none; }
/* On desktop, hovering the trigger also reveals the tip. JS keeps
   it open for clicks (mobile + accessibility). */
.mot-tip-trigger:hover + .mot-tip { display: block; }
@media (max-width: 720px) {
  .mot-tip-trigger:hover + .mot-tip { display: none; } /* no hover on touch */
  .mot-tip { max-width: calc(100vw - 64px); }
}

.mot-estimate-toggle {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 4px 0;
  margin-top: 4px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mot-estimate-toggle:hover { color: #d8580c; }

.mot-estimate {
  margin-top: 12px;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 10px;
  padding: 16px 18px;
}
.mot-estimate-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ece4d6;
}
.mot-estimate-row:last-of-type { border-bottom: none; }
.mot-estimate-row span { font-size: 13px; color: var(--charcoal); }
.mot-estimate-row input {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #ddd2bd;
  border-radius: 6px;
  background: #fff;
  text-align: right;
  width: 100%;
}
.mot-estimate-total {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 2px solid var(--sand);
}
.mot-estimate-total-label { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.mot-estimate-total-value { font-size: 18px; font-weight: 700; color: var(--charcoal); white-space: nowrap; }
.mot-estimate-apply {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  background: var(--charcoal);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease;
}
.mot-estimate-apply:hover { background: #1a1a1a; }

.mot-cta {
  margin-top: 22px;
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 24px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  letter-spacing: 0.2px;
}
.mot-cta:hover { background: #d8580c; }
.mot-cta:active { transform: translateY(1px); }
.mot-cta[disabled] { background: #c2b8a6; cursor: not-allowed; }

.mot-form-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fef0eb;
  border: 1px solid #f0c8b9;
  border-radius: 8px;
  color: #b24a2c;
  font-size: 13px;
}

/* ────── Result ────── */
.mot-result {
  margin-top: 32px;
  animation: motFade .35s ease both;
}
@keyframes motFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Verdict card — wraps confidence pill + headline + punch + human moment.
   Low tier gets a 4px top bar so risky verdicts read as "different"
   from the calm green ones. High and Medium stay quiet (no bar) — we
   don't want to over-color the page. */
.mot-verdict-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 12px;
  padding: 22px 22px 18px;
  margin-bottom: 24px;
}
.mot-verdict-card[data-tier="low"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red-soft);
  border-radius: 12px 12px 0 0;
}

.mot-confidence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--sage);
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}
.mot-confidence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.mot-confidence[data-tier="high"] .mot-confidence-dot { background: var(--green-good); }
.mot-confidence[data-tier="medium"] .mot-confidence-dot { background: var(--amber-warn); }
.mot-confidence[data-tier="low"] .mot-confidence-dot { background: var(--red-soft); }

.mot-verdict-line {
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0 0 10px;
}
.mot-verdict-punch {
  font-size: 17px;
  color: var(--charcoal);
  font-weight: 500;
  margin: 0 0 6px;
  line-height: 1.45;
}
.mot-verdict-human {
  font-size: 15px;
  font-style: italic;
  color: var(--sage);
  margin: 0 0 24px;
}

/* Low-tier number flag — wraps the break-even number and the range
   in the headline so the user sees at a glance that their numbers
   sit outside the patterns we've seen. */
.num-flag-low {
  color: var(--red-soft);
  font-weight: 700;
}

.mot-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.mot-number {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 10px;
  padding: 16px 14px;
  text-align: left;
}
.mot-number-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 6px;
}
.mot-number-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.mot-number-value.mot-pos { color: var(--forest); }
.mot-number-value.mot-neg { color: var(--red-soft); }
.mot-number-value.mot-muted { color: var(--sage); }

.mot-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 14px;
}

.mot-fix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.mot-fix {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: 12px;
  padding: 18px 18px 20px;
}
.mot-fix-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.mot-fix-action {
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0 0 8px;
  line-height: 1.4;
}
.mot-fix-result {
  font-size: 13px;
  color: var(--sage);
  margin: 0;
  line-height: 1.5;
}
.mot-fix-result strong { color: var(--charcoal); font-weight: 600; }

/* ────── Save section ────── */
.mot-save {
  background: var(--charcoal);
  color: #fff;
  border-radius: 14px;
  padding: 32px;
  margin-top: 8px;
}
.mot-save h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  /* Brief Day 5 Change 4: brand orange so the heading reads on the
     dark charcoal save section. The homepage has a global
     `h1,h2,h3 { color: var(--ink) }` rule which would otherwise pull
     this heading to dark-on-dark. Body copy stays cream, button
     stays orange — heading orange anchors the visual hierarchy. */
  color: var(--orange);
}
.mot-save-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  margin: 0 0 18px;
  line-height: 1.5;
}
.mot-save-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.mot-save-form input[type="email"] {
  font-family: inherit;
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.mot-save-form input[type="email"]::placeholder { color: rgba(255,255,255,0.45); }
.mot-save-form input[type="email"]:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255,255,255,0.1);
}
.mot-save-cta {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 20px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}
.mot-save-cta:hover { background: #d8580c; }
.mot-save-cta[disabled] { background: rgba(249,104,21,0.55); cursor: wait; }

.mot-save-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(61,90,61,0.2);
  border: 1px solid rgba(61,90,61,0.5);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #d8eed8;
}
.mot-save-feedback.mot-feedback-error {
  background: rgba(178,74,44,0.2);
  border-color: rgba(178,74,44,0.5);
  color: #f5cdbf;
}

.mot-side-door {
  margin: 16px 0 0;
  font-size: 13px;
  color: rgba(248,245,241,0.7); /* brand cream at 70% on charcoal */
  text-align: center;
  font-style: italic;
}
.mot-side-door a {
  color: var(--cream); /* solid cream — the action gets full contrast */
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mot-side-door a:hover { color: #fff; }

/* ────── Responsive ────── */
@media (max-width: 720px) {
  .mot-hero { padding: 40px 16px 56px; }
  .mot-form { padding: 20px; }
  .mot-grid { grid-template-columns: 1fr; }
  .mot-numbers { grid-template-columns: repeat(2, 1fr); }
  .mot-fix-grid { grid-template-columns: 1fr; }
  .mot-save { padding: 24px 20px; }
  .mot-save-form { grid-template-columns: 1fr; }
  .mot-estimate-row { grid-template-columns: 1fr 110px; }
  .mot-estimate-total { grid-template-columns: 1fr auto; }
  .mot-estimate-total .mot-estimate-apply { grid-column: 1 / -1; }
}
