/* Equipment Finder — anonymised showcase skin ("Ironbark Lifting", a
   fictional supplier). Industrial orange dominant. Fork of the real client
   prototype with all client branding and photography removed; mirrors the
   campaign-builder structure. */

:root {
  --color-ink: #1a1a1a;
  --color-ink-soft: #5a5a5a;
  --color-ink-faint: #8a8a8a;
  --color-accent: #f47f26;             /* industrial orange (fictional brand) */
  --color-accent-hover: #d96b15;
  --color-accent-soft: #fef0e6;        /* very pale orange wash for selected state */
  --color-line: #e5e5e5;
  --color-line-soft: #f0f0f0;
  --color-surface: #fafafa;
  --color-bg-page: #ffffff;
  --color-error: #b42318;
  --radius: 6px;
  --radius-pill: 999px;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 680px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 30px 70px rgba(0, 0, 0, 0.28);
}

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

html, body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  padding: 36px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Neutral gradient — no client photography in the showcase. */
  background: linear-gradient(135deg, #fdfaf6 0%, #fef0e6 55%, #f4e3d3 100%);
}

body.is-embedded {
  background: transparent;
  padding: 0;
  min-height: 0;
}

body.is-embedded .tool-container {
  /* Frosted glass effect over the host page's hero gradient. Heavy blur +
     saturation keeps text legible while letting the background bleed through
     for a premium feel (Apple / Vision Pro vibe). */
  box-shadow: none;
  border: none;
  border-radius: 0;
  max-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

body.is-embedded .tool-header {
  background: rgba(244, 127, 38, 0.85);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* Center welcome content vertically when iframe-embedded so the card doesn't
   sit at the top with empty space below. */
body.is-embedded .tool-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 32px;
}

body.is-embedded .welcome-card {
  width: 100%;
}

body.is-embedded .tool-footer {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- Trigger card ------------------------------------------------------- */

.tool-container {
  width: 100%;
  max-width: var(--max-width);
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--color-accent);
  color: #fff;
}

.tool-header .brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.tool-header .brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tool-header .brand-sep {
  opacity: 0.55;
  font-weight: 300;
  font-size: 16px;
}

.tool-header .brand-sub {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.95;
  text-transform: uppercase;
}

.tool-title {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.95;
}

.tool-main { padding: 52px 40px 46px; }

.eyebrow {
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  color: var(--color-ink);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

h2 {
  color: var(--color-ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--color-ink-soft);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 32em;
}

.welcome-fineprint {
  margin-top: 18px;
  font-size: 13px;
  color: var(--color-ink-faint);
  line-height: 1.55;
}

.tool-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--color-line);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-ink-faint);
}

.tool-footer a { color: var(--color-ink); text-decoration: none; }
.tool-footer a:hover { text-decoration: underline; }

/* --- Buttons ------------------------------------------------------------ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 15px 32px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s, transform 0.1s;
  letter-spacing: 0.01em;
}

.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.btn-primary .arrow { transition: transform 0.18s; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-line);
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-secondary:hover { border-color: var(--color-ink); background: var(--color-surface); }

/* --- Modal shell -------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.6);
  cursor: pointer;
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: min(88vh, 820px);
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.05);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--color-accent);
  color: #fff;
  flex-shrink: 0;
}

.modal-title {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.btn-close:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; }

.modal-main { flex: 1; overflow-y: auto; padding: 30px 30px 34px; }

body.modal-open { overflow: hidden; }

/* --- Steps -------------------------------------------------------------- */

.step { display: none; animation: stepIn 0.34s ease; }
.step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-bar {
  display: none;
  height: 3px;
  background: var(--color-line);
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 2px;
}

.progress-bar.show { display: block; }

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.4s ease;
}

.step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--color-ink-soft);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: 4px;
  transition: color 0.15s;
}

.btn-back:hover { color: var(--color-ink); }

.step-counter {
  font-size: 11px;
  color: var(--color-ink-soft);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.step-help {
  color: var(--color-ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 24px;
}

/* --- Field groups (for step 2 with multiple sub-questions) -------------- */

.field-group {
  margin-bottom: 26px;
}

.field-group:last-of-type {
  margin-bottom: 30px;
}

.field-label {
  display: block;
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* --- Option cards (big radio cards) ------------------------------------- */

.option-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 28px;
}

.option-group.inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--color-bg-page);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card:hover { border-color: var(--color-ink-faint); }

.option-card:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.option-body { flex: 1; min-width: 0; }

.option-label {
  display: block;
  color: var(--color-ink);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.option-desc {
  display: block;
  color: var(--color-ink-soft);
  font-size: 13.5px;
  margin-top: 3px;
  line-height: 1.45;
}

.option-tick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--color-line);
  border-radius: 50%;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.option-card:hover .option-tick { border-color: var(--color-ink-faint); }

.option-card:has(input:checked) .option-tick {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.option-card:has(input:checked) .option-tick::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Pill options (for short multi-choice like frequency) --------------- */

.option-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--color-bg-page);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-ink-soft);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.option-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-pill:hover { border-color: var(--color-ink-faint); color: var(--color-ink); }

.option-pill:has(input:checked) {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* --- Result page (product card) ----------------------------------------- */

.product-card {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  margin: 16px 0 22px;
}

.product-image {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius);
  padding: 8px;
  border: 1px solid var(--color-line-soft);
}

/* Neutral placeholder block shown instead of product photography (the
   showcase catalogue is fictional, so there are no photos by design). */
.product-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: linear-gradient(135deg, #31587c 0%, #1a3550 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-body { flex: 1; min-width: 0; }

.product-tagline {
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.product-spec {
  color: var(--color-ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.reasoning {
  color: var(--color-ink);
  font-size: 15px;
  line-height: 1.6;
  padding: 16px 18px;
  background: var(--color-accent-soft);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 22px;
}

.breakdown {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 4px 18px;
  margin-bottom: 16px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--color-line-soft);
}

.breakdown-row:last-child { border-bottom: none; }

.breakdown-key {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  flex-shrink: 0;
  padding-top: 2px;
}

.breakdown-val {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-ink);
  text-align: right;
}

.result-fineprint {
  font-size: 12px;
  color: var(--color-ink-faint);
  line-height: 1.5;
  margin-bottom: 22px;
}

.next-step {
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--color-accent-soft);
}

.next-step h3 {
  color: var(--color-ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.next-step p {
  color: var(--color-ink-soft);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* --- Lead form ---------------------------------------------------------- */

.form-row { margin-bottom: 16px; }

.form-row label {
  display: block;
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.form-row label .optional {
  color: var(--color-ink-soft);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.form-row input {
  width: 100%;
  padding: 13px 15px;
  background: var(--color-bg-page);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--color-ink);
  transition: border-color 0.15s;
}

.form-row input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.error-msg {
  display: block;
  color: var(--color-error);
  font-size: 13px;
  margin-top: 6px;
  min-height: 16px;
}

.form-fineprint {
  font-size: 12px;
  color: var(--color-ink-faint);
  line-height: 1.5;
  margin-top: 16px;
}

.turnstile-row {
  margin-top: 18px;
  margin-bottom: 8px;
}
.turnstile-widget {
  min-height: 65px;
  display: flex;
  align-items: center;
}
.turnstile-widget:empty {
  display: none;
}
.turnstile-widget:empty + .error-msg {
  display: none;
}

.lead-form .btn-primary { margin-top: 6px; }

/* --- Thanks ------------------------------------------------------------- */

.thanks-hero { text-align: center; padding: 12px 0; }

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--color-accent);
  color: #fff;
  font-size: 30px;
  border-radius: 50%;
  margin-bottom: 18px;
}

.estimate-recap {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 22px 0;
  text-align: left;
  font-size: 14px;
  color: var(--color-ink-soft);
}

.estimate-recap p { margin: 0; line-height: 1.5; }
.estimate-recap strong { color: var(--color-ink); font-weight: 700; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 580px) {
  body { padding: 0; background: #ffffff; }
  .tool-container { border: none; border-radius: 0; box-shadow: none; max-width: 100%; }
  .tool-main { padding: 36px 22px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .modal-overlay { padding: 0; }
  .modal-card {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .modal-main { padding: 26px 22px 30px; }
  .product-card {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .product-image { width: 120px; height: 120px; }
  .breakdown-val { font-size: 14px; }
}
