/* Self-hosted WOFF2 subsets. License notices are in the fonts directory. */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cinzel-600-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cinzel-600-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-vietnamese.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309,
    U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0a0812;
  --panel: #151122;
  --field: #1b162b;
  --line: #373047;
  --ink: #f5eddf;
  --dim: #bbb2c8;
  --gold: #f0bf6b;
  --cyan: #92d7ff;
  --violet: #c1a8ff;
  --display: Cinzel, Georgia, serif;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(65rem 36rem at 50% 0, #211635, transparent 75%), var(--bg);
  color: var(--ink);
  font:
    1rem/1.55 system-ui,
    sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

:focus-visible,
.file:focus-within {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - clamp(2rem, 8vw, 6rem), 76rem);
  margin-inline: auto;
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-block: clamp(1rem, 3vw, 2rem) 1.75rem;
  text-align: center;
}

.masthead h1 {
  width: min(100%, 46rem);
  margin: 0;
}

/* The artwork sits on pure black; screen blending drops the black into the page background. */
.logo {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
}

.tagline {
  margin: 0;
  color: var(--dim);
  font:
    500 clamp(1.25rem, 2.5vw, 1.65rem) / 1.2 "Cormorant Garamond",
    Georgia,
    serif;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.15rem;
  color: var(--dim);
  font-size: 0.875rem;
}

.section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.section-nav a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.panel {
  min-width: 0;
  margin-block: 1.25rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), #100d1c);
  scroll-margin-top: 1rem;
}

.studio {
  margin-top: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.studio-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.panel h2,
.panel h3 {
  margin: 0;
  font: 600 clamp(1.2rem, 2vw, 1.5rem) / 1.25 var(--display);
  letter-spacing: 0.04em;
}

.studio h2,
.panel h3 {
  font-size: 1rem;
}

.panel h3 span {
  color: var(--gold);
}

.subsection {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.section-copy,
.status,
.keys,
.drop {
  margin: 0.4rem 0 0;
  color: var(--dim);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.stage {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #000;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.stage:fullscreen {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.stage.drag {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.stage-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dim);
  font-size: 0.75rem;
}

.stage-mode::before {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.bar,
.chips,
.timeline,
.keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.bar,
.chips {
  margin-top: 0.8rem;
}

.timeline {
  flex: 1 1 14rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.timeline input {
  flex: 1;
  min-width: 0;
}

button,
.file,
select,
input[type="text"] {
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

button,
.file {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

button:not(:disabled):hover,
.file:hover {
  border-color: var(--violet);
}

:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary,
.chip.auto[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: #201408;
}

.primary:not(:disabled):hover {
  background: #ffcf82;
}

.rec.on {
  border-color: #df8292;
  background: #48212d;
  color: #ffdae2;
}

.file {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.time,
.seed,
.lv {
  font-variant-numeric: tabular-nums;
}

.time,
.seed {
  color: var(--dim);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.lv {
  color: var(--ink);
}

.chip {
  max-width: 100%;
  padding-inline: 0.9rem;
  border-radius: 999px;
}

.chip[aria-pressed="true"]:not(.auto) {
  border-color: var(--violet);
  background: #302347;
  color: #fff;
}

.grid,
.mixer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-top: 1rem;
}

.mixer {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.nature {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sound {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 8, 18, 0.35);
}

.sound legend {
  padding: 0 0.4rem;
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--display);
  letter-spacing: 0.04em;
}

.mixer label {
  align-items: center;
  text-align: center;
}

label,
.swatches legend {
  color: var(--dim);
  font-size: 0.875rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

label input,
label select {
  width: 100%;
}

input[type="range"] {
  min-height: 24px;
  margin: 0;
  accent-color: var(--gold);
}

#seek {
  min-height: 44px;
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--ink);
}

.check input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--gold);
}

.swatches {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.swatches legend {
  margin-bottom: 0.3rem;
  padding: 0;
}

.swatch-row {
  display: flex;
  gap: 0.4rem;
}

.swatch-row input {
  width: 3rem;
  min-width: 0;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  cursor: pointer;
}

.status {
  margin-top: 0.75rem;
}

.status:empty {
  margin: 0;
}

.keys {
  gap: 0.5rem 1rem;
  margin-top: 1rem;
}

kbd {
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink);
  font:
    0.75rem/1.3 ui-monospace,
    monospace;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.5rem 2rem;
  color: var(--dim);
  font-size: 0.8125rem;
}

.footer strong {
  color: var(--ink);
  font-family: var(--display);
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
}

.footer a:hover {
  color: #ffcf82;
}

@media (max-width: 52rem) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mixer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .masthead {
    row-gap: 0.5rem;
  }

  .timeline {
    flex-basis: 100%;
  }

  .nature {
    grid-template-columns: minmax(0, 1fr);
  }

  select,
  input[type="text"] {
    font-size: 1rem;
  }
}

@media (max-width: 27rem) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
