/* ================================================
   CALCULATOR — Premium Engineering Tool
   Big calculator card as hero · Light readable headline
   Warm architectural · Benyan orange accent
   ================================================ */

/* ===== Hero Section ===== */
.calc-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(165deg, #1A1D20 0%, #0F1214 100%);
}

.calc-hero__media {
  display: none;
}

.calc-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(249, 115, 22, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 55%);
}

/* ===== Hero Content — headline + chips, centered ===== */
.calc-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  padding-top: 108px;
  padding-bottom: 40px;
  text-align: center;
}

.calc-hero__eyebrow {
  margin-bottom: 18px;
}

.calc-hero__title {
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  color: var(--white);
  text-align: center;
}

.calc-hero__title .engraved-heading {
  background: linear-gradient(180deg,
    var(--white) 0%,
    var(--white) 10%,
    var(--brand) 38%,
    #E8A33D 62%,
    var(--gold-bright) 88%,
    var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter:
    drop-shadow(0 2px 3px rgba(0,0,0,0.95))
    drop-shadow(0 6px 16px rgba(0,0,0,0.70))
    drop-shadow(0 0 32px rgba(249, 115, 22, 0.28));
  line-height: 1.0;
  letter-spacing: -0.035em;
}

.calc-hero__sub {
  color: var(--white);
  font-size: 17px;
  line-height: 1.75;
  max-width: 52ch;
  margin: 0 auto 24px;
  text-align: center;
}

/* Volumetric chips — compact row above the card */
.volumetric-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.volumetric-chip {
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(249, 115, 22, 0.16);
  background: rgba(247, 244, 236, 0.08);
  color: var(--white-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  user-select: none;
  letter-spacing: 0.01em;
}

.volumetric-chip:hover {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.30);
  color: var(--brand);
}

.volumetric-chip.active {
  background: rgba(249, 115, 22, 0.16);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.14), 0 0 20px rgba(249, 115, 22, 0.10);
}

/* ===== BIG CALCULATOR CARD ===== */
.calc-card {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  padding-bottom: 80px;
}

.calc-form-panel {
  background: var(--bg-elevated);
  border: 1px solid rgba(249, 115, 22, 0.10);
  border-top: 2px solid var(--brand);
  border-radius: var(--radius-xl);
  padding: 36px 40px 32px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2),
    0 16px 56px rgba(0,0,0,0.12),
    0 0 32px rgba(249, 115, 22, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}

.calc-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--brand) 20%,
    var(--brand) 80%,
    transparent);
  opacity: 0.4;
}

.calc-form-panel .eyebrow {
  margin-bottom: 18px;
  display: inline-flex;
}

.calc-form-panel .calc-form-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 22px;
  display: block;
  text-align: left;
}

.calc-form {
  display: grid;
  gap: 14px;
}

/* Input grid */
.calc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.calc-inputs label {
  display: block;
}

.calc-inputs label span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.calc-inputs input[type="number"],
.calc-inputs input[type="text"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(249, 115, 22, 0.14);
  background: rgba(255, 255, 255, 0.70);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -moz-appearance: textfield;
}

.calc-inputs input[type="number"]::-webkit-inner-spin-button,
.calc-inputs input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-inputs input[type="number"]:focus,
.calc-inputs input[type="text"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  background: rgba(255, 255, 255, 0.90);
}

.calc-inputs select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(249, 115, 22, 0.14);
  background: rgba(255, 255, 255, 0.70);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(249, 115, 22, 0.30) 50%),
                    linear-gradient(135deg, rgba(249, 115, 22, 0.30) 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% + 1px), calc(100% - 8px) calc(50% + 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 28px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.calc-inputs select option {
  background: var(--bg-elevated);
  color: var(--ink);
}

.calc-inputs select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
  background: rgba(255, 255, 255, 0.70);
}

/* Wastage row */
.wastage-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
  align-items: center;
  margin-top: 2px;
}

.wastage-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wastage-label span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wastage-label .wastage-current {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.wastage-current .wastage-val {
  color: var(--brand);
  font-weight: 700;
}

.wastage-slider {
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
  height: 4px;
}

/* Form actions */
.calc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(249, 115, 22, 0.06);
}

/* ===== Result Section ===== */
.calc-result-section {
  padding: 0 0 64px;
}

.calc-result-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  padding-bottom: 64px;
}

.calc-result-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(249, 115, 22, 0.12);
  border-top: 2px solid var(--brand);
  border-radius: var(--radius-xl);
  padding: 40px 44px 36px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2),
    0 20px 64px rgba(0,0,0,0.12),
    0 0 32px rgba(249, 115, 22, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  overflow: hidden;
}

.calc-result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--brand) 20%,
    var(--brand) 80%,
    transparent);
}

.calc-result-card__header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.06);
  text-align: left;
}

.calc-result-card__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.calc-result-card__sub {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 54ch;
}

/* Result rows */
.result-rows {
  display: grid;
  gap: 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(249, 115, 22, 0.04);
}

.result-row:last-of-type {
  border-bottom: none;
}

.result-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-value {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-align: right;
}

.result-value.brand {
  color: var(--brand);
  font-weight: 700;
}

.result-row.total-row {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(249, 115, 22, 0.10);
}

.result-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
}

/* Result recommendation note */
.result-note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 16px;
  background: rgba(249, 115, 22, 0.04);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.result-note-icon {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--brand);
}

.result-note-text {
  flex: 1;
}

/* Result actions */
.calc-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(249, 115, 22, 0.06);
}

/* ===== Guidance Notes ===== */
.notes-section {
  padding: 56px 0 64px;
}

.notes-heading {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.025em;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.note-card {
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid rgba(249, 115, 22, 0.08);
  border-top: 2px solid var(--brand);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out);
}

.note-card:hover {
  border-color: rgba(249, 115, 22, 0.16);
  background: var(--bg-panel);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 8px 24px rgba(0,0,0,0.04);
}

.note-card__icon {
  font-size: 24px;
  margin-bottom: 12px;
  line-height: 1;
}

.note-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.note-text {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ===== CTA ===== */
.calc-cta-section {
  padding: 48px 0 72px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .calc-hero__title {
    font-size: clamp(34px, 5.5vw, 58px);
  }

  .calc-form-panel,
  .calc-result-card {
    padding: 30px 28px 26px;
  }
}

@media (max-width: 768px) {
  .calc-inputs {
    grid-template-columns: 1fr 1fr;
  }

  .wastage-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .notes-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calc-hero__inner {
    padding-top: 100px;
  }

  .calc-form-panel,
  .calc-result-card {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .calc-inputs {
    grid-template-columns: 1fr;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .calc-hero__inner {
    padding-top: 104px;
    padding-bottom: 24px;
  }

  .calc-hero__title {
    font-size: clamp(30px, 12vw, 42px);
  }

  .calc-hero__sub {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .volumetric-chips {
    gap: 6px;
    margin-bottom: 20px;
  }

  .volumetric-chip {
    font-size: 10.5px;
    padding: 6px 10px;
  }

  .calc-form-panel,
  .calc-result-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .calc-hero__inner {
    padding-bottom: 48px;
  }
}

/* ===== Mobile/tablet: stack headline above the calculator (also in ultra.css §21) ===== */
@media (max-width: 960px) {
  .calc-hero { flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; }
  .calc-hero__inner, .calc-card { flex: 0 0 auto; width: 100%; max-width: 680px; min-width: 0; margin-left: auto; margin-right: auto; box-sizing: border-box; }
  .calc-hero__inner { padding-bottom: 28px; }
  .calc-card { padding-bottom: 56px; }
  .calc-form-panel, .calc-result-card { min-width: 0; max-width: 100%; }
}
@media (max-width: 640px) {
  .calc-result-inner { padding-left: 0; padding-right: 0; padding-bottom: 48px; }
}
