/**
 * Homepage (index.html) Specific Styles
 * ROI Workbench, Scenario Hub, Flowchart
 */

/* ===== Hero Specific ===== */
.badge-soft {
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
  font-weight: 600;
}

.metric-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.metric-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-lg, 12px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  min-width: 180px;
}

.metric-chip span:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.metric-chip span:last-child {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.metric-chip--hero {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: none;
}

.metric-chip--hero span {
  color: #fff;
}

.disclaimer-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 10px 0;
  color: var(--text-secondary);
  text-align: center;
}

.offer-banner .btn-primary {
  background: var(--color-primary);
}

/* ===== ROI Workbench Layout ===== */
.roi-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

@media (max-width: 992px) {
  .roi-grid {
    grid-template-columns: 1fr;
  }
}

.workbench {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .inputs-grid {
    grid-template-columns: 1fr;
  }
}

.inputs-grid label {
  font-weight: 600;
  color: var(--text-primary);
}

.inputs-grid input[type="number"],
.inputs-grid input[type="range"] {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  border-radius: var(--radius-md, 8px);
  padding: 8px 10px;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  align-items: center;
  gap: 8px;
}

.summary-callout {
  padding: 16px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-primary-alpha-12);
  border-radius: var(--radius-md, 8px);
}

.insight-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 700px) {
  .insight-row {
    grid-template-columns: 1fr;
  }
}

.progress-rail {
  height: 10px;
  background: var(--rail-bg);
  border-radius: var(--radius-pill, 999px);
  position: relative;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--color-success);
}

.workbench-chart {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  padding: 10px;
}

/* ===== Scenario Hub ===== */
.scenario-hub {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  padding: 14px;
}

.scenario-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scenario-tabs .btn-flat {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill, 999px);
  color: var(--text-primary);
}

.scenario-tabs .is-active {
  background: var(--color-primary);
  color: var(--text-white);
  border-color: transparent;
}

.scenario-panel {
  display: none;
  margin-top: 8px;
}

.scenario-panel.is-active {
  display: block;
}

.trend-card .chart-wrapper {
  position: relative;
  height: 200px;
}

/* ===== Flowchart ===== */
.flowchart-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  padding: 10px;
}

.flowchart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  margin-top: 10px;
}

svg.flowchart .node {
  fill: #fff;
  stroke: rgba(13, 71, 161, 0.35);
}

svg.flowchart .node--accent {
  fill: #e3f2fd;
  stroke: rgba(13, 71, 161, 0.45);
}

svg.flowchart .label {
  fill: #0d47a1;
}

html[data-theme="dark"] svg.flowchart .node {
  fill: #0f1520;
  stroke: #223042;
}

html[data-theme="dark"] svg.flowchart .node--accent {
  fill: rgba(100, 181, 246, 0.15);
  stroke: #365774;
}

html[data-theme="dark"] svg.flowchart .label {
  fill: #90caf9;
}

html[data-theme="dark"] svg.flowchart text {
  fill: #c9d4e3;
}

/* ===== Helpers ===== */
.section-title {
  margin: 0 0 6px 0;
}

.section-subtitle {
  color: var(--text-secondary);
}

.fade-in-section {
  animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#back-to-top {
  background: var(--color-primary);
  color: var(--text-white);
}
