:root {
  --bg: #08090b;
  --bg-soft: #101116;
  --panel: rgba(255,255,255,0.045);
  --panel-strong: rgba(255,255,255,0.075);
  --line: #252832;
  --line-hot: #ff3c00;
  --line-red: #e63000;
  --text: #ffffff;
  --muted: #a7acb8;
  --dim: #707684;
  --green: #1fd67b;
  --shadow-hot: 0 0 24px rgba(255,60,0,0.34);
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
}

/* ── Full-viewport repair scene (escapes the 1120px max-width of .step) ── */
.body-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Blurred PC photo background */
.body-bg::before {
  content: '';
  position: absolute;
  inset: -5%;
  background: url('bg.jpg') center / cover no-repeat;
  filter: blur(22px) brightness(0.22) saturate(0.7);
}

/* Radial glow overlays */
.body-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 10%, rgba(255,60,0,0.22), transparent 45%),
    radial-gradient(ellipse at 20% 90%, rgba(255,60,0,0.12), transparent 38%);
}

/* Circuit dot grid */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,60,0,0.20) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse 80% 80% at center, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 20%, transparent 80%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, canvas { max-width: 100%; }

/* ── Typography ── */
.eyebrow {
  margin: 0 0 12px;
  color: var(--line-hot);
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; font-family: "Orbitron", sans-serif; }
.section-heading { text-align: center; margin-bottom: 36px; }
.section-heading h2 { font-size: clamp(1.8rem, 4.5vw, 3.4rem); text-transform: uppercase; }
.section-heading p:not(.eyebrow) {
  max-width: 600px; margin: 16px auto 0;
  color: var(--muted); font-size: 1rem; line-height: 1.65;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: 8px; border: 1px solid transparent;
  color: var(--text); font-weight: 800; text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.42; transform: none; box-shadow: none; }
.btn.is-disabled { cursor: not-allowed; opacity: 0.42; transform: none; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--line-hot), var(--line-red)); box-shadow: var(--shadow-hot); }
.btn-ghost { background: rgba(255,255,255,0.04); border-color: var(--line); }
.btn-large { margin-top: 24px; min-height: 54px; padding-inline: 30px; }
.btn-full { width: 100%; }

/* ── Builder shell & step ── */
.builder-shell { padding-top: 0; }
.step { display: none; max-width: 1120px; margin: 0 auto; padding: 48px 28px 64px; animation: stepIn 300ms ease both; }
.step.is-active { display: block; }
#step-1 { padding-top: 48px; }
.step-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; }

/* ── Step 1 landing ── */
.start-heading { margin-bottom: 24px; }
.start-heading h2 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); text-transform: uppercase; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.start-choice-grid { max-width: 480px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
.choice-card, .glass-panel, .modal-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
}
.choice-card {
  position: relative; min-height: 160px; padding: 22px;
  color: var(--text); text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.choice-card:hover, .choice-card.is-selected {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--line-hot); box-shadow: var(--shadow-hot);
}
.choice-card.is-selected { background: linear-gradient(145deg, rgba(255,60,0,0.25), rgba(255,255,255,0.04)); }
.choice-card.is-selected::after {
  content: "OK"; position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--line-hot); font-weight: 900;
}
.choice-card strong { display: block; margin-bottom: 8px; font-size: 1.05rem; }
.choice-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.start-choice {
  display: flex; flex-direction: column; min-height: 200px; padding: 26px; overflow: hidden;
  background: radial-gradient(circle at 82% 22%, rgba(255,60,0,0.18), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.026)), var(--panel);
}
.start-choice-top { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.choice-kicker {
  display: inline-flex; width: fit-content; min-height: 28px; align-items: center;
  padding: 0 10px; border: 1px solid rgba(255,60,0,0.30); border-radius: 999px;
  color: var(--line-hot); background: rgba(255,60,0,0.08); font-size: 0.78rem; font-weight: 900;
}
.start-choice strong { font-size: 1.24rem; }
.choice-cta {
  display: inline-flex; align-items: center; width: 100%;
  margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,60,0,0.30);
  color: white; font-weight: 900;
}
.choice-cta::after { content: ">"; margin-left: 10px; color: var(--line-hot); }
.start-whatsapp-logo {
  display: grid; width: 42px; height: 42px; flex: 0 0 42px;
  place-items: center; border: 1px solid rgba(255,255,255,0.16); border-radius: 50%;
  color: white; background: linear-gradient(145deg, #25d366, #128c7e); box-shadow: 0 0 22px rgba(37,211,102,0.24);
}
.start-whatsapp-logo svg { width: 25px; height: 25px; fill: currentColor; }

/* ── Progress bar ── */
.progress-wrap {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: rgba(13,14,18,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.06); backdrop-filter: blur(16px);
}
.progress {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 10px; flex: 1; min-width: 0; max-width: 1400px; margin: 0 auto; padding: 0; list-style: none;
}
.progress-step {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--dim); background: rgba(255,255,255,0.03);
}
.progress-step span {
  flex: 0 0 25px; display: grid; place-items: center; width: 25px; height: 25px;
  border-radius: 50%; background: #1a1c22; color: var(--muted); font-size: 0.78rem; font-weight: 900;
}
.progress-step strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-step.is-active { color: var(--text); border-color: rgba(255,60,0,0.72); box-shadow: 0 0 22px rgba(255,60,0,0.16); }
.progress-step.is-active span { background: var(--line-hot); color: white; }
.progress-step.is-complete span { background: var(--green); color: #04120b; }
.guided-close {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.14); border-radius: 50%;
  background: rgba(255,255,255,0.06); color: var(--muted); font-size: 0.85rem; cursor: pointer;
  transition: background 160ms, border-color 160ms, color 160ms;
}
.guided-close:hover { background: rgba(255,60,0,0.18); border-color: rgba(255,60,0,0.55); color: white; }

/* ── Guided modal ── */
.guided-modal {
  display: none; position: fixed; inset: 0; z-index: 500;
  padding: 40px 28px; background: rgba(0,0,0,0.32); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; overflow-y: auto;
}
.guided-modal.is-open { display: flex; }
body.guided-open { overflow: hidden; }
.guided-modal-inner {
  position: relative; width: 100%; max-width: 980px; max-height: 84dvh; overflow-y: auto;
  -webkit-overflow-scrolling: touch; background: #0d0e12;
  border: 1px solid rgba(255,60,0,0.22); border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 0 60px rgba(255,60,0,0.10), 0 40px 100px rgba(0,0,0,0.90);
}

/* ── Step 2: Category cards ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.cat-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  min-height: 0; text-align: left;
  background: var(--panel);
}
.cat-card:hover .cat-emoji { transform: scale(1.12); }
.cat-card strong { display: block; padding: 10px 12px 4px; font-size: 0.95rem; }
.cat-card p { margin: 0; padding: 0 12px 14px; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.cat-preview {
  position: relative; width: 100%; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cat-glow {
  position: absolute; inset: 0; pointer-events: none;
}
.cat-emoji {
  position: relative; z-index: 1; font-size: 3.2rem; line-height: 1;
  transition: transform 260ms ease;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.7));
}
.cat-img {
  position: relative; z-index: 1; width: auto; height: 72px; max-width: 80%;
  object-fit: contain; transition: transform 260ms ease;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.6));
}
.cat-card:hover .cat-img { transform: scale(1.08); }

/* ── Step 3: Questionnaire ── */
.questionnaire { position: relative; max-width: 1080px; margin: 0 auto; }
.question-progress { display: flex; justify-content: center; gap: 12px; margin-bottom: 28px; }
.question-progress span {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,0.04); color: var(--dim); font-weight: 900;
}
.question-progress span.is-active {
  border-color: var(--line-hot); background: rgba(255,60,0,0.18); color: white; box-shadow: var(--shadow-hot);
}
.question-progress span.is-complete { border-color: var(--green); background: var(--green); color: #03130a; }
.question-panel { display: none; min-height: 400px; animation: questionIn 320ms ease both; }
.question-panel.is-active { display: block; }
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.usage-subcard {
  min-height: 140px; padding: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)), rgba(255,255,255,0.035);
}
.choice-icon { display: block; margin-bottom: 12px; font-size: 1.9rem; }
.choice-icon-img { display: block; margin-bottom: 12px; width: auto; height: 52px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.usage-subcard strong { font-size: 1rem; }

/* Pills for step 3 panel 2 */
.filter-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.option-pill {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255,255,255,0.04); color: var(--muted); font-weight: 800;
  transition: border-color 160ms, background 160ms, color 160ms;
}
.option-pill.is-selected { color: white; border-color: var(--line-hot); background: rgba(255,60,0,0.22); }
.option-pill.has-logo { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; }
.pill-logo { flex-shrink: 0; height: 20px; width: auto; object-fit: contain; background: rgba(255,255,255,0.9); border-radius: 3px; padding: 2px 5px; }
.option-pill.has-logo.is-selected .pill-logo { background: rgba(255,255,255,1); }

/* ── Step 4: Problem form ── */
.problem-form { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }
.selected-summary { margin-bottom: 4px; }
.summary-chip {
  display: inline-flex; align-items: center; padding: 6px 14px;
  border: 1px solid rgba(255,60,0,0.36); border-radius: 999px;
  background: rgba(255,60,0,0.10); color: white; font-size: 0.85rem; font-weight: 700;
}
label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
input, select, textarea {
  width: 100%; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  background: rgba(0,0,0,0.36); padding: 11px 12px; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--line-hot); box-shadow: 0 0 0 3px rgba(255,60,0,0.16);
}
.hidden-field { display: none; }
.field-note { color: var(--dim); font-size: 0.78rem; font-weight: 400; }

/* ── Step 5: Summary & send ── */
.summary-box {
  max-width: 760px; margin: 0 auto 28px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  overflow: hidden;
}
.summary-row {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--muted); white-space: nowrap; font-size: 0.88rem; margin-top: 2px; }
.summary-row strong { text-align: right; font-size: 0.95rem; }
.problem-row strong { text-align: left; font-style: italic; color: var(--muted); font-weight: 400; }
.direct-contact-panel {
  display: grid; justify-items: center; gap: 18px;
  max-width: 760px; margin: 0 auto; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.send-actions {
  display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px; width: min(480px, 100%);
}
.direct-contact-panel .btn-large { width: 100%; margin-top: 0; }
.whatsapp-logo {
  display: grid; width: 28px; height: 28px; flex: 0 0 28px;
  place-items: center; border-radius: 50%;
  color: white; background: linear-gradient(145deg, #25d366, #128c7e);
}
.whatsapp-logo svg { width: 17px; height: 17px; fill: currentColor; }

/* ── Email modal ── */
.modal {
  position: fixed; inset: 0; z-index: 600;
  display: none; place-items: center; padding: 18px;
}
.modal.is-open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(10px); }
.modal-card { position: relative; z-index: 1; width: min(540px, 100%); padding: 28px; }
.modal-card h2 { margin-bottom: 20px; }
.modal-card label { margin-bottom: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,0.05); color: white;
}

/* ── Animations ── */
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes questionIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Mobile ── */
@media (max-width: 820px) {
  .guided-modal { padding: 14px 10px; }
  .guided-modal-inner { border-radius: 16px; max-height: 88dvh; }
  .progress-wrap { padding: 8px 10px; gap: 8px; overflow: visible; }
  .progress {
    display: flex; flex: 1; width: max-content; max-width: none;
    gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0;
  }
  .progress::-webkit-scrollbar { display: none; }
  .progress-step { flex: 0 0 auto; justify-content: center; width: 32px; min-height: 32px; padding: 4px; border-radius: 50%; }
  .progress-step span { width: 22px; height: 22px; flex-basis: 22px; font-size: 0.7rem; }
  .progress-step strong { display: none; }
  .step { width: 100%; padding: 16px 14px 72px; }
  #step-1.is-active { display: flex; flex-direction: column; justify-content: center; padding: 28px 16px 32px; }
  .section-heading { margin-bottom: 12px; text-align: left; }
  .eyebrow { margin-bottom: 4px; font-size: 0.68rem; }
  .section-heading h2 { font-size: clamp(1.3rem, 6.5vw, 1.8rem); line-height: 1.05; }
  .start-heading h2 { font-size: clamp(1.7rem, 8.5vw, 2.4rem); }
  .section-heading p:not(.eyebrow) { margin: 5px 0 0; font-size: 0.82rem; line-height: 1.3; }
  .start-choice-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .start-choice { min-height: 0; padding: 14px 12px; }
  .start-choice-top { min-height: 32px; margin-bottom: 12px; }
  .start-whatsapp-logo { width: 32px; height: 32px; flex-basis: 32px; }
  .start-whatsapp-logo svg { width: 20px; height: 20px; }
  .start-choice strong { font-size: 0.96rem; }
  .start-choice p { font-size: 0.82rem; }
  .start-choice .choice-cta { margin-top: auto; padding-top: 10px; font-size: 0.8rem; }
  .choice-kicker { min-height: 22px; padding: 0 7px; font-size: 0.62rem; }
  .choice-card { min-height: 0; padding: 10px 12px; }
  .choice-card:hover, .choice-card.is-selected { transform: none; }
  /* Category grid: 2-3 columns on mobile */
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-emoji { font-size: 2.4rem; }
  .cat-preview { aspect-ratio: 3/2; }
  .cat-card strong { font-size: 0.84rem; }
  .cat-card p { font-size: 0.7rem; }
  /* Sub-grid */
  .sub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .usage-subcard { min-height: 0; padding: 10px; }
  .usage-subcard .choice-icon { font-size: 1.4rem; margin-bottom: 6px; }
  .usage-subcard strong { font-size: 0.8rem; line-height: 1.1; }
  .question-panel { min-height: auto; }
  .question-progress { justify-content: flex-start; gap: 6px; margin-bottom: 10px; }
  .question-progress span { width: 26px; height: 26px; font-size: 0.76rem; }
  /* Summary */
  .summary-row { flex-direction: column; gap: 4px; }
  .summary-row strong { text-align: left; }
  .problem-row strong { text-align: left; }
  .send-actions { grid-template-columns: 1fr; width: 100%; }
  .direct-contact-panel { padding: 16px; }
  .step-actions {
    position: sticky; bottom: 0; z-index: 12; display: flex; gap: 8px;
    margin-top: 16px; padding: 14px 0 max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent, #0d0e12 36%); backdrop-filter: blur(6px);
  }
  .step-actions:empty { display: none; }
  .step-actions .btn { flex: 1; min-height: 46px; font-size: 0.88rem; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; border-radius: 16px 16px 0 0; max-height: min(92vh,700px); overflow: auto; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 500px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Step-1: ensure content renders above the fixed bg layer ── */
#step-1 { position: relative; z-index: 1; }

/* Large decorative tool icons (fixed = full viewport, escapes max-width) */
.repair-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.scene-icon {
  position: absolute;
  fill: none;
  stroke: var(--line-hot);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene-wrench {
  width: 300px; height: 300px;
  top: -60px; right: -70px;
  opacity: 0.08;
  transform: rotate(18deg);
  stroke-width: 0.7;
}
.scene-chip {
  width: 220px; height: 220px;
  bottom: -40px; left: -40px;
  opacity: 0.07;
  transform: rotate(-12deg);
  stroke-width: 0.8;
}
.scene-bolt {
  width: 130px; height: 130px;
  top: 42%; right: 7%;
  opacity: 0.05;
  transform: rotate(5deg);
  stroke-width: 1;
  stroke: rgba(255,255,255,0.5);
}
.repair-tool-badge {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255,60,0,0.5));
}
