/* Brand system: dark and technical. Logo colors: navy #1d2053, cyan #17d7e2. */
:root {
  /* surfaces, darkest to lightest */
  --bg: #0b0d26;
  --bg-2: rgb(16 19 58 / 0.55);
  --panel: #161a48;
  --panel-2: #1d2053; /* logo navy */
  /* text */
  --text: #eef0fb;
  --muted: #a3a8d1;
  --dim: #7378a8;
  /* lines */
  --line: rgb(23 215 226 / 0.14);
  --line-2: rgb(23 215 226 / 0.32);
  /* accent */
  --cyan: #17d7e2; /* logo cyan */
  --cyan-2: #7ff0f5;

  /* light "product screen" surfaces (chat demo, mockups, forms) */
  --paper: #ffffff;
  --ink: #1d2053;
  --slate: #4a4f72;
  --rule: #d3e6ef;
  --fog: #eef7fa;
  --fog-deep: #dff2f6;
  --cyan-ink: #087d86;

  /* glass */
  --glass: rgb(29 32 83 / 0.38);
  --glass-strong: rgb(22 26 72 / 0.62);
  --glass-edge: rgb(255 255 255 / 0.11);
  --glass-hi: inset 0 1px 0 rgb(255 255 255 / 0.09);
  --blur: blur(28px) saturate(1.5);

  --max: 1200px;
  --font: var(--font-brand), "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--cyan);
  color: var(--bg);
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
button,
input,
textarea {
  font: inherit;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ shared utilities */

/* faint engineering grid behind heroes */
.grid-bg {
  position: relative;
  isolation: isolate;
}
.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(23 215 226 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 215 226 / 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  pointer-events: none;
}

/* cyan corner marks, like a technical drawing */
.frame {
  position: relative;
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0 solid var(--cyan);
  pointer-events: none;
}
.frame::before {
  top: -9px;
  left: -9px;
  border-top-width: 2px;
  border-left-width: 2px;
}
.frame::after {
  bottom: -9px;
  right: -9px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

/* frosted panel */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-hi), 0 24px 48px -28px rgb(0 0 0 / 0.6);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

/* fixed backdrop of logo hexagon rings, seen through the glass panels */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.backdrop svg {
  position: absolute;
  inset: -10% -5%;
  width: 110%;
  height: 120%;
  filter: blur(14px);
}

/* ------------------------------------------------------------------ motion (all of it off under reduced motion) */

/* background rings: slow rotation, and a gentle drift as the page scrolls */
.backdrop .ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: ring-spin 140s linear infinite;
}
.backdrop .ring.reverse {
  animation-duration: 180s;
  animation-direction: reverse;
}
@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}
@supports (animation-timeline: scroll()) {
  .backdrop svg {
    animation: backdrop-drift linear both;
    animation-timeline: scroll(root);
  }
  @keyframes backdrop-drift {
    to {
      transform: translateY(-8%);
    }
  }
}

/* hero entrance: one sequence on load */
.rise {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.rise-2 {
  animation-delay: 0.12s;
}
.rise-3 {
  animation-delay: 0.24s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* light that follows the pointer across glass cards (position set by Pointer.tsx) */
.glow {
  position: relative;
  isolation: isolate;
}
.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgb(23 215 226 / 0.2), transparent 62%);
  z-index: 1;
}
.glow:hover::after {
  opacity: 1;
}

/* a line that draws itself as it scrolls into view */
@supports (animation-timeline: view()) {
  .draw-line::before {
    transform-origin: left;
    animation: draw linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
  }
  @keyframes draw {
    from {
      transform: scaleX(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop .ring,
  .backdrop svg,
  .rise,
  .draw-line::before {
    animation: none !important;
  }
  .glow::after {
    display: none;
  }
}

/* phones: lighter blur keeps scrolling smooth */
@media (max-width: 700px) {
  :root {
    --blur: blur(14px) saturate(1.3);
  }
  .backdrop svg {
    filter: blur(10px);
  }
}
/* visitors who ask for less transparency get solid panels */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass: #161a48;
    --blur: none;
  }
}
