/* ==========================================================================
   NEXOMIK — coming soon
   Tokens → base → backdrop → layout → components → motion → a11y
   ========================================================================== */

@font-face {
  font-family: "NX Display";
  src: url("fonts/inter-display-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "NX Text";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "NX Text";
  src: url("fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #08090b;
  --ink: #f3f5f8;
  --ink-2: #a3acba;      /* supporting copy   ≈ 8:1 on --bg */
  --ink-3: #7c8696;      /* footer, hints     ≈ 5:1 on --bg */
  --silver: #c7ceda;
  --line: rgba(199, 206, 218, 0.14);
  --line-strong: rgba(199, 206, 218, 0.26);
  --blue: #4c7dff;
  --blue-soft: #7fa2ff;

  --font-display: "NX Display", "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "NX Text", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
          text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(76, 125, 255, 0.35);
  color: #fff;
}

p,
h1 {
  margin: 0;
}

.sr-only {
  position: absolute;
  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;
}

/* ---------- Backdrop (fixed, non-interactive) ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Ambient blue light: two slow-drifting pools, transform-only animation */
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.ambient::before {
  left: 50%;
  top: -42%;
  width: 130vmax;
  height: 90vmax;
  background: radial-gradient(closest-side, rgba(48, 92, 255, 0.15), rgba(48, 92, 255, 0.05) 55%, transparent);
  transform: translateX(-50%);
  animation: drift-a 32s ease-in-out infinite alternate;
}
.ambient::after {
  left: -28%;
  bottom: -42%;
  width: 95vmax;
  height: 75vmax;
  background: radial-gradient(closest-side, rgba(70, 130, 230, 0.08), transparent);
  animation: drift-b 40s ease-in-out infinite alternate;
}

/* Extremely faint grid, faded toward the edges */
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(180, 200, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 200, 235, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 46%, #000 0%, transparent 76%);
          mask-image: radial-gradient(ellipse 72% 62% at 50% 46%, #000 0%, transparent 76%);
}

/* Fine grain to keep the dark gradients from banding */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* Cursor light — moved with transform only (compositor friendly) */
.cursor-light {
  position: absolute;
  left: 0;
  top: 0;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  background: radial-gradient(closest-side, rgba(88, 138, 255, 0.09), rgba(88, 138, 255, 0.03) 55%, transparent);
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: transform;
}
.cursor-light.is-active {
  opacity: 1;
}

/* ---------- Layout ---------- */
.site-header,
.site-footer,
.stage {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: calc(var(--gutter) * 0.75) var(--gutter) 0;
  padding-top: max(calc(var(--gutter) * 0.75), env(safe-area-inset-top));
}

.site-footer {
  padding: 0 var(--gutter) calc(var(--gutter) * 0.75);
  padding-bottom: max(calc(var(--gutter) * 0.75), env(safe-area-inset-bottom));
}

.stage {
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vh, 96px) var(--gutter);
  overflow-x: clip; /* the orbit is wider than small screens; never let it widen the page */
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 62rem;
  text-align: center;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}
.brand-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink);
}
.brand-by {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

/* ---------- Announcement label ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--silver);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.2;
}
.label-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-soft);
  animation: ping 3.4s ease-out 2s infinite;
}

/* ---------- Headline & copy ---------- */
.headline {
  margin-top: clamp(26px, 4.2vh, 40px);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.2rem + 6vw, 6.25rem);
  font-weight: 300;
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: balance;
}
.headline-line {
  display: block;
}

.lede {
  max-width: 34rem;
  margin-top: clamp(22px, 3.4vh, 32px);
  color: var(--ink-2);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.1875rem);
  line-height: 1.62;
  text-wrap: balance;
}

/* ---------- Footer ---------- */
.footer-text {
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

/* ---------- Orbital symbol (behind the headline) ---------- */
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(1120px, 175vw);
  aspect-ratio: 1;
  margin: calc(min(1120px, 175vw) / -2) 0 0 calc(min(1120px, 175vw) / -2);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 58%, transparent 100%);
}
.orbit-shift {
  width: 100%;
  height: 100%;
  will-change: transform;
}
.orbit-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.spin {
  transform-origin: 500px 500px;
}
.spin-a {
  animation: spin-cw 110s linear infinite;
}
.spin-b {
  animation: spin-ccw 170s linear infinite;
}

/* ---------- Motion ---------- */
@keyframes drift-a {
  from { transform: translateX(-50%) translate3d(-4%, 0, 0); }
  to   { transform: translateX(-50%) translate3d(4%, 3%, 0); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(8%, -5%, 0); }
}
@keyframes spin-cw  { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(127, 162, 255, 0.45); }
  70%,
  100% { box-shadow: 0 0 0 10px rgba(127, 162, 255, 0); }
}

/* One orchestrated entrance. Hidden states live inside the keyframes, so
   with animation removed (reduced motion, print) everything is simply visible. */
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes resolve {
  from { opacity: 0; filter: blur(8px); transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes orbit-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.reveal {
  animation: rise 1.1s var(--ease) both;
  animation-delay: var(--d, 0s);
}
.reveal-soft {
  animation: fade 1.6s ease both;
  animation-delay: var(--d, 0s);
}
.headline-line {
  animation: resolve 1.4s var(--ease) both;
  animation-delay: var(--d, 0s);
}
.orbit-svg {
  animation: orbit-in 2.8s var(--ease) 0.1s both;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .label {
    font-size: 10.5px;
    letter-spacing: 0.18em;
    padding: 8px 13px 8px 12px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .stage {
    padding-block: 28px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .cursor-light {
    display: none;
  }
}

/* ---------- Forced colors / high contrast ---------- */
@media (forced-colors: active) {
  .label {
    border-color: CanvasText;
  }
}
