/* Palminia LLC — production styles
   Base resets, keyframes, responsive rules, and every interactive state
   (hover / focus / active) that the design relies on. Layout and colour
   values remain inline on the elements so the rendering is unchanged. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: #52707C;
  font-family: 'Nunito Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #C4181D; text-decoration: none; }
a:hover { color: #7E0F11; }
input::placeholder, textarea::placeholder { color: #99AFB6; }
img { max-width: 100%; }

@keyframes sbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sbFabRing { 0% { transform: scale(1); opacity: .5; } 70% { transform: scale(1.55); opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes sbFabIn { from { opacity: 0; transform: translateY(14px) scale(.85); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tyRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tyPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Interactive states ---------- */
.nav-link:hover { color: #C4181D; }
.footer-link {
  position: relative;
  display: inline-block;
  width: fit-content;
  transition: color .22s ease, transform .22s ease;
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: #C4181D;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.footer-link:hover,
.footer-link:focus-visible { color: #FFFFFF; transform: translateX(3px); }
.footer-link:hover::after,
.footer-link:focus-visible::after { transform: scaleX(1); }

.btn-cta {
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.btn-cta:hover { transform: translateY(-2px); filter: brightness(.94); color: #FFFFFF; }
.btn-cta:active { transform: translateY(0); filter: brightness(.92); }

.btn-outline { transition: transform .2s ease, border-color .2s ease; }
.btn-outline:hover { transform: translateY(-2px); border-color: #C4181D; }

.btn-ghost { transition: transform .2s ease, background .2s ease; }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,.18); color: #FFFFFF; }

.btn-google { transition: transform .2s ease, border-color .2s ease; }
.btn-google:hover { transform: translateY(-2px); border-color: #C4181D; color: #133D4F; }

.logo-link { transition: opacity .2s ease; }
.logo-link:hover { opacity: .78; }

.service-card { transition: transform .25s ease, box-shadow .25s ease; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(19,61,79,.10); }

.review-card { transition: transform .25s ease, box-shadow .25s ease; }
.review-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(19,61,79,.10); }

.contact-card { transition: transform .2s ease; }
.contact-card:hover { transform: translateY(-2px); }

.gallery-item { transition: box-shadow .25s ease; }
.gallery-item:hover { box-shadow: 0 22px 50px rgba(0,0,0,.42); }
.gallery-item img { transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.08); }

.field { transition: border-color .18s ease, box-shadow .18s ease; }
.field:hover { border-color: #C6D3D7; }
.field:focus { border-color: #C4181D; box-shadow: 0 0 0 3px rgba(196,24,29,.13); background: #FFFFFF; outline: none; }

.faq-toggle { transition: background .2s ease; }
.faq-toggle:hover { background: #FCF7F4; }

.lightbox-btn { transition: background .2s ease; }
.lightbox-btn:hover { background: rgba(255,255,255,.22); }

.tab-btn { transition: all .25s ease; }

.rate-btn { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease; }
.rate-btn.is-primary:hover { transform: translateY(-2px); filter: brightness(.94); box-shadow: 0 14px 30px rgba(196,24,29,.36); }
.rate-btn:not(.is-primary):hover { transform: translateY(-2px); border-color: #C4181D; box-shadow: 0 10px 24px rgba(19,61,79,.14); }

.call-fab-body { transition: transform .18s ease, box-shadow .18s ease; }
.call-fab:active .call-fab-body {
  transform: scale(.92);
  box-shadow: 0 4px 12px rgba(126,15,17,.36), inset 0 1.5px 0 rgba(255,255,255,.24);
}

/* ---------- Header (desktop / mobile split) ---------- */
#siteHeader {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 11px 0;
  border-bottom: 1px solid #E7EFF1;
  transition: padding .3s ease, box-shadow .3s ease, transform .32s ease;
}
#siteHeader.is-scrolled {
  padding: 7px 0;
  box-shadow: 0 6px 24px rgba(19,61,79,.10);
  border-bottom: none;
}
#siteHeader.is-hidden { transform: translateY(-100%); }
#headerLogo { height: 58px; width: auto; display: block; transition: height .3s ease; }
#siteHeader.is-scrolled #headerLogo { height: 48px; }
#logoWrap:hover #headerLogo { transform: none; }
.header-phone { color: #133D4F; font-weight: 800; font-size: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.header-phone:hover { color: #C4181D; }
@media (max-width: 1179px) { .header-phone, .header-sep { display: none; } }

.only-mobile { display: none; }
#logoWrap { display: flex; align-items: center; flex: none; }

@media (max-width: 1079px) {
  .only-mobile { display: flex; }
  .only-desktop { display: none !important; }
  #siteHeader { padding: 17.5px 0; }
  #siteHeader.is-scrolled { padding: 12.5px 0; }
  #headerLogo { height: 46px; }
  #siteHeader.is-scrolled #headerLogo { height: 40px; }
  #logoWrap {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
  }
}

/* ---------- Trust bar ---------- */
#trustBar { padding: 44px 24px; flex-direction: row; }
.trust-item { padding: 0 24px; flex: 1; }
.trust-item.has-divider { border-right: 1px solid rgba(255,255,255,.22); }
@media (max-width: 1079px) {
  #trustBar { padding: 30px 24px; flex-direction: column; }
  .trust-item { padding: 18px 24px; }
  .trust-item.has-divider { border-right: none; border-bottom: 1px solid rgba(255,255,255,.22); }
}

/* ---------- How it works connector lines ---------- */
.step-line { background: #DCE7EA; }
.step-line.is-edge { background: transparent; }
@media (max-width: 1079px) { .step-line { background: transparent; } }

/* ---------- Media-first split sections ---------- */
.img-first { order: -1; }
@media (max-width: 940px) { .media-mobile-first { order: -1 !important; } }

/* ---------- Hero headline on desktop: fill the column ---------- */
@media (min-width: 941px) {
  #heroCopy h1 {
    font-size: clamp(44px, 4.5vw, 58px) !important;
    line-height: 1.06 !important;
    letter-spacing: -1.4px !important;
    text-wrap: balance !important;
  }
}

/* ---------- Hero headline on small screens ---------- */
@media (max-width: 620px) {
  #heroCopy h1 {
    font-size: clamp(31px, 9.3vw, 46px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.055em !important;
    text-wrap: pretty;
    margin-bottom: 16px !important;
  }
  #heroCopy .hero-eyebrow { margin-bottom: 18px !important; }
}

/* ---------- Recent work grid ---------- */
#recentJobsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(128px, 13.2vw, 172px);
  grid-auto-flow: dense;
  gap: 14px;
}
#recentJobsGrid figure {
  position: relative; margin: 0; overflow: hidden;
  border-radius: 16px; cursor: pointer;
  background: #082A36; box-shadow: 0 14px 32px rgba(0,0,0,.28);
}
#recentJobsGrid figure img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
#recentJobsGrid figure:hover img { transform: scale(1.06); }
#recentJobsGrid figure.is-feature { grid-column: span 2; grid-row: span 2; border-radius: 20px; }
@media (max-width: 980px) { #recentJobsGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  #recentJobsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 32vw, 180px); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #recentJobsGrid figure img, #recentJobsGrid figure:hover img { transition: none; transform: none; }
}

/* ---------- Hero: hybrid mobile order ---------- */
.rr-hero {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head img" "body img";
  column-gap: clamp(36px, 5vw, 64px);
  row-gap: 0;
  align-content: center;
}
.rr-head { grid-area: head; align-self: end; }
.rr-body { grid-area: body; align-self: start; }
.rr-img  { grid-area: img; align-self: center; position: relative; }

@media (max-width: 940px) {
  .rr-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "img" "body";
    row-gap: 28px;
  }
  .rr-head, .rr-body, .rr-img { align-self: auto; }
}

/* Hover zoom wrapper */
.zw { overflow: hidden; border-radius: 24px; }
.zw > img { transition: transform .55s cubic-bezier(.22,.61,.36,1); }
.zw:hover > img { transform: scale(1.045); }
@media (prefers-reduced-motion: reduce) { .zw > img, .zw:hover > img { transition: none; transform: none; } }

/* ---------- Mobile call button ---------- */
#callFab { display: none; }
#callFab.is-visible { display: flex; }
@media (min-width: 1080px) { #callFab.is-visible { display: none; } }

/* ---------- Mobile menu ---------- */
#mobileMenu { display: none; }
#mobileMenu.is-open { display: flex; }

/* ---------- FAQ accordion ---------- */
.faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.faq-item.is-open .faq-body { grid-template-rows: 1fr; }
.faq-chevron { transform: none; transition: transform .3s ease; flex: none; color: #607E88; }
.faq-item.is-open .faq-chevron { transform: rotate(180deg); color: #C4181D; }
.faq-question { color: #133D4F; transition: color .2s ease; }
.faq-item.is-open .faq-question { color: #C4181D; }

/* ---------- Reveal on scroll ---------- */
[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  [data-reveal].is-pending { opacity: 1; transform: none; transition: none; }
  #callFab .call-fab-ring { opacity: 0 !important; }
}

/* Photo hover lift — hero, about, why choose us, what's included */
.img-lift {
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .45s cubic-bezier(.22,.61,.36,1), filter .45s ease;
  will-change: transform;
}
.img-lift:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 30px 64px rgba(27, 47, 99, 0.24);
  filter: saturate(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .img-lift, .img-lift:hover { transition: none; transform: none; }
}

/* Lightbox controls out of thumb-tap zone on phones */
@media (max-width: 700px) {
  .lightbox-btn[data-lb="prev"], .lightbox-btn[data-lb="next"] {
    top: auto !important; bottom: 20px !important; transform: none !important;
    width: 56px !important; height: 56px !important;
    background: rgba(255,255,255,0.18) !important;
  }
  .lightbox-btn[data-lb="prev"] { left: calc(50% - 82px) !important; }
  .lightbox-btn[data-lb="next"] { right: calc(50% - 82px) !important; }
  [data-lb="figure"] { padding-bottom: 84px !important; }
  [data-lb="img"] { max-height: 64vh !important; }
}
