/* Interactik AI · coming soon
   Brand tokens come from the Interactik AI brand kit. main.js reads the
   --ai-* colours from here, so this is the only place they live. */
:root {
  --ink: #0c0c0b;
  --paper: #ffffff;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.5);

  --ai-1: #6ea8ff;
  --ai-2: #2b4acb;
  --ai-3: #8b5cf6;
  --ai-4: #ec6fcf;
  --ai-gradient: linear-gradient(110deg, var(--ai-1), var(--ai-2) 33%, var(--ai-3) 67%, var(--ai-4));

  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  height: 100%;
  /* never scroll sideways; no rubber-band bounce when swiping the field */
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  background-color: var(--ink);
  /* Static glow: shown on its own when motion is reduced or JS is off */
  background-image:
    radial-gradient(60% 55% at 50% 45%, rgba(43, 74, 203, 0.22), transparent 70%),
    radial-gradient(40% 40% at 62% 58%, rgba(139, 92, 246, 0.14), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Interactive field ---------- */
.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Content ---------- */
.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: clamp(2rem, 7vh, 5rem) 1.5rem 1.5rem;
  text-align: center;
}

/* soft dark halo so text stays readable over lit dots */
.stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(760px, 100%);
  height: min(520px, 100%);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(12, 12, 11, 0.78), rgba(12, 12, 11, 0.45) 60%, transparent);
  z-index: -1;
  pointer-events: none;
}

.logo {
  margin: 0;
  line-height: 0;
}

.logo img {
  display: block;
  width: clamp(240px, 56vw, 580px);
  height: auto;
}

.by {
  margin: clamp(0.9rem, 2.4vh, 1.4rem) 0 0;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.desc {
  max-width: 36rem;
  margin: clamp(1.5rem, 4vh, 2.25rem) 0 0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--muted);
  text-wrap: balance;
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(1.75rem, 4.5vh, 2.5rem);
  padding: 0.9rem 1.5rem;
  min-height: 48px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  isolation: isolate;
  transition: box-shadow 0.25s var(--ease);
}

.cta__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* gradient ring that appears on hover/focus */
.cta::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--ai-gradient);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.25s var(--ease);
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--paper);
  z-index: -1;
}

.cta:hover {
  box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.6);
}

.cta:hover::before,
.cta:focus-visible::before { opacity: 1; }

.cta:focus-visible {
  outline: 3px solid var(--ai-1);
  outline-offset: 4px;
}

.cta__icon { transition: transform 0.25s var(--ease); }
.cta:hover .cta__icon { transform: translate(2px, -2px); }

.footer {
  position: relative;
  z-index: 1;
  padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.875rem;
  color: var(--faint);
}

.footer p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Logo intro (see assets/logo-intro.js) ---------- */
.logo { position: relative; }

.logo img { transition: opacity 0.45s var(--ease); }

.logo__intro {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.logo__intro.is-out { opacity: 0; }

.field { transition: opacity 1.4s var(--ease); }

.intro .logo img,
.intro .field { opacity: 0; }

.intro .by,
.intro .desc,
.intro .cta {
  opacity: 0;
  transform: translateY(10px);
}
/* footer only fades: moving it down would push the page past the screen */
.intro .footer { opacity: 0; }

.intro.lit .field { opacity: 1; }

.intro.reveal .by,
.intro.reveal .desc,
.intro.reveal .cta,
.intro.reveal .footer {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}
.intro.reveal .desc { transition-delay: 0.1s; }
.intro.reveal .cta { transition-delay: 0.2s; }
.intro.reveal .footer { transition-delay: 0.35s; }

/* ---------- Liquid hover / drag (see assets/liquid.js) ---------- */
.by .w,
.desc .w { display: inline-block; }

.liquid .logo {
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.liquid .logo:active { cursor: grabbing; }
.liquid .cta {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .stage { padding: 1.5rem 1.25rem 1rem; }
  .footer { padding-top: 0.75rem; }
  .logo img { width: min(84vw, 340px); }
  .desc { font-size: 1rem; }
  .cta { width: 100%; max-width: 20rem; justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .cta:hover .cta__icon { transform: none; }
}
