/* ---------------------------------------------------------------
   Kazoo Labs — landing page
   Layout: full-bleed photo behind a vignette scrim; wordmark and
   contact centred in the free row, product links pinned to the foot.
   --------------------------------------------------------------- */

@font-face {
  font-family: "Horizon";
  src: url("../fonts/horizon.woff2") format("woff2"),
       url("../fonts/horizon.otf") format("opentype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --dim: rgba(255, 255, 255, 0.70);
  --faint: rgba(255, 255, 255, 0.72);

  --font-display: "Horizon", "Michroma", "Arial Black", "Helvetica Neue", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 28px;
  padding:
    calc(34px + env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    calc(28px + env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));

  /* 82-byte blurred placeholder paints before the photo arrives */
  background: #02030a url("data:image/webp;base64,UklGRkoAAABXRUJQVlA4ID4AAABQAwCdASogABYAPu1krE6ppa2iKA1RsB2JaQDPoBhBZ3SzoAD+8KESoHMVbFj+UoTsLFm4AdF22YQcwqAAAA==") center / cover no-repeat;

  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ---- background layers ---- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.sky img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% 50%;   /* keeps the Milky Way core in frame on tall screens */
  filter: brightness(1.18) saturate(1.12) contrast(1.04);
  transform: scale(1.03);
  animation: drift 90s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes drift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to   { transform: scale(1.11) translate3d(-1.6%, -1.1%, 0); }
}

.twinkle {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 44% at 50% 45%,
      rgba(0, 0, 0, 0.46) 0%,
      rgba(0, 0, 0, 0.18) 52%,
      rgba(0, 0, 0, 0) 78%),
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0.34) 0%,
      rgba(0, 0, 0, 0) 24%,
      rgba(0, 0, 0, 0) 64%,
      rgba(0, 0, 0, 0.5) 100%);
}

/* ---- content ---- */

main {
  display: grid;
  justify-items: center;
  gap: clamp(22px, 3.4vw, 36px);
  text-align: center;
  max-width: 100%;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 6.9vw, 5.2rem);
  line-height: 1.06;
  letter-spacing: 0.08em;
  text-indent: 0.08em;          /* re-centres against the trailing letter-space */
  text-wrap: balance;
  text-shadow:
    0 0 60px rgba(150, 170, 255, 0.22),
    0 0 20px rgba(0, 0, 0, 0.7),
    0 2px 40px rgba(0, 0, 0, 0.85);
}

.contact {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 10px;
  font-size: clamp(0.7rem, 1.5vw, 0.88rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85);
}

.contact .label::after { content: ":"; }

.contact a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact a:hover,
.contact a:focus-visible { border-bottom-color: #fff; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px clamp(18px, 4.4vw, 48px);
  font-size: clamp(0.64rem, 1.2vw, 0.76rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

footer a {
  color: var(--faint);
  text-decoration: none;
  padding: 4px 2px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
  transition: color 0.3s ease;
}

footer a:hover,
footer a:focus-visible { color: #fff; }

a:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.8);
  outline-offset: 5px;
  border-radius: 2px;
}

/* ---- entrance ---- */

/* `backwards`, not `both`: the resting state is fully visible, so if the
   animation never runs the page is still correct. */
main, footer {
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
footer { animation-delay: 0.25s; }

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

/* Phones: stack the wordmark so each word can take the full width.
   One word per line roughly doubles the type size over a single line. */
@media (max-width: 480px) {
  .wordmark span { display: block; }
  .wordmark {
    font-size: clamp(2.2rem, 14.4vw, 4.4rem);
    line-height: 1.0;
    letter-spacing: 0.06em;
    text-indent: 0.06em;
  }
  .contact { font-size: 0.78rem; }
  main { gap: clamp(26px, 6vw, 38px); }
}

/* Narrow phones: tighten the footer so all three domains hold one line. */
@media (max-width: 430px) {
  footer {
    gap: 8px 14px;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
  }
  .contact { letter-spacing: 0.16em; }
}

@media (prefers-reduced-motion: reduce) {
  .sky img { animation: none; transform: scale(1.03); }
  main, footer { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
