/* =========================================================
   Lucky Doge — sunburst / cloud / game-HUD landing
   Differentiated layout: bottom bubble dock + HUD strip +
   zigzag mission path (not a standard top-nav card grid)
   ========================================================= */

:root {
  --ld-yellow: #ffcc00;
  --ld-yellow-deep: #ffb000;
  --ld-orange: #ff7a00;
  --ld-orange-hot: #ff5500;
  --ld-cream: #fff6e8;
  --ld-cream-2: #ffe9c2;
  --ld-ink: #3d1f0a;
  --ld-ink-soft: #6b3a18;
  --ld-muted: #8a5a32;
  --ld-white: #ffffff;
  --ld-teal: #0a3d4a;
  --ld-teal-mid: #0f5363;
  --ld-teal-deep: #072832;
  --ld-green: #22c55e;
  --ld-green-deep: #16a34a;
  --ld-shadow: 0 12px 28px rgba(61, 31, 10, 0.18);
  --ld-radius-xl: 28px;
  --ld-font-display: "Fredoka", system-ui, sans-serif;
  --ld-font-body: "Nunito", system-ui, sans-serif;
  --ld-hud-h: 64px;
  --ld-dock-h: 78px;
  --ld-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ld-hud-h) + 12px);
  scroll-padding-bottom: calc(var(--ld-dock-h) + 16px);
}

body.ld-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ld-font-body);
  color: var(--ld-ink);
  background: var(--ld-cream);
  line-height: 1.55;
  overflow-x: hidden;
  padding-bottom: calc(var(--ld-dock-h) + 20px);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.ld-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ld-ink);
  color: var(--ld-white);
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.ld-skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---------- Ambient ---------- */
.ld-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ld-sunburst {
  position: absolute;
  top: -20vh;
  left: 50%;
  width: 140vmax;
  height: 140vmax;
  transform: translateX(-50%);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 204, 0, 0.55) 0deg 8deg,
    rgba(255, 140, 0, 0.35) 8deg 16deg
  );
  opacity: 0.55;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 62%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 62%);
  animation: ld-spin 48s linear infinite;
}

.ld-particles span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.55);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: ld-float 7s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes ld-spin {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes ld-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.08);
  }
}

/* ---------- HUD strip (sticky top) ---------- */
.ld-hud {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--ld-hud-h);
  padding: 0.55rem 1rem;
  background: linear-gradient(180deg, var(--ld-yellow) 0%, var(--ld-yellow-deep) 100%);
  border-bottom: 4px solid var(--ld-ink);
  box-shadow: 0 6px 0 rgba(61, 31, 10, 0.12);
}

.ld-hud.is-scrolled {
  box-shadow: 0 10px 24px rgba(61, 31, 10, 0.2);
}

.ld-hud__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-family: var(--ld-font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ld-ink);
  cursor: pointer;
}

.ld-hud__name em {
  font-style: normal;
  color: var(--ld-orange-hot);
}

.ld-hud__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 3px solid var(--ld-ink);
  background: var(--ld-white);
  object-fit: cover;
  flex-shrink: 0;
}

.ld-paw {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ld-orange);
  color: var(--ld-white);
  border: 3px solid var(--ld-ink);
  flex-shrink: 0;
}

.ld-hud__meter {
  flex: 1;
  min-width: 0;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
}

@media (min-width: 640px) {
  .ld-hud__meter {
    display: flex;
  }
}

.ld-hud__meter-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ld-ink-soft);
}

.ld-hud__bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(61, 31, 10, 0.15);
  border: 2px solid var(--ld-ink);
  overflow: hidden;
}

.ld-hud__bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5cad, #ff3d8a 55%, #ff8a00);
  transition: width 120ms linear;
}

.ld-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 3px solid var(--ld-ink);
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-family: var(--ld-font-display);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms var(--ld-ease), box-shadow 180ms var(--ld-ease), filter 180ms;
  box-shadow: 0 5px 0 var(--ld-ink);
  user-select: none;
}

.ld-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.ld-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ld-ink);
}

.ld-btn:focus-visible {
  outline: 3px solid var(--ld-orange);
  outline-offset: 3px;
}

.ld-btn--mini {
  padding: 0.45rem 0.95rem;
  background: linear-gradient(180deg, #3dff8a 0%, var(--ld-green) 55%, var(--ld-green-deep) 100%);
  color: var(--ld-white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.ld-btn--primary {
  background: linear-gradient(180deg, var(--ld-yellow) 0%, var(--ld-orange) 100%);
  color: var(--ld-ink);
}

.ld-btn--store {
  min-width: 160px;
  color: var(--ld-white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.ld-btn--apple {
  background: linear-gradient(180deg, #4b5563 0%, #111827 100%);
}

.ld-btn--google {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 60%, #15803d 100%);
}

/* ---------- Bottom bubble dock ---------- */
.ld-dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid var(--ld-ink);
  border-radius: 999px;
  box-shadow: var(--ld-shadow), 0 6px 0 rgba(61, 31, 10, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ld-dock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 62px;
  padding: 0.35rem 0.45rem 0.25rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ld-ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 180ms var(--ld-ease), color 180ms, transform 180ms;
}

.ld-dock__item:hover {
  color: var(--ld-ink);
  background: rgba(255, 204, 0, 0.35);
}

.ld-dock__item.is-active {
  color: var(--ld-ink);
  background: linear-gradient(180deg, var(--ld-yellow) 0%, var(--ld-orange) 140%);
  transform: translateY(-2px);
}

.ld-dock__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ld-cream);
  border: 2px solid var(--ld-ink);
}

.ld-dock__icon--cta {
  background: linear-gradient(180deg, #3dff8a, var(--ld-green-deep));
  color: var(--ld-white);
}

.ld-dock__item.is-active .ld-dock__icon {
  background: var(--ld-white);
}

/* ---------- Shared section bits ---------- */
#ld-main {
  position: relative;
  z-index: 1;
}

.ld-section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}

.ld-section-head h2 {
  margin: 0.35rem 0 0.65rem;
  font-family: var(--ld-font-display);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15;
  color: var(--ld-ink);
}

.ld-section-head p {
  margin: 0;
  color: var(--ld-muted);
  font-size: 1.05rem;
}

.ld-section-head--dark h2 {
  color: var(--ld-cream);
}

.ld-section-head--dark p {
  color: rgba(255, 246, 232, 0.78);
}

.ld-eyebrow {
  display: inline-block;
  margin: 0 !important;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.15);
  border: 2px solid var(--ld-ink);
  font-family: var(--ld-font-display);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ld-orange-hot);
}

.ld-section-head--dark .ld-eyebrow {
  background: rgba(255, 204, 0, 0.2);
  color: var(--ld-yellow);
  border-color: rgba(255, 246, 232, 0.45);
}

/* Cloud dividers — decorative only; never sit above interactive hero content */
.ld-cloud {
  position: relative;
  height: 72px;
  margin-top: -1px;
  z-index: 0;
  pointer-events: none;
  flex-shrink: 0;
}

.ld-cloud::before,
.ld-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 55%;
  height: 100%;
  background: inherit;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.ld-cloud::before {
  left: -8%;
}

.ld-cloud::after {
  right: -8%;
}

.ld-cloud--hero {
  background: var(--ld-cream);
  /* Soft overlap into gradient only — stage padding keeps CTAs clear */
  margin-top: -28px;
  z-index: 0;
}

.ld-cloud--cream {
  background: var(--ld-teal);
}

.ld-cloud--teal {
  background: var(--ld-teal);
  height: 48px;
}

/* ---------- Hero ---------- */
.ld-hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: calc(100svh - var(--ld-hud-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1rem 0;
  background: linear-gradient(180deg, #ffd84a 0%, #ff9a1a 48%, #ff7a00 100%);
  overflow: visible;
}

.ld-hero__stage {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  justify-items: center;
  /* Clear cloud overlap + breathing room above bottom dock */
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  flex: 1 1 auto;
  align-content: center;
}

.ld-hero__logo {
  width: min(720px, 100%);
  max-height: min(38vh, 320px);
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(61, 31, 10, 0.28));
  animation: ld-breathe 4.5s ease-in-out infinite;
}

@media (min-width: 768px) {
  .ld-hero__logo {
    max-height: min(42vh, 380px);
  }

  .ld-hero__stage {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

@keyframes ld-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.ld-hero__copy {
  text-align: center;
  max-width: 34rem;
}

.ld-hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--ld-font-display);
  font-size: clamp(1.9rem, 5.5vw, 3.1rem);
  line-height: 1.08;
  color: var(--ld-ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}

.ld-hero__lead {
  margin: 0 0 1.35rem;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--ld-ink-soft);
  font-weight: 650;
}

.ld-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ---------- Features / missions zigzag ---------- */
.ld-features {
  position: relative;
  padding: 1rem 1rem 4rem;
  background: var(--ld-cream);
  overflow: hidden;
}

.ld-ink-path {
  display: none;
  position: absolute;
  left: 50%;
  top: 12rem;
  bottom: 4rem;
  width: 80px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.35;
}

.ld-ink-path__line {
  stroke: var(--ld-ink);
  stroke-width: 2.5;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
}

@media (min-width: 900px) {
  .ld-ink-path {
    display: block;
  }
}

.ld-missions {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 920px;
  display: grid;
  gap: 1.25rem;
}

.ld-mission {
  position: relative;
  background: var(--ld-white);
  border: 3px solid var(--ld-ink);
  border-radius: var(--ld-radius-xl);
  padding: 1.35rem 1.35rem 1.35rem 1.5rem;
  box-shadow: 0 8px 0 rgba(61, 31, 10, 0.12), var(--ld-shadow);
}

.ld-mission__badge {
  position: absolute;
  top: -14px;
  left: 1.25rem;
  min-width: 44px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ld-yellow), var(--ld-orange));
  border: 3px solid var(--ld-ink);
  font-family: var(--ld-font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}

.ld-mission__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 0.65rem;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--ld-cream-2), var(--ld-yellow));
  border: 3px solid var(--ld-ink);
  color: var(--ld-ink);
}

.ld-mission h3 {
  margin: 0 0 0.4rem;
  font-family: var(--ld-font-display);
  font-size: 1.35rem;
}

.ld-mission p {
  margin: 0;
  color: var(--ld-muted);
}

@media (min-width: 900px) {
  .ld-missions {
    gap: 2rem;
  }

  .ld-mission {
    width: min(420px, 46%);
  }

  .ld-mission--left {
    justify-self: start;
    margin-left: 2%;
  }

  .ld-mission--right {
    justify-self: end;
    margin-right: 2%;
  }
}

/* ---------- Shots gallery + how-to ---------- */
.ld-shots {
  position: relative;
  padding: 3.5rem 0 4rem;
  color: var(--ld-cream);
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 30%, rgba(255, 204, 0, 0.08) 0%, transparent 35%),
    linear-gradient(180deg, var(--ld-teal-mid), var(--ld-teal-deep));
}

.ld-shots__rail {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.4rem, 1.2vw, 1rem);
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 0.5rem 1rem 0;
  overflow: visible;
}

.ld-phone {
  flex: 1 1 0;
  min-width: 0;
  max-width: 200px;
  margin: 0;
  text-align: center;
}

.ld-phone img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  border-radius: clamp(12px, 2.5vw, 28px);
  border: 3px solid var(--ld-ink);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(255, 204, 0, 0.35);
  background: #f3f3f3;
}

.ld-phone figcaption {
  margin-top: 0.55rem;
  font-family: var(--ld-font-display);
  font-weight: 650;
  font-size: clamp(0.65rem, 1.8vw, 0.95rem);
  letter-spacing: 0.03em;
  color: var(--ld-yellow);
}

.ld-steps {
  display: grid;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .ld-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.ld-step {
  position: relative;
  background: rgba(255, 246, 232, 0.08);
  border: 3px solid rgba(255, 246, 232, 0.35);
  border-radius: var(--ld-radius-xl);
  padding: 1.5rem 1.25rem 1.35rem;
  backdrop-filter: blur(4px);
}

.ld-step__num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ld-yellow), var(--ld-orange));
  border: 3px solid var(--ld-cream);
  color: var(--ld-ink);
  font-family: var(--ld-font-display);
  font-weight: 700;
}

.ld-step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--ld-font-display);
  font-size: 1.2rem;
}

.ld-step p {
  margin: 0;
  color: rgba(255, 246, 232, 0.78);
  font-size: 0.98rem;
}

/* ---------- Download ---------- */
.ld-download {
  padding: 0 1rem 3.5rem;
  background: var(--ld-teal);
}

.ld-download__panel {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(160deg, var(--ld-yellow) 0%, var(--ld-orange) 100%);
  border: 4px solid var(--ld-ink);
  border-radius: 36px;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.25);
}

.ld-download__panel h2 {
  margin: 0.4rem 0 0.65rem;
  font-family: var(--ld-font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--ld-ink);
}

.ld-download__panel > p:not(.ld-eyebrow) {
  margin: 0 0 1.35rem;
  color: var(--ld-ink-soft);
  font-weight: 650;
}

/* ---------- Footer ---------- */
.ld-footer {
  background: var(--ld-teal-deep);
  color: rgba(255, 246, 232, 0.85);
  padding: 2rem 1.25rem calc(1.5rem + var(--ld-dock-h));
  border-top: 3px solid rgba(255, 204, 0, 0.25);
}

.ld-footer__inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.ld-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ld-font-display);
  font-size: 1.15rem;
  color: var(--ld-yellow);
}

.ld-footer__brand img {
  border-radius: 10px;
  border: 2px solid rgba(255, 204, 0, 0.55);
}

.ld-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.ld-footer__links a {
  color: var(--ld-cream);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 180ms;
}

.ld-footer__links a:hover {
  color: var(--ld-yellow);
}

.ld-footer__copy {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 246, 232, 0.55);
}

/* ---------- Modal ---------- */
.ld-modal[hidden] {
  display: none !important;
}

.ld-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.ld-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 40, 50, 0.65);
  cursor: pointer;
}

.ld-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--ld-cream);
  border: 4px solid var(--ld-ink);
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: ld-pop 220ms var(--ld-ease);
}

@keyframes ld-pop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ld-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ld-ink-soft);
  cursor: pointer;
}

.ld-modal__paw {
  color: var(--ld-orange);
  margin-bottom: 0.35rem;
}

.ld-modal__dialog h2 {
  margin: 0 0 0.5rem;
  font-family: var(--ld-font-display);
  font-size: 1.65rem;
}

.ld-modal__dialog p {
  margin: 0 0 1.25rem;
  color: var(--ld-muted);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ld-sunburst,
  .ld-hero__logo,
  .ld-particles span,
  .ld-modal__dialog {
    animation: none !important;
  }

  .ld-btn,
  .ld-dock__item,
  .ld-hud__bar i {
    transition: none !important;
  }
}
