﻿/* ============================================================
   Tarkshya · by Adidev Shah — Custom CSS
   Companion to Tailwind CDN.  Design 100% identical to React ver.
   ============================================================ */

:root {
  --bg: #050505;
  --fg: #F4F4F5;
  --muted: #A1A1AA;
  --signal: #FF4500;
  --signal-hover: #E63E00;
  --obsidian-950: #050505;
  --obsidian-900: #0A0A0A;
  --obsidian-800: #111111;
  --obsidian-700: #1A1A1A;
  --border: rgba(255, 255, 255, 0.1);
}

* { border-color: var(--border); }

html {
  background-color: var(--bg);
  color: var(--fg);
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection { background: var(--signal); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #1A1A1A; }
::-webkit-scrollbar-thumb:hover { background: var(--signal); }

/* Fonts */
.font-display { font-family: "Cabinet Grotesk", system-ui, sans-serif; }
.font-mono   { font-family: "JetBrains Mono", monospace; }
.font-body   { font-family: "Manrope", system-ui, sans-serif; }

.text-balance { text-wrap: balance; }

/* Grid overlay */
.grid-lines {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Hover arrow slide */
.hover-arrow { display: inline-block; transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }
button:hover .hover-arrow,
a:hover .hover-arrow { transform: translateX(6px); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* Blinking dot */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.animate-blink { animation: blink 1s step-start infinite; }

/* Ping (nav logo) */
@keyframes ping-slow { 75%,100% { transform: scale(2.4); opacity: 0; } }
.ping-slow { animation: ping-slow 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }

/* Marquee */
@keyframes marquee { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
.animate-marquee { animation: marquee 40s linear infinite; }

/* Masked hero text (line-by-line reveal) */
.mask-reveal {
  display: block;
  overflow: hidden;
  padding-bottom: 0.15em;
  margin-bottom: -0.15em;
}
.mask-slide {
  display: block;
  transform: translateY(110%);
  animation: mask-slide-up 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0.4s);
}
@keyframes mask-slide-up {
  from { transform: translateY(110%); }
  to   { transform: translateY(0);    }
}

/* Section reveal on scroll (IntersectionObserver adds .in) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 900ms cubic-bezier(0.16,1,0.3,1), transform 900ms cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--delay, 0s);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Delayed fade-in used in hero utility bits */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: var(--fd, 0.9s);
}
@keyframes fadeIn { to { opacity: 1; } }

/* Corner brackets (hero + dialogs) */
.corner-mark { pointer-events: none; position: absolute; z-index: 10; }
.corner-mark .m { position: relative; height: 24px; width: 24px; }
.corner-mark .m::before,
.corner-mark .m::after {
  content: ""; position: absolute; background: var(--signal);
}
.corner-mark .m::before { top: 0; left: 0; height: 10px; width: 1px; }
.corner-mark .m::after  { top: 0; left: 0; height: 1px; width: 10px; }

/* Nav scroll state */
.nav-scrolled {
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border) !important;
}

/* Buttons */
.btn-signal {
  background: var(--signal); color: #fff;
  transition: background-color 300ms ease;
}
.btn-signal:hover { background: var(--signal-hover); }

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.20); color: #fff;
  transition: border-color 300ms ease, color 300ms ease;
}
.btn-ghost:hover { border-color: #fff; }

/* Dialog */
.dialog-root {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 300ms ease;
}
.dialog-root.is-open { display: flex; opacity: 1; }
.dialog-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.dialog-panel {
  position: relative; z-index: 10;
  width: 100%; max-width: 48rem;
  max-height: 88vh;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  background: var(--obsidian-900);
  transform: translateY(30px) scale(0.98);
  opacity: 0;
  transition: transform 550ms cubic-bezier(0.16,1,0.3,1), opacity 550ms;
}
.dialog-root.is-open .dialog-panel { transform: translateY(0) scale(1); opacity: 1; }
.dialog-panel .cm {
  position: absolute; height: 10px; width: 10px;
}
.dialog-panel .cm.tl { top: -1px; left: -1px;  border-top: 1px solid var(--signal); border-left: 1px solid var(--signal); }
.dialog-panel .cm.tr { top: -1px; right: -1px; border-top: 1px solid var(--signal); border-right: 1px solid var(--signal); }
.dialog-panel .cm.bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--signal); border-left: 1px solid var(--signal); }
.dialog-panel .cm.br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--signal); border-right: 1px solid var(--signal); }

body.no-scroll { overflow: hidden; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 40;
  background: var(--obsidian-950);
  padding: 6rem 1.5rem 2rem;
  display: none;
  flex-direction: column; gap: 1.5rem;
}
.mobile-drawer.is-open { display: flex; }

/* Image treatments */
.img-mono {
  filter: grayscale(1);
  transform: scale(1.05);
  transition: filter 1200ms ease-out, transform 1200ms ease-out;
}
.group:hover .img-mono { filter: grayscale(0); transform: scale(1); }

/* Utility: line-through market price */
.price-market { text-decoration: line-through; color: rgba(255,255,255,0.6); }
