/* Photo features — layered on top of styles.css */

/* ---------- Hero slideshow: crossfade + slow drone drift ---------- */
.hero-slide {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
  background-position: var(--focus, 50% 50%); /* per-photo focus point, set inline on each slide */
  opacity: 0; transition: opacity 1.6s ease;
}
.hero-slide.is-active { opacity: 1; animation: drift 9s ease-out both; }
.hero-slide:nth-child(even).is-active { animation-name: drift-alt; }
@keyframes drift { from { transform: scale(1.08) translate3d(-1.5%, 1%, 0); } to { transform: scale(1) translate3d(0, 0, 0); } }
@keyframes drift-alt { from { transform: scale(1.08) translate3d(1.5%, -1%, 0); } to { transform: scale(1) translate3d(0, 0, 0); } }

/* ---------- Service cards with photos ---------- */
.card-has-photo { padding-top: 0; overflow: hidden; }
.card-photo {
  display: block; width: calc(100% + 48px); max-width: none; margin: 0 -24px 18px;
  aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s;
}
.card-has-photo:hover .card-photo { transform: scale(1.04); }
.card-has-photo .card-icon { margin-top: -44px; position: relative; border: 3px solid var(--white); }

/* ---------- Portfolio ---------- */
.pf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -1rem 0 2rem; }
.pf-chip {
  font: 600 .95rem "Oswald", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  padding: .5em 1.1em; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--navy-800); background: transparent; color: var(--navy-800);
  transition: background .2s, color .2s;
}
.pf-chip:hover { background: rgba(42,52,57,.08); }
.pf-chip.is-on { background: var(--red); border-color: var(--red); color: #fff; }

/* Even grid (not CSS columns): tiles keep a fixed shape, so nothing jumps or splits across
   columns while photos lazy-load, filters change or "Show more" adds a row. */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pf-item {
  display: block; width: 100%; margin: 0; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 3 / 2;
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-800);
  box-shadow: var(--shadow); font: inherit; isolation: isolate;
}
.pf-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; backface-visibility: hidden; }
@media (hover: hover) { .pf-item:hover img { transform: scale(1.05); } }
.pf-item:focus-visible { outline: 3px solid var(--maroon-bright); outline-offset: 2px; }
.pf-item.is-hidden { display: none; }

/* ---------- Photo viewer ---------- */
.photo-box {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(12,15,16,.96); color: #fff;
}
.photo-box[open] { display: flex; align-items: center; justify-content: center; }
.photo-box::backdrop { background: rgba(12,15,16,.96); }
.photo-box figure { margin: 0; max-width: 92vw; text-align: center; }
.photo-box img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.photo-box figcaption { margin-top: 12px; font: 600 .9rem "Oswald", sans-serif; letter-spacing: .14em; color: #b9c3c8; }
.pb-close, .pb-nav {
  position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255,255,255,.1);
  border-radius: 50%; display: grid; place-items: center; transition: background .2s;
}
.pb-close:hover, .pb-nav:hover { background: var(--red); }
.pb-close { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 1.8rem; }
.pb-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 2.2rem; line-height: 1; }
.pb-prev { left: 16px; } .pb-next { right: 16px; }
@media (max-width: 560px) { .pb-nav { top: auto; bottom: 18px; } .pb-prev { left: 30%; } .pb-next { right: 30%; } }

/* ---------- Show more ---------- */
.pf-item.is-more { display: none; }
.pf-more-wrap { text-align: center; margin: 1.5rem 0 0; }

/* ---------- Scott's badge logo ---------- */
.hero-badge {
  display: block; width: clamp(96px, 14vw, 150px); height: auto; margin: 0 0 18px;
  border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 4px rgba(255,255,255,.25);
}
/* Wide screens: the badge sits in the open space to the LEFT of the headline block,
   centered on it, so the text keeps its usual left edge. (Padding is 120 top / 80 bottom,
   hence the +20px to center on the text rather than the padded box.) */
@media (min-width: 1700px) {
  .hero-badge {
    position: absolute; margin: 0;
    width: clamp(150px, calc((100vw - 1140px) / 2 - 140px), 250px);
    right: calc(100% + clamp(36px, 3vw, 60px)); top: calc(50% + 20px); transform: translateY(-50%);
    box-shadow: 0 16px 44px rgba(0,0,0,.55), 0 0 0 5px rgba(255,255,255,.22), 0 0 0 12px rgba(80,0,0,.35);
  }
}
.hometown-badge {
  width: 110px; height: 110px; flex: none; border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 4px rgba(255,255,255,.35);
}
@media (max-width: 700px) { .hometown-badge { width: 84px; height: 84px; } }

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active { animation: none; }
}

/* ---------- Hero slideshow dots ---------- */
.hero-dots { position: absolute; left: 72px; bottom: 64px; display: flex; gap: 8px; z-index: 3; }
.hero-dot {
  width: 26px; height: 6px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
  background: rgba(255,255,255,.35); transition: background .3s, width .3s;
  position: relative;
}
.hero-dot::after { content: ""; position: absolute; inset: -12px -2px; } /* bigger tap target */
.hero-dot:hover { background: rgba(255,255,255,.7); }
.hero-dot[aria-current="true"] { background: var(--maroon-bright); width: 42px; }

/* ---------- Flight progress bar under the header ---------- */
.flight-progress {
  position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, var(--red), var(--maroon-bright));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Filter chip counts ---------- */
.pf-count {
  display: inline-block; min-width: 1.6em; margin-left: .45em; padding: .05em .4em; border-radius: 999px;
  font-size: .72em; line-height: 1.5; letter-spacing: 0; text-align: center;
  background: rgba(42,52,57,.12); color: inherit;
}
.pf-chip.is-on .pf-count { background: rgba(255,255,255,.22); }

/* ---------- Phone action bar ---------- */
.action-bar { display: none; }

/* ---------- Phones ---------- */
@media (max-width: 820px) {
  /* Phones/tablets: a landscape photo in a tall screen is already heavily cropped, so keep the
     take-off pull-back gentle (about 1.11x down to 1x instead of 1.45x) and zoom toward the
     photo's focus point. The drift becomes a soft zoom with no sideways slide. */
  .hero-bg { transform: scale(calc(1 + (var(--zoom, 1.45) - 1) * .25)); transform-origin: 50% 50%; }
  .hero-slide.is-active, .hero-slide:nth-child(even).is-active { animation-name: drift-soft; }
  .hero-dots { left: 50%; bottom: 26px; transform: translateX(-50%); }
}
@media (max-width: 600px) {
  /* Filters: one swipeable row instead of three stacked rows */
  .pf-filters {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
    margin: -1rem -16px 1.25rem; padding: 4px 16px 8px; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
  }
  .pf-filters::-webkit-scrollbar { display: none; }
  .pf-chip { flex: none; scroll-snap-align: center; min-height: 40px; }
  /* Two-up grid so the portfolio isn't one long scroll */
  .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pf-item { border-radius: 10px; }
  .pf-more { width: 100%; }

  .hero-badge { width: 66px; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 3px rgba(255,255,255,.25); }
  .hero .eyebrow { font-size: .72rem; letter-spacing: .1em; }

  .action-bar {
    display: flex; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60;
    padding: 8px; border-radius: 16px; background: rgba(27,33,36,.94);
    box-shadow: 0 10px 30px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transform: translateY(140%); transition: transform .35s ease;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .action-bar.is-up { transform: none; }
  .action-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 11px;
    font: 600 1rem "Oswald", sans-serif; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: #fff;
  }
  .action-call { flex: 0 0 34%; background: rgba(255,255,255,.1); }
  .action-call svg { width: 18px; height: 18px; fill: currentColor; }
  .action-quote { flex: 1; background: var(--red); }
  .site-footer { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .action-bar { transition: none; }
}
@keyframes drift-soft { from { transform: scale(1.04); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none; }
  .hero-slide.is-active { animation: none; }
}

/* ---------- Phones & portrait tablets: "photo card" hero ----------
   Wide drone photos can't fill a tall screen without heavy cropping, so on narrow screens the
   slideshow becomes a full-width 3:2 photo band (whole photo, nothing cut off) with the HUD
   framed inside it, and the badge, headline and buttons sit on a gunmetal panel below.
   The scroll take-off effect is desktop-only; on phones the HUD simply reads 400 FT. */
@media (max-width: 820px) {
  .hero-runway { height: auto; }
  .hero-runway .hero {
    position: relative; height: auto; min-height: 0; display: block; padding-top: 68px;
    background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-900) 62%, #2b1517 100%);
  }
  .hero-bg {
    position: relative; inset: auto; aspect-ratio: 3 / 2; overflow: hidden;
    transform: none !important;
  }
  .hero-slide { background-position: center; }
  .hero-overlay {
    inset: 68px 0 auto 0; height: calc(100vw * 2 / 3);
    background: linear-gradient(0deg, var(--navy-900) 0%, rgba(27,33,36,.35) 22%, transparent 45%);
  }
  .hud { inset: auto; top: 78px; left: 10px; right: 10px; height: calc(100vw * 2 / 3 - 20px); }
  .hud-rec { top: 10px; left: 34px; } .hud-alt { top: 10px; right: 34px; }
  .hud-corner { width: 20px; height: 20px; }

  .hero-dots { left: auto; right: 16px; bottom: auto; top: calc(68px + 100vw * 2 / 3 - 30px); transform: none; }
  .hero-dot { width: 18px; } .hero-dot[aria-current="true"] { width: 30px; }

  .hero-content {
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    margin: 0; padding: 0 16px 40px; max-width: none;
  }
  .hero-badge {
    position: relative; z-index: 2; width: 92px; margin: -46px 0 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 4px var(--navy-900);
  }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3.2rem); line-height: 1.02; }
  .hero .lead { font-size: 1.05rem; line-height: 1.55; }
  .hero-actions { margin-top: 1.4rem; gap: 10px; }
}
@media (min-width: 601px) and (max-width: 820px) {
  .hero-content { padding-inline: 32px; }
  .hero-actions .btn { width: auto; }
}
@media (max-width: 600px) {
  .trust-item strong { font-size: 1rem; }
  .trust-item span { font-size: .8rem; }
}
@media (max-width: 400px) {
  .hero .eyebrow { font-size: .66rem; letter-spacing: .06em; }
}

/* ---------- Desktop hero: let the photos pop ----------
   Lighter tint (dark only behind the headline) and a gentler take-off zoom (1.15x -> 1x
   instead of 1.45x) so the photo stays sharp and full of colour, like the phone layout. */
@media (min-width: 821px) {
  .hero-runway .hero-bg { transform: scale(calc(1 + (var(--zoom, 1.45) - 1) * .33)); }
  .hero-slide { filter: saturate(1.12) contrast(1.06); }
  .hero-runway .hero-overlay {
    background:
      linear-gradient(90deg, rgba(27,33,36,.86) 0%, rgba(27,33,36,.7) 30%, rgba(27,33,36,.3) 50%, rgba(27,33,36,0) 68%),
      linear-gradient(0deg, rgba(27,33,36,.55) 0%, transparent 22%),
      linear-gradient(180deg, rgba(27,33,36,.45) 0%, transparent 18%);
  }
  .hero-runway .hero-content h1, .hero-runway .hero-content .lead, .hero-runway .hero-content .eyebrow { text-shadow: 0 2px 14px rgba(0,0,0,.45); }
}
