/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-start: #0a0f14;
  --bg-end: #111827;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --teal-glow: rgba(13, 148, 136, 0.15);
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --orange: #f59e0b;
  --red: #ef4444;
  --green: #10b981;
  --cyan: #06b6d4;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.06);
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --text-bright: #f9fafb;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(14, 148, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 148, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.mono { font-family: 'DM Mono', monospace; }
.accent { color: var(--teal-light); }
.hidden { display: none !important; }

/* ========== HEADER ========== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand-name {
  font-weight: 700; font-size: 15px; letter-spacing: 2px;
  color: var(--text-bright);
}
.brand-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 0.5px; }
.header-phone {
  font-family: 'DM Mono', monospace; font-size: 13px; color: var(--teal-light);
}

/* ========== TITLE ========== */
.title-section { text-align: center; padding: 40px 24px 10px; position: relative; z-index: 1; }
.title-section h1 { font-size: clamp(24px, 5vw, 40px); font-weight: 700; }
.tagline { color: var(--text-dim); font-size: 15px; margin-top: 6px; font-weight: 300; }

/* ========== PROGRESS BAR ========== */
.progress-bar {
  max-width: 700px; margin: 30px auto 40px; padding: 0 24px;
  position: relative; z-index: 1;
}
.progress-track {
  height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px;
  overflow: hidden; margin-bottom: 16px;
}
.progress-fill {
  height: 100%; width: 25%; background: var(--teal);
  border-radius: 4px; transition: width 0.5s ease;
}
.progress-steps { display: flex; justify-content: space-between; }
.step-indicator { text-align: center; flex: 1; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; transition: all 0.3s;
  color: var(--text-dim);
}
.step-indicator.active .step-circle {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.step-indicator.done .step-circle {
  background: var(--teal); border-color: var(--teal); color: #fff;
  font-size: 0;
}
.step-indicator.done .step-circle::after { content: '\2713'; font-size: 14px; }
.step-label { font-size: 11px; color: var(--text-dim); margin-top: 6px; }
.step-indicator.active .step-label { color: var(--teal-light); }

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 60px;
  position: relative; z-index: 1;
}
.step { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.step > h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.step-desc { color: var(--text-dim); margin-bottom: 24px; font-size: 14px; }

/* ========== SEARCH ========== */
.search-bar {
  position: relative; margin-bottom: 16px;
}
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-dim);
}
.search-bar input {
  width: 100%; padding: 12px 16px 12px 42px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  font-family: 'Outfit', sans-serif; outline: none; transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--teal); }
.search-bar input::placeholder { color: var(--text-dim); }

/* ========== BRAND FILTERS ========== */
.brand-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.brand-chip {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
  background: var(--card-bg); border: 1px solid var(--card-border);
  color: var(--text-dim); cursor: pointer; transition: all 0.2s;
}
.brand-chip:hover { border-color: var(--teal); color: var(--text); }
.brand-chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ========== MACHINE GRID ========== */
.machine-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; max-height: 520px; overflow-y: auto; padding: 4px;
  margin-bottom: 24px;
}
.machine-grid::-webkit-scrollbar { width: 6px; }
.machine-grid::-webkit-scrollbar-track { background: transparent; }
.machine-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.machine-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 16px; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.machine-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; transition: background 0.2s;
}
.machine-card:hover { border-color: rgba(255,255,255,0.15); background: var(--card-hover); }
.machine-card.selected {
  border-color: var(--teal); background: var(--teal-glow);
}
.machine-card.selected::before { background: var(--teal); }

.machine-brand { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--text-dim); text-transform: uppercase; margin-bottom: 4px; }
.machine-model { font-size: 16px; font-weight: 700; color: var(--text-bright); }
.machine-meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.machine-meta span { margin-right: 8px; }

/* ========== TRINITY GRID ========== */
.trinity-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.trinity-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.trinity-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; transition: background 0.2s;
}
.trinity-card:hover { border-color: rgba(255,255,255,0.15); background: var(--card-hover); }
.trinity-card.selected { border-color: var(--teal); background: var(--teal-glow); }
.trinity-card.selected::before { background: var(--teal); }

.trinity-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.trinity-name { font-size: 18px; font-weight: 700; color: var(--text-bright); }
.trinity-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.trinity-price { font-family: 'DM Mono', monospace; font-size: 20px; font-weight: 500; color: var(--teal-light); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
}
.badge-rec { background: rgba(13, 148, 136, 0.2); color: var(--teal-light); border: 1px solid rgba(13, 148, 136, 0.3); }
.badge-loader { background: rgba(59, 130, 246, 0.2); color: var(--blue-light); border: 1px solid rgba(59, 130, 246, 0.3); }

.trinity-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.trinity-spec { font-size: 11px; color: var(--text-dim); }
.trinity-spec strong { color: var(--text); display: block; font-size: 13px; }

/* ========== CONFIG ========== */
.config-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;
}
.config-card, .util-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px;
}
.config-card h3, .util-card h3 {
  font-size: 16px; font-weight: 600; margin-bottom: 18px;
  color: var(--text-bright);
}

.input-group { margin-bottom: 16px; }
.input-group:last-child { margin-bottom: 0; }
.input-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-dim); margin-bottom: 6px; }

.input-group input[type="number"],
.input-group input[type="text"] {
  width: 100%; padding: 10px 12px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); color: var(--text-bright);
  font-family: 'DM Mono', monospace; font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.input-group input:focus { border-color: var(--teal); }

.input-with-unit { display: flex; align-items: center; gap: 6px; }
.input-with-unit input { flex: 1; }
.unit { font-size: 13px; color: var(--text-dim); font-family: 'DM Mono', monospace; }

/* Button groups */
.shift-group { margin-bottom: 20px; }
.shift-group label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 10px; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
}
.tag-blue { background: rgba(59,130,246,0.2); color: var(--blue-light); }
.tag-teal { background: rgba(13,148,136,0.2); color: var(--teal-light); }

.btn-group {
  display: flex; gap: 0;
  border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.btn-group button {
  flex: 1; padding: 10px 0; background: transparent;
  border: none; border-right: 1px solid var(--card-border);
  color: var(--text-dim); font-family: 'Outfit', sans-serif; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-group button:last-child { border-right: none; }
.btn-group button:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn-group button.active { background: var(--teal); color: #fff; }

/* Info box */
.info-box {
  display: flex; gap: 10px; padding: 14px;
  background: rgba(13, 148, 136, 0.08); border: 1px solid rgba(13, 148, 136, 0.15);
  border-radius: var(--radius-sm); margin-top: 8px;
}
.info-icon { width: 18px; height: 18px; color: var(--teal-light); flex-shrink: 0; margin-top: 2px; }
.info-box p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.info-box strong { color: var(--teal-light); }

/* Utilization sliders */
.util-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-blue { background: var(--blue); }
.dot-teal { background: var(--teal); }

.slider-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.slider-row label { font-size: 12px; color: var(--text-dim); width: 130px; flex-shrink: 0; }
.slider-row .slider { flex: 1; }
.slider-val { width: 42px; text-align: right; font-size: 14px; color: var(--text-bright); }

/* Slider styling */
input[type="range"] {
  -webkit-appearance: none; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.08); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}
.slider-blue::-webkit-slider-thumb { background: var(--blue); }
.slider-teal::-webkit-slider-thumb { background: var(--teal); }

/* ========== BUTTONS ========== */
.nav-buttons { display: flex; justify-content: space-between; margin-top: 20px; }

.btn {
  padding: 12px 28px; border: none; border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #0f766e; }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--card-border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-large { padding: 14px 40px; font-size: 16px; }

/* ========== RESULTS ========== */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px;
}
.hero-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.hero-card.highlight {
  border-color: var(--teal); background: var(--teal-glow);
}
.hero-card .label { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.hero-card .value {
  font-family: 'DM Mono', monospace; font-size: 28px; font-weight: 500;
  color: var(--text-bright);
}
.hero-card.highlight .value { color: var(--teal-light); }
.hero-card .sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.section-title {
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
  padding-top: 16px; border-top: 1px solid var(--card-border);
}

/* ROI Timeline */
.roi-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.roi-item {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px; text-align: center;
}
.roi-item .label { font-size: 12px; color: var(--text-dim); }
.roi-item .value { font-family: 'DM Mono', monospace; font-size: 32px; font-weight: 500; color: var(--teal-light); }

/* Shift Impact */
.shift-impact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.impact-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden;
}
.impact-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.impact-card.blue::before { background: var(--blue); }
.impact-card.teal::before { background: var(--teal); }

.impact-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text-bright); }

.util-bar-row { margin-bottom: 10px; }
.util-bar-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.util-bar-track { height: 10px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.util-bar-fill { height: 100%; border-radius: 5px; transition: width 1.2s ease; }
.util-bar-fill.blue { background: var(--blue); }
.util-bar-fill.teal { background: var(--teal); }

.impact-stats { display: flex; gap: 20px; margin-top: 14px; }
.impact-stat .label { font-size: 10px; color: var(--text-dim); }
.impact-stat .value { font-family: 'DM Mono', monospace; font-size: 16px; font-weight: 500; color: var(--text-bright); }

.new-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 9px; font-weight: 700; background: rgba(13,148,136,0.2);
  color: var(--teal-light); letter-spacing: 0.5px; margin-left: 6px;
}

.shift-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.sum-item {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
}
.sum-item .label { font-size: 11px; color: var(--text-dim); }
.sum-item .value { font-family: 'DM Mono', monospace; font-size: 18px; font-weight: 500; color: var(--text-bright); margin-top: 4px; }

/* Breakdown */
.breakdown-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 32px;
}
.breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row .label { color: var(--text-dim); }
.breakdown-row .value { font-family: 'DM Mono', monospace; color: var(--text-bright); }
.breakdown-row .detail { font-size: 11px; color: var(--text-dim); font-family: 'DM Mono', monospace; }
.breakdown-row.total { border-top: 2px solid var(--teal); padding-top: 14px; margin-top: 4px; }
.breakdown-row.total .label { font-weight: 700; color: var(--text-bright); font-size: 16px; }
.breakdown-row.total .value { color: var(--teal-light); font-size: 22px; }
.breakdown-row.cost .value { color: var(--orange); }

/* Financing */
.financing-section { margin-bottom: 20px; }
.fin-inputs {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.fin-term-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fin-term-btn {
  padding: 6px 12px; border: 1px solid var(--card-border); border-radius: 6px;
  background: transparent; color: var(--text-dim); font-size: 12px;
  font-family: 'DM Mono', monospace; cursor: pointer; transition: all 0.2s;
}
.fin-term-btn:hover { border-color: var(--teal); color: var(--text); }
.fin-term-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }

.fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fin-stat {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.fin-stat .label { font-size: 12px; color: var(--text-dim); }
.fin-stat .value { font-family: 'DM Mono', monospace; font-size: 28px; font-weight: 500; margin: 6px 0; }
.fin-stat:nth-child(1) .value { color: var(--teal-light); }
.fin-stat:nth-child(2) .value { color: var(--green); }
.fin-stat:nth-child(3) .value { color: var(--cyan); }
.fin-stat .sub { font-size: 11px; color: var(--text-dim); }

/* Section 179 */
.s179-callout {
  background: rgba(13, 148, 136, 0.08); border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius); padding: 24px; margin-bottom: 32px;
  display: flex; gap: 16px; align-items: flex-start;
}
.s179-callout .s179-icon { font-size: 32px; flex-shrink: 0; }
.s179-callout h4 { font-size: 16px; font-weight: 700; color: var(--teal-light); margin-bottom: 6px; }
.s179-callout p { font-size: 13px; color: var(--text-dim); }
.s179-vals { display: flex; gap: 24px; margin-top: 10px; }
.s179-val .label { font-size: 11px; color: var(--text-dim); }
.s179-val .value { font-family: 'DM Mono', monospace; font-size: 18px; color: var(--teal-light); }

/* Proposal */
.proposal-section {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 32px;
}
.proposal-inputs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center; padding: 40px 24px; color: var(--text-dim);
  font-size: 12px; border-top: 1px solid var(--card-border);
  position: relative; z-index: 1;
}
.footer p { margin-bottom: 4px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .config-grid, .util-grid, .shift-impact { grid-template-columns: 1fr; }
  .proposal-inputs { grid-template-columns: 1fr; }
  .fin-inputs { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-stats { grid-template-columns: 1fr; }
  .roi-timeline, .shift-summary, .fin-stats { grid-template-columns: 1fr; }
  .machine-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .trinity-grid { grid-template-columns: 1fr; }
  .header-phone { display: none; }
  .slider-row { flex-wrap: wrap; }
  .slider-row label { width: 100%; }
}
