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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #d8d8d8;
  --soft: #efefef;
  --pixel: 'Press Start 2P', 'Courier New', monospace;
  --term: 'VT323', ui-sans-serif, system-ui, 'Helvetica Neue', Arial, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --dock-h: 72px;
}

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

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

body {
  margin: 0;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  color: var(--ink);
  font-family: var(--term);
  font-size: 1.125rem;
  line-height: 1.68;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 5rem clamp(1.15rem, 5vw, 4rem) 8.5rem;
  background: #000;
  color: #fff;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  margin-bottom: -1.5rem;
}

.hero-media {
  position: absolute;
  inset: -18% 0 -12%;
  z-index: 0;
  will-change: transform;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.18);
  opacity: 0;
  transition: opacity 1s linear;
}

.hero-media img.is-on {
  opacity: 0.5;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%, 100% 112px;
}

.hero-index {
  position: absolute;
  right: -0.02em;
  bottom: -0.16em;
  z-index: 1;
  font-family: var(--pixel);
  font-size: clamp(6rem, 30vw, 21rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 34ch;
}

.hero-brand {
  margin: 0;
  font-family: var(--pixel);
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  opacity: 0.82;
}

.hero-h1 {
  margin: 1rem 0 0;
  font-family: var(--pixel);
  font-size: clamp(1.45rem, 5vw, 3.1rem);
  line-height: 1.55;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.hero-slash {
  position: absolute;
  z-index: 2;
  left: clamp(1.15rem, 5vw, 4rem);
  bottom: 5.5rem;
  width: clamp(60px, 22vw, 180px);
  height: 6px;
  background: #fff;
  transform: skewX(-32deg);
}

/* ---------- layout ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.15rem, 4vw, 2.5rem) 2.5rem;
}

.col-main {
  min-width: 0;
}

/* ---------- prose ---------- */
.prose {
  max-width: 70ch;
  counter-reset: sec;
  font-size: 1.125rem;
  line-height: 1.75;
}

.prose > div {
  counter-increment: sec;
  padding: clamp(1.9rem, 5vw, 3.25rem) 0;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 1.25rem;
  scroll-margin-bottom: calc(var(--dock-h) + 1rem);
}

.prose > div::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--pixel);
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.prose > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose h2 {
  margin: 0 0 0.9rem;
  font-family: var(--pixel);
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  line-height: 1.62;
  letter-spacing: 0.01em;
}

.prose h2 + hr {
  width: 4.5rem;
  margin: 0 0 1.5rem;
  border: 0;
  border-top: 4px solid var(--ink);
}

.prose h3 {
  margin: 1.9rem 0 0.7rem;
  font-family: var(--pixel);
  font-size: 1.02rem;
  line-height: 1.7;
}

.prose h3 + hr {
  width: 2.5rem;
  margin: 0 0 1rem;
  border: 0;
  border-top: 2px solid var(--ink);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose li::marker {
  color: var(--ink);
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--ink);
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose figure {
  margin: 1.5rem 0;
}

.prose img {
  margin: 1.2rem 0;
  border-radius: 10px;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #333;
}

.prose table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: collapse;
  font-size: 1rem;
}

.prose th,
.prose td {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ink);
  text-align: left;
}

.prose th {
  background: var(--ink);
  color: var(--paper);
}

.prose code {
  padding: 0.1em 0.35em;
  background: var(--soft);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
}

/* ---------- rail ---------- */
.rail {
  align-self: start;
  border-top: 3px solid var(--ink);
  padding-top: 1rem;
}

.rail-h {
  margin: 0 0 0.55rem;
  font-family: var(--pixel);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.rail-hr {
  margin: 0 0 1.1rem;
  border: 0;
  border-top: 1px solid var(--ink);
}

.rail-list {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.rail-list a:hover {
  border-bottom-color: var(--ink);
}

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
}

/* ---------- footer ---------- */
.foot {
  margin-top: 1.5rem;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.15rem, 4vw, 2.5rem) 1.5rem;
  border-top: 3px solid var(--ink);
}

.foot-cols {
  display: grid;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.foot-addr {
  font-style: normal;
}

.foot-brand {
  margin: 0 0 0.7rem;
  font-family: var(--pixel);
  font-size: 1rem;
  line-height: 1.7;
}

.foot-desc {
  margin: 0;
  max-width: 42ch;
  font-size: 1.05rem;
}

.foot-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.foot-list a:hover {
  border-bottom-color: var(--ink);
}

.foot-base {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.foot-base p {
  margin: 0;
  font-size: 1rem;
}

/* ---------- dock ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.25rem;
  align-items: center;
  padding: 0.55rem clamp(0.6rem, 2vw, 1.75rem);
  padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 2px solid var(--ink);
}

.burger {
  grid-column: 1 / span 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.4rem 0.65rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
}

.burger-lines {
  position: relative;
}

.burger-lines::before,
.burger-lines::after {
  content: '';
  position: absolute;
  left: 0;
}

.burger-lines::before {
  top: -5px;
}

.burger-lines::after {
  top: 5px;
}

.dock-brand {
  grid-column: 4 / span 6;
  justify-self: center;
  text-align: center;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: clamp(0.72rem, 3.2vw, 0.95rem);
  line-height: 1.5;
  white-space: nowrap;
}

.dock-cta {
  grid-column: 10 / span 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.4rem 0.85rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
}

.dock-nav,
.dock-nav nav,
.dock-list {
  display: contents;
}

.dock-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dock-list li {
  display: none;
}

.dock-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.25rem 0.35rem;
  font-size: 0.98rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.dock-list a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- overlay menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem) 2rem;
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s linear;
}

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

body.nav-open {
  overflow: hidden;
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

.menu-mark {
  font-family: var(--pixel);
  font-size: clamp(0.78rem, 3vw, 1rem);
  line-height: 1.6;
}

.menu-close {
  min-height: 46px;
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.menu-nav ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.menu-nav a {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding: 0.5rem 0.2rem;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 1.25rem;
}

.menu-nav a:hover .menu-t,
.menu-nav a:focus-visible .menu-t {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.menu-i {
  font-family: var(--pixel);
  font-size: 0.95rem;
  opacity: 0.72;
}

:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.menu :focus-visible {
  outline-color: #fff;
}

/* ---------- responsive ---------- */
@media (min-width: 620px) {
  .foot-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .foot-cols {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
  }
}

@media (min-width: 960px) {
  .wrap {
    grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
    gap: clamp(1.5rem, 3vw, 3rem);
  }

  .rail {
    position: sticky;
    top: 1.5rem;
    border-top: 0;
    border-left: 2px solid var(--ink);
    padding: 0.15rem 0 0 1.25rem;
  }

  .dock {
    padding-left: clamp(1rem, 3vw, 2.5rem);
    padding-right: clamp(1rem, 3vw, 2.5rem);
  }

  .burger {
    grid-column: 1 / span 2;
  }

  .dock-brand {
    grid-column: 6 / span 2;
    font-size: 0.9rem;
  }

  .dock-cta {
    grid-column: 12;
  }

  .dock-list li {
    display: block;
  }

  .dock-list li:nth-child(1) {
    grid-column: 3;
    justify-self: end;
  }

  .dock-list li:nth-child(2) {
    grid-column: 4;
    justify-self: end;
  }

  .dock-list li:nth-child(3) {
    grid-column: 5;
    justify-self: end;
  }

  .dock-list li:nth-child(4) {
    grid-column: 8;
  }

  .dock-list li:nth-child(5) {
    grid-column: 9;
  }

  .dock-list li:nth-child(6) {
    grid-column: 10;
  }

  .dock-list li:nth-child(7) {
    grid-column: 11;
  }
}

@media (min-width: 1100px) {
  .hero {
    padding-bottom: 10rem;
  }

  .prose > div {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
  }
}

@media (max-width: 479px) {
  .hero {
    padding-bottom: 7.5rem;
  }

  .hero-slash {
    bottom: 4.75rem;
  }

  .menu-nav a {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

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