:root {
  --bg: #0b0e2a;
  --panel: rgba(23, 28, 74, 0.72);
  --overlay: rgba(10, 13, 40, 0.68);
  --veil: rgba(11, 14, 42, 0.84);
  --line: rgba(255, 255, 255, 0.1);
  --text: #fff4e2;
  --soft: #d4d7f0;
  --muted: #a6acd6;
  --shiba: #f28a2e;
  --shiba-deep: #b9561a;
  --cream: #fff1dc;
  --on-shiba: #2a1406;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 62px;
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(242, 138, 46, 0.12), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(90, 110, 255, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

:focus-visible {
  outline: 2px solid var(--shiba);
  outline-offset: 3px;
}

/* ---------- the 3D scene fills the whole page ---------- */

.scene {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  cursor: grab;
}

.scene:active {
  cursor: grabbing;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font: 800 15px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s;
}

.btn-primary {
  background: var(--shiba);
  color: var(--on-shiba);
  box-shadow: 0 4px 0 var(--shiba-deep);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--shiba-deep);
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--shiba-deep);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.btn-sm {
  padding: 9px 14px;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  background: rgba(11, 14, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--shiba);
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  transition: background 0.2s;
}

.social:hover {
  background: rgba(255, 255, 255, 0.16);
}

.social svg,
.footer-social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.nav-links a:hover {
  color: var(--text);
}

/* ---------- hero: overlays on top of the scene ---------- */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  grid-template-areas: 'copy .';
  gap: 20px;
  min-height: calc(100svh - var(--nav-h));
  padding: 24px var(--gutter);
  pointer-events: none; /* drags on empty space reach the scene */
}

.hero > * {
  pointer-events: auto;
}

.hero-copy {
  grid-area: copy;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.eyebrow {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(242, 138, 46, 0.16);
  box-shadow: inset 0 0 0 1px rgba(242, 138, 46, 0.35);
  color: #ffc58f;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.eyebrow b {
  font-weight: 800;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(56px, 6.6vw, 100px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 1px;
  color: var(--cream);
  text-shadow: 0 6px 0 #2b2f6b;
}

h1 em {
  font-style: normal;
  color: var(--shiba);
  text-shadow: 0 6px 0 var(--shiba-deep);
}

.lead {
  max-width: 30ch;
  margin: 0;
  color: var(--soft);
  font-size: clamp(17px, 1.4vw, 20px);
  text-shadow: 0 2px 14px rgba(5, 7, 25, 0.9);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stats {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 0.6fr;
  gap: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat + .stat {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.value {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.1;
  white-space: nowrap;
}

.stat-main .value {
  transition: color 0.6s;
  color: var(--shiba);
  font-size: 32px;
}

.stat-main .value.up {
  color: #4ade80;
  transition: none;
}

.stat-main .value.down {
  color: #ff6b6b;
  transition: none;
}

.progress {
  grid-column: 1 / -1;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.progress-row b {
  color: var(--text);
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--shiba), #ffc27a);
}

.ca {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ca code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--soft);
  font: 14px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint {
  position: absolute;
  top: 18px;
  right: var(--gutter);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.6s;
}

.spin-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.spin-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.hint.hide {
  opacity: 0;
}

.toast {
  position: absolute;
  top: 16px;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: min(440px, calc(100% - 32px));
  padding: 12px 20px;
  border-radius: 18px;
  background: var(--cream);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  color: var(--on-shiba);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 0.35s, transform 0.35s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast b {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
}

.toast span {
  font-size: 14px;
  font-weight: 600;
}

.dogcam {
  position: absolute;
  top: 48px;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.4s, transform 0.4s;
}

.dogcam.on {
  opacity: 1;
  transform: none;
}

.dogcam-view {
  width: clamp(190px, 16vw, 250px);
  height: clamp(190px, 16vw, 250px);
  overflow: hidden;
  border: 3px solid var(--shiba);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #26307a, #0b0e2a 75%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.dogcam-view canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.dogcam-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--overlay);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dogcam-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b3b;
  animation: blink 1.2s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.confetti {
  position: fixed;
  left: 50%;
  z-index: 40;
  width: 0;
  height: 0;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  width: 11px;
  height: 16px;
  border-radius: 2px;
}

.live-tag {
  display: none;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  color: #9fe3b0;
}

.live-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: live-pulse 1.6s infinite;
}

.is-live .live-tag {
  display: inline-flex;
}

@keyframes live-pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

/* ---------- below the hero: the scene keeps spinning behind a veil ---------- */

.below {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(11, 14, 42, 0) 0, var(--veil) 220px);
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--gutter) 0;
}

h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 400;
  line-height: 1.05;
  text-wrap: balance;
}

.section-lead {
  margin: 0 0 28px;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.step {
  padding: 26px;
}

.step-num {
  color: var(--shiba);
  font-family: var(--display);
  font-size: 18px;
}

.step h3 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
}

.step p {
  margin: 0;
  color: var(--soft);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.footer-social:hover {
  background: rgba(255, 255, 255, 0.16);
}

.footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'copy'
      '.';
    gap: 12px;
    padding-block: 16px;
  }

  .hero-copy {
    align-self: start;
    gap: 12px;
  }

  .stats {
    grid-template-columns: 1fr 1.25fr 0.6fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .stat + .stat {
    padding-left: 10px;
  }

  .label {
    font-size: 10px;
  }

  .value,
  .stat-main .value {
    font-size: 20px;
  }

  .progress-row {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .bar {
    height: 6px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav .social {
    margin-left: auto;
  }

  .nav {
    gap: 12px;
  }

  .hint {
    display: none;
  }

  .dogcam {
    top: calc(var(--copy-bottom, 260px) + 8px);
  }

  .dogcam-view {
    width: 132px;
    height: 132px;
  }

  .toast {
    top: auto;
    bottom: 76px; /* above the spin button */
  }
}

@media (max-width: 560px) {
  .lead {
    display: none;
  }

  h1 {
    font-size: 52px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .ca {
    padding: 6px 6px 6px 14px;
  }
}

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

  .btn,
  .toast,
  .dogcam {
    transition: none;
  }

  .dogcam-label i,
  .live-tag::before {
    animation: none;
  }
}
