/* IMX Media — coming soon
   Brand palette and type taken from the main imxmedia site (black + IMX yellow, Montserrat). */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  --black: #0a0a0a;
  --yellow: #ffd721;               /* the logo's symbol colour */
  --yellow-rgb: 255, 215, 33;
  --white: #ffffff;

  /* Logo size. Its clear space is the cap height of the "I" in the wordmark:
     52 of the logo's 388 viewBox units (≈13.4% of the logo width). Nothing
     may sit closer to the logo than this. */
  --logo-w: clamp(230px, min(72vw, 62vh), 540px);
  --clear: calc(var(--logo-w) * 52 / 388);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;              /* single screen, never scrolls */
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--black);
  color: var(--white);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Background scene ---------- */

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* Oversized well past the largest parallax/idle offset so no edge ever shows. */
.layer--bg { inset: -96px; }

.bg-pattern {
  position: absolute;
  inset: 0;
  background-color: var(--black);
  background-image: url("/assets/pattern-x.webp");
  background-size: 360px 360px;
  background-position: center;
}

/* Darken the outer edges a little so the pattern recedes. */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

.accents { position: absolute; inset: 0; }

.ring,
.dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  border-radius: 50%;
  translate: -50% -50%;
}

.ring {
  width: var(--s);
  height: var(--s);
  border: 1px solid rgba(var(--yellow-rgb), 0.16);
}

.ring--dashed {
  border-style: dashed;
  border-color: rgba(var(--yellow-rgb), 0.12);
}

.dot {
  width: 5px;
  height: 5px;
  background: rgba(var(--yellow-rgb), 0.45);
}

.dot--lg {
  width: 8px;
  height: 8px;
  background: rgba(var(--yellow-rgb), 0.3);
}

/* Floating copies of the brand symbol */
.mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  aspect-ratio: 100 / 132;
  margin-left: calc(var(--s) / -2);
  margin-top: calc(var(--s) * -0.66);
  color: rgba(var(--yellow-rgb), 0.2);
  will-change: transform;
}

.mark__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mark--outline { color: transparent; }
.mark--outline .mark__svg {
  stroke: rgba(var(--yellow-rgb), 0.28);
  stroke-width: 0.8;
}

/* Cursor-following glow */
.glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 70vmax;
  height: 70vmax;
  margin: -35vmax 0 0 -35vmax;
  will-change: transform;
  /* Centred until script.js takes over. */
  transform: translate3d(50vw, 50vh, 0);
}

.glow__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--yellow-rgb), 0.1), rgba(var(--yellow-rgb), 0.035) 45%, transparent 100%);
}

/* ---------- Foreground ---------- */

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}

.content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--clear);             /* logo lockup → label = one clear-space unit */
  will-change: transform;
}

/* Soft wash keeping the logo readable over anything passing behind it. */
.wash {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--logo-w) * 2.3);
  height: calc(var(--logo-w) * 1.45);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 10, 10, 0.94) 0%, rgba(10, 10, 10, 0.8) 45%, rgba(10, 10, 10, 0.35) 75%, rgba(10, 10, 10, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.logo {
  display: block;
  width: var(--logo-w);
  height: auto;
  aspect-ratio: 388 / 140;
}

.pitch {
  margin-top: calc(var(--clear) * 0.45);
  text-align: center;
}

.pitch p { margin: 0; }

.pitch__lead {
  font-size: max(10.5px, calc(var(--logo-w) * 0.027));
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  /* Optical centring: trailing letter-spacing */
  margin-right: -0.28em !important;
}

.pitch__lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  margin-top: 0.75em !important;
  font-size: max(15px, calc(var(--logo-w) * 0.0415));
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.005em;
  color: rgba(255, 255, 255, 0.92);
  max-width: min(92vw, calc(var(--logo-w) * 1.15));
  text-wrap: balance;
}

.pitch__accent { color: var(--yellow); }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin: 0;
  padding: 0.7em 1.25em 0.7em 1.05em;
  border: 1px solid rgba(var(--yellow-rgb), 0.32);
  border-radius: 999px;
  background: rgba(var(--yellow-rgb), 0.06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: clamp(10.5px, 0.42rem + 0.35vw, 12.5px);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1;
}

.soon__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(var(--yellow-rgb), 0.6);
}

.soon__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--yellow);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- Entrance (on inner elements only) ---------- */

.fade-in {
  opacity: 0;
  animation: fade-in 1.6s ease-out forwards;
}
.fade-in--late { animation-delay: 0.35s; animation-duration: 1.8s; }

.rise {
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1.2s var(--ease-out) 0.35s forwards;
}
.rise--late { animation-delay: 0.85s; }

@keyframes fade-in { to { opacity: 1; } }
@keyframes rise    { to { opacity: 1; transform: none; } }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .mark--desktop { display: none; }
  .pitch__lead { letter-spacing: 0.2em; margin-right: -0.2em !important; }
}

@media (max-height: 460px) and (orientation: landscape) {
  :root { --logo-w: clamp(200px, 48vh, 320px); }
}

/* ---------- Reduced motion: static page ---------- */

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .rise {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .soon__dot::after { animation: none; opacity: 0; }
}
