/*
Theme Name: Sellmark Thermal Hunt Landing
Theme URI: https://sellmark.com/
Author: Sellmark Marketing
Description: A cinematic full-screen night-field landing page with a hidden pig, coyote, and wolf thermal activation sequence.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: sellmark-thermal-hunt
*/

:root {
  --sellmark-field-bg: url('assets/images/night-field-background.png');
  --thermal-hot: #fff7a8;
  --thermal-yellow: #ffd45c;
  --thermal-orange: #ff8a2a;
  --thermal-red: #f23b20;
  --optic-blue: #9bd7ff;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: #020812;
}

body {
  overflow: hidden;
}

.sellmark-hunt {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background-color: #020812;
  background-image: var(--sellmark-field-bg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: filter 900ms ease, transform 900ms ease;
}

.sellmark-hunt::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 34%, rgba(0, 3, 10, .16) 78%, rgba(0, 2, 7, .48) 100%),
    linear-gradient(180deg, rgba(0, 8, 20, .04), rgba(0, 2, 9, .18));
}

.sellmark-hunt::after {
  content: '';
  position: absolute;
  inset: -6%;
  z-index: 2;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: screen;
  background-image:
    repeating-linear-gradient(0deg, rgba(164, 213, 245, .035) 0 1px, transparent 1px 4px);
  animation: sellmark-grain 8s steps(2, end) infinite;
}

.hunt-layer,
.hunt-effects,
.hunt-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hunt-paths {
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.track-path {
  fill: none;
  stroke: rgba(150, 215, 255, .58);
  stroke-width: .13;
  stroke-linecap: round;
  stroke-dasharray: .45 1.05;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(83, 178, 246, .7));
  opacity: 0;
}

.stage-pig-complete .track-pig-coyote {
  opacity: 1;
  animation: sellmark-trail 1.15s ease forwards;
}

.stage-coyote-complete .track-coyote-wolf {
  opacity: 1;
  animation: sellmark-trail 1.15s ease forwards;
}

.scan-sweep {
  position: absolute;
  top: -18%;
  bottom: -18%;
  left: -34%;
  z-index: 5;
  width: 25%;
  pointer-events: none;
  opacity: 0;
  transform: skewX(-10deg);
  background: linear-gradient(90deg, transparent, rgba(112, 204, 255, .035) 22%, rgba(151, 222, 255, .38) 50%, rgba(112, 204, 255, .05) 76%, transparent);
  filter: blur(.4px) drop-shadow(0 0 12px rgba(81, 180, 255, .45));
}

.stage-scanning .scan-sweep {
  opacity: 1;
  animation: sellmark-scan 1.25s cubic-bezier(.2,.65,.35,1) forwards;
}

.thermal-target {
  position: absolute;
  z-index: 7;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  background: transparent;
  appearance: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.thermal-target:focus-visible {
  outline: 1px solid rgba(183, 226, 255, .85);
  outline-offset: 8px;
  border-radius: 10px;
}

/* Pig aligns with the thermal hog already built into the artwork. */
.target-pig {
  left: 25.2%;
  top: 58.3%;
  width: clamp(108px, 13.5vw, 228px);
  height: clamp(78px, 10vw, 166px);
}

/* Coyote appears in the valley after the first scan. */
.target-coyote {
  left: 61.5%;
  top: 62%;
  width: clamp(130px, 17vw, 278px);
  height: clamp(88px, 11vw, 182px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.82);
  transition: opacity 500ms ease, transform 650ms cubic-bezier(.2,.8,.2,1);
}

/* Wolf appears on the distant ridge for the final lock. */
.target-wolf {
  left: 77.2%;
  top: 43%;
  width: clamp(126px, 16vw, 268px);
  height: clamp(90px, 11.5vw, 192px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.75);
  transition: opacity 540ms ease, transform 720ms cubic-bezier(.2,.8,.2,1);
}

.stage-coyote .target-coyote,
.stage-coyote-complete .target-coyote,
.stage-wolf .target-coyote,
.stage-complete .target-coyote {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.stage-wolf .target-wolf,
.stage-complete .target-wolf {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.stage-coyote .target-coyote,
.stage-wolf .target-wolf {
  pointer-events: auto;
}

.animal-svg {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  overflow: visible;
  filter:
    drop-shadow(0 0 5px rgba(255, 248, 181, .95))
    drop-shadow(0 0 13px rgba(255, 129, 38, .9))
    drop-shadow(0 0 27px rgba(241, 48, 27, .6));
}

.animal-body {
  fill: url('#thermalGradient');
  stroke: rgba(255, 247, 180, .95);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.target-wolf .animal-body {
  fill: url('#thermalGradientWolf');
}

.thermal-core {
  opacity: .52;
  fill: rgba(255, 255, 220, .86);
  filter: blur(2px);
}

.target-lock {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(158, 220, 255, .55));
}

.target-lock::before,
.target-lock::after,
.lock-corners::before,
.lock-corners::after {
  content: '';
  position: absolute;
  width: 23%;
  height: 23%;
  border-color: rgba(183, 227, 255, .9);
  border-style: solid;
}

.target-lock::before {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.target-lock::after {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.lock-corners::before {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.lock-corners::after {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}

.target-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  aspect-ratio: 1;
  border: 1px solid rgba(165, 222, 255, .78);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 13px rgba(81, 177, 244, .38), inset 0 0 13px rgba(81, 177, 244, .24);
}

.target-ring::before,
.target-ring::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(185, 229, 255, .82);
  transform: translate(-50%, -50%);
}

.target-ring::before { width: 138%; height: 1px; }
.target-ring::after { width: 1px; height: 138%; }

.target-pig .target-lock {
  inset: 15% 8% 12%;
}

.target-pig.is-next .target-lock,
.target-coyote.is-next .target-lock,
.target-wolf.is-next .target-lock,
.thermal-target.is-confirmed .target-lock {
  opacity: 1;
}

.thermal-target.is-next .target-lock {
  animation: sellmark-lock-breathe 1.6s ease-in-out infinite;
}

.thermal-target.is-next .target-ring {
  animation: sellmark-ring 1.35s ease-out infinite;
}

.target-coyote.is-next .animal-svg,
.target-wolf.is-next .animal-svg {
  animation: sellmark-thermal-pulse 1.45s ease-in-out infinite;
}

.target-pig.is-next::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  width: 52%;
  height: 42%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 239, 155, .22), rgba(255, 117, 35, .10) 42%, transparent 72%);
  filter: blur(4px);
  animation: sellmark-pig-heat 1.4s ease-in-out infinite;
}

.thermal-target.is-confirmed {
  pointer-events: none;
}

.thermal-target.is-confirmed .target-lock {
  animation: sellmark-lock-confirm 520ms ease forwards;
}

.focus-beam {
  position: absolute;
  z-index: 6;
  left: 77.2%;
  top: 43%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 12px 3px rgba(186, 232, 255, .9), 0 0 42px 12px rgba(80, 178, 246, .44);
}

.stage-wolf .focus-beam {
  opacity: 1;
  animation: sellmark-focus-ping 1.65s ease-out infinite;
}

.activation-flash {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 77% 43%, rgba(220, 244, 255, .84), rgba(97, 190, 255, .18) 24%, transparent 48%),
    #020914;
}

.stage-complete {
  filter: contrast(1.08) saturate(1.05) brightness(1.05);
  transform: scale(1.018);
}

.stage-complete .activation-flash {
  animation: sellmark-activate 1.05s ease forwards;
}

.stage-error {
  animation: sellmark-error 420ms ease;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.admin-bar .sellmark-hunt {
  top: 32px;
  height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
}

@keyframes sellmark-scan {
  0% { left: -34%; opacity: 0; }
  10% { opacity: .8; }
  80% { opacity: .72; }
  100% { left: 118%; opacity: 0; }
}

@keyframes sellmark-trail {
  0% { stroke-dashoffset: 8; opacity: 0; }
  16% { opacity: .9; }
  100% { stroke-dashoffset: 0; opacity: .68; }
}

@keyframes sellmark-lock-breathe {
  0%, 100% { transform: scale(.92); opacity: .55; }
  50% { transform: scale(1.045); opacity: 1; }
}

@keyframes sellmark-ring {
  0% { transform: translate(-50%, -50%) scale(.72); opacity: .9; }
  80%, 100% { transform: translate(-50%, -50%) scale(1.38); opacity: 0; }
}

@keyframes sellmark-lock-confirm {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(.76); opacity: 1; }
  100% { transform: scale(.84); opacity: .35; }
}

@keyframes sellmark-thermal-pulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(255,248,181,.9)) drop-shadow(0 0 13px rgba(255,129,38,.78)) drop-shadow(0 0 24px rgba(241,48,27,.48)); }
  50% { filter: drop-shadow(0 0 8px rgba(255,255,216,1)) drop-shadow(0 0 22px rgba(255,139,35,1)) drop-shadow(0 0 42px rgba(241,48,27,.78)); }
}

@keyframes sellmark-pig-heat {
  0%, 100% { opacity: .48; transform: translate(-50%, -50%) scale(.88); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes sellmark-focus-ping {
  0% { transform: scale(.2); opacity: 1; }
  70%, 100% { transform: scale(42); opacity: 0; }
}

@keyframes sellmark-activate {
  0% { opacity: 0; }
  28% { opacity: .82; }
  58% { opacity: .28; }
  100% { opacity: 1; background-color: #01050c; }
}

@keyframes sellmark-error {
  0%, 100% { filter: none; }
  40% { filter: saturate(.45) brightness(.7); }
}

@keyframes sellmark-grain {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(-1.2%, .7%); }
  50% { transform: translate(.9%, -1%); }
  75% { transform: translate(.5%, .6%); }
}

@media screen and (max-width: 782px) {
  body.admin-bar .sellmark-hunt {
    top: 46px;
    height: calc(100vh - 46px);
    min-height: calc(100dvh - 46px);
  }

  .sellmark-hunt {
    background-position: 45% center;
  }

  .target-pig {
    left: 24%;
    top: 59%;
    width: 118px;
    height: 98px;
  }

  .target-coyote {
    left: 59%;
    top: 64%;
    width: 145px;
    height: 104px;
  }

  .target-wolf {
    left: 78%;
    top: 45%;
    width: 140px;
    height: 104px;
  }
}

@media screen and (max-width: 520px) and (orientation: portrait) {
  .sellmark-hunt {
    background-size: auto 100%;
    background-position: 39% center;
  }

  .target-pig { left: 18%; top: 58%; }
  .target-coyote { left: 56%; top: 64%; }
  .target-wolf { left: 82%; top: 43%; }
}

@media (prefers-reduced-motion: reduce) {
  .sellmark-hunt::after,
  .scan-sweep,
  .track-path,
  .thermal-target,
  .thermal-target::after,
  .target-lock,
  .target-ring,
  .animal-svg,
  .focus-beam,
  .activation-flash,
  .stage-error {
    animation: none !important;
    transition: none !important;
  }
}
