/* Custom site styles (edit freely — not regenerated by Tailwind).
   Load after css/styles.css so brand tokens from @theme are available. */

@layer base {
  html { overflow-x: hidden; scroll-behavior: smooth; }
  body { margin: 0; font-family: var(--font-sans); color: var(--color-ink); background: #fff; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
  img { max-width: 100%; display: block; }
  h1, h2, h3 { font-family: var(--font-display); margin: 0; }
  p { line-height: 1.75; color: var(--color-navy); }
  a { color: inherit; }
  section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
}

@layer components {
  .z-1 { z-index: 1; }
  .z-2 { z-index: 2; }
  .wrap { max-width: 1440px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

  /* Buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .02em; padding: .95rem 1.9rem; border-radius: 30px; text-decoration: none; white-space: nowrap; box-shadow: 0 4px 10px rgb(0 0 0 / .25); transition: transform .15s; }
  .btn:hover { transform: translateY(-2px); }
  .btn-red { background: linear-gradient(116deg, var(--color-red-1) 0%, var(--color-red-2) 100%); color: #fff; }
  .btn-blue { background: var(--color-blue); color: #fff; }

  /* Section heading style */
  .hx { font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.9rem); color: var(--color-navy); line-height: 1.15; }
  .hx .lt { font-weight: 300; }
  .hx .sky { color: var(--color-sky); }

  /* Overlapping wave divider */
  .wave-overlap { position: absolute; left: 50%; bottom: 0; width: 105%; transform: translate(-50%, 55%); line-height: 0; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 100%); mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 100%); }

  /* ===== Hero ===== */
  .hero { background: var(--color-navy); position: relative; padding: 0 0 120px; z-index: 10; overflow: visible; }
  .hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 1400px 1400px at 78% -10%, rgb(255 255 255 / .06), transparent 100%), radial-gradient(ellipse 1100px 1100px at 8% 110%, rgb(255 255 255 / .05), transparent 100%); }
  .hero-mark { position: absolute; top: 50%; right: -2%; transform: translateY(-50%); width: 44%; max-width: 680px; height: auto; opacity: .18; z-index: 1; pointer-events: none; }
  .hero-topbar { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 48px; padding: 22px 0; font-size: clamp(0.9rem, 2.5vw, 1.275rem); color: #dbe3f5; }
  .hero-topbar .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--color-lime); display: inline-block; margin-right: 12px; }
  .hero-topbar-right { display: flex; gap: 52px; align-items: center; }
  .hero-navpill { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 0 18px; }
  .hero-navpill img { height: 68px; max-width: 100%; object-fit: contain; }
  .hero-cta { background: var(--color-lime); color: #fff; font-weight: 800; font-family: var(--font-display); font-size: 1.05rem; padding: 16px 32px; border-radius: 26px; text-decoration: none; }
  .hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; margin-top: 56px; }
  .hero h1 { color: #fff; font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-weight: 800; line-height: 1.08; }
  .hero-lead { color: #d7deee; font-size: 1.1rem; line-height: 1.65; max-width: 520px; margin: 20px 0 28px; }
  .trust-badges { display: flex; align-items: center; gap: 26px; margin-top: 52px; flex-wrap: wrap; }
  .trust-badges img { height: 58px; display: block; max-width: 100%; object-fit: contain; }
  .yt-wrap { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; }
  .yt-wrap iframe { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%) scale(1.62); border: 0; pointer-events: none; }
  @media (max-width: 920px) {
    .hero-grid { grid-template-columns: 1fr; margin-top: 32px; }
    .hero-topbar { padding: 14px 0; gap: 20px; }
    .hero-topbar-right { display: none; }
    .hero-navpill { padding: 12px 0; justify-content: center; }
    .hero-cta { display: none; }
    .hero-navpill img { height: 44px; }
    .trust-badges { background: rgb(255 255 255 / .95); border-radius: 14px; padding: 12px 6px; gap: 0; flex-wrap: nowrap; justify-content: space-between; width: 100%; margin-top: 28px; }
    .trust-badges img { height: 30px; padding: 0 12px; border-right: 1px solid rgb(20 20 20 / .15); }
    .trust-badges img:last-child { border-right: none; }
  }
  @media (max-width: 480px) {
    .hero-grid .btn { width: 100%; justify-content: center; text-align: center; }
  }

  /* ===== Checkmark lists ===== */
  .guarantee-check { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-direction: column; gap: 1.2rem; }
  .guarantee-check li { display: flex; gap: 14px; align-items: flex-start; }
  .guarantee-check li::before { content: '\2713'; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--color-lime); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }

  /* ===== Reviews slider ===== */
  .rev-mark { position: absolute; top: 46%; right: -2%; transform: translateY(-50%); width: 30%; max-width: 400px; height: auto; opacity: .14; z-index: 0; pointer-events: none; }
  .rev-inner { opacity: 1; transition: opacity .22s ease; }
  .rev-slider { display: flex; align-items: center; justify-content: center; gap: 22px; max-width: 100%; margin: 0 auto; padding: 32px 16px 40px; overflow: visible; }
  .rev-slot { flex: none; width: 250px; min-height: 250px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12); border-radius: 20px; padding: 26px 24px; transition: all .4s ease; opacity: .5; transform: scale(.86); position: relative; text-align: left; }
  .rev-slot .q { font-family: Georgia, serif; font-weight: 800; font-size: 2.8rem; color: rgb(255 255 255 / .4); line-height: 1; margin-bottom: 8px; }
  .rev-slot p { color: #e7ecf8; font-size: .95rem; font-weight: 500; line-height: 1.65; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .rev-slot .stars { color: #ffc72c; font-size: 1.15rem; letter-spacing: 4px; }
  .rev-slot--active { width: 360px; min-height: 300px; background: linear-gradient(155deg, var(--color-sky), var(--color-blue)); border-color: transparent; opacity: 1; transform: scale(1.08); box-shadow: 0 30px 55px rgb(5 10 30 / .4); z-index: 2; }
  .rev-slot--active .q { color: rgb(255 255 255 / .6); font-size: 3.2rem; }
  .rev-slot--active p { color: #fff; font-size: 1.05rem; font-weight: 600; -webkit-line-clamp: 7; line-clamp: 7; }
  .rev-slot--active .stars { color: #fff; }
  .rev-slot--active::after { content: ''; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 18px solid var(--color-blue); }
  .rev-nav { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 2rem; }
  .rev-arrow { width: 46px; height: 46px; border-radius: 50%; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .28); color: #fff; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
  .rev-arrow:hover { background: var(--color-lime); border-color: var(--color-lime); }
  .rev-google-dot { width: 54px; height: 54px; border-radius: 50%; background: #fff; padding: 11px; box-shadow: 0 12px 26px rgb(0 0 0 / .28); flex: none; }
  .rev-active-name { display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-top: 1.4rem; }
  .rev-active-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
  .rev-avatar--initials { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-family: var(--font-display); font-size: .85rem; border-radius: 50%; }
  @media (max-width: 900px) {
    .rev-slot { display: none; }
    .rev-slot--active { display: block; width: 90vw; max-width: 360px; min-height: auto; padding: 22px 20px 20px; transform: scale(1); }
    .rev-slot--active p { -webkit-line-clamp: 5; line-clamp: 5; font-size: .95rem; line-height: 1.6; margin-bottom: 12px; }
    .rev-slot--active .q { font-size: 2.6rem; margin-bottom: 4px; }
    .rev-nav { margin-top: 1.8rem; gap: 20px; }
    .rev-active-name { margin-top: 1rem; font-size: 1.05rem; }
    .rev-slot[data-pos="-1"], .rev-slot[data-pos="1"] { display: none; }
  }
  @media (max-width: 720px) {
    .rev-slot[data-pos="-1"], .rev-slot[data-pos="1"] { display: none; }
    .rev-slot--active { width: 92vw; max-width: 340px; transform: scale(1); padding: 18px 18px 16px; }
    .rev-slot--active p { font-size: .9rem; line-height: 1.55; -webkit-line-clamp: 5; line-clamp: 5; margin-bottom: 10px; }
  }
  @media (max-width: 768px) {
    [data-hover-card] .aspect-\[1\/0\.8\],
    .aspect-\[1\/0\.8\],
    [data-hover-zoom] .aspect-\[1\/0\.72\],
    .aspect-\[1\/0\.72\] {
      aspect-ratio: 16 / 9.5 !important;
    }
    [data-hover-card] {
      max-width: 440px;
      margin-inline: auto;
    }
    .quote-field input,
    .quote-field textarea {
      font-size: 16px !important;
    }
  }

  /* ===== Auto-scroll gallery ===== */
  .gallery-track-wrap { margin-top: 2rem; overflow: hidden; width: 100%; max-width: 100vw; position: relative; }
  .gallery-track { display: flex; gap: 0; width: max-content; animation: galleryScroll 42s linear infinite; }
  .gallery-track .cell { flex: none; width: clamp(200px, 18vw, 320px); aspect-ratio: 4/3; overflow: hidden; }
  .gallery-track .cell img { width: 100%; height: 100%; object-fit: cover; }
  @keyframes galleryScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (max-width: 900px) { .gallery-track .cell { width: 52vw; } }

  /* ===== Quote form ===== */
  .quote-field input, .quote-field textarea { font-family: var(--font-sans); font-size: .95rem; color: var(--color-navy); background: #fff; border: 1px solid #d8dfec; border-radius: 10px; padding: .75rem 1rem; outline: none; transition: border-color .2s; width: 100%; box-sizing: border-box; }
  .quote-field input::placeholder, .quote-field textarea::placeholder { color: rgb(41 67 128 / .55); }
  .quote-field input:focus, .quote-field textarea:focus { border-color: var(--color-blue); }
  .quote-field textarea { resize: vertical; min-height: 88px; }
  .quote-check { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--color-navy); }
  .quote-check input { width: 18px; height: 18px; flex: none; accent-color: var(--color-lime); }
  .quote-submit { align-self: flex-start; background: var(--color-navy); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .95rem; border: none; padding: .9rem 2.2rem; border-radius: 30px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; transition: transform .2s, background .2s; margin-top: .3rem; }
  .quote-submit:hover { background: var(--color-blue); transform: translateY(-2px); }
  @media (max-width: 550px) {
    .quote-submit { width: 100%; justify-content: center; }
  }

  /* ===== Mobile bottom app nav (light, sticky) ===== */
  .bottom-nav { display: none; }
  @media (max-width: 920px) {
    body { padding-bottom: 84px; }
    .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fbfbfc; border-top: 1px solid rgb(20 20 20 / .08); box-shadow: 0 -8px 24px rgb(10 20 50 / .08); padding: 8px 6px calc(10px + env(safe-area-inset-bottom, 0px)); align-items: center; justify-content: space-between; }
    .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: #82878f; font-size: .68rem; font-family: var(--font-sans); font-weight: 600; padding: 6px 3px; transition: color .22s ease; }
    .bottom-nav a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
    .bottom-nav a:active svg { transform: scale(.85); }
    .bottom-nav a.active { color: var(--color-blue); }
    .bottom-nav .bn-phone { flex: 0 0 72px; margin-top: -36px; }
    .bottom-nav .bn-phone .bn-phone-circle { position: relative; width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(140deg, #4eeb8c 0%, #16a651 55%, #0d7d3d 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -6px rgb(22 166 81 / .5), 0 0 0 5px #fff; transition: transform .18s cubic-bezier(.34, 1.56, .64, 1); }
    .bottom-nav .bn-phone:active .bn-phone-circle { transform: scale(.9); }
    .bottom-nav .bn-phone .bn-phone-circle svg { width: 24px; height: 24px; fill: #fff; stroke: none; }
    .bottom-nav .bn-phone span { margin-top: 7px; font-weight: 700; color: var(--color-ink); }
  }
}

/* ============================================================
   Motion layer - subtle scroll reveals and hover polish
   Nothing hides unless JS is running (html.anim-ready), so the
   page stays fully readable with JS off or on older browsers.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  html.anim-ready [data-anim] {
    opacity: 0;
    transform: translateY(26px);
    transition:
      opacity .75s cubic-bezier(.22, .61, .36, 1),
      transform .75s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--anim-d, 0ms);
  }
  html.anim-ready [data-anim="fade"]  { transform: none; }
  html.anim-ready [data-anim="left"]  { transform: translate3d(-28px, 0, 0); }
  html.anim-ready [data-anim="right"] { transform: translate3d(28px, 0, 0); }
  html.anim-ready [data-anim="zoom"]  { transform: scale(.965); }

  html.anim-ready [data-anim].is-in {
    opacity: 1;
    transform: none;
  }

  /* Slow zoom-out on framed photos as they come into view */
  html.anim-ready [data-anim-img] > img,
  html.anim-ready [data-anim-img] img.anim-img {
    transform: scale(1.09);
    transition: transform 1.3s cubic-bezier(.22, .61, .36, 1);
  }
  html.anim-ready [data-anim-img].is-in > img,
  html.anim-ready [data-anim-img].is-in img.anim-img {
    transform: none;
  }

  /* "We're open" status dot - gentle live pulse */
  .heroA .topbar-mini .dot,
  .hero-topbar .dot {
    animation: hwnzPulse 2.8s ease-out infinite;
  }
  @keyframes hwnzPulse {
    0%   { box-shadow: 0 0 0 0 rgba(136, 190, 0, .55); }
    70%  { box-shadow: 0 0 0 9px rgba(136, 190, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(136, 190, 0, 0); }
  }
}

/* ===== Hover polish (pointer devices only) ===== */
@media (hover: hover) and (pointer: fine) {

  /* Service cards - lift and deepen */
  .svc-grid .card,
  [data-hover-card] {
    transition:
      transform .35s cubic-bezier(.22, .61, .36, 1),
      box-shadow .35s ease;
  }
  .svc-grid .card:hover,
  [data-hover-card]:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 46px rgba(5, 10, 30, .3);
  }
  .svc-grid .card .ph img,
  [data-hover-card] img {
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
  }
  .svc-grid .card:hover .ph img,
  [data-hover-card]:hover img {
    transform: scale(1.06);
  }

  /* Reassurance photo cards - image drifts in behind the caption */
  .standard .cards a img,
  [data-hover-zoom] img {
    transition: transform .8s cubic-bezier(.22, .61, .36, 1);
  }
  .standard .cards a:hover img,
  [data-hover-zoom]:hover img {
    transform: scale(1.07);
  }

  /* Scrolling job gallery - pause on hover, lift the hovered frame */
  .gallery-track-wrap:hover .gallery-track {
    animation-play-state: paused;
  }
  .gallery-track .cell img {
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
  }
  .gallery-track .cell:hover img {
    transform: scale(1.07);
  }

  /* Buttons - existing lift, plus a softer shadow bloom */
  .btn {
    transition:
      transform .25s cubic-bezier(.22, .61, .36, 1),
      box-shadow .25s ease;
  }
  .btn-red:hover  { box-shadow: 0 14px 26px rgba(193, 24, 29, .38); }
  .btn-blue:hover { box-shadow: 0 14px 26px rgba(50, 109, 175, .38); }

  /* Service card footer CTA */
  .svc-grid .card .cta,
  [data-hover-card] .cta {
    transition: background-color .25s ease;
  }
  .svc-grid .card:hover .cta {
    background: var(--blue, #326daf);
  }

  /* Nav quote button */
  .heroA .navpill .cta,
  .hero-cta {
    transition: transform .25s cubic-bezier(.22, .61, .36, 1), box-shadow .25s ease;
  }
  .heroA .navpill .cta:hover,
  .hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(136, 190, 0, .4);
  }

  /* Form fields */
  .quote-field input,
  .quote-field textarea {
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .quote-field input:focus,
  .quote-field textarea:focus {
    box-shadow: 0 0 0 3px rgba(91, 168, 219, .18);
  }
}
