/* =========================================================
   ashutosh-vijay.dev — "THE FORGE"
   Bespoke art direction · molten signal on warm ink
   core.css — tokens, reset, type, chrome, primitives
   ========================================================= */

:root {
  /* warm ink scale */
  --ink:      #0c0a08;
  --ink-1:    #110e0b;
  --ink-2:    #17130e;
  --ink-3:    #211b14;
  --ink-4:    #2c241a;

  /* bone (warm whites) */
  --bone:     #f1ead d;
  --bone:     #f1eadd;
  --bone-2:   #cabfae;
  --bone-3:   #8a8070;
  --bone-4:   #5b5347;

  /* molten signal */
  --flux:     #ff5a1f;
  --flux-2:   #ff8a4d;
  --flux-3:   #ffb27e;
  --ember:    rgba(255,90,31,0.14);
  --ember-2:  rgba(255,90,31,0.07);

  /* cold counterpart — used ONLY in transform/encrypt viz */
  --ice:      #6fd3d6;
  --ice-dim:  rgba(111,211,214,0.5);

  --line:     rgba(241,234,221,0.09);
  --line-2:   rgba(241,234,221,0.05);
  --line-flux: rgba(255,90,31,0.28);

  --font-disp: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 72px);
  --nav-h: 74px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  /* Lenis drives scroll; keep native smooth off to avoid double-easing */
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;          /* Firefox — hide scrollbar */
  -ms-overflow-style: none;       /* old Edge/IE */
}
/* Hide scrollbar in WebKit/Blink (Chrome, Safari, Edge) while keeping scroll */
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* Hide scrollbars on any inner scroll regions too (code panes, etc.) */
*::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 380;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
code, .mono { font-family: var(--font-mono); }

/* ── grain + vignette (fixed, non-interactive) ─────────── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 0%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ── custom cursor ─────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9000; pointer-events: none;
  border-radius: 50%; mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--bone); margin: -3px 0 0 -3px; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(241,234,221,0.6);
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.cursor-ring.hot {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-color: var(--flux); background: rgba(255,90,31,0.08);
}
.cursor-ring.lbl::after {
  content: attr(data-label);
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--flux); text-transform: uppercase; mix-blend-mode: normal;
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ── layout primitives ─────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--flux);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--flux); opacity: 0.6;
}
.eyebrow.no-tick::before { display: none; }
.section-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--bone-4);
}

/* ── headings ──────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; }
.display {
  font-size: clamp(48px, 11vw, 168px);
  font-weight: 800; letter-spacing: -0.05em; line-height: 0.86;
  text-transform: uppercase;
}
.h-sec {
  font-size: clamp(34px, 5.6vw, 76px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.0;
  padding-bottom: 0.08em;
}
.lede {
  font-size: clamp(17px, 1.7vw, 22px); font-weight: 380;
  line-height: 1.55; color: var(--bone-2); letter-spacing: -0.015em;
}

/* ── buttons ───────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em;
  padding: 14px 22px; border-radius: 2px; overflow: hidden;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn svg { width: 15px; height: 15px; }
.btn-fill { background: var(--flux); color: var(--ink); font-weight: 500; }
.btn-fill::before {
  content: ''; position: absolute; inset: 0; background: var(--bone);
  transform: translateY(101%); transition: transform .45s var(--ease); z-index: 0;
}
.btn-fill:hover::before { transform: translateY(0); }
.btn-fill > * { position: relative; z-index: 1; }
.btn-ghost {
  border: 1px solid var(--line); color: var(--bone-2); background: transparent;
}
.btn-ghost::before {
  content: ''; position: absolute; inset: 0; background: var(--ink-3);
  transform: translateY(101%); transition: transform .45s var(--ease); z-index: 0;
}
.btn-ghost:hover { color: var(--bone); border-color: var(--line-flux); }
.btn-ghost:hover::before { transform: translateY(0); }
.btn-ghost > * { position: relative; z-index: 1; }

/* ── tags / chips ──────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em;
  color: var(--bone-3); padding: 5px 11px; border: 1px solid var(--line);
  border-radius: 100px; transition: color .3s, border-color .3s, background .3s;
}
.chip:hover { color: var(--flux); border-color: var(--line-flux); }

/* ── nav ───────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), backdrop-filter .4s, border-color .4s, height .4s var(--ease);
  border-bottom: 1px solid transparent;
}
#nav.stuck {
  height: 60px; background: rgba(12,10,8,0.72);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line-2);
}
#nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 23px;
  background: var(--flux);
  -webkit-mask: url("../img/av-logo.svg") no-repeat center / contain;
  mask: url("../img/av-logo.svg") no-repeat center / contain;
  transition: background .3s;
}
.brand:hover .brand-mark { background: var(--flux-2); }
.brand-txt { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--bone-3); }
.brand-txt b { color: var(--bone); font-weight: 500; }
.brand:hover .brand-txt b { color: var(--flux); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--bone-3); padding: 8px 13px; position: relative;
  transition: color .25s;
}
.nav-links a .nl-i { color: var(--bone-4); margin-right: 6px; }
.nav-links a:hover, .nav-links a.active { color: var(--bone); }
.nav-links a.active .nl-i { color: var(--flux); }
.nav-cta {
  margin-left: 10px; font-family: var(--font-mono); font-size: 12px;
  color: var(--ink); background: var(--flux); padding: 9px 16px; border-radius: 2px;
  letter-spacing: 0.03em; transition: transform .3s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px); }
@media (max-width: 880px) { .nav-links .nl-h { display: none; } }

/* ── scroll progress meter ─────────────────────────────── */
#meter {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--flux), var(--flux-3)); z-index: 600;
  box-shadow: 0 0 12px var(--flux);
}

/* ── reveal system ─────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-io), transform .9s var(--ease-io); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-d="1"] { transition-delay: .08s; }
[data-reveal][data-d="2"] { transition-delay: .16s; }
[data-reveal][data-d="3"] { transition-delay: .24s; }
[data-reveal][data-d="4"] { transition-delay: .32s; }
[data-reveal][data-d="5"] { transition-delay: .4s; }

/* line clip-reveal for headings */
.line-mask { overflow: hidden; display: block; }
.line-mask > span { display: block; transform: translateY(105%); transition: transform 1s var(--ease-io); }
.line-mask.in > span { transform: none; }

/* ── marquee ───────────────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  overflow: hidden; white-space: nowrap; background: var(--ink-1);
  padding: 26px 0; position: relative;
}
.marquee::before, .marquee::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 14%; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ink-1), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--ink-1), transparent); }
.marquee-track { display: inline-flex; align-items: center; gap: 0; will-change: transform; }
.marquee-track span {
  font-family: var(--font-disp); font-weight: 700; font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: -0.03em; color: var(--bone-4); text-transform: uppercase;
  padding: 0 26px; display: inline-flex; align-items: center; gap: 26px;
}
.marquee-track span::after {
  content: ''; width: 9px; height: 9px; background: var(--flux); border-radius: 50%;
  transform: rotate(45deg); border-radius: 1px;
}

/* ── footer ────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line-2); padding: clamp(70px,9vw,130px) 0 46px; position: relative; }
.foot-grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-mail {
  font-family: var(--font-disp); font-weight: 700; letter-spacing: -0.04em;
  font-size: clamp(30px, 6vw, 86px); line-height: 0.92; color: var(--bone);
  display: inline-flex; align-items: center; gap: 0.2em;
}
.foot-mail .fx { color: var(--flux); transition: transform .4s var(--ease); display: inline-block; }
.foot-mail:hover .fx { transform: translateX(14px) rotate(45deg); }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: clamp(50px,8vw,100px); padding-top: 28px; border-top: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--bone-4); letter-spacing: 0.04em;
}
.foot-social { display: flex; gap: 22px; }
.foot-social a { color: var(--bone-3); transition: color .25s; }
.foot-social a:hover { color: var(--flux); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .line-mask > span { transform: none; }
}
