/* Self-hosted fonts (SIL Open Font License, see fonts/OFL.txt) */
@font-face { font-family: "Syne"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/syne-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/syne-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

/* Studio Mi v1
   Layout: a narrow single column on a deep violet ground, with the
   "pulse rings" from the first cover as the recurring visual motif. */
:root {
  --ground: #1a1030;        /* deep violet, the cover's background */
  --ground-2: #241843;      /* raised surface */
  --line: #3a2c63;          /* hairlines */
  --ink: #f5efe6;           /* warm off-white text */
  --ink-soft: #bfb3d6;      /* secondary text, violet-tinted */
  --orange: #ff7a2f;
  --yellow: #ffcf3f;
  --blue: #4fa8ff;
  --purple: #8f5bff;

  --display: "Syne", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --beat: 0.682s;           /* one beat at 88 BPM */
  --measure: 2.727s;        /* one bar of 4/4 at 88 BPM */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  padding-inline: 20px;
  position: relative;
}

/* Shader canvas sits behind the header and hero, fading into the page */
canvas.shader {
  position: absolute; top: 0; left: 0; width: 100%; z-index: 0; display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
          mask-image: linear-gradient(to bottom, #000 72%, transparent);
  pointer-events: none;
}
.wrap { position: relative; z-index: 1; }
.gl .hero-art svg { visibility: hidden; }
.gl .hero h1, .gl .hero .lede { text-shadow: 0 2px 24px rgba(26, 16, 48, 0.7); }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 68rem; margin-inline: auto; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 24px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font: 800 1.25rem/1 var(--display); letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark svg { width: 28px; height: 28px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--ink-soft); padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--orange); }
.nav .nav-sub { color: var(--yellow); }

/* Type */
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.6rem, 8vw, 5.2rem); line-height: 0.95; letter-spacing: -0.03em; }
h2 { font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
p { margin: 0; max-width: 62ch; }
.eyebrow {
  font: 500 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--yellow);
}
.lede { font-size: 1.2rem; color: var(--ink-soft); }
.stack { display: grid; gap: 18px; align-content: start; }

/* Sections */
section { padding-block: 64px; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 56px 72px; }
.hero h1 .mi { color: var(--orange); }
.hero-art { max-width: 460px; justify-self: end; width: 100%; }

/* Hero entrance */
.hero .stack > * { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both; }
.hero .stack > :nth-child(2) { animation-delay: .08s; }
.hero .stack > :nth-child(3) { animation-delay: .16s; }
.hero .stack > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Cover hover */
a.cover { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s; }
a.cover:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 24px 60px -20px rgba(255, 122, 47, 0.45); }

/* Pulse rings, timed to the track's tempo */
.rings circle { transform-origin: 50% 50%; transform-box: fill-box; }
.rings .r1 { animation: pulse var(--measure) ease-out infinite; }
.rings .r2 { animation: pulse var(--measure) ease-out infinite calc(var(--beat) * 1); }
.rings .r3 { animation: pulse var(--measure) ease-out infinite calc(var(--beat) * 2); }
.rings .r4 { animation: pulse var(--measure) ease-out infinite calc(var(--beat) * 3); }
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  20% { opacity: 0.55; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .rings circle, .hero .stack > * { animation: none !important; }
  a.cover, a.cover:hover { transition: none; transform: none; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.95rem/1 var(--body); text-decoration: none;
  padding: 14px 20px; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
}
.btn:hover { background: var(--ink); color: var(--ground); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #1a1030; }
.btn-primary:hover { background: var(--yellow); border-color: var(--yellow); color: #1a1030; }
.btn[aria-disabled="true"] { border-style: dashed; color: var(--ink-soft); border-color: var(--line); pointer-events: none; }
.btn small { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* Play button: fills left to right as the track plays */
.play {
  --progress: 0%;
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 0.95rem/1 var(--body); color: #1a1030; cursor: pointer;
  padding: 12px 18px 12px 14px; border-radius: 999px; border: 0;
  background: linear-gradient(90deg, var(--yellow) var(--progress), var(--orange) var(--progress));
}
.play:hover { filter: brightness(1.06); }
.play-icon { width: 14px; height: 14px; position: relative; flex: none; }
.play-icon::before { content: ""; position: absolute; inset: 0; background: #1a1030; clip-path: polygon(10% 0, 100% 50%, 10% 100%); }
.play.is-playing .play-icon::before { clip-path: polygon(0 0, 38% 0, 38% 100%, 0 100%, 0 0, 62% 0, 100% 0, 100% 100%, 62% 100%, 62% 0); }
.play-time { font: 500 0.72rem/1 var(--mono); font-variant-numeric: tabular-nums; opacity: .75; }
.tracks .play { padding: 8px 14px 8px 10px; font-size: .85rem; letter-spacing: 0; text-transform: none; }

/* Featured track strip (home) */
.featured { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 20px 24px; align-items: center; padding-block: 36px; }
.mini-cover { width: 88px; aspect-ratio: 1; border-radius: 4px; overflow: hidden; display: block; }
.mini-cover svg { width: 100%; height: 100%; }
.featured-text { display: grid; gap: 8px; min-width: 0; }
.featured h2 { font-size: 1.5rem; }
@media (max-width: 640px) {
  .featured { grid-template-columns: 64px minmax(0, 1fr); }
  .mini-cover { width: 64px; }
  .featured .actions { grid-column: 1 / -1; }
}

/* Release block */
.release { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: start; }
.cover { position: relative; aspect-ratio: 1; width: 100%; max-width: 100%; background: var(--ground-2); border-radius: 6px; overflow: hidden; }
.cover svg { width: 100%; height: 100%; }
.cover-name {
  position: absolute; left: 7%; bottom: 6%;
  font: 800 clamp(0.9rem, 2.4vw, 1.15rem)/1 var(--display); letter-spacing: 0.02em; color: var(--ink);
}
.cover-title {
  position: absolute; left: 7%; top: 7%;
  font: 500 clamp(0.6rem, 1.6vw, 0.72rem)/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--yellow);
}
.specs {
  display: flex; flex-wrap: wrap; gap: 8px;
  font: 500 0.8rem/1 var(--mono); font-variant-numeric: tabular-nums;
}
.specs span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }
.specs b { color: var(--ink); font-weight: 600; }

/* Track map: the arrangement on a 3:08 timeline */
.trackmap { display: grid; gap: 10px; }
.trackmap-bar { position: relative; height: 44px; border-radius: 4px; overflow: hidden; display: flex; }
.trackmap-bar div { height: 100%; }
.trackmap-labels { position: relative; height: 1.2em; font: 500 0.72rem/1.2 var(--mono); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.trackmap-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.trackmap-labels span:first-child { transform: none; }
.trackmap-labels span:last-child { transform: translateX(-100%); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

/* Strands (home) */
.strands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.strand { padding: 22px 20px 26px 0; display: grid; gap: 10px; align-content: start; }
.strand + .strand { padding-left: 20px; border-left: 1px solid var(--line); }
.strand .dot { width: 12px; height: 12px; border-radius: 50%; }
.strand p { font-size: 0.95rem; color: var(--ink-soft); }
.status { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.status.live { color: var(--orange); }
a.status { text-decoration: none; }
a.status:hover { color: var(--yellow); }

/* Track list */
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tracks li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid var(--line); }
.tracks .tn, .tracks .td, .tracks .tl { font: 500 0.8rem/1.4 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.tracks .tl { color: var(--orange); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.tracks .tt { font: 700 1.1rem/1.3 var(--display); }
.tracks .tt small { display: block; font: 400 0.85rem/1.4 var(--body); color: var(--ink-soft); margin-top: 2px; }
.tracks li.todo { border-bottom-style: dashed; }
.tracks li.todo .tt { color: var(--ink-soft); }

/* Games */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.game { display: grid; gap: 20px; align-content: start; }
.game-art { aspect-ratio: 40 / 21; width: 100%; max-width: 100%; border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.game-art span { font: 800 clamp(1.4rem, 4vw, 2.2rem)/1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.game-art-a { background: radial-gradient(circle at 30% 35%, var(--orange) 0 8%, transparent 9%), repeating-radial-gradient(circle at 30% 35%, var(--purple) 0 10px, var(--ground-2) 10px 22px); }
.game-art-a span { background: var(--ground); padding: 10px 16px; border-radius: 4px; }
.game-art-c { background: linear-gradient(135deg, var(--yellow), var(--orange)); text-decoration: none; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.game-art-c:hover { transform: translateY(-4px); }
.game-art-c span { color: #1a1030; }
.game-art-c em { font-style: normal; opacity: .6; }
.game-art-b { background: var(--ground-2); border: 1.5px dashed var(--line); }
.game-art-b span { color: var(--ink-soft); }

/* Newsletter band */
.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 48px; align-items: start; }
.photo {
  aspect-ratio: 4 / 5; width: 100%; max-width: 100%; border: 1.5px dashed var(--line); border-radius: 6px;
  display: grid; place-items: center; text-align: center; padding: 20px;
  font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.name-parts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.name-part { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.name-part dt { font: 800 1.35rem/1.2 var(--display); color: var(--orange); }
.name-part dd { margin: 0; color: var(--ink-soft); }
.name-part dd b { color: var(--ink); font-weight: 600; }
.links { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.links li { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.links a { text-decoration: none; }
.links a:hover { color: var(--yellow); }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 28px 40px; border-top: 1px solid var(--line);
  font: 500 0.78rem/1.4 var(--mono); color: var(--ink-soft);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 800px) {
  .hero, .release, .about, .newsletter { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; max-width: 320px; }
  .strands { grid-template-columns: minmax(0, 1fr); }
  .strand, .strand + .strand { padding-left: 0; border-left: 0; grid-template-columns: 12px minmax(0, 9rem) minmax(0, 1fr); align-items: baseline; column-gap: 14px; }
  .strand + .strand { border-top: 1px solid var(--line); }
  .strand .status { grid-column: 2 / -1; }
  .games { grid-template-columns: minmax(0, 1fr); }
  .about .photo { max-width: 260px; }
  section { padding-block: 48px; }
}
@media (max-width: 460px) {
  body { padding-inline: 16px; }
  .strand, .strand + .strand { grid-template-columns: 12px minmax(0, 1fr); }
  .strand p { grid-column: 2; }
  .tracks li { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .tracks .tl { grid-column: 2 / -1; }
  .name-part { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .trackmap-labels .tm-intro { display: none; }
}

/* Privacy and legal pages */
.legal { max-width: 46rem; gap: 14px; }
.legal h2 { font-size: 1.3rem; margin-top: 18px; }
.legal a { color: var(--yellow); }
.contact { font-family: var(--mono); font-size: .92em; color: var(--ink); }

.game-img { object-fit: cover; height: auto; background: var(--ground-2); }
.game-art-anc { background: #141a17; text-decoration: none; display: flex; gap: 18px; justify-content: center; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.game-art-anc:hover { transform: translateY(-4px); }
.game-art-anc img { width: 28%; height: auto; }
.game-art-anc span { font-size: clamp(1.1rem, 3vw, 1.7rem); }
.game-art-anc span { color: #dba94e; }
.game-art-anc em { font-style: normal; opacity: .6; }
.anc-video { width: 100%; max-width: 260px; aspect-ratio: 9 / 16; height: auto; border-radius: 6px; background: #000; }
.anc-cap { font-size: .85rem; color: var(--muted, inherit); opacity: .75; margin-top: -4px; }
.games-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.anc-feature { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 960px) { .games-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .anc-feature { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
.game-art-c, .game-art-anc { container-type: inline-size; }
.game-art-c span { font-size: 6cqw; }
.game-art-anc span { font-size: 4.6cqw; }
.game-art-anc { gap: 4cqw; }
.game-art-anc img { width: 24%; flex: 0 0 24%; }
.game-art-sc { background: #f3f5f0; text-decoration: none; display: flex; gap: 4cqw; justify-content: center; container-type: inline-size; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.game-art-sc:hover { transform: translateY(-4px); }
.game-art-sc img { width: 22%; flex: 0 0 22%; height: auto; border-radius: 18%; }
.game-art-sc span { font-size: 5.2cqw; color: #1d2420; }
.game-art-sc em { font-style: normal; color: #1f7a52; }
.game { container-type: inline-size; }
.game-art-c, .game-art-anc, .game-art-sc { container-type: normal; }
.game-art-sc span { font-size: 6cqw; }
.game-art-anc span { font-size: 6cqw; }
.game-art-sc span, .game-art-anc span { font-size: 4.4cqw; }
.game-art-sc, .game-art-anc { gap: 3cqw; }
.game-art-sc img, .game-art-anc img { width: 20%; flex: 0 0 20%; }
.game-art-sc img.sc-logo { width: 70%; flex: 0 0 70%; border-radius: 0; }

.strand h3 a.strand-link { color: inherit; text-decoration: none; }
.strand h3 a.strand-link span { display: inline-block; opacity: .45; transition: transform .2s, opacity .2s; }
.strand h3 a.strand-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.strand h3 a.strand-link:hover span { opacity: 1; transform: translateX(3px); }
