* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(#0b1120 0%, #101a33 55%, #16224a 100%);
  color: #e8ecf4;
  padding: 24px;
  overflow: hidden;
}

/* ---------- night sky ---------- */
.sky-night {
  position: fixed; inset: 0; z-index: 0;
  transition: opacity 1.2s ease;
}

.stars span {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #cfe0ff;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 50% { opacity: 0.25; } }


.cloud {
  position: absolute;
  height: 26px;
  border-radius: 999px;
  background: rgba(160, 180, 220, 0.10);
  filter: blur(6px);
  animation: drift 46s linear infinite;
}
.cloud-1 { top: 16%; left: -200px; width: 180px; }
.cloud-2 { top: 31%; left: -300px; width: 260px; animation-duration: 70s; animation-delay: -24s; }
@keyframes drift { to { transform: translateX(135vw); } }

.shooting-star {
  position: absolute;
  width: 130px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0));
  transform: rotate(-24deg);
  transform-origin: right center;
  animation: shoot 0.9s ease-out forwards;
  pointer-events: none;
}
@keyframes shoot {
  0%   { opacity: 1; transform: rotate(-24deg) translateX(0); }
  100% { opacity: 0; transform: rotate(-24deg) translateX(-280px); }
}

/* ---------- ground ---------- */
.ground-night {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 16vh; z-index: 1;
  background: linear-gradient(#131c36, #0a0f22);
  border-top: 1px solid rgba(140, 160, 200, 0.12);
  pointer-events: none;
  transition: opacity 1.2s ease;
}

/* ---------- the doxie ---------- */
.doxie-runner {
  position: fixed;
  bottom: 8.5vh; left: 0;
  z-index: 2;
  width: clamp(280px, 36vw, 440px);
  animation: trot-across 18s linear infinite;
}
@keyframes trot-across {
  from { transform: translateX(-120%); }
  to   { transform: translateX(115vw); }
}

/* ----- hill-line walks: smaller, slower, undulating over the crest ----- */
.doxie-runner.on-hill {
  bottom: 20vh;
  animation-name: trot-hill;
  animation-duration: 24s;
}
@keyframes trot-hill {
  0%   { transform: translateX(-120%) translateY(0) scale(0.72); }
  20%  { transform: translateX(-5vw) translateY(-26px) scale(0.72); }
  40%  { transform: translateX(30vw) translateY(8px) scale(0.72); }
  60%  { transform: translateX(65vw) translateY(-22px) scale(0.72); }
  80%  { transform: translateX(95vw) translateY(6px) scale(0.72); }
  100% { transform: translateX(115vw) translateY(0) scale(0.72); }
}

.doxie { width: 100%; height: auto; display: block; cursor: pointer; transition: transform 0.6s ease; }

.dog-bob { animation: bob 0.55s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.leg {
  transform-box: fill-box;
  transform-origin: 50% 8%;
  animation: leg-swing 0.55s ease-in-out infinite alternate;
  transition: transform 0.4s ease;
}
.leg-a { animation-delay: 0s; }
.leg-b { animation-delay: -0.275s; }
@keyframes leg-swing {
  from { transform: rotate(-22deg); }
  to   { transform: rotate(22deg); }
}

.tail {
  transform-box: fill-box;
  transform-origin: 90% 90%;
  animation: wag 0.38s ease-in-out infinite alternate;
}
@keyframes wag {
  from { transform: rotate(-16deg); }
  to   { transform: rotate(20deg); }
}

.dog-head {
  transform-box: fill-box;
  transform-origin: 18% 82%;
  transition: transform 0.45s ease;
}

.doxie.boop { animation: hop 0.55s ease; }
@keyframes hop {
  30% { transform: translateY(-34px) rotate(-4deg); }
  60% { transform: translateY(0); }
  75% { transform: translateY(-12px); }
}

/* napping */
.doxie-runner.napping,
.doxie-runner.napping .dog-bob,
.doxie-runner.napping .leg { animation-play-state: paused; }
.doxie-runner.napping .leg { animation: none; transform: rotate(72deg); }
.doxie-runner.napping .tail { animation-duration: 1.8s; }
.doxie-runner.napping .doxie { transform: rotate(-6deg) translateY(14px); }

.zzz {
  position: absolute;
  right: 14%; top: -8px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.zzz span {
  display: inline-block;
  color: #bcd2ff;
  font-weight: 700;
  font-size: 22px;
  animation: zfloat 2.6s ease-in infinite;
}
.zzz span:nth-child(2) { animation-delay: 0.5s; font-size: 26px; }
.zzz span:nth-child(3) { animation-delay: 1s; font-size: 30px; }
.doxie-runner.napping .zzz { opacity: 1; }
@keyframes zfloat {
  0%   { transform: translateY(6px) scale(0.7); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(-52px) scale(1.2); opacity: 0; }
}

/* sniffing */
.doxie-runner.sniffing,
.doxie-runner.sniffing .dog-bob,
.doxie-runner.sniffing .leg,
.doxie-runner.sniffing .tail { animation-play-state: paused; }
.doxie-runner.sniffing .dog-head { transform: rotate(20deg) translateY(10px); }

/* zoomies */
.doxie-runner.zoomies { animation-duration: 4.5s; }
.doxie-runner.zoomies .leg { animation-duration: 0.22s; }
.doxie-runner.zoomies .dog-bob { animation-duration: 0.22s; }
.doxie-runner.zoomies .tail { animation-duration: 0.14s; }
.zoom-label {
  position: absolute;
  top: -36px; left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  background: #ffd94d;
  color: #4a2f0b;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}
.doxie-runner.zoomies .zoom-label { opacity: 1; }

/* ---------- content ---------- */
.card {
  text-align: center;
  max-width: 520px;
  position: relative;
  z-index: 3;
  transition: background 0.8s ease, padding 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

.badge {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #9fb3d9;
  border: 1px solid #2b3a5c;
  border-radius: 999px;
  padding: 8px 20px;
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.sub {
  font-size: 17px;
  line-height: 1.6;
  color: #a9b8d4;
  margin-bottom: 32px;
}

.contact {
  display: inline-block;
  color: #e8ecf4;
  text-decoration: none;
  border: 1px solid #3b507c;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  transition: background 0.2s, border-color 0.2s;
}

.contact:hover {
  background: #16223c;
  border-color: #5a739f;
}

footer {
  position: fixed;
  bottom: 20px;
  font-size: 13px;
  color: #5c6f93;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .doxie-runner { animation: none; left: 50%; transform: translateX(-50%); bottom: 12vh; }
  .dog-bob, .leg, .tail, .stars span, .cloud { animation: none; }
  .sky-night, .ground-night { transition: none; }
}

/* ---------- distant hilltop properties ---------- */
.hills {
  position: fixed;
  left: 0; right: 0;
  bottom: 16vh;
  height: 30vh;
  z-index: 1;
  pointer-events: none;
}
.hills svg {
  width: 100%;
  height: 100%;
  display: block;
}
.hill-window { animation: hilltwinkle 3.4s ease-in-out infinite; }
@keyframes hilltwinkle { 50% { opacity: 0.45; } }

/* ---------- sniffing (the star of the show) ---------- */
.sniff-label {
  position: absolute;
  right: 2%; top: 6%;
  transform: rotate(-6deg);
  background: #ffd94d;
  color: #4a2f0b;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 3px 12px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}
.doxie-runner.sniffing .sniff-label { opacity: 1; }
.sniff-puffs {
  position: absolute;
  right: 0; top: 26%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.doxie-runner.sniffing .sniff-puffs { opacity: 1; }
.sniff-puffs span {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(220, 235, 255, 0.85);
  margin-right: 5px;
  animation: pufffloat 1.6s ease-out infinite;
}
.sniff-puffs span:nth-child(2) { animation-delay: 0.35s; }
.sniff-puffs span:nth-child(3) { animation-delay: 0.7s; }
@keyframes pufffloat {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translate(14px, -22px) scale(1.15); opacity: 0; }
}

/* ---------- mobile-first ---------- */
@media (max-width: 600px) {
  body { padding: 14px 10px 10px; }
  .card { padding: 24px 18px 18px; }
  .badge { margin-bottom: 16px; }
  .sub { margin-bottom: 20px; }
  .hint { margin-top: 14px; }
  .hills { bottom: 16vh; height: 38vh; }
  .doxie-runner { width: min(72vw, 440px); bottom: 7vh; }
  .doxie-runner.on-hill { bottom: 25vh; }
  .sniff-label { font-size: 11px; }
}
.hill-lights circle { animation: hilltwinkle 2.6s ease-in-out infinite; }
.hill-lights circle:nth-child(2) { animation-delay: 0.5s; }
.hill-lights circle:nth-child(3) { animation-delay: 1s; }
.hill-lights circle:nth-child(4) { animation-delay: 1.5s; }
.hill-lights circle:nth-child(5) { animation-delay: 2s; }
}

.hill-window { stroke: rgba(0,0,0,0.25); stroke-width: 1; }
