/* ==========================================================================
   Calculator-specific styles
   ========================================================================== */

.page-calc { background: var(--bg); }

.nav__links a.active { color: var(--gold); }

/* Hero */
.calc-hero {
  padding: 80px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.calc-hero__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 16px;
}
.calc-hero__sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Layout */
.calc-main { padding: 60px 0 100px; }
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 980px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-results__sticky { position: static !important; }
}

/* Inputs */
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.calc-block { }
.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.calc-output {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.calc-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 12px 0 0;
}

/* Radio cards */
.calc-radios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .calc-radios { grid-template-columns: 1fr; } }
.calc-radio { cursor: pointer; }
.calc-radio input { position: absolute; opacity: 0; pointer-events: none; }
.calc-radio__card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 16px;
  background: var(--bg-elev);
  transition: all 0.18s ease;
  height: 100%;
}
.calc-radio:hover .calc-radio__card { border-color: var(--border-strong); }
.calc-radio input:checked + .calc-radio__card {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.04), transparent);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.calc-radio__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.calc-radio__sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.calc-radio__meta {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

/* Segmented buttons */
.calc-segmented {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elev);
}
.calc-segmented button {
  flex: 1;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.calc-segmented button:last-child { border-right: 0; }
.calc-segmented button small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.calc-segmented button:hover { background: var(--bg-alt); color: var(--text); }
.calc-segmented button.active {
  background: var(--gold);
  color: #0a0e1a;
}
.calc-segmented button.active small { color: rgba(10, 14, 26, 0.7); }
.calc-segmented button[disabled] { opacity: 0.35; cursor: not-allowed; }

/* Select */
.calc-select {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a6d2e' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.calc-select:focus { outline: none; border-color: var(--gold); }

/* Slider rows */
.calc-slider-row {
  display: grid;
  grid-template-columns: 200px 1fr 90px;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.calc-slider-row:last-child { border-bottom: 0; }
.calc-slider-label {
  font-size: 14px;
  color: var(--text-muted);
}
.calc-slider-out {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--gold);
  text-align: right;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
}

@media (max-width: 720px) {
  .calc-slider-row { grid-template-columns: 1fr; gap: 8px; }
  .calc-slider-out { text-align: left; }
}

/* Results panel */
.calc-results {
  align-self: start;
}
.calc-results__sticky {
  position: sticky;
  top: 96px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.calc-headline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.calc-headline__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.calc-headline__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.calc-headline__value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}
.calc-headline__value--accent { color: var(--gold); font-size: 32px; }

.calc-spec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.calc-spec__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.calc-spec__row > span:first-child { color: var(--text-dim); }
.calc-spec__row > span:last-child { color: var(--text); font-weight: 500; }

.calc-cta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.calc-disclaimer {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
  text-align: center;
}

/* Breakdown section */
.calc-breakdown {
  background: var(--bg-alt);
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.section__title--small {
  font-size: clamp(28px, 3.5vw, 40px);
  margin-bottom: 40px;
}
.calc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .calc-grid-2 { grid-template-columns: 1fr; } }

.breakdown-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
}
.breakdown-card__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 20px;
}
.breakdown-table {
  display: flex;
  flex-direction: column;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row > span:first-child { color: var(--text-muted); }
.breakdown-row > span:last-child { color: var(--text); font-weight: 500; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.breakdown-row--sub > span:first-child { padding-left: 16px; color: var(--text-dim); }
.breakdown-row--total {
  border-top: 1px solid var(--border-strong);
  padding-top: 16px;
  margin-top: 6px;
}
.breakdown-row--total > span:first-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.breakdown-row--total > span:last-child {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  color: var(--gold);
  font-weight: 500;
}
.breakdown-row--meta { padding-top: 6px; }
.breakdown-row--meta > span:first-child { font-size: 12px; color: var(--text-dim); letter-spacing: 0.04em; }
.breakdown-row--meta > span:last-child { font-size: 13px; color: var(--text-dim); font-weight: 400; }

/* Scope of supply */
.scope-supply {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
}
.scope-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}
@media (max-width: 700px) { .scope-list { grid-template-columns: 1fr; } }
.scope-list li {
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.scope-list li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 600;
}
.scope-list li:last-child,
.scope-list li:nth-last-child(2):not(:nth-child(odd)) { border-bottom: 0; }

/* ============== Print quote ============== */
.quote-print {
  display: none;
  padding: 40px 56px;
  background: #ffffff;
  color: #1a1410;
  font-family: 'Inter', sans-serif;
  max-width: 800px;
  margin: 0 auto;
}
.quote-print h1, .quote-print h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; color: #1a1410; }
.quote-print__head { display: flex; align-items: center; gap: 20px; padding-bottom: 24px; border-bottom: 2px solid #c9a961; margin-bottom: 32px; }
.quote-print__logo { width: 72px; height: auto; }
.quote-print__name { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: 0.18em; font-size: 18px; margin: 0 0 4px; }
.quote-print__tagline { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 16px; color: #5a5246; margin: 0; font-style: italic; }
.quote-print__date { font-size: 12px; color: #8a8275; margin: 8px 0 0; letter-spacing: 0.04em; }
.quote-print__title { font-size: 28px; margin: 0 0 32px; }
.quote-print__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.quote-print h2 { font-size: 18px; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid #c9a961; letter-spacing: 0.04em; }
.quote-table { width: 100%; border-collapse: collapse; margin-bottom: 28px; font-size: 13px; }
.quote-table th { text-align: left; padding: 8px 0; font-weight: 400; color: #5a5246; width: 50%; border-bottom: 1px solid #f0ebe0; }
.quote-table td { text-align: right; padding: 8px 0; font-weight: 500; color: #1a1410; border-bottom: 1px solid #f0ebe0; font-feature-settings: "tnum"; }
.quote-table__total th, .quote-table__total td { font-weight: 700; border-top: 2px solid #c9a961; border-bottom: 0; padding-top: 12px; }
.quote-table__total td { font-family: 'Cormorant Garamond', serif; font-size: 18px; color: #8a6d2e; }
.quote-print__assumptions { padding: 20px; background: #faf8f3; border-radius: 4px; margin-bottom: 24px; font-size: 12px; line-height: 1.6; }
.quote-print__assumptions h2 { font-size: 14px; border: 0; padding: 0; margin: 0 0 8px; }
.quote-print__foot { font-size: 11px; color: #8a8275; line-height: 1.5; padding-top: 20px; border-top: 1px solid #f0ebe0; }

/* Print mode: show only the quote */
@media print {
  body * { visibility: hidden; }
  .quote-print, .quote-print * { visibility: visible; }
  .quote-print { display: block !important; position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
  @page { margin: 14mm; }
}
