/* ==========================================================================
   LiquidAnts — shared design system for the cinematic marketing site
   Brand tokens mirror app.liquidants.xyz (monochrome + bull/bear accents)
   ========================================================================== */

:root {
  --ink: #000000;
  --ink-2: #07090a;
  --paper: #e7e9ea;
  --white: #ffffff;
  --muted: #71767b;
  --subtle: #3f4447;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.045);
  --bull: #00ba7c;
  --mint: #7cffcb;
  --bear: #f4212e;
  --gold: #ffd400;
  --purple: #985eff;
  --blue: #1d9bf0;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
}

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

html,
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--mint);
  color: var(--ink);
}

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

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mint);
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.mono {
  font-family: var(--font-mono);
}

.bull {
  color: var(--bull);
}
.bear {
  color: var(--bear);
}

/* ---------- Film grain + vignette overlays ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(18px, 3vw, 40px);
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.nav > * {
  pointer-events: auto;
}

/* Soft scrim so content scrolling under the fixed nav doesn't collide with the logo. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -24px;
  z-index: -1;
  background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.55) 60%, transparent);
  pointer-events: none;
}

.nav.is-hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.nav__logo img {
  height: 26px;
  display: block;
}

.nav__links {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
}

.nav__links a {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.3s, background 0.3s;
}

.nav__links a:hover {
  color: var(--white);
}

.nav__links a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.4s var(--ease-out), background 0.3s, box-shadow 0.4s;
  will-change: transform;
}

.btn:hover {
  background: var(--white);
  box-shadow: 0 0 40px rgba(124, 255, 203, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bull);
  box-shadow: 0 0 12px var(--bull);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
}

.nav__burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.4s var(--ease-out);
}

.nav__burger span:first-child { top: 18px; }
.nav__burger span:last-child { top: 25px; }
.menu-open .nav__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .nav__burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
}

@media (max-width: 480px) {
  .nav__cta { display: none; }
}

/* ---------- Mobile / compact menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 79;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 100px clamp(20px, 6vw, 60px) 40px;
  background: radial-gradient(ellipse at 50% 120%, #0b3a2b, #000 65%);
  clip-path: circle(0% at calc(100% - 44px) 44px);
  transition: clip-path 0.7s var(--ease-in-out);
}

.menu.is-open { clip-path: circle(150% at calc(100% - 44px) 44px); }
.menu-open { overflow: hidden; }

.menu__links { display: flex; flex-direction: column; }

.menu__links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out), color 0.3s;
  transition-delay: calc(0.15s + var(--i) * 0.05s);
}

.menu.is-open .menu__links a { opacity: 1; transform: none; }
.menu__links small { font-size: 11px; color: var(--muted); }
.menu__links span { font-size: clamp(38px, 9vw, 72px); color: var(--white); }
.menu__links a[aria-current="page"] span { color: var(--mint); }
.menu > .btn { align-self: flex-start; }

/* ---------- Shared footer ---------- */
.site-foot {
  position: relative;
  z-index: 2;
  padding: 14vh clamp(20px, 7vw, 120px) 40px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.site-foot__big {
  font-size: clamp(80px, 19vw, 320px);
  line-height: 0.8;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(124, 255, 203, 0.22);
  white-space: nowrap;
  margin-bottom: 8vh;
}

.site-foot__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.site-foot__grid nav { display: flex; flex-direction: column; gap: 10px; }
.site-foot__grid nav .eyebrow { margin: 0 0 6px; }
.site-foot__grid nav a { color: var(--muted); font-size: 14px; transition: color 0.3s; }
.site-foot__grid nav a:hover { color: var(--white); }
.site-foot__tag { color: var(--muted); font-size: 14px; max-width: 320px; line-height: 1.6; }
.site-foot__copy { margin: 24px 0 0; font-size: 11px; color: var(--subtle); }

@media (max-width: 760px) {
  .site-foot__grid { grid-template-columns: 1fr 1fr; }
  .site-foot__grid > div:first-child { grid-column: 1 / -1; }
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out),
    background 0.3s, border-color 0.3s;
  mix-blend-mode: difference;
}

.cursor.is-hover {
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  background: var(--white);
  border-color: var(--white);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 101;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--mint);
  pointer-events: none;
}

@media (hover: none) {
  .cursor,
  .cursor-dot {
    display: none;
  }
}

/* ---------- Page transition curtain ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.curtain span {
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.7s var(--ease-in-out);
}

.curtain.is-in span {
  transform: scaleY(1);
}

.curtain.is-covered span {
  transform: scaleY(1);
  transition: none;
}

.curtain.is-out span {
  transform-origin: top;
}

/* ---------- Footer / disclaimer ---------- */
.disclaimer {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 720px;
}

/* ---------- Reveal text ---------- */
.split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.split-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}

.is-active .split-line > span,
.is-revealed .split-line > span {
  transform: translateY(0);
}

.is-active .split-line:nth-child(2) > span,
.is-revealed .split-line:nth-child(2) > span {
  transition-delay: 0.08s;
}

.is-active .split-line:nth-child(3) > span,
.is-revealed .split-line:nth-child(3) > span {
  transition-delay: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
