/* ============================================================
   CrossTrigger landing — single-page styling.

   Design reference: Hyperliquid.xyz (display serif, white pill
   nav, teal pastel CTA, generous spacing, premium minimal feel).

   Color tokens
     --teal           : pastel mint (matches HL "Start Trading")
     --teal-deep      : darker teal for text on the pill
     --bg             : near-black fallback
     --card-overlay   : translucent black for the dark card
============================================================ */
:root {
  --teal:        #97FCE4;
  --teal-hover:  #b8ffe9;
  --teal-deep:   #0a3d2e;
  --teal-glow:   rgba(151, 252, 228, 0.18);
  --bg:          #050505;
  --card-overlay: rgba(0, 0, 0, 0.58);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: var(--bg);
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* No-scroll page: everything must fit inside the viewport. The
     hero is sized to height:100vh and content is tuned to fit a
     ~640px-tall viewport without overflow. */
  overflow: hidden;
}

a { color: inherit; }

/* ============================================================
   Background — pixel grid image with a slow left-right sway.
   3.5s each direction, alternate, so a full L→R→L cycle is 7s.
   Subtle (±1.2% translate) to read as "alive but calm".
============================================================ */
.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.background-img {
  position: absolute;
  /* Full-bleed video covers the whole viewport. Slight overscan
     prevents any rounding-induced edge showing on resize. */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* No CSS animation — the video itself drives motion now. */
}

@keyframes sway {
  from { transform: translate3d(-1.2%, 0, 0); }
  to   { transform: translate3d( 1.2%, 0, 0); }
}

/* Soft radial vignette over the bg so the centre is slightly
   darker — pulls focus toward the hero card without adding any
   visible edge or ring. */
.background-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(0, 0, 0, 0)   0%,
    rgba(0, 0, 0, 0)   28%,
    rgba(0, 0, 0, 0.45) 100%
  );
  pointer-events: none;
}

/* ============================================================
   Floating nav pill
============================================================ */
.nav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  width: calc(100% - 40px);
  max-width: 1280px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 8px 12px 8px 8px;
  /* Black pill, slight translucency so the bg pixels still hint
     through under the rounded edges. */
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 10px 30px rgba(0, 0, 0, 0.45);
}

.nav-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #000;
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  /* Bigger: the brackets fill more of the badge so the logo reads
     clearly at the small nav size. */
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 4px;
}

.nav-link {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover { background: rgba(255,255,255,0.08); }

.nav-cta {
  /* All-white text per the spec — outlined pill against the dark
     nav keeps the CTA visually distinct without violating the
     "no gray, all white" text rule. */
  background: transparent;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid #fff;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover  { background: rgba(255,255,255,0.12); }
.nav-cta:active { transform: scale(0.98); }

/* ============================================================
   Hero — full-viewport, content stacked vertically.
============================================================ */
.hero {
  position: relative;
  z-index: 1;
  /* Fixed viewport height: page must NOT scroll. Content sizes
     below are tuned so the whole hero fits inside this height
     down to ~640px-tall viewports. */
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Asymmetric padding (more bottom than top) shifts the centred
     stack visually upward — the user wanted the blob slightly
     higher on the page. */
  padding: 60px 24px 110px;
  /* Half the previous gap so the title sits closer to the blob. */
  gap: 10px;
}

/* ---------- Blob + logo ---------- */
.blob-wrapper {
  position: relative;
  /* 15% larger than before (150 → ~173). Both the morphing path
     and the inline <image> logo scale proportionally because they
     live inside the same SVG viewBox. */
  width: 173px;
  height: 173px;
  display: grid;
  place-items: center;
}

.blob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Soft teal glow so the blob reads against both bright and
     dark patches of the moving pixel field. */
  filter: drop-shadow(0 0 28px var(--teal-glow));
}

.blob path {
  fill: #060606;
}

.blob-logo {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  /* Subtle independent breathing on top of the rotating blob —
     keeps the centre alive without competing with the rotation. */
  animation: pulse 4.5s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 1;    }
  50%      { transform: scale(1.05); opacity: 0.92; }
}

/* ---------- Hero card ---------- */
.hero-card {
  background: var(--card-overlay);
  border-radius: 26px;
  /* Tighter top padding so the title hugs the top of the card,
     reducing the visible distance from the blob to the writing. */
  padding: 14px 56px 32px;
  /* Negative margin pulls the card upward into the empty space at
     the bottom of the blob wrapper (the SVG viewBox leaves padding
     around the morphing path). Net effect: the writing sits ~70px
     closer to the blob without overlapping the visible logo. */
  margin-top: -55px;
  text-align: center;
  width: 100%;
  max-width: 720px;
  /* No hard border. Just a tiny soft drop shadow + inset highlight
     so the rounded edges read clearly over the moving bg. */
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 30px 80px rgba(0,0,0,0.35);
}

/* Display serif title. */
.hero-title {
  font-family: 'Cormorant Garamond', 'Bodoni 72', 'Didot', serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}

/* Subtitle — same serif, italic. Significantly smaller than the
   title so the "Powered by [logo] Hyperliquid" line stays one
   line on every viewport. */
.hero-sub {
  font-family: 'Cormorant Garamond', 'Bodoni 72', 'Didot', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.1;
  margin: 10px 0 0;
  color: #fff;
}

/* Inline Hyperliquid mark — uses blob_green.gif, color-inverted
   so the green-on-white file becomes white-on-black inline.
   Height matches the line-height of the surrounding text so it
   reads as a small inline glyph, not a separate graphic. */
.hl-mark {
  display: inline-block;
  height: 1em;
  width: auto;
  margin: 0 0.25em;
  vertical-align: middle;
  /* Color path:
       1. grayscale(1)   teal blob → mid-gray; white bg stays white
       2. invert(1)      mid-gray → still mid-gray; white → black
       3. brightness(8)  mid-gray × 8 clips well past 255 → pure
                         white. Even very-dark teals end up pure
                         white at this multiplier.
       4. contrast(2)    crushes any antialiased mid-gray edges
                         that survived to either pure white or
                         pure black, eliminating the "grey blob"
                         look that brightness alone leaves behind.
     Black (the inverted bg) stays black through all steps. */
  filter: grayscale(1) invert(1) brightness(8) contrast(2);
}

/* "Hyperliquid" wordmark split: "Hyper" upright, "liquid" italic.
   The parent .hero-sub is italic, so we override .hl-prefix back
   to upright for the first half of the word. */
.hl-prefix {
  font-style: normal;
}

/* Used inside .hero-sub to keep "Powered by" and "Hyperliquid"
   each unbreakable. The line can break between them on narrow
   viewports without ever splitting a phrase or stranding the mark. */
.nowrap { white-space: nowrap; }

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.85rem, 1.05vw, 0.95rem);
  font-weight: 400;
  line-height: 1.5;
  margin: 14px 0 0;
  color: #fff;
}

/* ---------- Action buttons ---------- */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s, border-color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn:active { transform: scale(0.98); }

/* X.com and Telegram — both black pills, white icon + label.
   Same shape so the pair reads as a balanced unit. */
.btn-primary,
.btn-secondary {
  background: #000;
  color: #fff;
  border-color: #000;
}
.btn-primary:hover,
.btn-secondary:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

/* ============================================================
   Mobile
============================================================ */
@media (max-width: 720px) {
  .nav {
    top: 12px;
    width: calc(100% - 20px);
    padding: 5px 8px 5px 5px;
  }
  .nav-logo {
    width: 36px;
    height: 36px;
  }
  .nav-link {
    padding: 7px 10px;
    font-size: 0.85rem;
  }
  .nav-cta {
    padding: 7px 14px;
    font-size: 0.85rem;
  }

  .hero {
    padding: 70px 16px 20px;
    gap: 14px;
  }

  .blob-wrapper { width: 127px; height: 127px; }

  .hero-card {
    padding: 22px 24px 26px;
    border-radius: 20px;
  }

  .hero-title   { font-size: clamp(2rem,   9vw,  2.8rem); }
  .hero-sub     { font-size: clamp(0.95rem, 3.5vw, 1.2rem); }
  .hero-tagline { font-size: 0.85rem; margin-top: 10px; }

  .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-width: 340px;
    gap: 10px;
  }
  .btn { flex: 1 1 auto; padding: 11px 16px; font-size: 0.9rem; }
}

/* Reduce motion preference — pause the video for motion-sensitive
   users. The blob's SMIL animations don't honor this natively;
   we just leave them since they're slow + subtle. */
@media (prefers-reduced-motion: reduce) {
  .background-img {
    /* video element — JS doesn't auto-pause for reduced-motion;
       this hides it for now. */
    visibility: hidden;
  }
}
