/* ============================================================
   VI·AI — style.css
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg:      #02020a;
  --line:    #12122a;
  --dim:     #1c2050;
  --mid:     #2a3470;
  --accent:  #2352e8;
  --a2:      #5a8aff;
  --hi:      #dde4f5;
  --sec:     #7a8abf;
  --ter:     #4a5490;

  --font-mono: 'IBM Plex Mono', monospace;
  --font-display: 'Barlow Condensed', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--hi);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

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

/* --- Noise / Grain --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
}

/* --- Scan Line --- */
#scanline {
  position: fixed;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 999;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(90, 138, 255, 0.7), transparent);
  animation: scanline 2s ease-in-out 0.1s forwards;
  top: 0;
}

@keyframes scanline {
  from { top: 0; opacity: 1; }
  to   { top: 100vh; opacity: 0; }
}

/* --- Page Wrapper --- */
.page-wrapper {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 52px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.5s ease 0.2s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-vi  { color: var(--hi); }
.brand-dot { color: var(--a2); }
.brand-ai  { color: var(--hi); }

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 8.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sec);
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--a2); }

.nav-cta {
  display: flex;
  justify-content: flex-end;
}

.btn-access {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--a2);
  background: transparent;
  border: 1px solid var(--mid);
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-access:hover {
  border-color: var(--a2);
  background: rgba(90, 138, 255, 0.05);
}

/* ============================================================
   SPLIT
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* ============================================================
   LEFT PANEL
   ============================================================ */
.panel-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 52px;
  overflow: hidden;
}

/* --- Token Row --- */
.token-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.token-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.token-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.token-badge {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--sec);
  border: 1px solid var(--dim);
  padding: 3px 8px;
  position: relative;
  overflow: hidden;
}

.token-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(90, 138, 255, 0.18) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 1.8s ease forwards;
}

#tb-0::after { animation-delay: 0.3s; }
#tb-1::after { animation-delay: 0.5s; }
#tb-2::after { animation-delay: 0.7s; }
#tb-3::after { animation-delay: 0.9s; }
#tb-4::after { animation-delay: 1.1s; }

@keyframes shimmer {
  0%   { transform: translateX(-100%); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.token-sep {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ter);
}

.token-label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 7.5px;
  color: var(--ter);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* --- Headline --- */
.headline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 8px;
}

/*
 * Word Cell — each .wc is a clipping container.
 *
 * KEY FIX: .wc-word is in-flow (not position:absolute) so it
 * determines the container width. overflow:hidden on .wc clips
 * the word when it is translated below the cell boundary.
 * .wc-num is position:absolute so it sits over the word area.
 */
.wc {
  position: relative;
  height: 86px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex-shrink: 0;
}

.wc-num {
  position: absolute;
  bottom: 2px;
  left: 0;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 11px;
  color: var(--sec);
  line-height: 1;
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity   0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.wc-word {
  /* In-flow — sizes the container width */
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 1;
  white-space: nowrap;
  /* Starts hidden below the clipping boundary */
  transform: translateY(100%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Variant colors */
.wc[data-variant="default"] .wc-word { font-weight: 800; color: var(--hi); }
.wc[data-variant="light"]   .wc-word { font-weight: 200; color: var(--sec); }
.wc[data-variant="accent"]  .wc-word { font-weight: 800; color: var(--a2); }

/* On state — flip triggers */
.wc.on .wc-num {
  transform: translateY(-200%);
  opacity: 0;
}

.wc.on .wc-word {
  transform: translateY(0);
}

/* --- Sub Headline --- */
.sub-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 2px;
  margin-bottom: 36px;
}

.sh-pair {
  display: flex;
  align-items: flex-end;
}

.sh-word,
.sh-dot {
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 1;
  display: inline-block;
  transform: translateY(30px);
  opacity: 0;
  transition:
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.65s ease;
}

.sh-word { font-weight: 200; color: var(--ter); }
.sh-dot  { font-weight: 700; color: var(--accent); }

.sh-word.visible,
.sh-dot.visible {
  transform: translateY(0);
  opacity: 1;
}

/* --- V-Pills --- */
.vpills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.vpills.visible {
  opacity: 1;
  transform: translateY(0);
}

.vpill {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 7.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ter);
  cursor: default;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.vpill--active {
  border-color: var(--dim);
  color: var(--sec);
}

.vpill:hover {
  border-color: var(--mid);
  color: var(--sec);
}

/* ============================================================
   RIGHT PANEL — CSS abstract visual
   ============================================================ */
.panel-right {
  position: relative;
  background: #000;
  overflow: hidden;
}

/* Deep background gradient */
.panel-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 65% 50%, rgba(35, 82, 232, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 40% 60%, rgba(2, 2, 30, 0.9) 0%, transparent 80%);
  z-index: 0;
}

/* Orb container */
.orb-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Base orb — the core sphere */
.orb {
  position: absolute;
  border-radius: 50%;
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: radial-gradient(
    circle at 38% 35%,
    rgba(90, 138, 255, 0.18) 0%,
    rgba(35, 82, 232, 0.08) 40%,
    rgba(2, 2, 20, 0.0) 70%
  );
  border: 1px solid rgba(35, 82, 232, 0.15);
  animation: orb-breathe 7s ease-in-out infinite;
}

.orb-2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle at 40% 35%,
    rgba(90, 138, 255, 0.25) 0%,
    rgba(35, 82, 232, 0.12) 45%,
    transparent 70%
  );
  border: 1px solid rgba(90, 138, 255, 0.12);
  animation: orb-breathe 7s ease-in-out infinite 1.2s;
}

.orb-3 {
  width: 110px;
  height: 110px;
  background: radial-gradient(
    circle at 38% 35%,
    rgba(150, 180, 255, 0.35) 0%,
    rgba(90, 138, 255, 0.15) 50%,
    transparent 75%
  );
  border: 1px solid rgba(90, 138, 255, 0.2);
  box-shadow:
    0 0 40px rgba(35, 82, 232, 0.15),
    0 0 80px rgba(35, 82, 232, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: orb-breathe 7s ease-in-out infinite 2.4s;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1)   translateY(0px);  opacity: 1;    }
  50%       { transform: scale(1.04) translateY(-6px); opacity: 0.85; }
}

/* Dot grid overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(90, 138, 255, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, black 0%, transparent 80%);
  animation: grid-drift 12s ease-in-out infinite alternate;
}

@keyframes grid-drift {
  from { transform: translate(-4px, -3px); }
  to   { transform: translate(4px, 3px); }
}

/* Left-edge vignette — bleeds right panel into left panel bg */
.panel-right-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to right,
    var(--bg) 0%,
    rgba(2, 2, 10, 0.55) 12%,
    transparent 26%
  );
}

/* VI tag label */
.vi-tag {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 7.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ter);
  border: 1px solid var(--dim);
  background: rgba(2, 2, 10, 0.65);
  padding: 6px 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.vi-tag.visible {
  opacity: 1;
}

/* ============================================================
   META BAR
   ============================================================ */
.meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 52px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.meta-bar.visible {
  opacity: 1;
  transform: translateY(0);
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.meta-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.meta-value {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--a2);
}

.meta-label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 7px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ter);
}

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

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}

.meta-status {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 7.5px;
  color: var(--ter);
}

/* ============================================================
   RESPONSIVE — mobile ≤ 860px
   ============================================================ */
@media (max-width: 860px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  .page-wrapper {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }

  .nav {
    padding: 16px 24px;
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .panel-left {
    padding: 40px 24px 32px;
    justify-content: flex-start;
  }

  .wc {
    height: 58px;
  }

  .wc-word {
    font-size: 52px;
  }

  .sh-word,
  .sh-dot {
    font-size: 52px;
  }

  .panel-right {
    min-height: 52vh;
  }

  .meta-bar {
    padding: 16px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .meta-left {
    gap: 24px;
  }
}
