/* ==========================================================================
   HERO KIT — qu.ai hero design level (shared, dependency-free)
   Reference: Instagram reel DfRaUziOLLU (@ngocbuildswebsites) showing the
   Quai Network site qu.ai — hero only. See README.md for the
   adapted-vs-copied list and the limits of the reference.
   No external dependencies. No webfonts. No images. No external URLs.
   System font stacks only.
   ========================================================================== */

:root {
  --qu-black: #000000;
  --qu-red: #e5322d;
  --qu-red-deep: #8c0f0b;
  --qu-red-glow: rgba(229, 50, 45, 0.55);
  --qu-ice: #dfe9f5;
  --qu-ice-dim: #aab8cc;
  --qu-muted: #8a93a3;
  --qu-line: rgba(223, 233, 245, 0.28);
  --qu-font-display: "Arial Narrow", "Helvetica Neue", Helvetica, Arial,
    system-ui, sans-serif;
  --qu-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, system-ui, sans-serif;
  --qu-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* --- Hero shell ---------------------------------------------------------- */
.qu-hero {
  position: relative;
  min-height: 100svh;
  background: #000;
  color: var(--qu-ice);
  overflow: hidden;
  font-family: var(--qu-font-body);
  isolation: isolate;
}

/* Red glow / haze: layered radial gradients, no images. */
.qu-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(229, 50, 45, 0.28) 0%, rgba(140, 15, 11, 0.16) 38%, transparent 68%),
    radial-gradient(ellipse 90% 40% at 50% 108%, rgba(229, 50, 45, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

.qu-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* --- Top bar ------------------------------------------------------------- */
.qu-hero__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
}

.qu-hero__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--qu-ice);
  text-decoration: none;
  font-family: var(--qu-font-display);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 15px;
  text-transform: uppercase;
  white-space: nowrap;
}

.qu-hero__logo-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1.5px solid var(--qu-ice);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--qu-ice);
}

.qu-hero__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Elongated-hexagon pill: clip-path polygon, transparent fill, thin outline.
   (Reference shape: stretched hexagon, pointed left/right ends.) */
.qu-hero__pill,
.qu-hero__nav a,
.qu-hero__nav button {
  --qu-pill-bg: rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  font-family: var(--qu-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--qu-ice);
  background: var(--qu-pill-bg);
  border: 0;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  cursor: pointer;
  white-space: nowrap;
}
/* Visible outline for a clipped element: a slightly larger hexagon behind it. */
.qu-hero__pill-wrap {
  position: relative;
  display: inline-flex;
  padding: 1px;
  background: rgba(223, 233, 245, 0.55);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
}
.qu-hero__pill-wrap > .qu-hero__pill { background: rgba(0, 0, 0, 0.72); }
.qu-hero__pill:hover,
.qu-hero__nav a:hover { color: #fff; background: rgba(229, 50, 45, 0.35); }

.qu-hero__hamburger {
  width: 40px;
  height: 34px;
  padding: 0;
  flex-direction: column;
  gap: 5px;
  background: transparent;
}
.qu-hero__hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--qu-ice);
}

/* When the kit styles an EXISTING header/nav instead of building one,
   hero.js adds .qu-hero--nav-styled to the hero and these rules apply. */
.qu-hero--nav-styled > header,
.qu-hero--nav-styled > nav,
.qu-hero--nav-styled header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.qu-hero--nav-styled header a,
.qu-hero--nav-styled nav a {
  font-family: var(--qu-font-display);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* --- Headline block (lower third) ---------------------------------------- */
.qu-hero__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 0 28px 118px;
  text-align: center;
  pointer-events: none;
}
.qu-hero__copy a, .qu-hero__copy button { pointer-events: auto; }

.qu-hero__labels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-family: var(--qu-font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--qu-ice);
}
.qu-hero__labels span + span::before,
.qu-hero__label-rule {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--qu-line);
  margin-right: 18px;
  vertical-align: middle;
}

.qu-hero__headline {
  margin: 0;
  font-family: var(--qu-font-display);
  font-weight: 800;
  font-stretch: condensed;
  font-size: clamp(44px, 8.2vw, 118px);
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qu-ice);
  text-shadow: 0 0 42px rgba(229, 50, 45, 0.35), 0 2px 30px rgba(0, 0, 0, 0.8);
}

/* --- Bottom-left terminal microcopy -------------------------------------- */
.qu-hero__term {
  position: absolute;
  left: 28px;
  bottom: 26px;
  z-index: 5;
  font-family: var(--qu-font-mono);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.08em;
  color: var(--qu-ice-dim);
  text-transform: uppercase;
  text-align: left;
  pointer-events: none;
}
.qu-hero__term .qu-term--red { color: var(--qu-red); }
.qu-hero__term .qu-term--bright { color: var(--qu-ice); }

/* --- Bottom-right explanatory paragraph ---------------------------------- */
.qu-hero__blurb {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 5;
  max-width: 340px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--qu-ice-dim);
  text-align: left;
}

/* --- Skip animation ------------------------------------------------------- */
.qu-hero__skip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 6px 12px;
  font-family: var(--qu-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--qu-ice-dim);
  cursor: pointer;
}
.qu-hero__skip:hover { color: #fff; }
.qu-hero__skip::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.qu-hero__skip[hidden] { display: none; }

/* --- Below-the-hero language (same black / red-glow / huge-type system) --- */
.qu-page {
  background: #000;
  color: var(--qu-ice);
  font-family: var(--qu-font-body);
}
.qu-section {
  position: relative;
  padding: 96px 28px;
  background: #000;
  color: var(--qu-ice);
}
.qu-section--glow {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(229, 50, 45, 0.16) 0%, transparent 65%),
    #000;
}
.qu-h2 {
  margin: 0 0 18px;
  font-family: var(--qu-font-display);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qu-ice);
}
.qu-eyebrow {
  font-family: var(--qu-font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--qu-ice-dim);
}
.qu-eyebrow--red { color: var(--qu-red); }
.qu-lede {
  max-width: 640px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--qu-ice-dim);
}
.qu-rule {
  width: 56px;
  height: 1px;
  background: var(--qu-line);
  border: 0;
  margin: 28px 0;
}
.qu-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 26px;
  font-family: var(--qu-font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--qu-ice);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(223, 233, 245, 0.55);
  cursor: pointer;
}
.qu-btn--red { border-color: var(--qu-red); color: #fff; background: rgba(229, 50, 45, 0.22); }
.qu-btn:hover { background: rgba(229, 50, 45, 0.35); color: #fff; }
.qu-term-inline {
  font-family: var(--qu-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qu-ice-dim);
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 760px) {
  .qu-hero__topbar { padding: 14px 16px; gap: 10px; }
  .qu-hero__nav { display: none; } /* hamburger only on small screens, as in reference */
  .qu-hero__nav.qu-hero__nav--open {
    display: flex;
    position: absolute;
    top: 64px;
    right: 16px;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.9);
    padding: 12px;
  }
  .qu-hero__copy { padding: 0 16px 150px; }
  .qu-hero__labels { font-size: 10px; letter-spacing: 0.22em; gap: 10px; }
  .qu-hero__blurb { display: none; }
  .qu-hero__term { left: 16px; bottom: 64px; font-size: 10px; }
  .qu-hero__skip { bottom: 14px; }
}

/* Reduced motion: the canvas starts at its final state (see hero.js);
   CSS keeps the hero static too. */
@media (prefers-reduced-motion: reduce) {
  .qu-hero__canvas { animation: none; }
}
