@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --violet: #8000ff;
  --magenta: #ff00ff;
  --ink: #0d0d0d;
  --ink-2: #120c1c;
  --paper: #e9e2f7;
  --dim: #b6a3d2;
  --line: #2c1c46;
  --mono: 'VT323', ui-monospace, 'Courier New', monospace;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1.65;
  background-image:
    radial-gradient(circle at 18% 0%, rgba(128, 0, 255, .18), transparent 55%),
    radial-gradient(circle at 92% 12%, rgba(255, 0, 255, .12), transparent 48%);
  background-repeat: no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--paper); }

p { margin: 0 0 1em; }

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 8, 16, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.ann {
  margin: 0;
  padding: 7px 14px;
  font-size: 16px;
  letter-spacing: .22em;
  text-align: center;
  color: var(--magenta);
  text-shadow: 0 0 9px rgba(255, 0, 255, .75);
  border-bottom: 1px dashed rgba(255, 0, 255, .28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--pixel), var(--mono);
  font-size: 14px;
  letter-spacing: .06em;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 0 10px var(--violet), 0 0 24px rgba(128, 0, 255, .55);
}

.brand .logo { width: auto; height: 26px; }

.burger {
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--pixel), var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--magenta);
  background: transparent;
  border: 2px solid var(--magenta);
  cursor: pointer;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: background .2s, color .2s;
}

.burger:hover,
.burger:focus-visible {
  background: var(--magenta);
  color: var(--ink);
  outline: none;
}

#nav-menu {
  position: fixed;
  inset: 0;
  z-index: 58;
  padding: 116px 22px 40px;
  background:
    repeating-linear-gradient(135deg, rgba(128, 0, 255, .07) 0 2px, transparent 2px 12px),
    rgba(7, 5, 12, .97);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) skewX(-2deg);
  transition: opacity .26s ease, transform .26s ease, visibility .26s;
}

body.menu-open #nav-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

#nav-menu p {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: min(520px, 100%);
  margin: 0;
}

#nav-menu a {
  display: block;
  padding: 13px 16px;
  min-height: 48px;
  text-decoration: none;
  font-family: var(--pixel), var(--mono);
  font-size: 14px;
  letter-spacing: .08em;
  line-height: 1.6;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
}

#nav-menu a:hover,
#nav-menu a:focus-visible {
  color: var(--magenta);
  border-left-color: var(--magenta);
  text-shadow: 0 0 12px var(--magenta);
  outline: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: clamp(430px, 70vh, 760px);
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: 48px 22px 90px;
  border-bottom: 1px solid var(--violet);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 58px), 0 100%);
  background: var(--ink-2);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(128, 0, 255, .55) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .45;
  pointer-events: none;
}

.hero-media { position: absolute; inset: 0; }

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(.7) contrast(1.1);
  transition: opacity 1.1s ease;
}

.hero-img.is-on { opacity: .3; }

.hero-inner { position: relative; z-index: 2; max-width: 780px; }

.hero h1 {
  margin: 0 0 .5em;
  font-family: var(--pixel), var(--mono);
  font-size: clamp(21px, 4.4vw, 34px);
  line-height: 1.6;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 0 12px var(--violet), 0 0 34px rgba(255, 0, 255, .6);
  animation: glitch 6s infinite steps(1);
}

@keyframes glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: skewX(-4deg) translateX(-2px); }
  95% { transform: skewX(3deg) translateX(2px); }
  97% { transform: none; }
}

.hero-desc {
  max-width: 56ch;
  margin: 0 auto;
  font-size: 18px;
  color: var(--dim);
  letter-spacing: .02em;
}

.hero-cut {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 58px;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
  clip-path: polygon(0 calc(100% - 2px), 100% 0, 100% 100%, 0 100%);
  opacity: .85;
  z-index: 1;
}

/* ---------- layout ---------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.side {
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  background: rgba(128, 0, 255, .06);
  padding: 16px 16px 18px;
}

.side h2 {
  margin: 0;
  font-family: var(--pixel), var(--mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .1em;
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 0, 255, .6);
}

.side hr,
.doc h2 + hr,
.doc h3 + hr {
  border: 0;
  height: 2px;
  margin: 10px 0 16px;
  background: linear-gradient(90deg, var(--magenta), rgba(128, 0, 255, 0));
}

.side-list { display: flex; flex-direction: column; margin: 0; }

.side-list a {
  display: block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 17px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.side-list a:hover,
.side-list a:focus-visible {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 0, 255, .6);
}

/* ---------- section ---------- */

.doc > article {
  padding: 8px 0 30px;
  margin-bottom: 26px;
  border-bottom: 1px dashed var(--line);
  scroll-margin-top: 124px;
}

.doc > article:last-child { border-bottom: 0; }

.doc h2 {
  margin: 0 0 4px;
  font-family: var(--pixel), var(--mono);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: .03em;
  color: var(--magenta);
  text-shadow: 0 0 12px rgba(255, 0, 255, .55);
}

.doc h3 {
  margin: 1.4em 0 4px;
  font-family: var(--pixel), var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--violet);
  text-shadow: 0 0 10px rgba(128, 0, 255, .6);
}

.doc p { color: var(--paper); }

.doc ul,
.doc ol { padding-left: 1.4em; }

.doc li { margin-bottom: .5em; }

.doc a {
  color: var(--magenta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc strong { color: #fff; text-shadow: 0 0 10px rgba(128, 0, 255, .7); }

.doc blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  border-left: 3px solid var(--violet);
  background: rgba(128, 0, 255, .09);
  color: var(--dim);
}

.doc img {
  border: 1px solid var(--violet);
  margin: 1em 0;
}

.doc table { width: 100%; border-collapse: collapse; }
.doc th,
.doc td { border: 1px solid var(--line); padding: 8px; text-align: left; }

.doc > article::after {
  content: "";
  display: block;
  height: 2px;
  width: 64px;
  margin-top: 18px;
  background: var(--violet);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--violet);
  background: #08060e;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px 28px;
  padding: 30px 20px 0;
  max-width: 1180px;
  margin: 0 auto;
}

footer article { padding: 0 0 18px; }

.foot-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--pixel), var(--mono);
  font-size: 14px;
  color: #fff;
  text-shadow: 0 0 10px var(--violet);
}

.foot-logo .logo { height: 26px; width: auto; }

.foot-name {
  margin: 6px 0 0;
  font-family: var(--pixel), var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--magenta);
  letter-spacing: .06em;
}

.foot-nav p { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 10px;
  font-size: 17px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 0, 255, .6);
}

.foot-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0 16px;
  border-top: 1px dashed var(--line);
  font-size: 16px;
  color: var(--dim);
}

.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 6px;
  color: var(--violet);
  text-decoration: none;
}

.foot-bar a:hover,
.foot-bar a:focus-visible { color: var(--magenta); }

/* ---------- motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}

.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-img { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 16px 20px;
  }

  .doc { order: 1; }
  .side { order: 2; }

  .hero { min-height: 62vh; padding: 40px 18px 76px; }

  footer { grid-template-columns: minmax(0, 1fr); padding: 24px 16px 0; }
  .foot-bar { padding-bottom: 14px; }
}

@media (max-width: 420px) {
  body { font-size: 18px; }
  .brand { font-size: 12px; }
  .hero h1 { font-size: 19px; }
  .hero-desc { font-size: 17px; }
  .doc h2 { font-size: 15px; }
  .doc h3 { font-size: 13px; }
  .ann { letter-spacing: .12em; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
