:root {
  --ink: #0b1215;
  --ink-soft: #142026;
  --fog: #c5d5d0;
  --mist: #8fa8a0;
  --amber: #e8a54b;
  --amber-deep: #c47f28;
  --line: rgba(197, 213, 208, 0.16);
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --qr-size: 240px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--fog);
  background: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 15% 10%, rgba(232, 165, 75, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(70, 140, 120, 0.22), transparent 50%),
    linear-gradient(165deg, #0b1215 0%, #101c22 45%, #0b1215 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

@keyframes drift {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.04) translate3d(-1.5%, 1%, 0);
  }
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #f3f7f5;
}

.lede {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--mist);
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.lab-url {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mist);
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.lab-url code {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(20, 32, 38, 0.85);
  border: 1px solid var(--line);
  color: var(--amber);
  font-size: 0.88rem;
  word-break: break-all;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 1.35rem 1.15rem 1.5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 32, 38, 0.55), rgba(11, 18, 21, 0.2));
  transition: border-color 0.25s ease, background 0.25s ease;
}

.platform:hover {
  border-color: rgba(232, 165, 75, 0.35);
  background: linear-gradient(180deg, rgba(28, 42, 48, 0.7), rgba(11, 18, 21, 0.35));
}

.platform-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  order: 2;
}

.platform h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f3f7f5;
}

.platform-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--mist);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 0.55rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  background: var(--amber);
  color: #1a1206;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn-lg {
  margin-top: 1rem;
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

.platform-desktop {
  justify-content: center;
  min-height: calc(var(--qr-size) + 7.5rem);
}

.platform-desktop .platform-copy {
  order: 0;
  justify-content: center;
  flex: 1;
}

.btn:hover {
  background: #f0b862;
  transform: translateY(-1px);
}

.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
  transform: none;
  background: #5c6b66;
  color: #d5e0dc;
}

.status {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--mist);
  min-height: 1.1em;
}

.platform.is-ready .status {
  color: #7dcfb0;
}

.platform.is-missing .status {
  color: #b8a07a;
}

.qr {
  flex: 0 0 auto;
  order: 1;
  width: var(--qr-size);
  height: var(--qr-size);
  padding: 12px;
  background: #f3f7f5;
  border-radius: 14px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
}

.qr img,
.qr canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
}

.qr.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(243, 247, 245, 0.08);
  border: 1px dashed var(--line);
  color: var(--mist);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.75rem;
  box-shadow: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  :root {
    --qr-size: 210px;
  }

  .platforms {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }

  .platform {
    max-width: none;
  }
}

@media (max-width: 420px) {
  :root {
    --qr-size: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .brand,
  .lede,
  .lab-url,
  .platforms {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }
}
