/* =========================================================
   Public site — global scale (~20%) + overflow/reflow fixes
   Does not redesign approved section styling.
   ========================================================= */

.site-header,
.header-inner,
main,
.site-footer {
  max-width: 100%;
  min-width: 0;
}

.hero-grid > *,
.build-split > *,
.fcase-grid > *,
.admin-cap-grid > *,
.enq-grid > *,
.sel-top > *,
.tech-layout > *,
.footer-grid > * {
  min-width: 0;
}

/* Framed screenshots must fill their boxes after global img height:auto */
.hero-laptop-screen img,
.hero-phone-screen img,
.sel-media img,
.portfolio-tile-media img,
.work-page-feature-media img,
.work-feature-media img,
.project-media img,
.project-grid-page .project-media img,
.admin-phone img,
.fcase-dash img,
.page-home [class*="-screen"] img {
  height: 100%;
}

.page-home .tech-tile-logo img {
  height: auto;
  max-height: 48px;
  width: auto;
  max-width: 100%;
}

/* —— Homepage compact mockups / sections —— */
.page-home .capability-dark {
  padding: clamp(1.2rem, 2.2vw, 1.7rem) 0;
}

.page-home .sel-section {
  padding: clamp(1.25rem, 2vw, 1.75rem) 0 clamp(1.15rem, 1.8vw, 1.6rem);
}

.page-home .featured-case-section {
  padding: clamp(1.4rem, 2.4vw, 2.05rem) 0;
}

.page-home .cta-section {
  padding: clamp(1.35rem, 2.2vw, 1.9rem) 0 0.55rem;
}

.page-home .home-stats {
  padding-bottom: clamp(1.2rem, 2vw, 1.7rem);
}

.page-home .enq-section {
  padding: clamp(1.5rem, 2.4vw, 2.15rem) 0;
}

.page-home .tech-tile {
  min-height: 108px;
  padding: 0.85rem 0.7rem 0.75rem;
}

@media (min-width: 720px) {
  .page-home .tech-tile {
    min-height: 114px;
  }
}

@media (min-width: 1024px) {
  .page-home .tech-tile {
    min-height: 120px;
  }
}

.page-home .admin-cap-visual {
  min-height: 0;
  max-width: 100%;
}

.page-home .admin-phone {
  max-width: min(176px, 42vw);
}

@media (max-width: 1023px) {
  .page-home .admin-phone {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: min(220px, 70%);
  }
}

.page-home .fcase-visual,
.page-home .fcase-card,
.page-home .build-app,
.page-home .sel-card,
.page-home .cta-panel,
.page-home .home-stats-panel,
.page-home .enq-card {
  max-width: 100%;
}

.page-home .fcase-table-card {
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 767px) {
  .page-home .fcase-table-card th,
  .page-home .fcase-table-card td {
    white-space: normal;
  }

  .page-home .enq-visual {
    display: none !important;
  }

  .page-home .enq-badge {
    white-space: normal;
  }

  .page-home .hero-actions .hero-btn,
  .page-home .cta-btn {
    max-width: 100%;
  }
}

@media (max-width: 479px) {
  .page-home .hero-btn {
    width: 100%;
  }

  .page-home .hero-phone {
    min-width: 0;
    width: min(28%, 104px);
  }

  .page-home .sel-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep decorative orbs from inflating layout */
.page-home .tech-bg,
.page-home .fcase-bg,
.page-home .admin-cap-bg,
.page-home .enq-bg,
.page-home .sel-bg {
  overflow: hidden;
  max-width: 100%;
}

/* —— Inner public pages —— */
.work-page-feature,
.work-page-feature-media,
.work-page-feature-body,
.service-detail,
.cases-list article,
.process-page-section,
.about-page-section {
  max-width: 100%;
  min-width: 0;
}

.project-grid-page .project-media {
  min-height: 0;
}

.work-page-feature-media {
  min-height: 0;
}

.form-grid {
  min-width: 0;
}

.form-field,
.form-field input,
.form-field select,
.form-field textarea,
.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea {
  max-width: 100%;
}

@media (max-width: 639px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .footer-legal {
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .work-feature,
  .work-page-feature {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 359px) {
  .page-home .capability-dark-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .page-home .fcase-orb,
  .page-home .tech-orb,
  .page-home .admin-cap-orb,
  .page-home .enq-orb {
    display: none;
  }

  .page-home .sel-hand {
    transform: none;
    font-size: 1.12rem;
  }
}

table {
  max-width: 100%;
}
