/* ============================================================
   BASE.CSS
   Design tokens · Reset · Animations · Layout utilities
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --teal:     #4fd1c0;
  --teal-lo:  rgba(79, 209, 192, 0.10);
  --teal-md:  rgba(79, 209, 192, 0.22);
  --teal-hi:  rgba(79, 209, 192, 0.35);
  --amber:    #f0c060;
  --bg:       #020617;
  --surface:  #0d1628;
  --surface2: #111b2e;
  --border:   rgba(79, 209, 192, 0.11);
  --border2:  rgba(79, 209, 192, 0.26);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: #f1f5f9;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar         { width: 5px; height: 5px; }
::-webkit-scrollbar-track   { background: #04080f; }
::-webkit-scrollbar-thumb   { background: #1e293b; border-radius: 4px; }

/* ── Background dot grid ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(79,209,192,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Hero scanline ──────────────────────────────────────────── */
.hero-scan::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--teal-hi), transparent);
  animation: scan 7s ease-in-out infinite;
}
@keyframes scan {
  0%   { top: 0;    opacity: 0; }
  8%   {            opacity: 1; }
  92%  {            opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fup {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes gpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}
@keyframes bpFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Hero animation helpers ─────────────────────────────────── */
.a1 { animation: fup .55s ease both .05s; }
.a2 { animation: fup .60s ease both .20s; }
.a3 { animation: fup .60s ease both .36s; }
.a4 { animation: fup .60s ease both .50s; }
.a5 { animation: fup .60s ease both .65s; }
.a6 { animation: fup .60s ease both 1.1s; }

/* ── Scroll reveal ──────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.rv.on { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }

/* ── Hero corner brackets ───────────────────────────────────── */
.brk {
  position: absolute;
  width: 44px; height: 44px;
  border-color: var(--teal-md);
  border-style: solid;
}
.brk.tl { top: 72px;  left: 24px;  border-width: 1px 0 0 1px; }
.brk.tr { top: 72px;  right: 24px; border-width: 1px 1px 0 0; }
.brk.bl { bottom: 24px; left: 24px;  border-width: 0 0 1px 1px; }
.brk.br { bottom: 24px; right: 24px; border-width: 0 1px 1px 0; }

/* ── Nav progress bar ───────────────────────────────────────── */
.nav-bar {
  position: absolute;
  bottom: -1px; left: 0;
  height: 2px;
  background: var(--teal);
  width: 0%;
  transition: width .1s linear;
}

/* ── Glowing pulse dot ──────────────────────────────────────── */
.gdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: gpulse 2s ease-in-out infinite;
}

/* ── Back to top ────────────────────────────────────────────── */
#btt {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #334155;
  background: #0d1628;
  display: flex;
  align-items: center; justify-content: center;
  color: #94a3b8;
  cursor: pointer;
}
#btt:hover { color: var(--teal); border-color: rgba(79,209,192,.5); }
#btt.show  { opacity: 1; pointer-events: auto; }
