/* Tighter vertical rhythm, requested by the owner: every page should need as little
   scrolling as possible on phone and desktop. Loads after main.css and overrides only spacing
   and sizes; colours, fonts and layout stay as approved. */

:root { --section-y: clamp(44px, 5.5vw, 80px); }

h1 { font-size: clamp(38px, 5.2vw, 72px); }
h2 { font-size: clamp(30px, 3.6vw, 50px); }
h3 { font-size: 25px; }
.lead { font-size: 17px; }

.section { padding: var(--section-y) 0; }
.section-head { margin-bottom: 36px; gap: 32px; }
.section-head h2 { margin-top: 14px; }

/* Home hero */
.hero { min-height: 0; }
.hero__copy { padding-top: 64px; padding-bottom: 56px; }
.hero__copy h1 { margin: 18px 0 20px; }
.hero__actions { margin-top: 30px; }
.hero__proof { margin-top: 36px; padding-top: 24px; }
.hero__media { max-height: 640px; }

/* Inner page heroes */
.phero { height: 380px; }
.phero .wrap { padding-bottom: 44px; }
.phero h1 { margin: 14px 0 10px; }
.phero--plain { height: auto; padding: 44px 0 24px; }
.phero--plain p { font-size: 17px; }

/* Blocks */
.trust__item { padding: 22px 0; }
.svc__img { aspect-ratio: 4/4.2; }
.svc__body { padding: 22px 22px 24px; }
.svc h3 { margin: 4px 0 8px; }
.svc .link { margin-top: 16px; }
.checks { margin: 24px 0 30px; gap: 12px 24px; }
.split { gap: clamp(32px, 5vw, 80px); }
.split__media .inset { bottom: -28px; }
.step { padding-top: 30px; }
.step__n { font-size: 50px; }
.step h3 { margin: 16px 0 8px; }
.ba { aspect-ratio: 16/7; }
.ba-meta { margin-top: 18px; }
.gallery { grid-auto-rows: 120px; gap: 16px; }
.quote { padding: 30px 28px; }
.quote p { font-size: 20px; margin: 12px 0 22px; }
.areas a { padding: 16px 20px 16px 0; font-size: 22px; }
.faq details { padding: 20px 0; }
.faq summary { font-size: 22px; }
.form-card { padding: 34px 32px; }
.form-card > p { margin: 6px 0 18px; }
.field { margin-bottom: 12px; }
.field input, .field select, .field textarea { padding: 13px 14px; }
.stats div { padding: 30px 0; }
.stats b { font-size: 48px; }
.values { gap: 36px; }
.values h3 { margin: 14px 0 8px; }
.prose h3 { margin: 36px 0 14px; }
.incl div { padding: 20px 20px; }
.pricing div { padding: 20px; }
.filters { margin-bottom: 28px; }
.pgrid { gap: 28px 20px; }
.pcard .meta { margin-top: 12px; }
.qinfo li { padding: 18px 0; }
.quote-page { gap: 60px; }
.quote-page .form-card { padding: 38px 40px; }
.footer .top { padding: 64px 0 44px; gap: 44px; }
.footer .bottom { padding: 20px 0; }

/* Portfolio: the comparison slider now sits after the grid (it used to push every project below
   the fold), so the first projects show on the first screen. */
.portfolio-compare { aspect-ratio: 16/6 !important; margin: 44px 0 0 !important; }

@media (max-width: 900px) {
  :root { --section-y: 44px; }
  h1 { font-size: clamp(34px, 9vw, 44px); }
  h2 { font-size: clamp(28px, 7.4vw, 36px); }
  .section-head { margin-bottom: 24px; gap: 14px; }
  .hero__media { height: 250px; }
  .hero__copy { padding: 44px var(--gutter) 40px; }
  .hero__badge { bottom: -28px; padding: 12px 16px; }
  .hero__proof { margin-top: 28px; padding-top: 20px; }
  .hero__actions { margin-top: 24px; gap: 10px; }
  .trust__item, .trust__item + .trust__item { padding: 14px 0; }
  .svc__img { aspect-ratio: 16/9; }
  .services { gap: 16px; }
  .split__media { margin-bottom: 24px; }
  .split__media .main { aspect-ratio: 4/3.4; }
  .step, .step + .step { padding: 20px 0; }
  .step__n { font-size: 40px; }
  .ba { aspect-ratio: 4/3; }
  .gallery { grid-auto-rows: 130px; gap: 10px; }
  .quotes { gap: 14px; }
  .quote { padding: 24px 22px; }
  .quote p { font-size: 19px; }
  .areas a { font-size: 18px; padding: 13px 12px 13px 0; }
  .faq details { padding: 16px 0; }
  .faq summary { font-size: 19px; }
  .phero { height: 300px; }
  .phero .wrap { padding-bottom: 28px; }
  .phero--plain { height: auto; padding: 28px 0 12px; } /* text-only headers must not inherit the 300px image-header height */
  .pgrid { gap: 24px; }
  .portfolio-compare { aspect-ratio: 4/3 !important; margin: 28px 0 0 !important; }
  .stats div { padding: 22px 0; }
  .stats b { font-size: 38px; }
  .footer .top { padding: 44px 0 28px; gap: 26px; }
  .cta__contact { margin-top: 24px; }
}

/* Comfortable tap targets on phones (links were under 24px tall). */
@media (max-width: 900px) {
  .footer li a, .footer li { display: inline-block; padding: 7px 0; }
  .footer ul { gap: 0; }
  .footer li a, .footer li { padding: 5px 0; }
  .link { display: inline-block; padding: 12px 0 6px; }
  .crumbs a { display: inline-block; padding: 10px 0; }
  .side-box li a, .side-box li { display: inline-block; padding: 6px 0; }
}

/* Phone footer: Services and Company side by side instead of one long column. */
@media (max-width: 900px) {
  .footer .top { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer .top > :first-child, .footer .top > :last-child { grid-column: 1 / -1; }
}

/* A text-only page header is followed directly by its content; no full section gap in between. */
.phero--plain + .section { padding-top: 16px; }

/* ---------------------------------------------------------------------------------------------
   Phone density pass: the owner wants visitors to see everything with as little scrolling as
   possible. Long single-column stacks become swipeable rows (the next card peeks in so it's
   obvious there is more) or two-column grids.
   --------------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Swipe rows: services, testimonials, home gallery, service-page project photos */
  .services, .quotes, .gallery {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .services::-webkit-scrollbar, .quotes::-webkit-scrollbar, .gallery::-webkit-scrollbar { display: none; }
  /* positioned, so absolutely placed card images are clipped by the row instead of widening the page */
  .services, .quotes, .gallery, .svc__img { position: relative; }
  .services > *, .quotes > * { flex: 0 0 78%; scroll-snap-align: start; }
  .gallery > figure, .gallery .g1 { flex: 0 0 72%; height: 230px; scroll-snap-align: start; grid-column: auto; grid-row: auto; }
  .gallery figcaption { display: block; padding: 40px 16px 14px; }
  .gallery figcaption b { font-size: 19px; }
  .svc__img { aspect-ratio: 4/3; }
  .svc p { font-size: 14px; }
  .quote p { font-size: 18px; }

  /* Two-column grids instead of one long column */
  .process { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .step, .step + .step { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .step__n { font-size: 32px; }
  .step h3 { font-size: 19px; margin: 8px 0 4px; }
  .step p { font-size: 13px; line-height: 1.5; }
  .checks { grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 13.5px; }
  .checks li { font-size: 13.5px; }
  .values { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
  .values > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .values h3 { font-size: 19px; margin: 8px 0 4px; }
  .values p { font-size: 13.5px; }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .pcard b { font-size: 17px; line-height: 1.2; }
  .pcard .meta { flex-direction: column; gap: 2px; margin-top: 8px; }
  .pcard small { font-size: 12px; }
  .incl div { padding: 14px; }
  .incl b { font-size: 17px; }
  .incl span { font-size: 13px; }
  .pricing div { padding: 14px 10px; }
  .pricing b { font-size: 24px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats div { padding: 16px 0; }
  .stats b { font-size: 28px; }
  .stats span { font-size: 11px; letter-spacing: 0; display: block; line-height: 1.3; }
  .trust .wrap { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .trust__item { font-size: 12.5px; gap: 10px; }
  .trust__item svg { width: 24px; height: 24px; }

  /* Pictures that only decorate get smaller */
  .split__media .inset { display: none; }
  .split__media .main { width: 100%; aspect-ratio: 16/10; }
  .split__media { margin-bottom: 4px; }
  .phero { height: 240px; }
  .hero__media { height: 220px; }
  .hero__copy { padding-top: 40px; }
  .hero__copy .lead { font-size: 15.5px; }
  .hero__proof b { font-size: 26px; }
  .ba { aspect-ratio: 16/11; }

  /* Section headings: the side note under each title is the first thing to trim */
  .section-head p { font-size: 14.5px; }
}
