@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/SchibstedGrotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --paper: #f1efe9;
  --paper-2: #e8e5dc;
  --ink: #141414;
  --ink-2: #3b3a36;
  --muted: #6f6c64;
  --rule: #d4d0c5;
  /* From the app icon: the blue ring and the green level bars. */
  --accent: #2d6ad6;
  --accent-deep: #2156b8;
  --ring: #4a8ae4;
  --mint: #7fe0aa;
  --icon-bg: #1b1e25;
  --dark: #141414;
  --dark-2: #1e1e1d;
  --dark-rule: #33322f;
  --dark-muted: #a19d93;
  --pad: clamp(16px, 4vw, 40px);
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
b, strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--pad); }

h2 {
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: .98;
  letter-spacing: -0.035em;
  font-weight: 750;
  text-wrap: balance;
}
h3 { font-size: 20px; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.top { border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.mark {
  display: flex; align-items: center; gap: 10px;
  font-weight: 750; font-size: 20px; letter-spacing: -0.02em; text-decoration: none;
}
.mark img { border-radius: 6px; }
.top-nav { display: flex; gap: 28px; margin-left: auto; font-size: 16px; }
.top-nav a { text-decoration: none; color: var(--ink-2); }
.top-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.top-cta {
  text-decoration: none; font-weight: 650; font-size: 15px;
  padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--paper);
}
.top-cta:hover { background: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 88px); }
.meta {
  display: flex; flex-wrap: wrap; gap: 8px 0;
  font-size: 14px; color: var(--muted); font-weight: 500;
}
.meta span + span::before { content: "/"; margin: 0 12px; color: var(--rule); }
h1 {
  margin-top: 20px;
  font-size: clamp(60px, 12.4vw, 184px);
  line-height: .86;
  letter-spacing: -0.055em;
  font-weight: 800;
  margin-left: -0.05em;
}
/* The "O" drawn as the Oxbeat logo: a ring with level bars inside. */
.o-logo {
  display: inline-block;
  width: .74em; height: .74em;
  margin: 0 .03em 0 .02em;
  vertical-align: -0.012em;
}
.o-logo svg { width: 100%; height: 100%; overflow: visible; }
.o-logo .ring { fill: none; stroke: var(--ring); stroke-width: 44; }
.o-logo .bars rect { fill: var(--mint); transform-box: fill-box; transform-origin: center; animation: level var(--d, 1.1s) ease-in-out var(--delay, 0s) infinite alternate; }
.o-logo .bars rect:nth-child(1) { --d: .9s;  --delay: -.4s; }
.o-logo .bars rect:nth-child(2) { --d: 1.2s; --delay: -.9s; }
.o-logo .bars rect:nth-child(3) { --d: 1s;   --delay: -.2s; }
.o-logo .bars rect:nth-child(4) { --d: 1.3s; --delay: -.7s; }
.o-logo .bars rect:nth-child(5) { --d: .8s;  --delay: -.5s; }
@keyframes level { from { transform: scaleY(1); } to { transform: scaleY(.55); } }
.o-logo .disc { fill: var(--icon-bg); }

.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 28px; border-top: 1px solid var(--ink);
}
.lead { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.4; max-width: 34ch; color: var(--ink-2); }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.button {
  display: inline-flex; flex-direction: column; gap: 2px;
  padding: 16px 26px 15px; border-radius: 14px;
  background: var(--accent); color: #fff; text-decoration: none;
  transition: background .15s, transform .15s;
}
.button:hover { background: var(--accent-deep); }
.button:active { transform: translateY(1px); }
.button-label { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.button-sub { font-size: 13px; opacity: .85; }

.hero-shot {
  margin-top: clamp(40px, 6vw, 72px);
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--ink);
  background: #131417;
  box-shadow: 0 30px 60px -30px rgba(20, 20, 20, .45);
}

/* ---------- Bands ---------- */
.band { margin-top: clamp(80px, 11vw, 150px); }
.band-dark { background: var(--dark); color: var(--paper); }
.band-blue { background: var(--accent); color: #fff; }

/* ---------- Try it ---------- */
.play {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 72px; align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
}
.play-text > p { color: var(--dark-muted); margin-top: 22px; max-width: 42ch; }
kbd {
  font: 600 14px/1 var(--font);
  display: inline-block; min-width: 1.8em; padding: 4px 6px 5px; text-align: center;
  border: 1px solid var(--dark-rule); border-bottom-width: 3px; border-radius: 6px;
  color: var(--paper); background: var(--dark-2);
}
.play-text > .play-status {
  display: flex; gap: 24px; align-items: baseline;
  margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--dark-rule);
  font-size: 15px;
}
#play-note { font-size: 44px; font-weight: 750; letter-spacing: -0.03em; color: var(--mint); min-width: 2.2em; line-height: 1; }

.piano {
  --p: 14px;
  --slot: calc((100% - 2 * var(--p)) / 8);
  position: relative; display: flex; height: clamp(190px, 24vw, 300px);
  padding: var(--p) var(--p) 18px; border-radius: 18px;
  background: #0b0b0b; border: 1px solid var(--dark-rule);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .04);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.key {
  font: 600 14px/1 var(--font); cursor: pointer; border: 0; padding: 0 0 14px;
  display: flex; align-items: flex-end; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.key.white {
  flex: 1; margin: 0 2px; border-radius: 0 0 8px 8px;
  background: linear-gradient(#fbfaf7, #ebe8e0);
  color: var(--muted);
  box-shadow: inset 0 -6px 0 #d9d5ca;
}
.key.black {
  position: absolute; top: var(--p); z-index: 1;
  width: calc(var(--slot) * .6); height: 60%;
  margin-left: calc(var(--slot) * -.3);
  border-radius: 0 0 6px 6px;
  background: linear-gradient(#2a2a29, #111);
  color: #8d8a82;
  box-shadow: inset 0 -5px 0 #000, 0 2px 0 rgba(0, 0, 0, .4);
}
.key.white.on { background: linear-gradient(#e4ecfb, #c9daf7); box-shadow: inset 0 -2px 0 #a9c2ee; transform: translateY(2px); color: var(--accent-deep); }
.key.black.on { background: var(--accent); box-shadow: inset 0 -2px 0 var(--accent-deep); color: #fff; }
/* Black keys sit on the line between two white keys. */
.key.black[data-note="1"]  { left: calc(var(--p) + var(--slot) * 1); }
.key.black[data-note="3"]  { left: calc(var(--p) + var(--slot) * 2); }
.key.black[data-note="6"]  { left: calc(var(--p) + var(--slot) * 4); }
.key.black[data-note="8"]  { left: calc(var(--p) + var(--slot) * 5); }
.key.black[data-note="10"] { left: calc(var(--p) + var(--slot) * 6); }

/* ---------- Features ---------- */
.inside {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 72px;
  padding-top: clamp(80px, 11vw, 150px);
}
.inside-head { align-self: start; position: sticky; top: 32px; }
.inside-head p { margin-top: 22px; color: var(--muted); max-width: 36ch; }
.specs { counter-reset: spec; border-top: 1px solid var(--ink); }
.specs li {
  counter-increment: spec;
  display: grid; grid-template-columns: 56px 150px minmax(0, 1fr); gap: 6px 20px;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.specs li::before {
  content: counter(spec, decimal-leading-zero);
  font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums;
}
.specs p { color: var(--ink-2); font-size: 17px; }

/* ---------- Tour ---------- */
.tour { display: grid; gap: clamp(64px, 9vw, 120px); padding-top: clamp(80px, 11vw, 150px); }
.tour-item { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 56px; align-items: end; }
.tour-item img { border-radius: 12px; border: 1px solid var(--ink); }
.tour-item figcaption { border-top: 1px solid var(--ink); padding: 20px 0 8px; }
.tour-item h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.025em; line-height: 1.1; font-weight: 700; }
.tour-item p { margin-top: 14px; color: var(--ink-2); }
.tour-item.flip { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.tour-item.flip img { order: 2; }

/* ---------- Free ---------- */
.free {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px 72px; align-items: end;
  padding-block: clamp(64px, 9vw, 120px);
}
.free-big { font-size: clamp(64px, 11vw, 168px); line-height: .86; letter-spacing: -0.055em; font-weight: 800; }
.free-list li { padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .45); font-size: 18px; }
.free-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .45); }

/* ---------- Packs ---------- */
.packs { padding-top: clamp(80px, 11vw, 150px); }
.packs-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 72px; align-items: end; margin-bottom: 44px; }
.packs-head p { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 640px; }
.table th {
  text-align: left; font-weight: 600; font-size: 13px; color: var(--muted);
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink);
}
.table td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); }
.table td:first-child { font-weight: 650; color: var(--ink); white-space: nowrap; }
.table td:nth-child(3) { white-space: nowrap; }
.packs-more { margin-top: 24px; }

/* ---------- Download ---------- */
.download { padding-block: clamp(64px, 9vw, 120px); }
.dl-head { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); }
.dl-icon { width: clamp(64px, 9vw, 112px); height: auto; flex: none; }
#dl-version { color: var(--ring); }
.downloads { margin-top: 44px; border-top: 1px solid var(--paper); }
.downloads li {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 8px 24px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--dark-rule);
}
.dl-os { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.dl-what { color: var(--dark-muted); }
.dl-get {
  text-decoration: none; font-weight: 650; font-size: 16px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--dark-rule);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.dl-get:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dl-size { font-weight: 400; opacity: .6; margin-left: 4px; }
.downloads li.mine .dl-get { background: var(--accent); border-color: var(--accent); color: #fff; }
.downloads li.mine .dl-get:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.downloads li.mine .dl-os::after {
  content: "Your system"; font-size: 12px; font-weight: 600; letter-spacing: 0;
  color: var(--mint); margin-left: 12px; vertical-align: middle;
}
.dl-note { margin-top: 28px; color: var(--dark-muted); max-width: 62ch; font-size: 16px; }
.dl-note b { color: var(--paper); }

/* ---------- Footer ---------- */
.foot { padding-top: clamp(56px, 8vw, 96px); padding-bottom: 32px; overflow: hidden; }
.foot-mark { font-size: clamp(72px, 19vw, 300px); line-height: .8; letter-spacing: -0.065em; font-weight: 800; margin-left: -0.06em; }
.foot-row {
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--ink);
  font-size: 15px; color: var(--muted);
}
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.foot-row a { text-decoration: none; color: var(--ink-2); }
.foot-row a:hover { color: var(--accent); }

/* ---------- Narrower screens ---------- */
@media (max-width: 960px) {
  .play, .inside, .free, .packs-head, .tour-item, .tour-item.flip { grid-template-columns: minmax(0, 1fr); }
  .tour-item.flip img { order: 0; }
  .inside-head { position: static; }
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .top-nav { display: none; }
  .top-cta { margin-left: auto; }
  .meta span:nth-child(3) { display: none; }
  .specs li { grid-template-columns: 40px minmax(0, 1fr); }
  .specs li p { grid-column: 2; }
  .downloads li { grid-template-columns: minmax(0, 1fr) auto; }
  .dl-what { grid-column: 1; grid-row: 2; font-size: 15px; }
  .dl-get { grid-row: 1 / 3; grid-column: 2; }
  .dl-os { font-size: 20px; }
  .downloads li.mine .dl-os::after { display: block; margin: 2px 0 0; }
  .piano { --p: 8px; }
  .key { font-size: 12px; padding-bottom: 10px; }
  .key.white { margin: 0 1px; }
  .foot-row nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .o-logo .bars rect { animation: none; }
}
#play-note:empty::before { content: "Press a key"; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--dark-muted); }
