:root {

  --ground:  #363638;
  --ground-a: rgb(54 54 56 / 0);
  --surface: #2b2b2d;
  --field:   #222224;
  --ink:     #ecebe4;
  --soft:    #b9b6ad;
  --green:   #3fae3a;
  --green-text: #6fcf66;
  --yellow:  #e0d77e;
  --on-green: #161617;

  --grain: url("assets/img/grain-tile.webp");
  --grain-size: 300px;

  --emblem: url("assets/img/emblem-640.webp");

  --bits-opacity: 0.2;
  --bits-drift: 90s;

  --emblem-size: min(84vw, 60svh);

  --font: "Toren Mono", system-ui, -apple-system, "Segoe UI", sans-serif;
  --s-small: 14px;
  --s-body:  17px;
  --s-mid:   clamp(22px, 2.3vw, 32px);
  --s-big:   clamp(44px, 9vw, 132px);

  --gutter:  clamp(16px, 4vw, 56px);
  --section: clamp(112px, 18vh, 220px);

  --ease-out: cubic-bezier(0.12, 1, 0.16, 1);
  --t-press: 80ms;
  --t-hover: 80ms;
  --t-reveal: 100ms;
}

@media (min-width: 701px) {
  :root { --emblem-size: min(50vw, 74svh); }
}

@font-face {
  font-family: "Toren Mono";
  src: url("assets/fonts/Toren-Mono.woff2") format("woff");
  font-weight: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ground) var(--grain) repeat;
  background-size: var(--grain-size);
  color: var(--ink);
  font: 400 var(--s-body)/1.55 var(--font);
  text-transform: lowercase;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.soft { color: var(--soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--soft); text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease; }
a:hover { color: var(--green-text); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
::selection { background: var(--green); color: var(--on-green); }

.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 20; background: var(--green); color: var(--on-green); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--green); color: var(--on-green);
  font: 500 var(--s-body)/1 var(--font); text-transform: lowercase; text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.button:hover { background: var(--yellow); color: var(--on-green); }
.button:active { transform: scale(0.97); }

.ph { display: inline-block; margin-left: 8px; padding: 2px 6px; background: var(--yellow); color: var(--on-green); font-size: var(--s-small); line-height: 1.3; }

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items:center; justify-content:end; gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  background: var(--ground-a);
}
.bar-mark { display: block; width: clamp(84px, 9vw, 120px); padding: 6px 0; transition: transform var(--t-press) var(--ease-out); }
.bar-mark:active { transform: scale(0.95); }
.bar ul { display: flex; gap: clamp(4px, 2vw, 28px); }
.bar a:not(.bar-mark) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
  font-size: var(--s-body); text-decoration-color: transparent;
}
.bar a[aria-current="true"] { color: var(--green-text); text-decoration-color: currentColor; text-decoration-thickness: 2px; }

.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bits {
  position: absolute; left: -20vw; top: -6vh; width: 140vw; height: 150vh;
  opacity: var(--bits-opacity); will-change: transform;
}
.bits picture, .bits img { display: block; width: 100%; height: 100%; object-fit: cover; }
.orbit {
  position: absolute; left: 50%; top: 46%;
  width: var(--emblem-size); aspect-ratio: 1;
  margin: calc(var(--emblem-size) / -2) 0 0 calc(var(--emblem-size) / -2);
  will-change: transform, opacity;
}
.orbit picture { display: block; width: 100%; height: 100%; }
.emblem { width: 100%; height: 100%; pointer-events: auto; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.emblem.is-held { cursor: grabbing; }

@media (prefers-reduced-motion: no-preference) {
  .bits img { animation: drift var(--bits-drift) ease-in-out infinite alternate; }
}
@keyframes drift { from { transform: translateX(-3vw); } to { transform: translateX(3vw); } }

main, .foot { position: relative; z-index: 1; }

main { pointer-events: none; }
main > section:not(.hero) { pointer-events: auto; }
main > section { padding: var(--section) var(--gutter) 0; }
h2 { font-size: var(--s-mid); color: var(--green-text); margin-bottom: clamp(32px, 6vh, 64px); }

.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 20px;
  padding: 0 var(--gutter) max(28px, env(safe-area-inset-bottom)) !important;
  pointer-events: none;
}
.hero a, .hero-words { pointer-events: auto; }
.hero h1 { font-size: var(--s-mid); color: var(--ink); }
.hero-words p { margin-top: 6px; max-width: 36ch; }
.hint {
  position: absolute; left: 50%; top: calc(46% + var(--emblem-size) / 2 + 10px);
  transform: translateX(-50%);
  font-size: var(--s-small); color: var(--soft); opacity: 0;
  transition: opacity 600ms ease;
}
.hint.is-on { opacity: 1; }

@media (min-width: 701px) {
  .hero { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

.scatter { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; row-gap: 72px; }
.rel { grid-column: 1 / -1; }
.rel-meta { font-size: var(--s-small); color: var(--soft); margin-bottom: 10px; }
.rel-cover { display: block; overflow: hidden; background: var(--emblem) center / 50% no-repeat;}
.rel-cover img { width: 100%; aspect-ratio: 1; object-fit: cover;}
.rel-cover:hover img { mix-blend-mode:hue; }
.rel-title { font-size: var(--s-mid); margin-top: 14px; line-height: 1.15; }
.rel-title a { text-decoration-color: transparent; }
.rel-links { display: flex; gap: 18px; margin-top: 6px; }
.rel-links a { display: inline-flex; align-items: center; min-height: 44px; }
.remark { grid-column: 1 / -1; font-size: var(--s-mid); line-height: 1.3; max-width: 22ch; }

.rel--b { grid-column: 5 / -1; }
.rel--c { grid-column: 1 / 11; }

@media (min-width: 701px) {
  .scatter { row-gap: 20vh; }
  .rel { grid-row: var(--row); }
  .rel--a { grid-column: 1 / span 6; }
  .rel--b { grid-column: 9 / -1; margin-top: calc(-20vh - 80px); }
  .rel--c { grid-column: 3 / span 4; }
  .remark { grid-column: 2 / span 5; grid-row: 2; align-self: center; }
}

.row {
  display: flex; gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px;
  scrollbar-width: none; cursor: grab;
}
.row::-webkit-scrollbar { display: none; }
.row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.row.is-dragging a { pointer-events: none; }
.set { flex: 0 0 min(78vw, 520px); scroll-snap-align: start; }
.set-meta { font-size: var(--s-small); color: var(--soft); margin-bottom: 10px; }
.set-pic { display: block; overflow: hidden; background: var(--emblem) center / 50% no-repeat;}
.set-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; -webkit-user-drag: none;}
.set-pic:hover img { mix-blend-mode:hue; }
.set-title { font-size: var(--s-mid); margin-top: 14px; line-height: 1.15; }
.set-title a { text-decoration-color: transparent; }
.set-where { margin-top: 6px; }
.set-where a { display: inline-flex; align-items: center; min-height: 44px; }
.set--more { flex-basis: min(64vw, 360px); display: flex; align-items: center; }
.set--more p { font-size: var(--s-mid); line-height: 1.3; }

.show { display: grid; gap: 28px; }
.show-date { font-size: var(--s-big); line-height: 0.9; letter-spacing: -0.04em; }
.show-when { font-size: var(--s-small); color: var(--soft); margin-top: 14px; }
.show-lines p { font-size: var(--s-mid); line-height: 1.35; }
.show-lines .show-name { color: var(--green-text); }
.show-lineup { color: var(--soft); }
.show-lineup b { font-weight: 400; color: var(--ink); }
.show-lineup span, .show-lineup b { white-space: nowrap; }
.show .button { margin-top: 28px; }
.show-none { font-size: var(--s-mid); max-width: 26ch; }
.js .show-none { display: none; }
.show.is-empty .show-none { display: block; }

@media (min-width: 701px) {
  .show { grid-template-columns: 7fr 5fr; align-items: end; column-gap: 32px; }
}

.contact { display: grid; gap: 40px; }
.contact-intro p { font-size: var(--s-mid); line-height: 1.35; max-width: 20ch; }
.form { background: var(--surface); padding: clamp(20px, 4vw, 40px); display: grid; gap: 18px; }
.field label { display: block; font-size: var(--s-small); color: var(--soft); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--field); color: var(--ink);
  border: 1px solid #47474a; border-radius: 0;
  font: 400 var(--s-body)/1.4 var(--font);
  transition: border-color var(--t-hover) ease;
}
.field input:focus, .field textarea:focus { border-color: var(--green); outline: 2px solid var(--yellow); outline-offset: 2px; }
.field textarea { resize: vertical; min-height: 140px; }
.form .button { justify-self: start; min-width: 140px; }
.form .button[disabled] { opacity: 0.6; cursor: progress; }
.form-status { font-size: var(--s-body); min-height: 1.5em; }
.form-status.is-ok { color: var(--green-text); }
.form-status.is-error { color: var(--yellow); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 701px) {
  .contact { grid-template-columns: repeat(12, 1fr); column-gap: 16px; align-items: start; }
  .contact-intro { grid-column: 1 / span 5; }
  .form { grid-column: 7 / -1; }
}

.foot {
  min-height: 92svh;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
  font-size: var(--s-small);
  pointer-events: none;
}
.foot a, .foot p { pointer-events: auto; }
.foot-links { display: flex; flex-wrap: wrap; column-gap: 20px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }

@media (min-width: 701px) {
  .foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; align-content: end; }
  .foot > :last-child { text-align: right; }
  .foot-links { column-gap: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] {
    opacity: 0; transform: translateY(18px);
    animation: rise var(--t-reveal) var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 300ms);
  }
  .js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .orbit { animation: arrive 1400ms var(--ease-out) both; }
}
.js .orbit { animation-fill-mode: backwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes arrive { from { opacity: 0.15; scale: 0.94; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage { position: absolute; height: 100svh; }
  .emblem { cursor: default; }
  .js [data-reveal] { opacity: 0; transition: opacity 400ms ease; }
  .js [data-reveal].is-in { opacity: 1; }
  .rel-cover:hover img, .set-pic:hover img { transform: none; }
}
