/* The landing page: the lock, with the product running next to it (js/landing.js).
   Loaded after app.css, whose .pin-* and .lock-msg rules it builds on. */

#lock.landing {
  position: relative;
  display: block;
  place-items: normal; /* app.css centres #lock, which block layout honours too */
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(90% 80% at 72% 40%, #0d131b 0%, var(--bg) 70%);
}

/* a faint PCB grid that fades out */
#lock.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(122 167 255 / .045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(122 167 255 / .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 70% at 65% 45%, #000, transparent);
  mask-image: radial-gradient(80% 70% at 65% 45%, #000, transparent);
}

.landing .hero { position: absolute; inset: 0 0 0 44%; z-index: -1; pointer-events: none; }
.landing .hero-canvas { display: block; width: 100%; height: 100%; }

.landing .lock-card {
  width: min(680px, 46%);
  max-width: none;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 16px 32px clamp(24px, 6vw, 104px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  box-sizing: border-box;
}

.eyebrow { margin: 0 0 18px; color: var(--muted); font: 600 11.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; }

/* --lit: 0..1, written by neon_ignite */
.landing .lock-card h1.neon {
  --lit: 0;
  margin: 0;
  font: 800 clamp(52px, 8vw, 108px)/.95 var(--sans);
  letter-spacing: -.025em;
  color: color-mix(in srgb, #fff2dc calc(var(--lit) * 100%), #2a2f36);
  text-shadow:
    0 0 10px rgb(255 160 50 / calc(var(--lit) * .75)),
    0 0 34px rgb(255 120 0 / calc(var(--lit) * .5)),
    0 0 90px rgb(255 100 0 / calc(var(--lit) * .35));
}

.tagline { margin: 22px 0 0; max-width: 22em; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.35; color: var(--text); }
.tagline em { font-style: normal; color: var(--muted); }

.flow { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); font: 12px/1.4 var(--mono); }
.flow li + li::before { content: "→"; padding: 0 9px; color: var(--faint); }

.unlock {
  margin-top: 38px;
  padding: 18px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(16 19 24 / .66);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.landing .lock-sub { margin: 0 0 12px; color: var(--muted); }
.landing .pin-row { justify-content: flex-start; }
.landing .lock-actions { margin: 0; }
.unlock-foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.landing .lock-msg { margin: 0; min-height: 0; }

.hero-caption { margin: 26px 0 0; max-width: 100%; display: grid; gap: 5px; font: 11.5px/1.5 var(--mono); color: var(--faint); min-height: 56px; }
.hero-caption .cap-name { color: var(--muted); }
.cap-hex { display: flex; flex-wrap: wrap; gap: 0 6px; }
.cap-hex i { font-style: normal; animation: byte-in .5s both; animation-delay: calc(var(--i) * 35ms); }

@keyframes byte-in {
  0% { opacity: 0; color: var(--accent); }
  40% { opacity: 1; color: #bcd2ff; }
  100% { opacity: 1; color: var(--faint); }
}

/* phones and narrow panes: the stack on top, the PIN under it */
@media (max-width: 860px) {
  #lock.landing { display: flex; flex-direction: column; }
  .landing .hero { position: relative; inset: auto; flex: 1 1 300px; min-height: 230px; width: 100%; order: 0; }
  .landing .lock-card {
    order: 1;
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    padding: 0 16px max(20px, env(safe-area-inset-bottom));
    align-items: center;
    text-align: center;
  }
  .eyebrow { margin-bottom: 12px; }
  .landing .lock-card h1.neon { font-size: clamp(46px, 14vw, 72px); }
  .tagline { margin-top: 12px; font-size: 16px; }
  .flow { display: none; }
  .unlock { margin-top: 20px; padding: 14px 12px; }
  .landing .pin-row { justify-content: center; }
  .hero-caption { margin-top: 14px; justify-items: center; min-height: 50px; }
  .cap-hex { justify-content: center; }
}

@media (max-width: 400px) {
  .landing .pin-box { width: 42px; height: 52px; }
}

/* loading or unreachable: where the PIN boxes will be, a light runs along 16 pixels */
.wake { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 328px; max-width: 100%; height: 60px; }
.wake i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: wake 1.6s linear infinite;
  animation-delay: calc(var(--i) * 100ms - 1.6s);
}
@keyframes wake {
  0% { opacity: 1; box-shadow: 0 0 10px var(--accent); }
  45%, 100% { opacity: .14; box-shadow: none; }
}

/* keyboard up, or a very low window: the text gives way, never the rings */
@media (max-height: 560px) and (max-width: 860px) {
  .landing .hero { flex: 1 1 96px; min-height: 96px; }
  .landing .hero-caption, .landing .tagline, .landing .eyebrow { display: none; }
  .landing .lock-card h1.neon { font-size: 34px; }
  .landing .unlock { margin-top: 10px; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cap-hex i { animation: none; }
  .wake i { animation: none; opacity: .4; }
}
