/* ==========================================================================
   Service pages v2 — additions on top of styles.css (design system v2)
   Blocks: hero upgrades, cost calculator, scope icons,
   color palette, day-by-day timeline, refinish-vs-replace table, guides.
   ========================================================================== */

/* -------- Hero upgrades -------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-mute);
}
.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--gold-deep);
}
.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line);
}
.service-hero__lede {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  max-width: 56ch;
}
.service-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.svc-trust {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 12px 40px;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.svc-trust li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.svc-trust strong {
  font-family: var(--head);
  font-size: 15px;
  color: var(--ink);
}
.svc-trust svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.svc-trust__star {
  color: var(--gold);
}
@media (max-width: 420px) {
  .svc-trust {
    grid-template-columns: 1fr;
  }
}
.svc-trust__badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #43a047, #2e7d32);
  box-shadow: 0 2px 6px rgb(46, 125, 50, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.svc-trust__badge svg {
  width: 14px;
  height: 12px;
}

.service-hero__media {
  position: relative;
}

@media (min-width: 901px) {
  .service-hero__grid {
    grid-template-columns: 1fr 1.1fr;
  }
  .service-hero__img {
    aspect-ratio: 5 / 6;
  }
  .service-hero__img img {
    object-position: center 40%;
  }
}
.svc-facts {
  position: absolute;
  left: -28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0;
  background: var(--dark);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.svc-facts div {
  padding: 18px 22px;
  border-right: 1px solid var(--line-dark);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.svc-facts div:last-child {
  border-right: 0;
}
.svc-facts strong {
  font-family: var(--head);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.svc-facts span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255, 255, 255, 0.62);
}
@media (max-width: 900px) {
  .svc-facts {
    position: static;
    margin-top: -24px;
    margin-inline: 16px;
    grid-template-columns: repeat(3, 1fr);
  }
  .svc-facts div {
    padding: 14px 12px;
  }
  .svc-facts strong {
    font-size: 19px;
  }
}

/* -------- Cost calculator -------- */
.calc {
  background: var(--white);
  border-top: 1px solid var(--line);
}
.calc__box {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--sh);
}
@media (max-width: 900px) {
  .calc__box {
    grid-template-columns: 1fr;
  }
}
.calc__form {
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.calc__field > label,
.calc__legend {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 12px;
}
.calc__legend output,
.calc__field output {
  font-family: var(--head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.calc__hint {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 8px 0 0;
}

/* range */
.calc input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--gold) 0,
    var(--gold) var(--fill, 30%),
    var(--cream-deep) var(--fill, 30%),
    var(--cream-deep) 100%
  );
  outline: none;
  margin: 6px 0 10px;
}
.calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
  box-shadow: 0 2px 10px rgb(0, 0, 0, 0.18);
  cursor: pointer;
}
.calc input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
  box-shadow: 0 2px 10px rgb(0, 0, 0, 0.18);
  cursor: pointer;
}
.calc input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid var(--gold-pale);
}
.calc__scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* segmented radios / check chips */
.calc__seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.calc__seg--2 {
  grid-template-columns: repeat(2, 1fr);
}
.calc__seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.calc__seg label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color var(--tf), background var(--tf);
}
.calc__seg label small {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-mute);
}
.calc__seg label:hover {
  border-color: var(--gold-soft);
}
.calc__seg input:checked + label {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.calc__seg input:focus-visible + label {
  outline: 3px solid var(--gold-soft);
  outline-offset: 1px;
}
@media (max-width: 520px) {
  .calc__seg {
    grid-template-columns: 1fr;
  }
}

/* checklist (bathroom variant) */
.calc__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calc__list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.calc__list label {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: border-color var(--tf), background var(--tf);
}
.calc__list label small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-mute);
}
.calc__list label em {
  font-style: normal;
  font-family: var(--head);
  font-weight: 700;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calc__list label::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--line);
  background: #fff;
  display: block;
}
.calc__list input:checked + label {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.calc__list input:checked + label::before {
  border-color: var(--gold);
  background: var(--gold)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")
    center/14px no-repeat;
}
.calc__list input:focus-visible + label {
  outline: 3px solid var(--gold-soft);
}

/* result panel */
.calc__result {
  background: var(--dark);
  color: #fff;
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.calc__result::before {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(184, 136, 46, 0.28), transparent 68%);
  pointer-events: none;
}
.calc__result .eyebrow {
  color: var(--gold-soft);
  margin-bottom: 4px;
}
.calc__price {
  font-family: var(--head);
  font-size: clamp(34px, 4.2vw, 50px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: opacity var(--tf);
}
.calc__price.is-updating {
  opacity: 0.35;
}
.calc__price small {
  display: block;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgb(255, 255, 255, 0.62);
  margin-top: 10px;
}
/* Result panel on a photo: image open at the top, dark builds where text sits.
   The image URL lives in THIS file, so it resolves against /css/ — a url() passed
   in from an inline style would resolve against the stylesheet and 404. */
.calc__result--photo {
  justify-content: flex-end;
  min-height: 660px;
  background-color: var(--dark);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}
.calc__result--photo::before {
  display: none;
}
.calc__result--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgb(13, 13, 11, 0.04) 0%,
    rgb(13, 13, 11, 0.08) 22%,
    rgb(13, 13, 11, 0.42) 30%,
    rgb(13, 13, 11, 0.86) 39%,
    rgb(13, 13, 11, 0.95) 60%,
    rgb(13, 13, 11, 0.97) 100%
  );
}
.calc__result--photo > * {
  position: relative;
  z-index: 1;
}
.calc__result--photo .eyebrow {
  text-shadow: 0 1px 10px rgb(13, 13, 11, 0.9);
}
.calc__result--kitchen {
  background-image: url("../images/uns-kitchen-b.webp");
}
.calc__result--bath {
  background-image: url("../images/uns-bath-b.webp");
}

.calc__summary {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: rgb(255, 255, 255, 0.78);
}
.calc__summary li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-dark);
}
.calc__summary li span:last-child {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.calc__result .btn {
  align-self: flex-start;
}
.calc__fine {
  font-size: 12px;
  color: rgb(255, 255, 255, 0.5);
  margin: 0;
}
.calc__compare {
  font-size: 13px;
  color: rgb(255, 255, 255, 0.72);
  margin: 0;
}
.calc__compare strong {
  color: var(--gold-soft);
}

/* -------- Scope grid with SVG icons -------- */
.scope-card {
  position: relative;
}
.scope-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-pale);
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.scope-card__icon svg {
  width: 24px;
  height: 24px;
}
.scope-card__note {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
@media (min-width: 781px) and (max-width: 1100px) {
  .scope-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------- Color palette -------- */
.palette {
  background: var(--cream);
  border-top: 1px solid var(--line);
}
.palette__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  .palette__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 640px) {
  .palette__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
.swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform var(--tm) var(--ease), box-shadow var(--tm) var(--ease),
    border-color var(--tf);
}
.swatch:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}
.swatch:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 2px;
}
.swatch__chip {
  height: 84px;
  border-bottom: 1px solid rgb(0, 0, 0, 0.06);
}
.swatch__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.swatch__name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.swatch__code {
  font-size: 12px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.swatch__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgb(13, 13, 11, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.swatch__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
}
.swatch__check svg {
  width: 14px;
  height: 14px;
}
.swatch.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-pale), var(--sh-md);
}
.swatch.is-selected .swatch__check {
  display: flex;
}
.palette__bar {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
}
.palette__pick {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.palette__pick i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream-deep);
  flex: none;
}
.palette__pick strong {
  font-family: var(--head);
}
.palette__pick span {
  color: var(--ink-mute);
}
.palette__note {
  width: 100%;
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
}

/* -------- Day-by-day timeline -------- */
.timeline {
  background: var(--white);
}
.timeline__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 12px;
}
.timeline__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 15px;
  height: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold-soft));
}
.tl-step {
  position: relative;
  padding-top: 44px;
}
.tl-step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 4px #fff;
}
.tl-step__day {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 8px;
}
.tl-step h3 {
  font-family: var(--body);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}
.tl-step p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.tl-step__where {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--ink-mid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .timeline__track {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 34px;
  }
  .timeline__track::before {
    left: 7px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    background: linear-gradient(to bottom, var(--gold), var(--gold-soft));
  }
  .tl-step {
    padding: 0 0 32px;
  }
  .tl-step::before {
    left: -34px;
    top: 2px;
  }
}
.timeline__aside {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 26px 30px;
  border-radius: var(--r-lg);
  background: var(--cream);
  border: 1px solid var(--line);
}
.timeline__aside p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-mid);
}
.timeline__aside strong {
  font-family: var(--head);
  color: var(--ink);
}
@media (max-width: 720px) {
  .timeline__aside {
    grid-template-columns: 1fr;
  }
}

/* -------- Refinish vs Replace -------- */
.compare {
  background: var(--cream);
}
.compare__wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--sh-sm);
}
.compare table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
}
.compare th,
.compare td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.compare thead th {
  font-family: var(--head);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--cream);
}
.compare thead th small {
  display: block;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-mute);
  margin-top: 2px;
}
.compare tbody th {
  font-weight: 600;
  color: var(--ink-mid);
  width: 22%;
}
.compare tbody tr:last-child td,
.compare tbody tr:last-child th {
  border-bottom: 0;
}
.compare .is-us {
  background: var(--gold-pale);
  color: var(--ink);
  font-weight: 600;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}
.compare thead .is-us {
  background: var(--gold);
  color: #fff;
  border-top: 2px solid var(--gold);
}
.compare thead .is-us small {
  color: rgb(255, 255, 255, 0.82);
}
.compare tbody tr:last-child .is-us {
  border-bottom: 2px solid var(--gold);
}
.compare td {
  color: var(--ink-soft);
}
.compare__foot {
  margin: 32px auto 0;
  max-width: 720px;
  text-align: center;
}
.compare__foot p {
  margin: 0 0 18px;
  font-size: 17px;
  color: var(--ink-mid);
}
.compare__foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* -------- Guides strip -------- */
.guides-strip {
  background: var(--white);
  border-top: 1px solid var(--line);
}

/* -------- Reviews: topic count line -------- */
.reviews__topic {
  margin: -8px 0 24px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-mute);
}
.reviews__topic strong {
  color: var(--ink);
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  .swatch,
  .calc__price {
    transition: none;
  }
}

/* -------- Estimate card inside the contact form -------- */
.calc-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "eyebrow edit" "price edit" "meta edit";
  gap: 4px 16px;
  align-items: center;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: var(--r);
  background: var(--gold-pale);
}
.calc-card__eyebrow {
  grid-area: eyebrow;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.calc-card__price {
  grid-area: price;
  font-family: var(--head);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calc-card__meta {
  grid-area: meta;
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.calc-card__edit {
  grid-area: edit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.calc-card.is-flash {
  animation: calcCardFlash 1.6s var(--ease);
}
@keyframes calcCardFlash {
  0% { box-shadow: 0 0 0 0 rgb(184, 136, 46, 0.55); }
  100% { box-shadow: 0 0 0 14px rgb(184, 136, 46, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .calc-card.is-flash { animation: none; }
}
