/* Musemind — Coming Soon. Same type system and brand palette as the main site
   (frontend/app/fonts.ts, frontend/app/globals.css): Satoshi for display,
   Albert Sans for body, Space Mono for meta labels only (loaded from
   Google Fonts / Fontshare in index.html). Fluid sizes follow the
   site's `min(Npx, N/19.2 vw)` rule so the 1920 design canvas scales down. */

:root {
  --bg: #050507;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --meta: #e8e6e0;
  --teal: #46bfa0;
  --brand-gradient: linear-gradient(90deg, #19206d 0%, #4077e3 31%, #e489ac 62%, #ffaf56 100%);
  --text-gradient: linear-gradient(90deg, #4077e3 0%, #dc93af 50%, #46bfa0 100%);
  --font-heading: "Satoshi", system-ui, arial, sans-serif;
  --font-body: "Albert Sans", system-ui, arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --gutter: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* One locked screen: exactly the viewport, never scrolls. `dvh` tracks mobile
   browser chrome as it shows/hides; `vh` is the fallback. Every size below
   is capped by BOTH width (vw) and height (svh) so the content always fits. */
html,
body {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ── Backdrop ─────────────────────────────────────────────────────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.glow--blue {
  top: 40%;
  width: min(1180px, 140vw);
  height: min(760px, 90vw);
  background: radial-gradient(closest-side, rgba(64, 119, 227, 0.3), rgba(25, 32, 109, 0.16) 55%, transparent);
  filter: blur(20px);
}
.glow--pink {
  left: 64%;
  top: 66%;
  width: min(640px, 90vw);
  height: min(520px, 70vw);
  background: radial-gradient(closest-side, rgba(228, 137, 172, 0.14), transparent);
  filter: blur(30px);
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: min(72px, 14vw) min(72px, 14vw);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, #000 30%, transparent 100%);
}

#strands {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s ease;
}
#strands.is-ready {
  opacity: 1;
}

/* The horizon the strands converge on — a thin brand-gradient line. */
.horizon {
  position: absolute;
  left: 50%;
  top: 78%;
  width: min(1400px, 120vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(64, 119, 227, 0.7) 30%, rgba(228, 137, 172, 0.7) 60%, transparent);
  box-shadow: 0 0 24px 2px rgba(64, 119, 227, 0.35);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: clamp(12px, 2.6svh, 20px) var(--gutter) 0;
}

.logo {
  display: inline-flex;
  color: var(--ink);
}
.logo svg {
  width: 130px;
  height: 20px;
}

/* ── Pills (house CTA shapes) ─────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: clamp(40px, 6svh, 48px);
  padding: 0 clamp(18px, 5vw, 24px);
  border-radius: 48px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(14px, 4vw, 16px);
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.pill--gradient {
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 10px 30px rgba(64, 119, 227, 0.35);
}
.pill--gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(64, 119, 227, 0.5);
}
.pill--gradient .chev {
  width: 23px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}
.pill--gradient:hover .chev {
  transform: translateX(3px);
}

.pill--outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.pill--outline:hover {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.pill--glass {
  display: none; /* desktop only — mobile keeps the bar to the logo */
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.pill--glass:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

/* ── Stage ────────────────────────────────────────────────────────────── */

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3svh, 48px) var(--gutter) clamp(16px, 6svh, 80px);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: clamp(5px, 1svh, 8px) 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 48px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.6svh, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--meta);
}
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--teal);
  animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  75%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.title {
  margin: clamp(12px, 3svh, 28px) 0 0;
  max-width: 1100px;
  font-family: var(--font-heading);
  font-weight: 700;
  /* 9vw keeps "Something remarkable" on one line; 6.2svh keeps short screens fitting. */
  font-size: clamp(24px, min(9vw, 6.2svh), 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
/* Each line is a mask; its text rises from below (site reveal standard). */
.title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em; /* keeps descenders inside the mask */
}
.title .line > .reveal {
  display: inline-block;
}

.grad {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: clamp(10px, 2.2svh, 20px) 0 0;
  max-width: 520px;
  font-size: clamp(14px, min(3.8vw, 2.2svh), 16px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(8px, 1.4svh, 12px) 12px;
  margin-top: clamp(16px, 4svh, 36px);
}

/* ── Meta bar (hero bottom-bar language) ──────────────────────────────── */

.meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: clamp(6px, 1.4svh, 12px) 24px;
  margin: 0 var(--gutter);
  padding: clamp(10px, 2.4svh, 20px) 0 max(clamp(12px, 2.8svh, 24px), env(safe-area-inset-bottom));
  border-top: 1px solid rgba(232, 230, 224, 0.3);
  font-family: var(--font-mono);
  font-size: clamp(10px, min(3.4vw, 1.6svh), 12px);
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--meta);
}
.meta__item {
  white-space: nowrap;
}
.clock {
  font-variant-numeric: tabular-nums;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px clamp(10px, 3.4vw, 20px);
  order: 3;
  width: 100%;
}
.socials a {
  position: relative;
  color: rgba(232, 230, 224, 0.7);
  transition: color 0.3s ease;
}
.socials a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.socials a:hover {
  color: #fff;
}
.socials a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── Desktop: fluid against the 1920 canvas ───────────────────────────── */

@media (min-width: 768px) {
  .top {
    padding: min(32px, 1.6667vw, 3svh) min(108px, 5.625vw) 0;
  }
  .logo svg {
    width: clamp(130px, 10.83vw, 208px);
    height: clamp(20px, 1.67vw, 32px);
  }
  .pill--glass {
    display: inline-flex;
    height: clamp(38px, min(2.3vw, 5svh), 44px);
  }

  .stage {
    padding: min(80px, 4.1667vw, 4svh) min(108px, 5.625vw) min(140px, 7.2917vw, 9svh);
  }
  .eyebrow {
    font-size: clamp(11px, min(0.7292vw, 1.5svh), 14px);
  }
  .title {
    margin-top: min(36px, 1.875vw, 3.4svh);
    /* Width-led (1920 canvas), but never taller than the screen allows. */
    font-size: clamp(32px, min(5.8333vw, 10.5svh), 112px);
    max-width: min(1300px, 90vw);
  }
  .lead {
    margin-top: min(28px, 1.4583vw, 2.6svh);
    max-width: max(min(640px, 33.3333vw), min(480px, 70vw));
    font-size: clamp(15px, min(1.0417vw, 2.2svh), 20px);
  }
  .actions {
    margin-top: min(48px, 2.5vw, 4.4svh);
    gap: clamp(10px, 0.8333vw, 16px);
  }
  .pill {
    height: clamp(40px, min(2.92vw, 6.4svh), 56px);
    padding: 0 clamp(22px, 1.67vw, 32px);
    font-size: clamp(14px, min(0.94vw, 2.2svh), 18px);
  }

  .meta {
    flex-wrap: nowrap;
    margin: 0 min(108px, 5.625vw);
    padding: min(24px, 1.25vw, 2.4svh) 0 max(min(24px, 1.25vw, 2.4svh), env(safe-area-inset-bottom));
    font-size: clamp(11px, min(0.7292vw, 1.5svh), 14px);
  }
  .socials {
    order: 0;
    width: auto;
    gap: clamp(16px, 1.6667vw, 32px);
  }
}

/* Very short screens (landscape phones): drop the secondary copy so the
   headline + CTAs keep breathing room instead of crushing together. */
@media (max-height: 460px) {
  .lead {
    display: none;
  }
}

/* ── Entrance: items rise from the bottom, staggered by --d ───────────── */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 1.1s var(--ease-out) both;
    animation-delay: calc(0.2s + var(--d, 0) * 0.12s);
  }
  .title .reveal {
    animation-name: rise-masked;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
  }
  @keyframes rise-masked {
    from {
      transform: translateY(110%);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot::after {
    animation: none;
  }
}
