/* Site overrides on top of the Webflow CSS (plan 007). Loaded last on every page. */

/* Homepage "Recent projects": 5 per row. The Webflow layout used fixed 214px
   floats + 17px margins, which needs 1155px but the container is ~1140px, so
   the 5th card always wrapped. Below 992px the section is hidden by Webflow. */
@media screen and (min-width: 992px) {
  .hprwcolllist.w-dyn-items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 17px;
  }
  .hprwcolllist.w-clearfix::before,
  .hprwcolllist.w-clearfix::after { content: none; }
  .hprwcollitem { float: none; width: auto; margin-right: 0; }
  .hprecentrw { width: 100%; }
  .hprecentrwimage { display: block; width: 100%; height: auto; aspect-ratio: 215 / 200; object-fit: cover; }
}

/* Portfolio: square thumbnails, centre-cropped from the banner image. */
.prtrwimg { aspect-ratio: 1 / 1; }
.prtrwimg .prtimg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Meet the Team (plan 010): four to a row, square photos, flat cards. */
.teamgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 30px; padding: 40px 0 10px; }
@media screen and (max-width: 991px) { .teamgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 24px; } }
@media screen and (max-width: 479px) { .teamgrid { grid-template-columns: 1fr; } }
.teamcard { min-width: 0; }
.teamphoto { aspect-ratio: 1 / 1; overflow: hidden; background: #111; }
.teamphoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.teamphoto-empty { background: linear-gradient(135deg, #1a1a1a, #0d0d0d); }
.teamname { font-family: "Lexend Deca", sans-serif; font-size: 18px; font-weight: 500; margin: 22px 0 2px; color: #fff; }
.teamrole { font-family: "Lexend Deca", sans-serif; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #9a9a9a; margin-bottom: 12px; }
.teamblurb { font-family: "Lexend Deca", sans-serif; font-size: 13px; line-height: 1.6; color: #d6d6d6; margin: 0; }
.teamlinks { display: flex; gap: 14px; margin-top: 12px; }
.teamlink { font-family: "Lexend Deca", sans-serif; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #fff; text-decoration: none; border-bottom: 1px solid #fff; padding-bottom: 2px; }
.teamlink:hover { color: #50c1e7; border-color: #50c1e7; }
.teamjoin { padding-top: 40px; }
.teamjointext { font-family: "Lexend Deca", sans-serif; font-size: 16px; line-height: 1.6; color: #fff; }
.teamjointext:empty, .teamjointext:empty + a { display: none; }

/* =====================================================================
   Plan 015: mobile homepage.
   "Phone" below means: narrower than 768px, or a phone held sideways
   (short screen + touch), which would otherwise get the desktop 3D hero.
   The same landscape test gates the 3D script (HERO_LOADER in render.ts).
   ===================================================================== */

/* --- Landscape phones 768px+ wide: the phone homepage, not the 3D hero --- */
@media (min-width: 768px) and (max-height: 500px) and (pointer: coarse) {
  .hp3d { display: none; height: 0; }
  .hpall { margin-top: 0; padding-top: 0; }
  .sectionhp { margin-top: 0; }
  .navbar.hp { position: relative; }
  /* the menu's Contact button stays in the header instead of floating over the page */
  .nav-menu-contact { position: absolute; }
  .mobhphead { display: block; padding-top: 0; }
  /* Webflow slides this block up over the 3D hero on scroll; no hero, no slide */
  .sectionhp .wrappersingle { transform: none !important; }
  .mobhphead .paragraph-2 { font-size: 32px; font-weight: 500; line-height: 40px; }
}

/* --- Any phone held sideways: the headline starts near the top of the short screen --- */
@media (max-height: 500px) and (pointer: coarse) {
  .sectionhp .wrapperinner { padding-top: 12px; }
  .sectionhp .mobhphead { padding-top: 0; }
}

/* --- Phones 480-767px wide (mostly held sideways): the header scrolls away with
   the page, as it already does below 480px, instead of covering the content --- */
@media (min-width: 480px) and (max-width: 767px) {
  .navbar.hp { position: relative; }
}

/* --- Section headings on phones: left-aligned, one size --- */
@media (max-width: 767px), (max-height: 500px) and (pointer: coarse) {
  .sectionhp .hphead1,
  .hphead2 {
    display: block;
    text-align: left;
    font-size: 22px;
    line-height: 28px;
    font-weight: 500;
    margin: 0;
    padding: 48px 0 0;
  }
  .sectionhp .hphead1 { padding-top: 40px; }
  .h1line { display: none; }
}

/* --- Services: compact tiles (photo + name, linking to the service page) --- */
@media (max-width: 767px), (max-height: 500px) and (pointer: coarse) {
  .svrwhold {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px 12px;
    padding-top: 18px;
  }
  .svrwhold .svrw,
  .svrwhold .svrw.paddright { margin: 0; padding: 0; border: 0; min-width: 0; }
  .svrwhold .svrwlink { display: block; width: 100%; }
  .svrwhold .svrwimg { aspect-ratio: 1 / 1; overflow: hidden; background: #111; }
  .svrwhold .svrwimg .svrwimage { display: block; width: 100%; min-width: 0; height: 100%; object-fit: cover; }
  .svrwhold .svrwimg .svrwimage:hover { transform: none; opacity: 1; }
  .svrwhold .svrwhead { margin: 0; padding: 10px 0 0; font-size: 14px; line-height: 18px; font-weight: 500; }
  .svrwhold .svrwtext { display: none; }
}
@media (max-width: 479px) {
  .svrwhold { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .svrwhold .svrwimg { aspect-ratio: 4 / 3; }
  .svrwhold .svrw.sv5 { grid-column: 1 / -1; }
  .svrwhold .svrw.sv5 .svrwimg { aspect-ratio: 8 / 3; }
}

/* --- Recent projects: swipeable row below 992px (hidden there by Webflow) --- */
@media (max-width: 991px) {
  .sectionhp { --ip-gutter: 30px; }
  .hphead2 { display: block; }
  .hprecentpro { display: block; padding-top: 16px; }
  .hprwcollwrapper { min-width: 0; }
  .hprwcolllist.w-dyn-items {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--ip-gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: auto;
    margin: 0 calc(-1 * var(--ip-gutter));
    padding: 0 var(--ip-gutter) 2px;
  }
  .hprwcolllist.w-dyn-items::-webkit-scrollbar { display: none; }
  .hprwcolllist.w-clearfix::before,
  .hprwcolllist.w-clearfix::after { content: none; display: none; }
  .hprwcolllist .hprwcollitem,
  .hprwcolllist .hprwcollitem:last-child {
    float: none;
    flex: 0 0 30%;
    width: auto;
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
  }
  .hprwcolllist .hprecentrw { width: 100%; padding-bottom: 0; opacity: 1 !important; }
  .hprwcolllist .hprecentrwhold { overflow: hidden; background: none; }
  .hprwcolllist .hprecentrwimage { background: #111; display: block; width: 100%; min-width: 0; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
  .hprwcolllist .hprecentrwimage:hover { transform: none; opacity: 1; }
  /* no hover on touch screens: the title sits under the photo, always visible */
  .hprwcolllist .hprecenthover { position: static; background: none; transform: none !important; }
  .hprwcolllist .hprecenthead { padding: 10px 0 0; font-size: 14px; line-height: 18px; font-weight: 500; }
}
@media (max-width: 767px) { .hprwcolllist .hprwcollitem, .hprwcolllist .hprwcollitem:last-child { flex-basis: 44%; } }
@media (max-width: 479px) {
  .sectionhp { --ip-gutter: 25px; }
  .hprwcolllist .hprwcollitem, .hprwcolllist .hprwcollitem:last-child { flex-basis: 76%; }
}

/* --- Client quote on the homepage (all widths) --- */
.hpquote { margin: 0; padding: 0; }
.hpquote-text {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 17px;
  line-height: 27px;
  font-weight: 300;
  color: #fff;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  overflow: hidden;
}
.hpquote-who { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 16px; text-align: left; font-size: 12px; line-height: 17px; letter-spacing: .5px; }
.hpquote-name { color: #fff; font-weight: 500; }
.hpquote-role { color: #9a9a9a; }
@media (min-width: 992px) {
  .hasquote .hpbigtext1 .hptext1 { padding-bottom: 22px; }
  .hasquote .hpquote { width: 100%; text-align: right; }
  .hasquote .hpquote-who { align-items: flex-end; text-align: right; }
  /* the large photo moves down to make room for the quote above it */
  .hprelative1.hasquote { padding-bottom: 1080px; }
  .hprelative1.hasquote .hpimage2 { top: auto; bottom: 0; }
}
@media (max-width: 991px) {
  .hprelative1.hasquote .hpbigtext1 { position: static; width: auto; padding-top: 36px; }
  .hprelative1.hasquote .hpimage2 { padding-top: 0; }
  .hasquote .hptext1 { padding-bottom: 18px; }
  .hasquote .hpquote { max-width: 620px; }
}
@media (max-width: 767px), (max-height: 500px) and (pointer: coarse) {
  .hasquote .hptext1 { font-size: 22px; line-height: 28px; font-weight: 500; }
  .hpquote-text { font-size: 16px; line-height: 25px; -webkit-line-clamp: 10; line-clamp: 10; }
}

/* --- Phone contact bar: Call / Email / Contact, fixed to the bottom --- */
.mcta { display: none; }
@media (max-width: 767px), (max-height: 500px) and (pointer: coarse) {
  .mcta {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(0, 0, 0, .94);
    border-top: 1px solid #2b2b2b;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform .25s ease;
    font-family: "Lexend Deca", sans-serif;
  }
  .mcta-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #fff;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .mcta-btn svg { flex: none; }
  .mcta-btn:active { background: #fff; color: #000; }
  .mcta-btn.mcta-primary { background: #fff; color: #000; }
  .mcta-btn.mcta-primary:active { background: #cfcfcf; border-color: #cfcfcf; }
  .mcta-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  /* room under the footer so the bar never covers the last line */
  body { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
  /* steps aside while typing (keyboard open) or while the menu is open */
  html.mcta-off .mcta,
  html:has(.w-nav-button.w--open) .mcta { transform: translateY(calc(100% + 2px)); }
}
@media (max-width: 340px) {
  .mcta { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .mcta-btn { gap: 5px; letter-spacing: .5px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .mcta { transition: none; } }
@media print { .mcta { display: none !important; } }
