/* PATTERN EXISTS: shared styles (tokens, fonts, header, footer, buttons). Neon on near-black, phone first. */

@font-face {
  font-family: 'Inter Display';
  src: url('fonts/InterDisplay-Medium.subset.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Display';
  src: url('fonts/InterDisplay-Bold.subset.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Display';
  src: url('fonts/InterDisplay-Black.subset.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono NL';
  src: url('fonts/JetBrainsMonoNL-Medium.subset.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono NL';
  src: url('fonts/JetBrainsMonoNL-ExtraBold.subset.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #05060a;
  --bg2: #0b0e17;
  --bg3: #121626;
  --line: rgba(245, 243, 238, 0.09);
  --line2: rgba(245, 243, 238, 0.16);
  --ink: #f5f3ee;
  --dim: #9aa0b0;
  --faint: #5c6273;
  --cyan: #2de2e6;
  --pink: #ff3c78;
  --yellow: #ffd319;
  --violet: #9d5cff;
  --green: #3cff8f;
  --orange: #ff8a3d;
  --blue: #3d7bff;
  --red: #ff5a5a;
  --sans: 'Inter Display', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono NL', 'Inter Display', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: 16px;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* a faint aurora behind the top of every page */
  content: '';
  position: fixed;
  inset: -20vh -20vw auto -20vw;
  height: 70vh;
  background:
    radial-gradient(40% 50% at 30% 40%, rgba(157, 92, 255, 0.13), transparent 70%),
    radial-gradient(35% 45% at 75% 30%, rgba(45, 226, 230, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- header ------------------------------------------------------------------------------------------------------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 15px;
  white-space: nowrap;
}
.brand:hover {
  color: var(--ink);
}
.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}

/* --- header menu (assets/site.js) --------------------------------------------------------------------------------- */
.menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(18, 22, 38, 0.7);
  color: var(--ink);
  font: 700 14.5px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.menu-btn:hover,
.menu-btn[aria-expanded='true'] {
  color: var(--ink);
  border-color: rgba(45, 226, 230, 0.6);
  background: rgba(45, 226, 230, 0.1);
}
.menu-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.15s;
}
.menu-btn[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
.menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: max(var(--gutter), calc((100% - 1180px) / 2 + var(--gutter)));
  width: min(380px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 18px;
  padding: 8px;
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: menu-in 0.14s ease-out;
  z-index: 30;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
.menu-panel nav {
  display: flex;
  flex-direction: column;
}
.menu-shade {
  display: none;
}
.menu-home,
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
}
.menu-home:hover,
.menu-item:hover,
.menu-home:focus-visible,
.menu-item:focus-visible {
  color: var(--ink);
  background: var(--bg3);
}
.menu-home svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--dim);
  padding: 2px;
}
.menu-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.menu-txt b {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
}
.menu-txt small {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-num {
  flex: none;
  width: 26px;
  font: 800 13px/1 var(--mono);
  color: var(--cyan);
  text-align: center;
}
.menu-go {
  color: var(--faint);
  font-weight: 700;
}
.menu-here {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 6px;
  font: 800 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(45, 226, 230, 0.5);
  border-radius: 999px;
  padding: 3px 6px;
}
.menu-item.is-current,
.menu-home.is-current {
  background: rgba(45, 226, 230, 0.08);
  border-color: rgba(45, 226, 230, 0.35);
}
.menu-home.is-current svg {
  color: var(--cyan);
}
.menu-label {
  margin: 10px 12px 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font: 800 11.5px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.menu-soon {
  margin: 6px 12px 6px 50px;
  color: var(--faint);
  font-size: 13px;
}
@media (max-width: 639px) {
  /* phone: a full-width sheet under the header, over a dimmed page */
  .menu-panel {
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    border-radius: 0 0 20px 20px;
    border-width: 0 0 1px;
    padding: 8px var(--gutter) 14px;
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
  }
  .menu-shade {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 3, 6, 0.6);
    z-index: 9;
  }
  .menu-shade[hidden] {
    display: none;
  }
  .menu-home,
  .menu-item {
    min-height: 56px;
  }
}

/* --- footer ------------------------------------------------------------------------------------------------------- */
.site-foot {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 40px;
}
.site-foot p {
  margin: 0;
}
.site-foot strong {
  color: var(--ink);
  letter-spacing: 0.08em;
  font-weight: 900;
}

/* --- buttons and form controls ------------------------------------------------------------------------------------ */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--bg3);
  color: var(--ink);
  font: 700 15px/1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  border-color: rgba(245, 243, 238, 0.35);
  color: var(--ink);
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #120f02;
  box-shadow: 0 0 24px rgba(255, 211, 25, 0.25);
}
.btn-primary:hover {
  color: #120f02;
  border-color: #fff1a6;
  box-shadow: 0 0 32px rgba(255, 211, 25, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
