.hero {
  position: relative;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(40px, 7vh, 80px) var(--gutter) 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -160px -30vw auto;
  height: 900px;
  z-index: -2;
  background:
    radial-gradient(52% 46% at 74% 30%, rgb(194 237 135 / 0.13), transparent 70%),
    radial-gradient(40% 40% at 12% 62%, rgb(213 183 139 / 0.07), transparent 70%);
  pointer-events: none;
}

.contours {
  position: absolute;
  top: 0;
  right: calc(var(--gutter) * -1);
  z-index: -1;
  width: min(66%, 860px);
  height: clamp(300px, 46vw, 540px);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 80%, transparent);
}

.hero-copy { max-width: 1100px; }
.hero h1 { margin-top: 26px; font-size: clamp(2.3rem, 8vw, 6.9rem); font-weight: 300; letter-spacing: -0.045em; line-height: 0.96; text-wrap: nowrap; }
.hero h1 em { letter-spacing: -0.03em; }
.lede { max-width: 34em; margin-top: 30px; font-size: clamp(1.05rem, 1.5vw, 1.24rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* The sketch borrows the plugin's panel language: surface, field, quiet lines. */
.demo {
  margin-top: clamp(48px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgb(28 33 29 / 0.92), rgb(20 23 21 / 0.96));
  box-shadow: inset 0 1px 0 rgb(240 242 233 / 0.06), 0 60px 120px -50px #000, 0 0 0 8px rgb(25 29 26 / 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.demo:focus { outline: none; }
.demo-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
.demo-keys { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.demo-keys kbd:not(:first-child) { margin-left: 10px; }
.demo-body { display: grid; grid-template-columns: 250px 1fr; }
.demo-rail { display: grid; align-content: start; gap: 22px; padding: 24px 22px; border-right: 1px solid var(--line); }
.demo-main { display: grid; gap: 22px; padding: 24px 22px 26px; min-width: 0; }

.field-row { display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.field, .chip-group { display: grid; gap: 10px; min-width: 0; }
select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23929c91' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-weight: 600;
  font-size: 0.9rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.chips { display: grid; gap: 6px; }
.chips-2 { grid-template-columns: repeat(2, 1fr); }
.chips-3 { grid-template-columns: repeat(3, 1fr); }
.chip {
  min-height: 40px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(180deg, #cff29c, var(--sage-deep));
  color: var(--charcoal);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45);
}

.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.demo-head h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.hint { margin-top: 4px; font-size: 0.86rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 178px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #232925, #1b201c);
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-3px); border-color: var(--muted); }
.card-top { display: flex; justify-content: space-between; font: 500 0.66rem var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.card-name { align-self: end; font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1; overflow-wrap: anywhere; }
.card-notes { font: 400 0.68rem var(--mono); letter-spacing: 0.16em; color: var(--muted); }
.card-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin-top: 8px; }
.card-strip i { height: 3px; border-radius: 2px; background: rgb(146 156 145 / 0.2); }
.card-strip i.on { background: var(--warm); }
.card.is-active {
  border-color: var(--sage);
  background: linear-gradient(180deg, #33412a, #232c20);
  box-shadow: 0 0 0 1px rgb(194 237 135 / 0.3), 0 22px 50px -24px rgb(194 237 135 / 0.5);
}
.card.is-active .card-name { color: var(--sage); }
.card.is-active .card-strip i.on { background: var(--sage); }

.demo-transport { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.demo-transport .btn { min-width: 122px; }
.icon-play { width: 0; height: 0; border-block: 6px solid transparent; border-left: 10px solid currentcolor; }
.is-playing .icon-play { width: 11px; height: 11px; border: 0; border-radius: 2px; background: currentcolor; }

@media (max-width: 900px) {
  .contours { width: 100%; opacity: 0.6; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; }
  .demo-rail > :first-child { grid-column: 1 / -1; }
  .demo-main { order: -1; border-bottom: 1px solid var(--line); }
  .demo-keys { display: none; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 140px; }
  .card-name { font-size: 1.22rem; }
  .hero h1 { text-wrap: balance; }
  .demo-rail { grid-template-columns: 1fr; }
  .demo-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .chip { transition: none; }
}
