:root {
  --bg: #050914;
  --panel: #0b1224;
  --panel-2: #101a33;
  --text: #f4f7fb;
  --muted: #aab6c8;
  --blue: #1e88ff;
  --blue-2: #00c2ff;
  --border: rgba(255,255,255,0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(30,136,255,.25), transparent 35%),
    linear-gradient(180deg, #050914, #02040a);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--blue-2); }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  padding: 72px 0 48px;
}

.badge {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue-2);
  background: rgba(30,136,255,.08);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.95;
  margin: 18px 0;
  letter-spacing: -0.06em;
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
  margin-top: 48px;
}

p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.card h3 {
  margin-top: 0;
  font-size: 26px;
}

.button {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: white;
  text-decoration: none;
  font-weight: 800;
}

.feature-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.feature-list li {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .container {
    width: 90%;
    padding: 32px 0;
  }

  .hero {
    padding-top: 44px;
  }

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

  .card {
    padding: 22px;
    border-radius: 20px;
  }

  p {
    font-size: 16px;
  }
}

/* CapCheck HVAC product pages */
.site-nav {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.site-nav a:hover { color: var(--blue-2); }

.brand-link {
  color: var(--text) !important;
  letter-spacing: -0.02em;
}

.capcheck-page {
  --cap-bg: #07111f;
  --cap-bg-2: #0b1730;
  --cap-panel: rgba(15, 27, 52, .82);
  --cap-panel-2: rgba(8, 18, 35, .92);
  --cap-line: rgba(61, 199, 255, .18);
  background:
    radial-gradient(circle at 82% 8%, rgba(30, 136, 255, .34), transparent 28%),
    radial-gradient(circle at 14% 28%, rgba(61, 199, 255, .12), transparent 28%),
    linear-gradient(180deg, #030711 0%, var(--cap-bg) 48%, #040812 100%);
  overflow-x: hidden;
}

.capcheck-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(var(--cap-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--cap-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 70% 10%, black, transparent 58%);
}

.cap-nav {
  position: relative;
  z-index: 5;
}

.cap-hero,
.cap-section,
.diagnostic-band,
.cap-cta,
.cap-footer,
.legal-shell {
  width: min(1180px, 92%);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.cap-hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr);
  gap: 44px;
  align-items: center;
  padding: 48px 0 80px;
}

.product-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(118, 228, 255, .22);
  border-radius: 999px;
  background: rgba(30, 136, 255, .09);
  color: #76e4ff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}

.product-kicker img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.cap-hero h1,
.legal-hero h1 {
  max-width: 780px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: .94;
  margin: 22px 0;
  letter-spacing: -0.07em;
}

.cap-hero p {
  max-width: 680px;
  font-size: clamp(18px, 2vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.cap-primary {
  box-shadow: 0 0 34px rgba(30, 136, 255, .38);
}

.button.ghost {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-strip span {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(118, 228, 255, .18);
  background: rgba(255, 255, 255, .04);
  color: #cfe9ff;
  font-size: 13px;
  font-weight: 800;
}

.cap-hero-art {
  position: relative;
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(30, 136, 255, .5), rgba(118, 228, 255, .06));
  box-shadow: 0 24px 90px rgba(0, 0, 0, .55), 0 0 70px rgba(30, 136, 255, .28);
}

.cap-hero-art img {
  display: block;
  width: 100%;
  border-radius: 26px;
}

.cap-section {
  padding: 64px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.diagnostic-band h2,
.cap-cta h2 {
  margin: 16px 0 10px;
  letter-spacing: -0.045em;
}

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

.cap-feature-card,
.legal-card {
  border: 1px solid rgba(118, 228, 255, .14);
  background:
    linear-gradient(180deg, rgba(20, 35, 66, .88), rgba(8, 17, 34, .9));
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,.32);
}

.cap-feature-card h3 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(30, 136, 255, .14);
  border: 1px solid rgba(61, 199, 255, .28);
  color: #76e4ff;
  font-weight: 1000;
  font-size: 24px;
  box-shadow: inset 0 0 28px rgba(30, 136, 255, .16);
}

.diagnostic-band {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
  border-radius: 32px;
  border: 1px solid rgba(118, 228, 255, .18);
  background:
    radial-gradient(circle at 10% 50%, rgba(30, 136, 255, .2), transparent 36%),
    linear-gradient(135deg, rgba(11, 23, 48, .92), rgba(3, 7, 17, .92));
}

.diagnostic-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.diagnostic-stats div {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
}

.diagnostic-stats strong {
  display: block;
  color: #76e4ff;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.diagnostic-stats span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}

.phone-frame {
  margin: 0;
  padding: 10px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(118, 228, 255, .18), rgba(255, 255, 255, .05));
  border: 1px solid rgba(118, 228, 255, .16);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.phone-frame img {
  width: 100%;
  display: block;
  border-radius: 25px;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

.featured-phone {
  transform: translateY(-18px);
  box-shadow: 0 24px 80px rgba(30, 136, 255, .22);
}

.phone-frame figcaption {
  padding: 14px 8px 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.cap-cta {
  margin-top: 30px;
  margin-bottom: 50px;
  padding: 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  border-radius: 32px;
  border: 1px solid rgba(118, 228, 255, .18);
  background:
    radial-gradient(circle at 0 50%, rgba(30, 136, 255, .26), transparent 30%),
    linear-gradient(135deg, rgba(20, 35, 66, .94), rgba(6, 12, 25, .96));
}

.cap-cta img {
  width: 90px;
  border-radius: 24px;
}

.cap-cta h2,
.cap-cta p { margin: 0; }

.cap-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.legal-shell {
  padding: 46px 0 40px;
}

.legal-hero {
  max-width: 860px;
}

.legal-card {
  max-width: 900px;
  margin-top: 28px;
}

.legal-card h2 {
  font-size: 28px;
  margin-top: 34px;
}

.big-link {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.support-card { margin-top: 0; }

@media (max-width: 980px) {
  .cap-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 26px;
  }

  .cap-hero-art { max-width: 760px; }
  .cap-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diagnostic-band { grid-template-columns: 1fr; }
  .phone-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }
  .phone-frame {
    min-width: 260px;
    scroll-snap-align: start;
  }
  .featured-phone { transform: none; }
  .cap-cta { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 18px;
  }

  .site-nav nav {
    justify-content: flex-start;
    gap: 12px;
  }

  .cap-hero,
  .cap-section,
  .diagnostic-band,
  .cap-cta,
  .cap-footer,
  .legal-shell {
    width: 90%;
  }

  .cap-hero h1,
  .legal-hero h1 {
    letter-spacing: -0.055em;
  }

  .cap-hero-art {
    border-radius: 22px;
    padding: 6px;
  }

  .cap-hero-art img { border-radius: 17px; }
  .cap-feature-grid { grid-template-columns: 1fr; }
  .diagnostic-stats { grid-template-columns: 1fr; }
  .diagnostic-band,
  .cap-cta,
  .cap-feature-card,
  .legal-card { border-radius: 22px; }
  .phone-frame { min-width: 230px; }
  .cap-footer { flex-direction: column; }
}

/* CapCheck polish pass v3 */
.cap-hero {
  grid-template-columns: minmax(0, .82fr) minmax(520px, 1.18fr);
  gap: clamp(42px, 6vw, 86px);
}

.cap-hero h1 {
  max-width: 640px;
  font-size: clamp(42px, 5.6vw, 74px);
}

.cap-hero p {
  max-width: 600px;
}

.button.subtle {
  opacity: .86;
}

.cap-hero-art {
  transform: scale(1.06);
  transform-origin: center;
}

.workflow-section {
  padding-top: 18px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.workflow-grid article {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 26px;
  border: 1px solid rgba(118, 228, 255, .14);
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 136, 255, .22), transparent 34%),
    linear-gradient(180deg, rgba(20, 35, 66, .78), rgba(8, 17, 34, .86));
  box-shadow: 0 20px 60px rgba(0,0,0,.26);
}

.workflow-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #76e4ff;
  border: 1px solid rgba(118, 228, 255, .22);
  background: rgba(30, 136, 255, .12);
  font-weight: 1000;
}

.workflow-grid h3 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.phone-row.expanded {
  grid-template-columns: repeat(6, minmax(190px, 1fr));
}

.phone-row.expanded .phone-frame {
  border-radius: 30px;
}

.phone-row.expanded .phone-frame img {
  border-radius: 22px;
}

.screenshots-section {
  padding-top: 76px;
}

@media (max-width: 1180px) {
  .phone-row.expanded {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 0 16px;
  }

  .phone-row.expanded .phone-frame {
    min-width: 250px;
    scroll-snap-align: start;
  }
}

@media (max-width: 980px) {
  .cap-hero {
    grid-template-columns: 1fr;
  }

  .cap-hero-art {
    transform: none;
  }

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

/* CapCheck polish pass v4 */
.cap-hero-art picture {
  display: block;
}

.phone-row.expanded {
  align-items: stretch;
}

.phone-row.expanded .phone-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.phone-row.expanded .phone-frame figcaption {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  line-height: 1.35;
}

.cap-footer {
  border-top: 1px solid rgba(118, 228, 255, .12);
  color: rgba(226, 232, 240, .7);
}

.cap-footer a {
  color: rgba(226, 232, 240, .84);
}

.cap-footer a:hover {
  color: #76e4ff;
}

.fieldbuilt-page {
  min-height: 100vh;
  color: #f8fbff;
  background:
    radial-gradient(circle at 20% 0%, rgba(30, 136, 255, .16), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(118, 228, 255, .08), transparent 34%),
    linear-gradient(135deg, #060b14 0%, #07111f 52%, #0b1730 100%);
}

.fieldbuilt-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 140px 0 80px;
}

.fieldbuilt-hero {
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(118, 228, 255, .16);
  border-radius: 32px;
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 136, 255, .20), transparent 34%),
    linear-gradient(180deg, rgba(20, 35, 66, .72), rgba(8, 17, 34, .82));
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
}

.fieldbuilt-hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(54px, 9vw, 108px);
  letter-spacing: -.07em;
  line-height: .9;
}

.fieldbuilt-hero p {
  max-width: 620px;
  color: #aebbd0;
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 28px;
}

@media (max-width: 1180px) {
  .phone-row.expanded .phone-frame {
    height: auto;
  }
}

@media (max-width: 700px) {
  .phone-row.expanded .phone-frame figcaption {
    min-height: 0;
  }
}

/* CapCheck final correction v6: stable hero + screenshot alignment */
.cap-hero {
  min-height: auto;
  grid-template-columns: minmax(320px, .78fr) minmax(560px, 1.22fr);
  gap: clamp(48px, 6vw, 96px);
  padding-top: clamp(72px, 8vw, 118px);
  padding-bottom: clamp(64px, 8vw, 104px);
  align-items: center;
}

.cap-hero h1 {
  max-width: 600px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: .96;
}

.cap-hero p {
  max-width: 590px;
}

.cap-hero-art {
  transform: none;
  width: 100%;
  max-width: 860px;
  justify-self: center;
  padding: 8px;
  overflow: hidden;
}

.cap-hero-art picture,
.cap-hero-art img {
  display: block;
  width: 100%;
}

.cap-hero-art img {
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: contain;
  border-radius: 24px;
}

.hero-actions {
  align-items: center;
}

.phone-row.expanded {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.phone-row.expanded .phone-frame,
.phone-row.expanded .phone-frame.featured-phone {
  margin: 0;
  display: grid;
  grid-template-rows: auto 76px;
  height: 100%;
  min-height: 0;
  transform: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.phone-row.expanded .phone-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  border-radius: 22px;
}

.phone-row.expanded .phone-frame figcaption {
  min-height: 76px;
  height: 76px;
  padding: 14px 8px 6px;
  display: flex;
  align-items: flex-start;
  color: var(--muted);
  font-size: clamp(13px, .9vw, 15px);
  line-height: 1.35;
  overflow: hidden;
}

.screenshots-section .section-heading {
  max-width: 840px;
}

@media (max-width: 1280px) {
  .phone-row.expanded {
    display: flex;
    overflow-x: auto;
    align-items: stretch;
    scroll-snap-type: x mandatory;
    padding: 4px 0 16px;
  }

  .phone-row.expanded .phone-frame {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }
}

@media (max-width: 980px) {
  .cap-hero {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }

  .cap-hero-art {
    max-width: 760px;
  }
}

@media (max-width: 700px) {
  .phone-row.expanded .phone-frame {
    flex-basis: 235px;
    grid-template-rows: auto auto;
  }

  .phone-row.expanded .phone-frame figcaption {
    height: auto;
    min-height: 0;
  }
}
