:root {
  --bg: #e3e5e1;
  --surface: #f4f5f2;
  --ink: #16181b;
  --muted: #3e433f;
  --soft: #5c615c;
  --line: #c5c8c2;
  --accent: #b42318;
  --accent-ink: #fff8f5;
  --shadow: 6px 6px 0 #16181b;
  --font: "Onest", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  padding-bottom: 72px;
}
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
img, video, audio { max-width: 100%; }

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand img {
  display: block;
  width: 36px;
  height: 36px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}
.brand-word {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.05em;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero {
  display: grid;
  gap: 28px;
  padding: 36px 0 18px;
}
.kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
}
h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 700;
  max-width: 9ch;
}
.lead {
  margin: 18px 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.bench {
  background: var(--surface);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 18px;
}
.modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}
.modes button,
.levels button,
.go,
.cookie button,
.ghost {
  font: inherit;
  cursor: pointer;
}
.modes button,
.levels button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  min-height: 44px;
  padding: 8px 6px;
}
.modes button[aria-pressed="true"],
.levels button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--surface);
}
.drop {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 168px;
  padding: 22px;
  border: 1px dashed var(--ink);
  background:
    linear-gradient(var(--bg), var(--bg)) left / 8px 100% no-repeat;
  cursor: pointer;
}
.drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.drop strong { font-size: 22px; letter-spacing: -0.03em; }
.drop span, .hint, .status { color: var(--muted); }
.hint, .status { margin: 12px 0 0; font-size: 14px; }
.file-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}
.source, .result video, .result audio {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: #111;
}
.controls { margin-top: 14px; display: grid; gap: 12px; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trim {
  display: grid;
  gap: 10px;
}
.trim label {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.trim input[type="range"] { width: 100%; accent-color: var(--accent); }
.time {
  font-family: var(--mono);
  font-size: 13px;
  min-width: 7ch;
  text-align: right;
}
.turn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.turn select {
  font: inherit;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  min-height: 40px;
  padding: 0 8px;
}
.meter {
  height: 4px;
  background: var(--line);
  margin-top: 14px;
}
.meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}
.go {
  margin-top: 14px;
  width: 100%;
  min-height: 54px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.go:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(22, 24, 27, 0.18); }
.go:disabled { opacity: 0.55; cursor: wait; transform: none; box-shadow: none; }
.sizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.sizes div {
  border-top: 1px solid var(--ink);
  padding-top: 8px;
}
.sizes span {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--soft);
  margin-bottom: 4px;
}
.sizes strong {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.band {
  display: grid;
  margin: 72px 0 28px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.band article {
  position: relative;
  padding: 28px 22px 32px 0;
}
.band article + article { border-top: 1px solid var(--line); }
.band .n {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--soft);
}
.band h2 {
  margin: 8px 0 8px;
  font-size: 26px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.band p { margin: 0; color: var(--muted); max-width: 36ch; }

.sheet {
  padding: 10px 0 72px;
}
.sheet h2 {
  margin: 0 0 16px;
  font-size: 32px;
  letter-spacing: -0.04em;
}
.pairs {
  margin: 0;
  display: grid;
  gap: 0;
}
.pairs div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.pairs dt { font-weight: 700; }
.pairs dd { margin: 0; color: var(--muted); }
.note {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 14px;
  max-width: 68ch;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--ink); }
.foot { align-items: flex-start; }
.req { margin: 8px 0 0; max-width: 42ch; font-size: 13px; line-height: 1.45; }

.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
}
.cookie p { margin: 0; }
.cookie a { color: var(--surface); }
.cookie button {
  border: 0;
  background: var(--surface);
  color: var(--ink);
  min-height: 36px;
  min-width: 64px;
  font-weight: 700;
}

.legal {
  padding: 36px 0 80px;
  max-width: 68ch;
}
.legal h1 {
  max-width: none;
  font-size: clamp(36px, 5vw, 52px);
  margin: 28px 0 16px;
}
.legal p { color: var(--muted); }
.legal a.back { color: var(--ink); }

@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
    gap: 48px;
    align-items: start;
    padding-top: 48px;
  }
}

@media (min-width: 800px) {
  .band { grid-template-columns: repeat(3, 1fr); }
  .band article + article {
    border-top: 0;
    padding-left: 22px;
  }
  .band article + article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 1px;
    background: var(--line);
  }
}

@media (max-width: 720px) {
  .wrap, .top-inner { width: min(var(--wrap), calc(100% - 28px)); }
  .modes { grid-template-columns: 1fr 1fr; }
  .trim label { grid-template-columns: 64px 1fr; }
  .time { grid-column: 2; text-align: left; }
  .cookie { align-items: flex-start; }
  .sizes strong { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .go:hover { transform: none; }
  html { scroll-behavior: auto; }
}
