@font-face {
  font-family: Havoc;
  src: url("./assets/minecraft.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  --bg: #111019;
  --surface: #1b1927;
  --edge: #423c50;
  --ink: #f6f3fc;
  --soft: #cdc7dc;
  --muted: #b2aabe;
  --accent: #d0b6ff;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
a:focus-visible, [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.wrap { width: min(70rem, calc(100% - clamp(2rem, 9vw, 9rem))); margin-inline: auto; }
.skip { position: absolute; z-index: 3; top: .65rem; left: .75rem; transform: translateY(-170%); padding: .7rem; background: var(--surface); }
.skip:focus { transform: none; }
.masthead { background: #16141e; border-bottom: 1px solid #302b3a; }
.header-row { display: flex; min-height: 3.85rem; align-items: center; justify-content: space-between; gap: .75rem; }
.wordmark, .jump { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }
.wordmark { gap: .65rem; font: 1.1rem/1 Havoc, monospace; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; background: var(--accent); color: #261a37; border-radius: .28rem; }
.pixel { display: inline-block; flex: none; width: 1.25rem; height: 1.25rem; background: currentColor; mask: url("./assets/icons.png") 0 50% / 500% 100% no-repeat; image-rendering: pixelated; }
.mark .pixel { width: 1.5rem; height: 1.5rem; }
.power { mask-position: 25% 50%; }
.device { mask-position: 50% 50%; }
.library { mask-position: 75% 50%; }
.style { mask-position: 100% 50%; }
.edition { color: var(--muted); font: .84rem/1 system-ui, sans-serif; border-left: 1px solid var(--edge); padding-left: .7rem; }
.jump { gap: .45rem; font-size: .85rem; color: var(--soft); }
.jump span { position: relative; width: .7rem; height: .85rem; color: var(--accent); font-size: 0; }
.jump span::before { content: ""; position: absolute; top: .07rem; left: .31rem; width: 1px; height: .62rem; background: currentColor; }
.jump span::after { content: ""; position: absolute; left: .15rem; bottom: .13rem; width: .34rem; height: .34rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.jump:hover { color: #fff; }

main { padding-block: clamp(1.2rem, 3.4vw, 2.65rem) 3rem; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #4e435e;
  border-radius: .55rem;
  background: #201b31;
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before {
  background: url("./assets/observatory.png") right center / auto 100% no-repeat;
  image-rendering: pixelated;
}
.hero::after { background: linear-gradient(90deg, #211c30 6%, #211c30f7 31%, #211c30bb 49%, #211c3020 69%, transparent 83%); }
.hero-copy { padding: clamp(1.5rem, 3.6vw, 3.1rem); }
.dateline { display: flex; align-items: baseline; flex-wrap: wrap; gap: .55rem .8rem; font-size: .8rem; color: #e3ddec; }
.dateline span { color: #e6d4ff; font: .71rem/1.5 Havoc, monospace; text-transform: uppercase; letter-spacing: .085em; }
.dateline time { padding-left: .8rem; border-left: 1px solid #80738a; }
h1 { margin: .85rem 0 .8rem; font-size: clamp(2.7rem, 5.25vw, 4.35rem); line-height: .99; letter-spacing: -.052em; font-weight: 710; }
h1 span { color: #d9c2ff; }
.hero p { max-width: 25rem; color: #e6deef; font-size: clamp(.94rem, 1.3vw, 1.025rem); line-height: 1.52; }

#screens { padding-top: clamp(1.65rem, 3.1vw, 2.55rem); scroll-margin-top: .75rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
.screen-links { display: flex; gap: .45rem; margin: 1rem 0; flex-wrap: wrap; }
.screen-links a {
  display: flex; align-items: center; justify-content: center; gap: .52rem; min-height: 2.8rem;
  padding: .55rem 1rem; color: var(--soft); background: #1c1926; border: 1px solid #443d51;
  border-radius: .34rem; font-size: .91rem; font-weight: 560; text-decoration: none;
}
.screen-links .pixel { width: 1rem; height: 1rem; }
.screen-links a:hover { border-color: #8a759e; background: #2b2438; }
.screen-links a[aria-selected="true"] { background: #d0b6ff; color: #241a30; border-color: #dfcaff; }
.screen-panel {
  display: grid; grid-template-columns: minmax(0,1.34fr) minmax(0,1fr); grid-template-areas: "frame notes";
  align-items: start; gap: clamp(1.4rem, 3.3vw, 2.75rem); margin-top: .9rem;
  padding: clamp(.95rem, 2.3vw, 1.8rem); background: var(--surface);
  border: 1px solid var(--edge); border-radius: .55rem; scroll-margin: 1rem;
}
.screen-panel[hidden] { display: none; }
.screen-panel figure { grid-area: frame; min-width: 0; }
.image-link { position: relative; display: block; border: 1px solid #514864; border-radius: .32rem; overflow: hidden; background: #181625; }
.image-link:hover { border-color: var(--accent); }
.image-link img { display: block; width: 100%; height: auto; }
.expand { position: absolute; bottom: .55rem; right: .55rem; width: 1.9rem; height: 1.9rem; font-size: 0; background: #1c1826ef; color: white; border: 1px solid #817391; border-radius: .25rem; }
.expand::before { content: ""; position: absolute; inset: 26% 26% 44% 44%; border: solid currentColor; border-width: 2px 2px 0 0; }
.expand::after { content: ""; position: absolute; top: 47%; left: 24%; width: 56%; height: 2px; background: currentColor; transform: rotate(-45deg); }
.image-link:hover .expand { background: var(--accent); color: #21172f; }
figcaption { margin-top: .65rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.notes { grid-area: notes; align-self: center; }
h3 { font-size: clamp(1.4rem, 2.3vw, 1.95rem); line-height: 1.13; letter-spacing: -.035em; }
.notes p, .notes li { color: var(--soft); font-size: .96rem; line-height: 1.54; }
.notes p { margin-top: .75rem; }
ul { list-style: square; margin: 1.05rem 0 0; padding-left: 1.15rem; }
li { padding-left: .2rem; margin: .5rem 0; }
li:last-child { margin-bottom: 0; }
li::marker { color: #b49bcf; font-size: .72rem; }
strong { color: var(--ink); font-weight: 610; }
code, kbd { color: #e9dbff; font: .89em ui-monospace, monospace; }
kbd { padding: .02em .23em; background: #2a2438; border: 1px solid #544860; border-radius: .19em; }

@media (max-width: 52rem) {
  .screen-panel { grid-template-columns: 1fr; grid-template-areas: "notes" "frame"; gap: 1.35rem; }
  .hero::after { background: linear-gradient(90deg, #211c30fa 5%, #211c30eb 37%, #211c3094 57%, transparent 88%); }
}
@media (max-width: 37rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-row { min-height: 3.45rem; }
  .wordmark { gap: .44rem; font-size: .98rem; }
  .edition { padding-left: .5rem; font-size: .78rem; }
  .jump { font-size: .78rem; }
  .hero::before { background-size: auto 13rem; background-position: 80% 0; }
  .hero::after { background: linear-gradient(0deg, #211c30 47%, #211c30ed 55%, #211c3000 84%); }
  .hero-copy { padding: 7.15rem 1.2rem 1.45rem; }
  h1 { margin: .7rem 0 .75rem; }
  .screen-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
  .screen-links a { justify-content: flex-start; padding-inline: .75rem; }
  .screen-panel { padding: 1.05rem; }
}
@media (max-width: 20rem) {
  .edition { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .screen-links a, .image-link, .expand { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
  .screen-panel[role="tabpanel"]:not([hidden]) { animation: enter 180ms ease-out; }
  @keyframes enter { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: none; } }
}
