/* ─────────────────────────────────────────────
   RFQ CHECKER PAGE — body styles only
   tokens.css supplies :root
   public-nav.css supplies nav
   public-footer.css supplies footer
───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  /* Dark-theme overrides */
  --border: rgba(240,255,0,0.15);
  --muted: #f9fafb;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(240,255,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,255,0,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--yellow); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-tag::before {
  content: ''; display: block;
  width: 2rem; height: 1px; background: var(--yellow);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero h1 em { color: var(--yellow); font-style: normal; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  font-family: var(--font-mono); font-size: 0.8rem;
  background: var(--yellow); color: var(--navy);
  padding: 0.85rem 2rem; border-radius: 2px;
  text-decoration: none; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost {
  font-family: var(--font-mono); font-size: 0.8rem;
  background: transparent; color: var(--white);
  padding: 0.85rem 2rem; border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--border);
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* STL Drop Zone in Hero */
.hero-viewer {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.stl-drop-zone {
  width: 100%; max-width: 460px;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(22,45,80,0.4);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.stl-drop-zone:hover {
  border-color: rgba(240,255,0,0.4);
  background: rgba(22,45,80,0.6);
}
.stl-drop-zone.drag-over {
  border-color: var(--yellow);
  background: rgba(240,255,0,0.06);
}
.stl-canvas-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
}
.stl-icon {
  width: 64px; height: 64px;
  border: 1.5px solid rgba(240,255,0,0.3);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.stl-icon svg { opacity: 0.6; }
.stl-drop-label {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); text-align: center;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.stl-drop-label strong { color: var(--yellow); display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
.stl-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--font-mono); font-size: 0.65rem;
  background: rgba(240,255,0,0.1);
  color: var(--yellow); border: 1px solid rgba(240,255,0,0.2);
  padding: 0.25rem 0.6rem; border-radius: 2px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.stl-geometry {
  position: absolute; bottom: 1rem; left: 1rem; right: 1rem;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.stl-geo-item {
  background: rgba(11,26,51,0.8);
  border: 1px solid var(--border-dim);
  padding: 0.4rem 0.6rem; border-radius: 2px;
}
.stl-geo-label {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em;
}
.stl-geo-val {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--yellow); font-weight: 500;
}
#stl-file-input { display: none; }

/* Render canvas for Three.js */
#stl-render-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: none; border-radius: 4px;
}

/* ── SECTION LAYOUT ── */
section { padding: 6rem 3rem; }
.section-tag {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--yellow); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-tag::before {
  content: ''; width: 1.5rem; height: 1px; background: var(--yellow);
}
h2.section-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: clamp(2.2rem, 4vw, 3.5rem);
  text-transform: uppercase; line-height: 0.95;
  letter-spacing: -0.01em; margin-bottom: 1.5rem;
}
h2.section-title em { color: var(--yellow); font-style: normal; }

/* ── PROBLEM ── */
.problem { background: var(--navy-mid); border-top: 1px solid var(--border-dim); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.problem-bullets { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.problem-bullets li {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.25rem; border: 1px solid var(--border-dim);
  border-radius: 2px; background: rgba(11,26,51,0.4);
}
.bullet-num {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--yellow); opacity: 0.6;
  padding-top: 0.1rem; flex-shrink: 0;
}
.bullet-text { font-size: 0.95rem; color: var(--muted); }
.problem-closing {
  margin-top: 2rem; padding: 1.5rem;
  border-left: 3px solid var(--yellow);
  font-size: 1.05rem; color: var(--white);
  background: rgba(240,255,0,0.04);
}
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; border: 1px solid var(--border-dim);
}
.stat-box {
  padding: 2rem; background: rgba(11,26,51,0.5);
  border: 1px solid var(--border-dim);
}
.stat-box .num {
  font-family: var(--font-display);
  font-size: 3.5rem; font-weight: 800;
  color: var(--yellow); line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-box .label {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── INTERACTIVE TOOL ── */
.tool-section { background: var(--navy); }
.tool-wrapper { max-width: 860px; margin: 0 auto; }
.tool-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 3rem;
}
.tool-header {
  background: var(--navy-mid);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-dim);
}
.tool-header-left { display: flex; align-items: center; gap: 1rem; }
.tool-dots { display: flex; gap: 6px; }
.tool-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-dim); display: block;
}
.tool-dots span:first-child { background: rgba(240,255,0,0.5); }
.tool-title-bar {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--muted); letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tool-timer {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--yellow); letter-spacing: 0.08em;
}

/* Progress bar */
.tool-progress-bar {
  height: 3px; background: var(--border-dim);
}
.tool-progress-fill {
  height: 100%; background: var(--yellow);
  transition: width 0.4s ease;
}

/* Steps */
.tool-steps { padding: 2.5rem 2rem; min-height: 340px; }
.step { display: none; }
.step.active { display: block; animation: fadeUp 0.3s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-label {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.step-q {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.6rem; text-transform: uppercase;
  margin-bottom: 2rem; color: var(--white);
}
.option-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem; margin-bottom: 2rem;
}
.opt {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: rgba(22,45,80,0.3);
}
.opt:hover { border-color: rgba(240,255,0,0.4); }
.opt.selected { border-color: var(--yellow); background: rgba(240,255,0,0.08); }
.opt-icon {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--yellow); margin-bottom: 0.4rem;
  letter-spacing: 0.1em;
}
.opt-label {
  font-size: 0.9rem; font-weight: 500; color: var(--white);
  margin-bottom: 0.2rem;
}
.opt-desc { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }

/* Slider */
.slider-wrap { margin-bottom: 2rem; }
.slider-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--muted); margin-bottom: 0.75rem;
}
input[type=range] {
  width: 100%; appearance: none;
  height: 3px; background: var(--border);
  border-radius: 0; outline: none;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 20px; height: 20px;
  background: var(--yellow);
  border-radius: 50%; cursor: pointer;
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 1px var(--yellow);
}
.slider-val {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--yellow); margin-top: 0.75rem; text-align: center;
}

/* Material input */
.mat-input {
  width: 100%;
  background: rgba(22,45,80,0.4);
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
  outline: none;
  margin-bottom: 2rem;
  transition: border-color 0.2s;
}
.mat-input:focus { border-color: var(--yellow); }
.mat-input option { background: var(--navy-mid); }

/* STL micro-drop inside tool */
.tool-stl-hint {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px dashed rgba(240,255,0,0.2);
  border-radius: 2px;
  margin-bottom: 2rem;
  background: rgba(240,255,0,0.03);
  cursor: pointer;
  transition: border-color 0.2s;
}
.tool-stl-hint:hover { border-color: rgba(240,255,0,0.4); }
.tool-stl-icon {
  width: 36px; height: 36px;
  border: 1px solid rgba(240,255,0,0.3);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-stl-text { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.tool-stl-text strong { color: var(--yellow); display: block; font-size: 0.78rem; margin-bottom: 0.1rem; }

/* Nav buttons */
.tool-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-dim);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(22,45,80,0.2);
}
.step-counter {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--muted); letter-spacing: 0.1em;
}
.tool-nav { display: flex; gap: 0.75rem; }

/* ── RESULT CARD ── */
.result-card { display: none; animation: fadeUp 0.4s ease; }
.result-card.visible { display: block; }
.score-display {
  display: flex; align-items: center; gap: 3rem;
  margin-bottom: 2rem;
}
.score-ring {
  position: relative; width: 120px; height: 120px; flex-shrink: 0;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring-track { fill: none; stroke: var(--border-dim); stroke-width: 8; }
.score-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.2rem; line-height: 1; color: var(--white);
}
.score-denom {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--muted);
}
.score-meta { flex: 1; }
.score-status {
  font-family: var(--font-display); font-weight: 800;
  font-size: 2rem; text-transform: uppercase; margin-bottom: 0.5rem;
}
.score-status.good { color: #4ade80; }
.score-status.warn { color: var(--yellow); }
.score-status.bad { color: #f87171; }
.score-desc { font-size: 0.9rem; color: var(--muted); max-width: 340px; }

.result-categories {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem; margin-bottom: 1.5rem;
}
.cat-box {
  padding: 1rem; border: 1px solid var(--border-dim);
  border-radius: 2px; background: rgba(22,45,80,0.3);
}
.cat-name {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.5rem;
}
.cat-bar-wrap { height: 4px; background: var(--border-dim); border-radius: 0; margin-bottom: 0.5rem; }
.cat-bar { height: 100%; border-radius: 0; transition: width 0.8s ease 0.3s; }
.cat-score-val {
  font-family: var(--font-mono); font-size: 0.85rem;
  font-weight: 500;
}

.result-insights { margin-top: 1.5rem; }
.insight-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.9rem;
}
.insight-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}
.insight-dot.warn { background: var(--yellow); }
.insight-dot.error { background: #f87171; }
.insight-dot.ok { background: #4ade80; }

.result-cta {
  margin-top: 2rem; padding: 1.5rem;
  border: 1px solid rgba(240,255,0,0.3);
  background: rgba(240,255,0,0.05);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.result-cta-text { font-size: 0.95rem; color: var(--white); }
.result-cta-text strong { color: var(--yellow); display: block; font-size: 1rem; margin-bottom: 0.2rem; }

/* ── POSITIONING ── */
.positioning {
  background: var(--navy-mid);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}
.position-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.position-desc { font-size: 1.05rem; color: var(--muted); line-height: 1.8; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th {
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-dim);
  text-align: left;
}
.compare-table th:last-child { color: var(--yellow); }
.compare-table td {
  padding: 0.8rem 1rem; font-size: 0.85rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--muted);
}
.compare-table td:last-child { color: var(--white); }
.compare-table td .check { color: #4ade80; }
.compare-table td .cross { color: #f87171; }

/* ── DUAL AUDIENCE ── */
.audience { background: var(--navy); }
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.audience-card {
  border: 1px solid var(--border-dim);
  border-radius: 4px; overflow: hidden;
}
.audience-card-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(22,45,80,0.4);
}
.audience-card-header .role-tag {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 0.5rem;
}
.audience-card-header h3 {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.6rem; text-transform: uppercase;
  color: var(--white);
}
.audience-card-body { padding: 1.5rem 2rem; }
.benefit-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.benefit-list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.9rem; color: var(--muted);
}
.benefit-list li::before {
  content: '\2192'; color: var(--yellow);
  font-family: var(--font-mono); flex-shrink: 0;
  margin-top: 0.05rem;
}
.key-msg {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  border-left: 3px solid var(--yellow);
  font-size: 0.9rem; color: var(--white);
  background: rgba(240,255,0,0.04);
}
.audience-card-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-dim);
  background: rgba(11,26,51,0.4);
}

/* ── FINAL CTA ── */
.final-cta {
  background: var(--navy-mid);
  text-align: center;
  padding: 8rem 3rem;
  border-top: 1px solid var(--border-dim);
  position: relative; overflow: hidden;
}
.final-cta::before {
  content: 'RFQ';
  position: absolute;
  font-family: var(--font-display); font-weight: 800;
  font-size: 28vw; color: rgba(240,255,0,0.03);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: -0.05em;
  pointer-events: none; user-select: none;
}
.final-cta h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 5rem);
  text-transform: uppercase; line-height: 0.95;
  margin-bottom: 1.5rem; position: relative;
}
.final-cta h2 em { color: var(--yellow); font-style: normal; }
.final-cta p {
  color: var(--muted); max-width: 500px;
  margin: 0 auto 2.5rem; font-size: 1rem;
}
.final-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; }

/* ── SCROLL ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 6rem 1.5rem 3rem; gap: 3rem; }
  section { padding: 4rem 1.5rem; }
  .problem-grid, .position-grid, .audience-grid { grid-template-columns: 1fr; gap: 2rem; }
  .result-categories { grid-template-columns: 1fr; }
  .score-display { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}
