/* ============================================================
   MAGNET — Made to Matter
   base.css : tokens · reset · nav · preloader · cursor · buttons · marquee
   ============================================================ */

:root {
  --bg: #0A0A0A;
  --panel: #111113;
  --card-hover: #16161A;
  --text: #F5F5F2;
  --muted: #9A9A98;
  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-strong: rgba(255, 255, 255, 0.18);
  --lime: #C4FF3D;
  --lime-pressed: #A6E029;
  --paper: #F2F2EC;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shell: clamp(20px, 5vw, 96px);
  --maxw: 1560px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.preloading { overflow: hidden; height: 100vh; }
body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--lime); color: #0A0A0A; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 2px;
}

/* ---- Typographic primitives -------------------------------- */
.display {
  font-family: "Archivo", "Inter", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--lime);
}
.eyebrow::before {
  content: ""; width: 30px; height: 1px; background: var(--lime); flex: none;
}
.eyebrow--center { justify-content: center; }
.lime { color: var(--lime); }

.ghost {
  font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.04em; line-height: 0.8;
  font-size: clamp(80px, 20vw, 300px);
  color: transparent; -webkit-text-stroke: 1px var(--hairline);
  pointer-events: none; user-select: none; white-space: nowrap;
}

.section { padding: clamp(86px, 13vh, 184px) var(--shell); position: relative; }
.wrap { max-width: var(--maxw); margin: 0 auto; position: relative; }

.s-head { margin-bottom: clamp(44px, 6vw, 84px); }
.s-head .eyebrow { margin-bottom: 22px; }
.s-head h2 { font-size: clamp(34px, 5vw, 68px); max-width: 18ch; }

/* clip-mask reveal lines */
.lineMask { display: block; overflow: hidden; padding-bottom: 0.04em; }
.lineMask > span { display: block; transform: translateY(106%); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); }
.reveal.in { opacity: 1; transform: translateY(0); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

/* ============================================================
   BACKDROP
   ============================================================ */
.hero-glow {
  position: absolute; top: -28vh; right: -16vw; z-index: 0; pointer-events: none;
  width: 78vw; height: 78vw; max-width: 1100px; max-height: 1100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196,255,61,0.16), transparent 62%);
  filter: blur(50px);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--lime); z-index: 95; will-change: transform;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none;
  width: 34px; height: 34px; border: 1.5px solid var(--lime); border-radius: 50%;
  transform: translate(-50%, -50%); mix-blend-mode: difference;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease), opacity 0.3s var(--ease);
  display: flex; align-items: center; justify-content: center;
}
.cursor-ring .clabel {
  font-family: "Inter", sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; color: #0A0A0A; opacity: 0; text-transform: uppercase;
}
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 301; pointer-events: none;
  width: 5px; height: 5px; background: var(--lime); border-radius: 50%;
  transform: translate(-50%, -50%); mix-blend-mode: difference;
}
body.cursor-grow .cursor-ring { width: 64px; height: 64px; background: var(--lime); mix-blend-mode: normal; border-color: var(--lime); }
body.cursor-grow .cursor-ring .clabel { opacity: 1; }
body.cursor-grow .cursor-dot { opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none !important; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--shell);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 14px var(--shell);
  background: rgba(10,10,10,0.72); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.nav__logo { display: flex; align-items: center; gap: 10px; flex: none; }
.nav__logo img { height: 38px; width: auto; transition: height 0.4s var(--ease); }
.nav.scrolled .nav__logo img { height: 32px; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.nav__link {
  position: relative; font-size: 14px; font-weight: 500; letter-spacing: 0.01em; color: var(--text);
  padding: 6px 0;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--lime); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover { color: var(--lime); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta { margin-left: 8px; }

.nav__burger {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  width: 40px; height: 40px; align-items: center; justify-content: center;
}
.nav__burger span { width: 24px; height: 2px; background: var(--text); transition: transform 0.4s var(--ease), opacity 0.3s var(--ease); }
body.nav-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav__burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 88; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  padding: calc(var(--shell) + 40px) var(--shell) var(--shell); overflow-y: auto;
  transform: translateY(-101%); opacity: 0; visibility: hidden;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease), visibility 0s linear 0.6s;
  pointer-events: none;
}
body.nav-open .mobile-menu { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; transition: transform 0.6s var(--ease), opacity 0.4s var(--ease), visibility 0s; }
.mobile-menu a {
  font-family: "Archivo", sans-serif; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.02em; font-size: clamp(28px, 6vw, 44px); line-height: 1.1; color: var(--text);
}
.mobile-menu a:hover { color: var(--lime); }
.mobile-menu .mm-cta { margin-top: 30px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  padding: 14px 26px; min-height: 48px; border-radius: 100px; overflow: hidden;
  border: 1px solid var(--hairline-strong); background: transparent; color: var(--text);
  will-change: transform; transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn__t { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0; background: var(--lime);
  transform: translateY(102%); transition: transform 0.5s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: #0A0A0A; border-color: var(--lime); }

.btn--lime { background: var(--lime); border-color: var(--lime); color: #0A0A0A; }
.btn--lime::before { background: #0A0A0A; }
.btn--lime:hover, .btn--lime:focus-visible { color: var(--lime); border-color: var(--lime); }

.btn--lg { font-size: 15px; padding: 17px 32px; min-height: 56px; }
.btn--paper { border-color: rgba(10,10,10,0.2); color: #0A0A0A; }
.btn--paper::before { background: #0A0A0A; }
.btn--paper:hover, .btn--paper:focus-visible { color: var(--paper); }

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader { position: fixed; inset: 0; z-index: 200; background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.6s var(--ease); }
.preloader.is-out { opacity: 0; }
.preloader__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
/* mask: soft vignette + solid black bottom strip that hides the video's corner watermark */
.preloader__vmask { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 46%, transparent 42%, rgba(0,0,0,0.28) 100%),
    linear-gradient(0deg, #000 0%, #000 17%, rgba(0,0,0,0) 33%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 16%); }
.preloader__brand { position: absolute; z-index: 2; bottom: clamp(9%, 12vh, 13%); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.preloader__mark { height: clamp(36px, 5vw, 48px); width: auto; opacity: 0; transform: translateY(10px) scale(0.96);
  filter: blur(6px); animation: pl-mark 1s var(--ease) 0.15s forwards; }
.preloader__tag { font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--lime);
  opacity: 0; animation: pl-fade 0.8s var(--ease) 0.5s forwards; }
.preloader__line { width: clamp(140px, 40vw, 220px); height: 2px; border-radius: 2px; overflow: hidden;
  background: rgba(255,255,255,0.12); opacity: 0; animation: pl-fade 0.6s var(--ease) 0.6s forwards; }
.preloader__line i { display: block; height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--lime), var(--lime));
  box-shadow: 0 0 12px rgba(196,255,61,0.7); animation: pl-progress 5s var(--ease) 0.4s forwards; }
@keyframes pl-mark { to { opacity: 0.98; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes pl-fade { to { opacity: 0.9; } }
@keyframes pl-progress { 0% { width: 0; } 70% { width: 82%; } 100% { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .preloader__mark, .preloader__tag, .preloader__line { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .preloader__line i { animation: none !important; width: 100% !important; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { position: relative; overflow: hidden; padding: clamp(22px, 3vw, 40px) 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; }
.marquee__group { display: flex; align-items: center; }
.marquee__item {
  display: inline-flex; align-items: center; gap: clamp(26px, 4vw, 60px); padding: 0 clamp(26px, 4vw, 60px);
  font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(28px, 5vw, 64px); color: var(--text); white-space: nowrap;
}
.marquee__item::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .lineMask > span { transform: none !important; }
  * { transition-duration: 0.01ms !important; }
}
