/* =========================================================
   BuildBetterEstimates — Improvements v1
   Modern polish layered on top of existing design system
   ========================================================= */

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Stronger focus for accessibility */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- Sticky header polish ---------- */
header.top,
.hdr {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
header.top.scrolled,
.hdr.scrolled {
  box-shadow: 0 10px 40px rgba(0,0,0,0.28);
}

/* Subtle nav underline on hover */
.links > a,
.dd > .ddt {
  position: relative;
}
.links > a:not(.current)::after,
.dd > .ddt::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.25s ease, left 0.25s ease;
}
.links > a:hover::after,
.dd:hover > .ddt::after {
  width: 100%;
  left: 0;
}

/* ---------- Hero refinements ---------- */
.hero2 h1 {
  text-shadow: 0 4px 28px rgba(0,0,0,0.45);
  letter-spacing: -0.015em;
}
.hero2 .lede {
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
}

/* Primary CTA — subtle shine on hover */
.hero2 .btn.primary,
.btn.primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -6px rgba(224, 98, 26, 0.5);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.hero2 .btn.primary:hover,
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -6px rgba(224, 98, 26, 0.65);
}
.hero2 .btn.primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transition: left 0.55s ease;
}
.hero2 .btn.primary:hover::after {
  left: 130%;
}

/* Outline button lift */
.hero2 .btn.outline:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* ---------- Service / bid cards ---------- */
a.bid {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.35s cubic-bezier(0.22,1,0.36,1);
}
a.bid:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 44px -18px rgba(0,0,0,0.3);
}
a.bid .ph {
  overflow: hidden;
}
a.bid .ph img {
  transition: transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
a.bid:hover .ph img {
  transform: scale(1.07);
}
a.bid .card-title {
  transition: color 0.2s ease;
}
a.bid:hover .card-title {
  color: var(--orange);
}
a.bid .more-link span {
  display: inline-block;
  transition: transform 0.25s ease;
}
a.bid:hover .more-link span {
  transform: translateX(5px);
}

/* ---------- Blog post cards ---------- */
a.post {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
a.post:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.25);
}
a.post .ph img {
  transition: transform 0.65s ease;
}
a.post:hover .ph img {
  transform: scale(1.06);
}

/* ---------- Included / process items ---------- */
.inc-item {
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.inc-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -14px rgba(0,0,0,0.16);
}

.steps li {
  transition: transform 0.25s ease;
}
.steps li:hover {
  transform: translateY(-3px);
}

/* ---------- Stats gradient numbers ---------- */
.stats b,
.stats .num {
  background: linear-gradient(135deg, #E0621A 0%, #f08a4b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Floating stack subtle enhancement ---------- */
.fl-btn:hover .fl-ico {
  box-shadow: 0 14px 32px -6px rgba(0,0,0,0.5);
}

/* ---------- Form focus rings ---------- */
input:focus, select:focus, textarea:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 3px rgba(224,98,26,0.18);
  outline: none;
}

/* ---------- Reveal animation polish ---------- */
.rv {
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1),
              transform 0.75s cubic-bezier(0.22,1,0.36,1);
}

/* ---------- Call band subtle glow ---------- */
.callband {
  position: relative;
  overflow: hidden;
}
.callband::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle, rgba(224,98,26,0.1) 0%, transparent 65%);
  pointer-events: none;
}

/* ---------- Footer link hover ---------- */
footer a:hover {
  color: var(--orange) !important;
}

/* ---------- Reduced motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.bid:hover, a.post:hover, .inc-item:hover, .steps li:hover {
    transform: none;
  }
  a.bid .ph img, a.post .ph img {
    transition: none;
  }
}

/* Taller, more impactful service card images */
.bid .ph {
  height: 230px !important;
}
@media (min-width: 1100px) {
  .bid .ph {
    height: 250px !important;
  }
}

/* Ensure images are always visible even if fade class is slow */
html.js img.fadein {
  opacity: 0.01; /* almost invisible but still "loaded" for layout */
}
html.js img.fadein.loaded {
  opacity: 1;
}

/* Slightly stronger card border radius site-wide */
.bid, a.post, .inc-item {
  border-radius: 10px !important;
}

/* --- SEO: replace decorative/repeated <b> with styled spans --- */
.dd-label {
  display: block;
  font-family: var(--display), "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-ink, #B84A0C);
  font-size: 15px;
  margin-bottom: 6px;
}
.ddm .dd-label {

  font-family: var(--display), "Barlow Condensed", sans-serif;
}
.ptx .pname {
  font-weight: 700;
  display: block;
}
.tick-strong {
  font-weight: 600;
}

/* Match original .ddm b look for the replacement spans */
.ddm .dd-label {
  display: block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--orange-ink);
  font-size: 15px;
  margin-bottom: 6px;
}

/* Calculator output numbers — keep visual weight without <b> */
.num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.calc-out .num,
.calc-out b.num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  color: var(--orange);
}

/* =========================================================
   Spacing & proportion fixes (desktop + mobile)
   Remove oversized empty bands under heroes / stats
   ========================================================= */

/* --- Homepage hero: less bottom padding --- */
.hero2 {
  min-height: 580px !important;
  padding: 120px 0 56px !important;
}
@media (max-width: 900px) {
  .hero2 {
    min-height: 0 !important;
    padding: 110px 0 44px !important;
  }
}
@media (max-width: 560px) {
  .hero2 {
    padding: 100px 0 36px !important;
  }
}

/* --- Stats bar: tighter --- */
.bbe-stats-in {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* --- Main content sections: reduce vertical bulk --- */
section.block {
  padding: 64px 0 !important;
}
@media (max-width: 768px) {
  section.block {
    padding: 48px 0 !important;
  }
}

/* First section after stats / assure should sit closer */
.bbe-stats + section.block,
.assure + section.block,
.bbe-stats + .block,
.assure + .block {
  padding-top: 48px !important;
}
@media (max-width: 768px) {
  .bbe-stats + section.block,
  .assure + section.block {
    padding-top: 36px !important;
  }
}

/* --- Inner page heroes (.phero): much tighter --- */
.phero {
  padding: 130px 0 48px !important;
}
@media (max-width: 900px) {
  .phero {
    padding: 112px 0 40px !important;
  }
}
@media (max-width: 620px) {
  .phero {
    padding: 104px 0 32px !important;
  }
}

/* Content immediately after page hero */
.phero + section,
.phero + .block,
.phero + .wrap,
main > .phero + * {
  /* pull the next band up slightly */
}
.phero + section.block,
.phero + section {
  padding-top: 48px !important;
}
@media (max-width: 768px) {
  .phero + section.block,
  .phero + section {
    padding-top: 36px !important;
  }
}

/* Services page filter chips area — reduce empty bands */
.svc-filters,
.trade-filters,
.filter-row,
.chips,
.tag-row {
  margin-top: 8px !important;
  margin-bottom: 12px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Generic: reduce large empty top margins after heroes */
main > section:first-of-type + section {
  margin-top: 0 !important;
}

/* Contact page: keep form visible sooner */
.contact-layout,
.contact-grid,
.ct-grid {
  margin-top: 0 !important;
}
.phero + .contact-section,
.phero + section.contact,
section.contact {
  padding-top: 40px !important;
}
@media (max-width: 768px) {
  section.contact {
    padding-top: 28px !important;
  }
}

/* Portfolio / blog grids: less top air */
.bbe-portfolio-grid,
.posts,
.blog-grid {
  margin-top: 28px !important;
}

/* Pricing cards: less space under intro */
.pgrid,
.price-grid {
  margin-top: 28px !important;
}

/* Reduce section heading bottom margins slightly */
.bbe-section-heading {
  margin-bottom: 24px !important;
}

/* Mobile: keep CTAs and content tight */
@media (max-width: 620px) {
  section.block {
    padding: 40px 0 !important;
  }
  .phero + section.block,
  .bbe-stats + section.block {
    padding-top: 28px !important;
  }
  .hero2-ctas {
    gap: 10px !important;
  }
}

/* --- bbx sections (homepage mid-page blocks) --- */
.bbx-section {
  padding: 64px 0 !important;
}
@media (max-width: 720px) {
  .bbx-section {
    padding: 48px 0 !important;
  }
}

/* --- Jump / chip row on services (and similar) --- */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 28px !important;
  padding: 0 !important;
}
.jump a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line, #CDD4D8);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #121A22);
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}
.jump a:hover {
  border-color: var(--orange);
  color: var(--orange-ink, #B84A0C);
  background: #fff8f3;
}

/* Pull first content section tighter under every page hero */
main > .phero + section.block {
  padding-top: 36px !important;
  padding-bottom: 56px !important;
}
@media (max-width: 768px) {
  main > .phero + section.block {
    padding-top: 28px !important;
    padding-bottom: 40px !important;
  }
}

/* Homepage: services section right after stats */
#services.block,
section#services {
  padding-top: 48px !important;
}
@media (max-width: 768px) {
  #services.block {
    padding-top: 36px !important;
  }
}

/* Reduce lede margin under section titles for denser feel */
section.block .lede,
.bbx-section .lede {
  margin-bottom: 8px;
}

/* Contact form card: ensure it sits higher / more visible */
.contact-card,
.qform-card,
.form-card {
  margin-top: 0 !important;
}

/* --- Softer reveal: content near the fold shouldn't look blank --- */
html.js .rv {
  opacity: 0.15 !important;
  transform: translateY(14px) !important;
}
html.js .rv.in {
  opacity: 1 !important;
  transform: none !important;
}

/* First content blocks after heroes/stats should not start invisible */
.bbe-stats + section .rv,
.assure + section .rv,
.phero + section .rv,
#services .rv:first-child {
  opacity: 1 !important;
  transform: none !important;
}

/* =========================================================
   Text & motion: rotation, flip, refined entrances
   Professional — construction B2B appropriate
   ========================================================= */

/* Perspective helpers */
.hero2-in,
.phero .wrap,
.fl-stack {
  perspective: 1200px;
}

/* ----- Hero title: 3D flip-up per line ----- */
.hero2-title {
  transform-style: preserve-3d;
}
.hero2-title .line {
  display: block;
  opacity: 0;
  transform: rotateX(55deg) translateY(28px);
  transform-origin: center bottom;
  animation: titleFlipIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero2-title .line:nth-child(1) { animation-delay: 0.2s; }
.hero2-title .line:nth-child(2) { animation-delay: 0.38s; }

@keyframes titleFlipIn {
  0% {
    opacity: 0;
    transform: rotateX(55deg) translateY(28px);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: rotateX(0) translateY(0);
  }
}

/* Hero secondary text: soft rise (keep existing stagger but smoother) */
.hero2-in > .hero2-kicker {
  animation: textRise 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero2-in > .hero2-lede {
  animation: textRise 0.75s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero2-in > .hero2-ctas {
  animation: textRise 0.7s 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero2-in > .hero2-contact {
  animation: textRise 0.65s 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes textRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Override old generic hero2-in>* animation so title lines control themselves */
.hero2-in > .hero2-title {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* ----- Inner page hero titles: flip entrance ----- */
.phero h1 {
  opacity: 0;
  transform: rotateX(40deg) translateY(20px);
  transform-origin: center bottom;
  animation: titleFlipIn 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.phero .lede {
  opacity: 0;
  animation: textRise 0.7s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.phero .crumbs,
.phero .breadcrumb {
  opacity: 0;
  animation: textRise 0.5s 0.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ----- Floating buttons: sharper 3D flip ----- */
.fl-stack {
  perspective: 900px;
}
.fl-btn {
  transform-style: preserve-3d;
}
.fl-ico {
  transition: transform 0.65s cubic-bezier(0.3, 1.4, 0.5, 1),
              box-shadow 0.3s ease !important;
  transform-style: preserve-3d;
}
.fl-btn:hover .fl-ico,
.fl-btn:focus-visible .fl-ico {
  transform: rotateY(360deg) scale(1.08) !important;
}
.fl-lbl {
  transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1),
              opacity 0.25s ease !important;
  transform: rotateY(85deg) translateX(6px);
  transform-origin: right center;
}
.fl-btn:hover .fl-lbl,
.fl-btn:focus-visible .fl-lbl {
  transform: rotateY(0) translateX(0) !important;
  opacity: 1 !important;
}

/* Entrance for floating stack — sequential flip-in */
.fl-btn {
  animation: fabFlipIn 0.7s cubic-bezier(0.22, 1.2, 0.4, 1) both !important;
}
.fl-btn:nth-child(1) { animation-delay: 0.7s !important; }
.fl-btn:nth-child(2) { animation-delay: 0.9s !important; }
.fl-btn:nth-child(3) { animation-delay: 1.1s !important; }

@keyframes fabFlipIn {
  from {
    opacity: 0;
    transform: translateX(70px) rotateY(-90deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- Section kickers: subtle slide + fade ----- */
.kicker {
  display: inline-block;
  opacity: 0;
  transform: translateX(-12px);
  animation: kickerIn 0.55s 0.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.rv.in .kicker,
.rv .kicker {
  /* when inside reveal blocks, let parent control; still animate once visible */
}
.rv.in .kicker {
  animation: kickerIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes kickerIn {
  from {
    opacity: 0;
    transform: translateX(-14px) skewX(-4deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- Stats numbers: pop with slight rotation ----- */
.bbe-stat strong {
  display: inline-block;
  animation: statPop 0.7s cubic-bezier(0.22, 1.3, 0.36, 1) both;
}
.bbe-stat:nth-child(1) strong { animation-delay: 0.15s; }
.bbe-stat:nth-child(2) strong { animation-delay: 0.3s; }
.bbe-stat:nth-child(3) strong { animation-delay: 0.45s; }

@keyframes statPop {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(-8deg);
  }
  70% {
    transform: scale(1.08) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* ----- Primary buttons: micro lift + shine (already partly there) ----- */
.h2btn-primary,
.btn.primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}
.h2btn-primary:hover,
.btn.primary:hover {
  transform: translateY(-3px) !important;
}
.h2btn-ghost:hover,
.btn.ghost:hover,
.btn.outline:hover {
  transform: translateY(-2px);
}

/* ----- Card hover: subtle 3D tilt ----- */
a.bid,
a.post {
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease !important;
}
a.bid:hover,
a.post:hover {
  transform: translateY(-7px) rotateX(2deg) !important;
}

/* ----- Pricing tier cards ----- */
.pcard,
.tier {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease !important;
}
.pcard:hover,
.tier:hover {
  transform: translateY(-6px) !important;
}

/* ----- Reduced motion: kill theatrical transforms ----- */
@media (prefers-reduced-motion: reduce) {
  .hero2-title .line,
  .phero h1,
  .phero .lede,
  .phero .crumbs,
  .hero2-in > *,
  .fl-btn,
  .bbe-stat strong,
  .kicker {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  a.bid:hover,
  a.post:hover,
  .pcard:hover {
    transform: none !important;
  }
  .fl-btn:hover .fl-ico {
    transform: none !important;
  }
}

/* =========================================================
   First-screen framing + fly effects
   Home ends at stats | Services ends at chips | Contact shows form
   ========================================================= */

/* ----- HOME: first screen = hero + assure + stats ----- */
body:has(.hero2) .hero2 {
  /* Fill most of the viewport; leave room for assure (~70px) + stats (~56px) + header */
  min-height: calc(100vh - 140px) !important;
  max-height: none;
  padding: 120px 0 48px !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}
@media (min-width: 1100px) {
  body:has(.hero2) .hero2 {
    min-height: calc(100vh - 150px) !important;
    padding: 110px 0 40px !important;
  }
}
@media (max-width: 900px) {
  body:has(.hero2) .hero2 {
    min-height: auto !important;
    padding: 108px 0 40px !important;
  }
}
/* Tighten assure + stats so they sit in the first screen */
.assure .wrap > div {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}
.bbe-stats-in {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* ----- INNER PAGES: compact heroes so content is visible ----- */
.phero {
  padding: 118px 0 36px !important;
  min-height: 0 !important;
}
.phero h1 {
  font-size: clamp(36px, 5vw, 64px) !important;
  margin-bottom: 0;
}
.phero .lede {
  margin-top: 12px !important;
  max-width: 52ch;
}
@media (max-width: 900px) {
  .phero {
    padding: 104px 0 28px !important;
  }
}
@media (max-width: 620px) {
  .phero {
    padding: 96px 0 24px !important;
  }
}

/* Content right under hero */
main > .phero + section.block {
  padding-top: 28px !important;
  padding-bottom: 48px !important;
}
@media (max-width: 768px) {
  main > .phero + section.block {
    padding-top: 22px !important;
    padding-bottom: 36px !important;
  }
}

/* ----- CONTACT: form visible in first screen ----- */
body:has(.qform) .phero {
  padding: 110px 0 28px !important;
}
body:has(.qform) .phero h1 {
  font-size: clamp(34px, 4.5vw, 56px) !important;
}
body:has(.qform) .phero .lede {
  margin-top: 8px !important;
  font-size: 17px !important;
}
body:has(.qform) main > .phero + section.block {
  padding-top: 20px !important;
  padding-bottom: 40px !important;
}
body:has(.qform) .qform {
  max-height: none;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.35);
}
/* Slightly denser form fields on contact */
body:has(.qform) .qform .field {
  margin-bottom: 12px !important;
}
body:has(.qform) .qform textarea {
  min-height: 88px !important;
}
body:has(.qform) .qform {
  padding: 24px 26px !important;
}
@media (max-width: 900px) {
  body:has(.qform) .phero {
    padding: 100px 0 22px !important;
  }
}

/* ----- SERVICES: hero + chip row = first screen focus ----- */
body:has(.jump) .phero {
  padding: 118px 0 32px !important;
}
body:has(.jump) main > .phero + section.block {
  padding-top: 22px !important;
}
body:has(.jump) .jump {
  margin-bottom: 20px !important;
}

/* ----- PORTFOLIO & PRICING: same compact framing ----- */
body:has(#deliverables) .phero,
body:has(.pgrid) .phero {
  padding: 118px 0 32px !important;
}
body:has(#deliverables) main > .phero + section.block,
body:has(.pgrid) main > .phero + section.block {
  padding-top: 28px !important;
}
body:has(.pgrid) .pgrid {
  margin-top: 24px !important;
}

/* ----- BLOG: compact hero ----- */
body:has(.posts) .phero {
  padding: 118px 0 32px !important;
}
body:has(.posts) main > .phero + section.block {
  padding-top: 28px !important;
}
body:has(.posts) .posts {
  margin-top: 24px !important;
}

/* =========================================================
   FLY / FLIP effects — services rows & blog cards
   ========================================================= */

/* Service rows: fly in from alternating sides */
.svrow {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.svrow.rv.in,
.svrow.in,
.svrow.fly-in {
  opacity: 1;
  transform: none;
}
/* Alternate horizontal fly */
.svrow:nth-child(odd).rv {
  transform: translateX(-48px) translateY(16px);
}
.svrow:nth-child(even).rv {
  transform: translateX(48px) translateY(16px);
}
.svrow:nth-child(odd).rv.in,
.svrow:nth-child(even).rv.in {
  transform: none;
}
/* Hover micro-lift */
.svrow {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}
.svrow:hover {
  /* subtle emphasis when already visible */
}

/* Blog posts: fly-up with stagger */
a.post.rv,
.post.rv {
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}
a.post.rv.in,
.post.rv.in {
  opacity: 1;
  transform: none;
}
/* Stagger via nth-child when parent reveals */
.posts .post.rv:nth-child(1) { transition-delay: 0.05s; }
.posts .post.rv:nth-child(2) { transition-delay: 0.12s; }
.posts .post.rv:nth-child(3) { transition-delay: 0.19s; }
.posts .post.rv:nth-child(4) { transition-delay: 0.26s; }
.posts .post.rv:nth-child(5) { transition-delay: 0.33s; }
.posts .post.rv:nth-child(6) { transition-delay: 0.4s; }

/* Portfolio sample cards fly-up */
.bbe-portfolio-grid .bbe-sample,
#deliverables .bbe-sample,
#sample .bbe-sample {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.bbe-portfolio-grid .bbe-sample.rv.in,
#deliverables .bbe-sample.rv.in,
#sample .bbe-sample.rv.in,
.bbe-portfolio-grid .bbe-sample.in {
  opacity: 1;
  transform: none;
}

/* Pricing cards fly-up stagger */
.pcard.rv,
.tier.rv,
.pgrid .pcard {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}
.pcard.rv.in,
.tier.rv.in,
.pgrid .pcard.in,
.pcard.rv.in {
  opacity: 1;
  transform: none;
}
.pgrid .pcard:nth-child(1) { transition-delay: 0.05s; }
.pgrid .pcard:nth-child(2) { transition-delay: 0.12s; }
.pgrid .pcard:nth-child(3) { transition-delay: 0.19s; }
.pgrid .pcard:nth-child(4) { transition-delay: 0.26s; }
/* Featured card should not stay scaled from .feat translate */
.pcard.feat.rv.in {
  transform: translateY(-8px) !important;
}

@media (prefers-reduced-motion: reduce) {
  .svrow,
  .svrow.rv,
  a.post.rv,
  .post.rv,
  .bbe-sample,
  .pcard,
  .tier {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Contact page: pull form into first viewport */
section.contact {
  padding: 36px 0 48px !important;
}
section.contact .cgrid {
  gap: 36px !important;
  align-items: start !important;
}
@media (max-width: 900px) {
  section.contact {
    padding: 28px 0 40px !important;
  }
  section.contact .cgrid {
    gap: 28px !important;
  }
}
/* Shorter contact page hero specifically */
body:has(section.contact) .phero {
  padding: 108px 0 24px !important;
}
body:has(section.contact) .phero h1 {
  font-size: clamp(32px, 4.2vw, 52px) !important;
}
body:has(section.contact) .phero .lede {
  margin-top: 6px !important;
  font-size: 16px !important;
}

/* Ensure qform is fully visible / not clipped */
.qform {
  overflow: visible !important;
}

/* =========================================================
   UI Polish v2 — Contact form fit, services flip/fly,
   portfolio / pricing / blog card effects
   ========================================================= */

/* ---------- CONTACT: fit form in one screen ---------- */
body.page-contact .phero,
.contact-page .phero,
main:has(section.contact) > .phero {
  padding: 72px 0 12px !important;
  min-height: 0 !important;
}
body.page-contact .phero h1,
main:has(section.contact) > .phero h1 {
  font-size: clamp(28px, 4vw, 40px) !important;
  margin: 0 0 4px !important;
  line-height: 1.15 !important;
}
body.page-contact .phero .lede,
main:has(section.contact) > .phero .lede {
  margin-top: 6px !important;
  font-size: 16px !important;
  max-width: 48ch;
}
body.page-contact .phero .crumb,
main:has(section.contact) > .phero .crumb {
  margin-bottom: 6px !important;
  font-size: 13px !important;
}

section.contact {
  padding: 20px 0 28px !important;
  min-height: 0 !important;
}
section.contact .cgrid {
  gap: 28px !important;
  align-items: start !important;
}
section.contact .cgrid > .rv:first-child h2 {
  font-size: clamp(22px, 3vw, 30px) !important;
  margin: 4px 0 6px !important;
}
section.contact .cgrid > .rv:first-child .lede {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
}
section.contact .cinfo {
  margin-top: 12px !important;
  gap: 10px !important;
}
section.contact .cinfo a {
  font-size: 15px !important;
  gap: 10px !important;
}
section.contact .cinfo .ic {
  width: 36px !important;
  height: 36px !important;
}
section.contact .cinfo .ic svg {
  width: 18px !important;
  height: 18px !important;
}
section.contact .cinfo small {
  font-size: 12px !important;
}

/* Compact form */
section.contact .qform {
  padding: 18px 20px !important;
  border-radius: 8px !important;
}
section.contact .qform .row2 {
  gap: 10px !important;
  margin-bottom: 0 !important;
}
section.contact .qform .field {
  margin-bottom: 10px !important;
}
section.contact .qform label {
  font-size: 13px !important;
  margin-bottom: 3px !important;
  display: block;
}
section.contact .qform input,
section.contact .qform select,
section.contact .qform textarea {
  padding: 8px 10px !important;
  font-size: 14px !important;
  min-height: 0 !important;
  line-height: 1.3 !important;
}
section.contact .qform textarea {
  min-height: 64px !important;
  max-height: 90px !important;
}
section.contact .qform .consent,
section.contact .qform .qconsent {
  font-size: 12px !important;
  margin: 6px 0 8px !important;
  line-height: 1.35 !important;
}
section.contact .qform .ctas {
  margin-top: 4px !important;
  gap: 8px !important;
  flex-wrap: wrap;
}
section.contact .qform .ctas .btn {
  padding: 10px 16px !important;
  font-size: 14px !important;
}
section.contact .qform .note {
  font-size: 12px !important;
  margin-top: 8px !important;
  line-height: 1.35 !important;
}
section.contact .qform .qmsg {
  min-height: 0 !important;
  margin: 4px 0 !important;
  font-size: 13px !important;
}

/* Hide FAQ below fold on contact so form is the focus; keep accessible via scroll */
/* (FAQ remains, just ensure contact section is tight) */

@media (max-width: 900px) {
  section.contact .cgrid {
    gap: 20px !important;
  }
}
@media (max-width: 620px) {
  body.page-contact .phero,
  main:has(section.contact) > .phero {
    padding: 64px 0 8px !important;
  }
  section.contact {
    padding: 16px 0 24px !important;
  }
  section.contact .qform {
    padding: 14px 14px !important;
  }
}

/* ---------- SERVICES: compact rows + flip / fly effects ---------- */
.svrow {
  perspective: 1400px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease,
              border-color 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px !important;
  border: 1px solid transparent;
  background: var(--panel, #fff);
}
.svrow:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: 0 28px 50px -24px rgba(18, 26, 34, 0.35);
  border-color: rgba(224, 98, 26, 0.25);
}
.svrow .ph {
  overflow: hidden;
  position: relative;
}
.svrow .ph img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.svrow:hover .ph img {
  transform: scale(1.08) translateZ(0);
}

/* Fly-in reveal for each service row */
html.js .svrow.rv {
  opacity: 0;
  transform: translateY(40px) rotateX(12deg) scale(0.97);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js .svrow.rv.in {
  opacity: 1;
  transform: none;
}
/* Stagger via nth-child when parent observes */
.svrow.rv:nth-child(1) { transition-delay: 0.05s; }
.svrow.rv:nth-child(2) { transition-delay: 0.12s; }
.svrow.rv:nth-child(3) { transition-delay: 0.19s; }
.svrow.rv:nth-child(4) { transition-delay: 0.26s; }
.svrow.rv:nth-child(5) { transition-delay: 0.33s; }
.svrow.rv:nth-child(6) { transition-delay: 0.4s; }
.svrow.rv:nth-child(7) { transition-delay: 0.47s; }
.svrow.rv:nth-child(8) { transition-delay: 0.54s; }
.svrow.rv:nth-child(9) { transition-delay: 0.61s; }
.svrow.rv:nth-child(10) { transition-delay: 0.68s; }
.svrow.rv:nth-child(11) { transition-delay: 0.75s; }
.svrow.rv:nth-child(12) { transition-delay: 0.82s; }

/* Compact service images so more fit above the fold */
.svrow .ph {
  max-height: 220px;
}
.svrow .ph img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  max-height: 220px;
}
@media (min-width: 981px) {
  .svrow {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 0;
    align-items: stretch;
  }
  .svrow:nth-child(even) {
    grid-template-columns: 1.15fr 1fr;
  }
  .svrow:nth-child(even) .ph {
    order: 2;
  }
  .svrow > div:not(.ph) {
    padding: 28px 32px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .svrow h3 {
    font-size: 26px !important;
    margin: 4px 0 8px !important;
  }
  .svrow .lede {
    font-size: 15px !important;
    margin-bottom: 10px !important;
  }
  .svrow .ticks {
    margin: 0 0 12px !important;
  }
  .svrow .ticks li {
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }
  .svrow .ctas {
    margin-top: 8px !important;
  }
}

/* Jump chips more attractive */
.jump {
  margin-bottom: 20px !important;
}
.jump a {
  transition: transform 0.25s ease, border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.25s !important;
}
.jump a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px rgba(224, 98, 26, 0.45);
}

/* Limit services page first block padding so content starts higher */
body:has(.svrow) main > .phero + section.block {
  padding-top: 24px !important;
  padding-bottom: 40px !important;
}

/* ---------- PORTFOLIO: denser, more attractive cards ---------- */
.dgrid {
  gap: 22px !important;
  margin-top: 24px !important;
}
.dcard {
  border-radius: 10px !important;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease !important;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.dcard:hover {
  transform: translateY(-8px) rotateX(3deg) scale(1.01) !important;
  box-shadow: 0 30px 55px -28px rgba(18, 26, 34, 0.5) !important;
}
.dcard .dprev {
  height: 240px !important;
}
html.js .dcard.rv {
  opacity: 0;
  transform: translateY(36px) scale(0.96);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js .dcard.rv.in {
  opacity: 1;
  transform: none;
}
.dcard.rv:nth-child(1) { transition-delay: 0.05s; }
.dcard.rv:nth-child(2) { transition-delay: 0.15s; }
.dcard.rv:nth-child(3) { transition-delay: 0.25s; }

/* Gallery on portfolio */
.gallery {
  gap: 14px !important;
}
.gallery .ph {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.gallery .ph:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 40px -20px rgba(0,0,0,0.4);
}

/* ---------- PRICING: card lift + flip-ish hover ---------- */
.pgrid {
  gap: 18px !important;
  margin-top: 24px !important;
}
.pcard {
  border-radius: 12px !important;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease,
              border-color 0.3s ease !important;
  transform-style: preserve-3d;
}
.pcard:hover {
  transform: translateY(-10px) rotateX(2deg) !important;
  box-shadow: 0 28px 50px -22px rgba(18, 26, 34, 0.4) !important;
  border-color: rgba(224, 98, 26, 0.35) !important;
}
.pcard.feat:hover,
.pcard.tier.feat:hover {
  transform: translateY(-12px) scale(1.02) !important;
  box-shadow: 0 32px 56px -20px rgba(224, 98, 26, 0.35) !important;
}
.pcard .amt {
  transition: transform 0.4s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.pcard:hover .amt {
  transform: scale(1.06);
}
html.js .pcard.rv {
  opacity: 0;
  transform: translateY(40px) rotateY(-8deg);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js .pcard.rv.in {
  opacity: 1;
  transform: none;
}
.pcard.rv:nth-child(1) { transition-delay: 0.05s; }
.pcard.rv:nth-child(2) { transition-delay: 0.15s; }
.pcard.rv:nth-child(3) { transition-delay: 0.25s; }
.pcard.rv:nth-child(4) { transition-delay: 0.35s; }

/* ---------- BLOG: fly effect on posts ---------- */
.posts {
  display: grid;
  gap: 22px !important;
  margin-top: 24px !important;
}
a.post {
  border-radius: 12px !important;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease !important;
  transform-style: preserve-3d;
}
a.post:hover {
  transform: translateY(-10px) rotateX(2deg) scale(1.01) !important;
  box-shadow: 0 28px 48px -22px rgba(18, 26, 34, 0.4) !important;
}
a.post .ph {
  overflow: hidden;
}
a.post .ph img {
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
a.post:hover .ph img {
  transform: scale(1.1) !important;
}
a.post .more {
  display: inline-block;
  transition: transform 0.3s ease, color 0.25s;
}
a.post:hover .more {
  transform: translateX(6px);
  color: var(--orange);
}

/* Fly-in from the side for blog posts */
html.js a.post.rv {
  opacity: 0;
  transform: translateX(-48px) translateY(20px) rotateY(6deg);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js a.post.rv.in {
  opacity: 1;
  transform: none;
}
a.post.rv:nth-child(1) { transition-delay: 0.04s; }
a.post.rv:nth-child(2) { transition-delay: 0.12s; }
a.post.rv:nth-child(3) { transition-delay: 0.2s; }
a.post.rv:nth-child(4) { transition-delay: 0.28s; }
a.post.rv:nth-child(5) { transition-delay: 0.36s; }
a.post.rv:nth-child(6) { transition-delay: 0.44s; }
a.post.rv:nth-child(7) { transition-delay: 0.52s; }
a.post.rv:nth-child(8) { transition-delay: 0.6s; }
a.post.rv:nth-child(odd) {
  /* alternate fly direction */
}
html.js a.post.rv:nth-child(even) {
  transform: translateX(48px) translateY(20px) rotateY(-6deg);
}
html.js a.post.rv.in:nth-child(even) {
  transform: none;
}

/* ---------- Shared reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .svrow,
  .svrow:hover,
  .dcard,
  .dcard:hover,
  .pcard,
  .pcard:hover,
  a.post,
  a.post:hover,
  html.js .svrow.rv,
  html.js .dcard.rv,
  html.js .pcard.rv,
  html.js a.post.rv,
  html.js .svrow.rv.in,
  html.js .dcard.rv.in,
  html.js .pcard.rv.in,
  html.js a.post.rv.in {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .svrow .ph img,
  a.post .ph img {
    transition: none !important;
  }
}

/* Ensure contact form section is the visual focus — shrink anything after form until scroll */
section.contact + section.block,
section.contact + section#faq {
  /* leave as is for SEO/content, form is above */
}

/* =========================================================
   Contact page — fit first screen to red-box area,
   push hero title (green box) a bit lower
   ========================================================= */

/* Push "CONTACT US" title + lede further down from the header */
body.page-contact .phero,
main:has(section.contact) > .phero {
  padding: 96px 0 8px !important;
  min-height: 0 !important;
}
body.page-contact .phero .wrap,
main:has(section.contact) > .phero .wrap {
  padding-top: 12px !important;
}
body.page-contact .phero .crumb,
main:has(section.contact) > .phero .crumb {
  margin-bottom: 10px !important;
  opacity: 0.85;
}
body.page-contact .phero h1,
main:has(section.contact) > .phero h1 {
  font-size: clamp(30px, 4.2vw, 44px) !important;
  margin: 0 0 6px !important;
  line-height: 1.1 !important;
}
body.page-contact .phero .lede,
main:has(section.contact) > .phero .lede {
  margin-top: 4px !important;
  margin-bottom: 0 !important;
  font-size: 15px !important;
  max-width: 52ch;
  line-height: 1.4 !important;
}

/* Contact form band: fill remaining first screen, no extra air below form */
section.contact {
  padding: 16px 0 20px !important;
  min-height: 0 !important;
}
section.contact .cgrid {
  gap: 24px !important;
  align-items: start !important;
}
section.contact .cgrid > .rv:first-child .kicker {
  margin-bottom: 2px !important;
  font-size: 13px !important;
}
section.contact .cgrid > .rv:first-child h2 {
  font-size: clamp(22px, 2.8vw, 28px) !important;
  margin: 2px 0 6px !important;
  line-height: 1.15 !important;
}
section.contact .cgrid > .rv:first-child .lede {
  margin: 0 0 12px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}
section.contact .cinfo {
  margin-top: 8px !important;
  gap: 8px !important;
}
section.contact .cinfo a {
  font-size: 14px !important;
  gap: 10px !important;
}
section.contact .cinfo .ic {
  width: 34px !important;
  height: 34px !important;
}
section.contact .cinfo .ic svg {
  width: 16px !important;
  height: 16px !important;
}
section.contact .cinfo small {
  font-size: 11px !important;
}

section.contact .qform {
  padding: 16px 18px !important;
}
section.contact .qform .field {
  margin-bottom: 8px !important;
}
section.contact .qform .row2 {
  gap: 10px !important;
}
section.contact .qform label {
  font-size: 12px !important;
  margin-bottom: 2px !important;
}
section.contact .qform input,
section.contact .qform select,
section.contact .qform textarea {
  padding: 7px 10px !important;
  font-size: 13.5px !important;
}
section.contact .qform textarea {
  min-height: 56px !important;
  max-height: 72px !important;
}
section.contact .qform .consent,
section.contact .qform .qconsent {
  font-size: 11.5px !important;
  margin: 4px 0 6px !important;
  line-height: 1.3 !important;
}
section.contact .qform .ctas {
  margin-top: 2px !important;
  gap: 8px !important;
}
section.contact .qform .ctas .btn {
  padding: 9px 14px !important;
  font-size: 13px !important;
}
section.contact .qform .note {
  font-size: 11.5px !important;
  margin-top: 6px !important;
  line-height: 1.3 !important;
}

/* Schedule section starts fully below the fold — more top padding so it doesn't peek */
section.schedsec,
section.block.schedsec,
main > section.contact + section.block {
  padding-top: 48px !important;
  margin-top: 0 !important;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* On short viewports keep form denser */
@media (max-height: 820px) {
  body.page-contact .phero,
  main:has(section.contact) > .phero {
    padding: 88px 0 4px !important;
  }
  section.contact {
    padding: 12px 0 16px !important;
  }
  section.contact .qform textarea {
    min-height: 48px !important;
    max-height: 60px !important;
  }
  section.contact .cinfo {
    gap: 6px !important;
  }
}
@media (max-width: 620px) {
  body.page-contact .phero,
  main:has(section.contact) > .phero {
    padding: 76px 0 8px !important;
  }
  body.page-contact .phero h1,
  main:has(section.contact) > .phero h1 {
    font-size: 28px !important;
  }
}

/* =========================================================
   Services page — first screen = hero + jump chips only
   (service detail rows start fully below the fold)
   ========================================================= */

body.page-services .phero {
  padding: 100px 0 36px !important;
  min-height: 0 !important;
}
body.page-services .phero h1 {
  font-size: clamp(36px, 5.5vw, 64px) !important;
  margin: 0 0 10px !important;
  line-height: 1.05 !important;
}
body.page-services .phero .lede {
  margin-top: 8px !important;
  font-size: 17px !important;
  max-width: 42ch;
  line-height: 1.45 !important;
}
body.page-services .phero .crumb {
  margin-bottom: 12px !important;
}

/* First content block: only chips visible on load */
body.page-services main > .phero + section.block {
  padding-top: 22px !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

/* Jump chips sit near the fold edge */
body.page-services .jump {
  margin: 0 0 0 !important;
  padding-bottom: 8px !important;
  justify-content: center;
}

/* Push first service row well below the fold */
body.page-services .svrow:first-of-type,
body.page-services #residential.svrow {
  margin-top: 48px !important;
  padding-top: 8px;
}

/* Keep subsequent rows consistent spacing */
body.page-services .svrow {
  margin-bottom: 32px !important;
}

/* On shorter screens, keep chips above fold and rows below */
@media (max-height: 800px) {
  body.page-services .phero {
    padding: 88px 0 24px !important;
  }
  body.page-services main > .phero + section.block {
    padding-top: 16px !important;
  }
  body.page-services .svrow:first-of-type,
  body.page-services #residential.svrow {
    margin-top: 56px !important;
  }
}
@media (max-width: 620px) {
  body.page-services .phero {
    padding: 80px 0 20px !important;
  }
  body.page-services .phero h1 {
    font-size: 32px !important;
  }
  body.page-services .svrow:first-of-type,
  body.page-services #residential.svrow {
    margin-top: 36px !important;
  }
}

/* =========================================================
   Portfolio — shrink green-box gap so 3 sample cards
   are visible on the first screen
   ========================================================= */

body.page-portfolio .phero {
  padding: 96px 0 20px !important;
  min-height: 0 !important;
}
body.page-portfolio .phero h1 {
  font-size: clamp(34px, 5vw, 58px) !important;
  margin: 0 0 8px !important;
  line-height: 1.05 !important;
}
body.page-portfolio .phero .lede {
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  font-size: 16px !important;
  max-width: 48ch;
  line-height: 1.4 !important;
}
body.page-portfolio .phero .crumb {
  margin-bottom: 10px !important;
}

/* Pull deliverables section up — kill the empty green band */
body.page-portfolio main > .phero + section.block,
body.page-portfolio #deliverables {
  padding-top: 28px !important;
  padding-bottom: 40px !important;
}

body.page-portfolio #deliverables .kicker {
  margin-bottom: 4px !important;
}
body.page-portfolio #deliverables h2 {
  margin: 4px 0 8px !important;
  font-size: clamp(28px, 3.5vw, 40px) !important;
  line-height: 1.1 !important;
}
body.page-portfolio #deliverables .lede {
  margin-bottom: 16px !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
}

/* Compact the 3 sample cards so they fit in first viewport */
body.page-portfolio .dgrid {
  margin-top: 16px !important;
  gap: 16px !important;
}
body.page-portfolio .dcard .dprev {
  height: 200px !important;
}
body.page-portfolio .dcard figcaption {
  padding: 14px 16px !important;
}
body.page-portfolio .dcard h3 {
  font-size: 18px !important;
  margin: 0 0 2px !important;
}
body.page-portfolio .dcard p {
  font-size: 13px !important;
  line-height: 1.35 !important;
}
body.page-portfolio .dnum {
  font-size: 26px !important;
}

@media (max-height: 860px) {
  body.page-portfolio .phero {
    padding: 88px 0 12px !important;
  }
  body.page-portfolio main > .phero + section.block,
  body.page-portfolio #deliverables {
    padding-top: 20px !important;
  }
  body.page-portfolio .dcard .dprev {
    height: 170px !important;
  }
}
@media (max-width: 620px) {
  body.page-portfolio .phero {
    padding: 80px 0 16px !important;
  }
  body.page-portfolio .dcard .dprev {
    height: 180px !important;
  }
}
