/* ============================================================
   ROI Calculator page styles
   Builds on theme.css + services.css design tokens.
   ============================================================ */

.roi-page {
  padding: 120px 24px 80px;
  background: var(--bg-dark);
  min-height: 100vh;
}

.roi-page-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.roi-header {
  text-align: center;
  margin-bottom: 64px;
}

.roi-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 16px 0 20px;
}

.roi-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto;
}

/* ---------- Two-column layout ---------- */
.roi-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
}

/* ---------- Inputs ---------- */
.roi-inputs {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
}

.roi-inputs h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 36px;
  color: var(--text-primary);
}

.roi-field {
  margin-bottom: 32px;
}

.roi-field:last-child {
  margin-bottom: 0;
}

.roi-field label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.roi-input-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.roi-input-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.roi-input-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0, 229, 153, 0.15);
  transition: box-shadow 0.2s;
}

.roi-input-wrap input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(0, 229, 153, 0.2);
}

.roi-input-wrap input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.roi-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  min-width: 64px;
  text-align: right;
}

.roi-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ---------- Results panel ---------- */
.roi-results {
  position: sticky;
  top: 88px;
}

.roi-results-sticky {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px;
}

.roi-results h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 28px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
}

.roi-metric {
  margin-bottom: 16px;
}

.roi-metric--big {
  margin-bottom: 20px;
}

.rm-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.rm-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.rm-value--accent {
  font-size: 52px;
  color: var(--accent);
  line-height: 1;
}

.rm-value--muted {
  font-size: 20px;
  color: var(--text-muted);
}

.rm-value--big {
  font-size: 36px;
}

.rm-value--green {
  color: var(--accent);
}

.rm-value--red {
  color: var(--highlight);
}

.roi-metric--highlight {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 -4px 16px;
}

.roi-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.roi-cta-block {
  margin-top: 28px;
  text-align: center;
}

.roi-cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--bg-dark);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 10px;
}

.roi-cta-btn:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.roi-cta-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.roi-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---------- Breakdown table ---------- */
.roi-breakdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
}

.roi-breakdown h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
}

.roi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.roi-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--bg-section);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.roi-table th:first-child { border-radius: 8px 0 0 8px; }
.roi-table th:last-child { border-radius: 0 8px 8px 0; text-align: right; }

.roi-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.roi-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.roi-table td:last-child {
  text-align: right;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
}

.roi-table tr:last-child td {
  border-bottom: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .roi-layout {
    grid-template-columns: 1fr;
  }

  .roi-results {
    position: static;
  }
}

@media (max-width: 640px) {
  .roi-inputs,
  .roi-results-sticky,
  .roi-breakdown {
    padding: 24px 20px;
  }

  .rm-value--accent {
    font-size: 40px;
  }

  .roi-table th:nth-child(2),
  .roi-table td:nth-child(2) {
    display: none;
  }
}
