/* turfRad ROI calculator — website styles.
 * [CONTENT] Layout and components for the calculator page. Uses tokens from theme.css.
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

h1 {
  color: var(--ink);
  font-size: var(--h1-size);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.intro { text-align: center; color: var(--text); max-width: 46rem; margin: 0 auto 2.5rem; }

h2.section {
  color: var(--ink);
  font-size: var(--section-size);
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--line);
}

/* Form fields */
.field { margin-bottom: var(--gap); }
.field label { display: block; color: var(--ink); font-weight: 600; margin-bottom: .35rem; }
.field .hint { display: block; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.req { color: var(--required); }

input[type="text"], input[type="number"], input[type="email"], select {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(43, 131, 196, 0.15);
}
input.invalid { border-color: var(--required); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Computed cost readouts (gold, like the legacy tool) */
.readout { }
.readout .label { color: var(--ink); font-weight: 600; }
.readout .value { color: var(--money); font-size: 1.15rem; font-weight: 700; }
.readout .sub { color: var(--muted); font-size: .82rem; }

/* Toggle switch */
.toggle-row { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-toggle {
  position: absolute; inset: 0; cursor: pointer;
  background: #c8ced4; border-radius: 999px; transition: .2s;
}
.slider-toggle::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider-toggle { background: var(--brand-blue); }
.switch input:checked + .slider-toggle::before { transform: translateX(20px); }

/* Range sliders */
.range-field { margin: 1.5rem 0; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; }
.range-value { color: var(--ink); font-weight: 800; font-size: 1.25rem; }
input[type="range"] {
  width: 100%; margin: .6rem 0 .2rem; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 999px; background: var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-blue); cursor: pointer; box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 3px solid var(--brand-blue); cursor: pointer;
}
.range-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }

/* Results */
.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
@media (max-width: 640px) { .results { grid-template-columns: 1fr 1fr; } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1rem; box-shadow: var(--shadow-sm);
}
.kpi .k-label { color: var(--muted); font-size: .8rem; }
.kpi .k-value { color: var(--money); font-weight: 800; font-size: 1.35rem; margin-top: .25rem; }
.kpi.neutral .k-value { color: var(--ink); }

/* Callout box (success-story style) */
.callout {
  background: var(--callout-bg); border: 1.5px solid var(--callout-border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; margin: 1.5rem 0;
}
.callout .c-label {
  color: var(--callout-label); text-transform: uppercase; letter-spacing: .05em;
  font-size: .78rem; font-weight: 700; margin-bottom: .4rem;
}

/* Buttons */
.actions { display: flex; gap: .75rem; margin-top: 2rem; }
.btn {
  font: inherit; font-weight: 700; border: none; border-radius: var(--radius);
  padding: .8rem 1.4rem; cursor: pointer; transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--brand-blue); color: #fff; }
.btn-primary:hover { background: var(--brand-blue-dark); }
.btn-secondary { background: #eef1f4; color: var(--ink); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

/* Steps */
.step { display: none; }
.step.active { display: block; }
.stepper { display: flex; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.stepper .dot {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: #eef1f4; color: var(--muted); font-weight: 700; font-size: .85rem;
}
.stepper .dot.active { background: var(--brand-blue); color: #fff; }

.error-banner {
  display: none; background: #fdecec; border: 1px solid var(--required); color: #8a2b2b;
  border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0;
}
.error-banner.show { display: block; }

.brandmark { text-align: center; margin-bottom: .5rem; font-weight: 800; color: var(--brand-cyan); letter-spacing: -.01em; }
.disclaimer { color: var(--muted); font-size: .78rem; margin-top: 2rem; text-align: center; }
