/* "What we do" on the home page: four illustrated tiles instead of text cards.
   The drawings are inline SVG in index.html, so there is no image to wait for.
   Repairs get the colour of the problem (ice for AC, warm for no heat), the two
   new systems get the navy night sky and the star from the logo. */

.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.svc {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 42, 67, .07);
  transition: transform .25s cubic-bezier(.3, 1.3, .5, 1), box-shadow .25s ease;
}
.svc:hover, .svc:focus-visible { transform: translateY(-6px); box-shadow: 0 20px 36px rgba(15, 42, 67, .16); }
.svc:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.svc-scene { position: relative; display: block; height: 176px; overflow: hidden; }
.svc-cool .svc-scene { background: linear-gradient(170deg, #eef8ff 0%, #cde9fa 100%); }
.svc-warm .svc-scene { background: linear-gradient(170deg, #fff4ea 0%, #ffd8bd 100%); }
.svc-new .svc-scene {
  background:
    radial-gradient(1.4px 1.4px at 14% 70%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 80% 18%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.2px 1.2px at 62% 40%, rgba(255, 255, 255, .5), transparent),
    linear-gradient(170deg, #0a1f33 0%, var(--navy-2) 70%, #245a8c 100%);
}
.svc-art { position: absolute; left: 50%; bottom: 6px; width: 190px; height: auto; transform: translateX(-50%); }

/* The price hangs off the scene like a tag on a new unit. */
.svc-tag {
  position: absolute; top: 14px; right: 12px; transform: rotate(5deg); transform-origin: 50% -14px;
  background: #fff; color: var(--navy); border-radius: 6px 6px 6px 6px; padding: 6px 10px 6px 18px;
  font-family: var(--font-display); font-weight: 700; font-size: .92rem; white-space: nowrap;
  box-shadow: 0 4px 10px rgba(15, 42, 67, .18); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.svc-tag::before { content: ""; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--line); }
.svc-new .svc-tag { background: var(--orange); color: #1b1300; }
.svc-new .svc-tag::before { background: rgba(0, 0, 0, .25); }
.svc:hover .svc-tag { transform: rotate(-3deg); }

.svc-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.svc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--navy); line-height: 1.2; }
.svc-text { color: var(--muted); font-size: .95rem; margin: 6px 0 12px; text-wrap: pretty; }
.svc-more { margin-top: auto; font-weight: 700; color: var(--navy-2); }
.svc:hover .svc-more { color: var(--orange-text); }

/* Small life on hover: the fan turns, the flame moves, the stars glint. */
.svc-fan, .svc-flame, .svc-star { transform-box: fill-box; transform-origin: center; }
.svc-flame { transform-origin: 50% 100%; }
.svc:hover .svc-fan { animation: svc-spin 1.1s linear infinite; }
.svc:hover .svc-flame { animation: svc-flicker .5s ease-in-out infinite alternate; }
.svc:hover .svc-star { animation: svc-glint 1.4s ease-in-out infinite; }
.svc:hover .svc-star-2 { animation-delay: .5s; }
@keyframes svc-spin { to { transform: rotate(360deg); } }
@keyframes svc-flicker { to { transform: scale(1.08, 1.16) skewX(-3deg); } }
@keyframes svc-glint { 50% { transform: scale(1.35) rotate(20deg); } }

@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* On a phone the scene goes to the left, so four tiles do not become four screens. */
@media (max-width: 600px) {
  .svc-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .svc { flex-direction: row; }
  .svc-scene { flex: none; width: 124px; height: auto; min-height: 150px; }
  .svc-art { width: 132px; bottom: 4px; }
  .svc-tag { top: 8px; left: 8px; right: 8px; padding: 4px 6px 4px 14px; font-size: .78rem; transform: none; text-align: center; white-space: normal; line-height: 1.15; }
  .svc-tag::before { left: 5px; width: 5px; height: 5px; }
  .svc:hover .svc-tag { transform: none; }
  .svc-body { padding: 12px 14px 14px; }
  .svc-title { font-size: 1.08rem; }
  .svc-text { font-size: .9rem; margin: 4px 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .svc, .svc-tag { transition: none; }
  .svc:hover { transform: none; }
  .svc:hover .svc-fan, .svc:hover .svc-flame, .svc:hover .svc-star { animation: none; }
}

/* "Why neighbors choose Mountain Star": the four reasons become promise cards with
   their own icons, the owners' line becomes a pull quote, and the real job photo is
   pinned up like a print. Markup is the same list, quote and image as before. */
.why .two-col { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.why .checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.why .checks li {
  position: relative; padding: 62px 18px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  font-size: .94rem; line-height: 1.5; color: var(--muted);
}
.why .checks li strong { display: block; color: var(--navy); font-family: var(--font-display); font-size: 1.08rem; line-height: 1.25; margin-bottom: 4px; }
.why .checks li::before {
  content: ""; left: 18px; top: 16px; width: 38px; height: 38px; border-radius: 11px;
  background: #fff1e6 center / 22px no-repeat; box-shadow: inset 0 0 0 1px rgba(242, 118, 46, .25);
}
.why .checks li:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1541a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.why .checks li:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1541a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l10 10-8 8z'/%3E%3Ccircle cx='7.5' cy='8' r='1.5'/%3E%3C/svg%3E"); }
.why .checks li:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1541a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.why .checks li:nth-child(4)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1541a' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6L12 16.6l-5.4 2.9 1.2-6-4.5-4.2 6.1-.7z'/%3E%3C/svg%3E"); }

.why .owner-quote { position: relative; margin-top: 26px; padding: 8px 0 0 64px; border: 0; background: none; }
.why .owner-quote::before {
  content: "\201C"; position: absolute; left: 0; top: -14px; font-family: var(--font-display); font-weight: 700;
  font-size: 5.2rem; line-height: 1; color: var(--orange);
}
.why .owner-quote p { font-family: var(--font-display); font-style: normal; font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.35; color: var(--navy); text-wrap: pretty; }
.why .owner-quote cite { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-weight: 600; }
.why .owner-quote cite::before { content: ""; width: 28px; height: 2px; background: var(--orange); }

/* The photo, pinned up as a print with a strip of tape. */
.why .two-col > div:last-child {
  position: relative; background: #fff; padding: 12px 12px 4px; border-radius: 4px;
  box-shadow: 0 2px 4px rgba(15, 42, 67, .08), 0 22px 44px rgba(15, 42, 67, .2);
  transform: rotate(2deg); transition: transform .4s cubic-bezier(.3, 1.3, .5, 1);
}
.why .two-col > div:last-child:hover { transform: rotate(0deg) scale(1.01); }
.why .two-col > div:last-child::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 110px; height: 28px; margin-left: -55px; z-index: 2;
  background: rgba(240, 226, 190, .78); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.why .job-photo { border: 0; border-radius: 2px; box-shadow: none; max-height: 460px; }
.why .map-caption { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--navy); margin: 10px 0 8px; }

@media (max-width: 800px) {
  .why .two-col { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .why .two-col > div:last-child { transform: rotate(1.2deg); margin: 0 8px; }
}
@media (max-width: 560px) {
  .why .checks { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .why .checks li { padding: 16px 16px 16px 70px; }
  .why .checks li::before { top: 16px; }
  .why .owner-quote { padding-left: 50px; }
  .why .owner-quote::before { font-size: 4.2rem; }
}
@media (prefers-reduced-motion: reduce) { .why .two-col > div:last-child { transition: none; } }

/* Three-tile version, on the Salt Lake City new-systems page. */
.svc-grid.svc-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
@media (max-width: 1000px) { .svc-grid.svc-3 { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 601px) and (max-width: 1000px) {
  .svc-grid.svc-3 .svc { flex-direction: row; }
  .svc-grid.svc-3 .svc-scene { flex: none; width: 220px; height: auto; min-height: 170px; }
}

/* Round 48: real job photos and a short silent furnace clip from the team. */
.work-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; grid-template-rows: auto auto; gap: 14px; margin-top: 18px; }
.work-tile { position: relative; margin: 0; overflow: hidden; border-radius: 16px; background: var(--navy); box-shadow: 0 12px 26px rgba(15, 42, 67, .14); }
.work-tile .work-media { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.work-video { grid-row: 1 / span 2; }
.work-video .work-media { aspect-ratio: auto; min-height: 100%; }
.work-wide { grid-column: 2 / span 2; }
.work-wide .work-media { aspect-ratio: 16 / 9; }
.work-tile figcaption {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 7px 11px; border-radius: 10px;
  background: rgba(10, 31, 51, .78); color: #fff; font-size: .84rem; font-weight: 600; line-height: 1.3;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.symptoms-with-clip { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.symptoms-with-clip .symptoms { margin-top: 20px; }
.work-clip { position: relative; margin: 20px 0 0; border-radius: 16px; overflow: hidden; background: var(--navy); box-shadow: 0 12px 26px rgba(15, 42, 67, .16); }
.work-clip .work-media { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.work-clip figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 7px 11px; border-radius: 10px; background: rgba(10, 31, 51, .78); color: #fff; font-size: .82rem; font-weight: 600; }
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-video { grid-row: span 2; }
  .work-wide { grid-column: 2; }
  .work-wide .work-media { aspect-ratio: 4 / 3; }
  .symptoms-with-clip { grid-template-columns: minmax(0, 1fr); }
  .work-clip { max-width: 300px; margin: 18px auto 0; }
}
@media (max-width: 520px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .work-video, .work-wide { grid-column: auto; grid-row: auto; }
  .work-video .work-media { aspect-ratio: 4 / 5; min-height: 0; }
  .work-wide { grid-column: 1 / -1; }
  .work-tile figcaption { font-size: .76rem; padding: 6px 9px; }
}
