/* ═══════════════════════════════════════════════════════════
   BRAND — tokens + global chrome
   Mirrors the portfolio's design system (index.html :root).
   If the portfolio tokens ever change, change them here too.
   ═══════════════════════════════════════════════════════════ */

:root {
  --black: #04050a;
  --white: #eef0f5;
  --cyan: #00deff;
  --cyan2: #00b8d9;
  --cyan3: #007a8f;
  --cyandim: rgba(0, 222, 255, 0.12);
  --cyangl: rgba(0, 222, 255, 0.28);
  --gold: #e8c94a;
  --gray: #10121a;
  --gray2: #1c1f2a;
  --gray3: #252830;
  --mid: #6a6d7a;
  --border: rgba(255, 255, 255, 0.07);
  --nav-h: 72px;

  /* LMS-only additions — same language, new roles */
  --danger: #ff5c6a;
  --success: #3ddc97;
  --shell: min(1400px, 100% - clamp(2.5rem, 8vw, 6rem));
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: "Space Mono", monospace;
  cursor: none;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* The portfolio has no forms, so body{cursor:none} was harmless there.
   Here it would hide the caret in every input. Restore real cursors. */
input,
textarea,
select,
[contenteditable] {
  cursor: text;
}
button,
a,
label,
summary,
[role="button"],
input[type="checkbox"],
input[type="radio"],
input[type="submit"],
input[type="button"] {
  cursor: pointer;
}

/* ═══════════ CUSTOM CURSOR ═══════════ */
#cursor,
#cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}
#cursor {
  width: 10px;
  height: 10px;
  background: var(--cyan);
  mix-blend-mode: screen;
  transition: width 0.25s, height 0.25s, background 0.25s;
}
#cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 222, 255, 0.35);
  z-index: 9998;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
body:has(a:hover) #cursor,
body:has(button:hover) #cursor {
  width: 18px;
  height: 18px;
  background: var(--gold);
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 54px;
  height: 54px;
  border-color: var(--gold);
}
@media (hover: none) {
  #cursor,
  #cursor-ring {
    display: none;
  }
  body,
  input,
  textarea,
  select {
    cursor: auto;
  }
}

/* ═══════════ GRAIN ═══════════ */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ═══════════ HEADER / NAV ═══════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.site-header.scrolled {
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  /* the glyphs are only ~29px tall; the link should still be 44 */
  min-height: 44px;
  gap: 0.2em;
  position: relative;
  z-index: 2;
}
.nav-logo .dot {
  color: var(--cyan);
  font-size: 1.8rem;
  line-height: 0;
  vertical-align: middle;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.2s, color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.3s;
}
.nav-links a:hover,
.nav-links a.is-current {
  opacity: 1;
  color: var(--cyan);
}
.nav-links a:hover::after,
.nav-links a.is-current::after {
  width: 100%;
}
.nav-cta {
  font-family: "Space Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  text-decoration: none;
  opacity: 1 !important;
  transition: background 0.25s, color 0.25s !important;
}
.nav-cta:hover {
  background: var(--cyan) !important;
  color: var(--black) !important;
}
.nav-cta::after {
  display: none !important;
}
.nav-cart-count {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 0.4em;
  padding: 0.05em 0.35em;
  background: var(--cyan);
  color: var(--black);
  text-align: center;
}

.nav-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  /* 44x44 minimum — this is the only way into the menu on a phone */
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  margin-right: -6px;
  position: relative;
  z-index: 2;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.35s, opacity 0.35s, background 0.2s;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 10, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 590;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.18, 1);
}
.nav-drawer.open {
  transform: translateX(0);
}
.nav-drawer a {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 9vw, 3.5rem);
  letter-spacing: 0.1em;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-drawer a:hover {
  color: var(--cyan);
}
.nav-drawer .drawer-sub {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 1rem;
}
@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
}

/* ═══════════ FOOTER ═══════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer .footer-logo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
}
.site-footer .footer-logo span {
  color: var(--cyan);
}
.site-footer .footer-copy,
.site-footer .footer-nav a {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
}
.site-footer .footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer .footer-nav a:hover {
  color: var(--cyan);
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
