/* Midiator website. Light by default, dark when the system is dark. Short sections, big type,
   real screenshots. The only 8-bit thing is the demo's Send button (simulator.css). */

:root {
  --bg: #fbfaf8;
  --bg-2: #f2f0eb;
  --card: #ffffff;
  --ink: #16150f;
  --ink-2: #57554d;
  --ink-3: #8d8a80;
  --line: rgba(22, 21, 15, 0.1);
  --brand: #f2542d;
  --accent: #c93a15;
  --accent-hover: #b0310f;
  --accent-soft: #fdebe4;
  --on-accent: #ffffff;
  --dark: #121110;
  --dark-2: #1d1c19;
  --green: #3b6d11;
  --radius: 22px;
  --wrap: 1120px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --section: clamp(72px, 10vw, 128px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0c;
    --bg-2: #181714;
    --card: #1d1c19;
    --ink: #f3f1ea;
    --ink-2: #b3b0a6;
    --ink-3: #7c796f;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #ff6b45;
    --accent-hover: #ff8261;
    --accent-soft: #3a170c;
    --on-accent: #1b1a18;
    --dark: #1d1c19;
    --dark-2: #282723;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.honey { position: absolute; left: -9999px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 15px/1 var(--font); padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: transparent; }
.btn--lg { font-size: 17px; padding: 15px 26px; }
.btn--sm { font-size: 14px; padding: 8px 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }
.fine { font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .01em; margin-bottom: 12px; }
.accent { color: var(--accent); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.brand img { border-radius: 7px; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { font-size: 15px; color: var(--ink-2); text-decoration: none; }
.nav__links a:hover { color: var(--ink); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 110px); text-align: center; overflow: hidden; }
.hero__title { font-size: clamp(46px, 8.4vw, 104px); line-height: .98; letter-spacing: -.045em; font-weight: 700; }
.hero__lede { font-size: clamp(18px, 2.1vw, 22px); color: var(--ink-2); max-width: 34ch; margin: 22px auto 32px; line-height: 1.45; }
.hero__shot { margin-top: clamp(48px, 7vw, 80px); }
.window { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: 0 30px 80px -20px rgba(40, 30, 10, .25), 0 0 0 1px rgba(0,0,0,.02); }
.window__bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.window__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window__bar i:nth-child(2) { background: #febc2e; }
.window__bar i:nth-child(3) { background: #28c840; }
.hero .window { border-bottom-left-radius: 0; border-bottom-right-radius: 0; max-height: 560px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-block: var(--section) 0; }
.stat { background: var(--bg-2); border-radius: var(--radius); padding: 30px 28px 32px; }
.stat__big { font-size: clamp(34px, 4vw, 48px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin-bottom: 10px; }
.stat:nth-child(1) .stat__big { color: var(--accent); }
.stat p:last-child { color: var(--ink-2); font-size: 16px; }

/* ---------- Section heads ---------- */
.section-head { text-align: center; max-width: 840px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.04em; font-weight: 700; }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: 19px; margin-top: 14px; }

/* ---------- Try it ---------- */
.try { padding-block: var(--section); }

/* ---------- Features (bento) ---------- */
.features { padding-bottom: var(--section); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 22px; min-height: 300px; }
.tile--wide { grid-column: span 2; }
.tile h3 { font-size: 22px; letter-spacing: -.025em; line-height: 1.15; font-weight: 650; }
.tile__copy p { color: var(--ink-2); font-size: 15px; margin-top: 6px; max-width: 34ch; }
.tile__shot { margin-top: auto; }
.tile__shot img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 16px 40px -18px rgba(40, 30, 10, .3); }
.tile__shot--bleed { margin: auto -28px -28px 28px; }
.tile__shot--bleed img { border-radius: 12px 0 0 0; border-right: 0; border-bottom: 0; }
.tile--dark { background: var(--dark); color: #f3f1ea; }
.tile--dark p { color: #b3b0a6; }
.tile--dark .tile__shot img { border-color: rgba(255,255,255,.1); }
.tile--accent { background: var(--accent-soft); }
.bpm { margin-top: auto; display: flex; align-items: baseline; gap: 10px; }
.bpm__n { font-size: 88px; font-weight: 700; letter-spacing: -.05em; line-height: .9; color: var(--accent); font-variant-numeric: tabular-nums; }
.bpm__u { font-weight: 600; color: var(--ink-2); }
.bpm__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); align-self: center; animation: beat .833s ease-out infinite; }
@keyframes beat { 0% { transform: scale(1.3); opacity: 1; } 60%, 100% { transform: scale(.7); opacity: .35; } }
.scanline { margin-top: auto; display: grid; gap: 8px; }
.scanline span { font-size: 14px; padding: 10px 14px; border-radius: 10px; background: var(--card); color: var(--ink-3); border: 1px solid var(--line); }
.scanline .on { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tile--video { grid-column: 1 / -1; min-height: 360px; background: var(--dark) url("assets/tutorial-poster.jpg?v=2") center / cover; color: #fff; justify-content: flex-end; }
.tile--video p { color: rgba(255,255,255,.7); }
.play { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.play { align-content: end; justify-items: center; gap: 10px; padding-bottom: 12%; }
.play__icon { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; transition: transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.play__label { color: #fff; font: 500 15px var(--font); }
.play__icon::after { content: ""; border-left: 20px solid #16150f; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.play:hover .play__icon { transform: scale(1.08); }

/* ---------- Gear ---------- */
.gear { padding-block: var(--section); background: var(--bg-2); }
.brands { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; }
.brands li { font-size: clamp(20px, 2.4vw, 28px); font-weight: 650; letter-spacing: -.03em; color: var(--ink-3); }
.brands li:nth-child(-n+2) { color: var(--ink); }
.gear__actions { text-align: center; margin-top: 36px; }
.gear__all summary { list-style: none; }
.gear__all summary::-webkit-details-marker { display: none; }
.gear__all[open] summary { margin-bottom: 20px; }
.devices { text-align: left; max-width: 760px; margin: 0 auto; background: var(--card); border-radius: 18px; padding: 22px 26px; border: 1px solid var(--line); }
.devices__legend { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.devices dl { margin: 0; }
.devices dt { font-weight: 650; font-size: 14px; margin-top: 14px; }
.devices dd { margin: 4px 0 0; display: flex; justify-content: space-between; gap: 14px; font-size: 14px; color: var(--ink-2); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.level { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; align-self: flex-start; }
.level--full { background: #e3efd3; color: #27500a; }
.level--part { background: var(--bg-2); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .level--full { background: #27500a; color: #c0dd97; } }
.ask { max-width: 640px; margin: 44px auto 0; text-align: center; }
.ask__label, .updates label { display: block; font-weight: 600; margin-bottom: 12px; }
.ask__row { display: flex; gap: 8px; }
.ask__row input { flex: 1; min-width: 0; font: 15px var(--font); padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.ask__row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.request__note { font-size: 14px; color: var(--ink-2); margin-top: 10px; min-height: 1em; }
.request__note.error { color: #b3261e; }
.request__done { display: flex; align-items: center; gap: 14px; justify-content: center; text-align: left; }
.request__done svg { width: 40px; height: 40px; stroke: var(--green); flex: none; }
.request__done p { color: var(--ink-2); font-size: 15px; }
.request__done button { margin-top: 6px; background: none; border: 0; color: var(--accent); font: 500 14px var(--font); padding: 0; cursor: pointer; }

/* ---------- FAQ ---------- */
.faq { padding-block: var(--section); }
.faq__list { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -.015em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--ink-3); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-2); padding: 0 0 22px; max-width: 62ch; }

/* ---------- Download ---------- */
.cta { padding-block: var(--section); background: var(--dark); color: #f3f1ea; text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta__mark { border-radius: 22px; margin-bottom: 26px; box-shadow: 0 16px 50px rgba(242, 84, 45, .35); }
.cta__title { font-size: clamp(48px, 8vw, 96px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.cta__lede { font-size: 20px; color: #b3b0a6; margin: 14px 0 30px; }
.cta .btn--primary { background: #ff6b45; color: #1b1a18; }
.cta .btn--primary:hover { background: #ff8261; }
.cta .fine { color: #8d8a80; }
.install { margin-top: 22px; font-size: 15px; color: #b3b0a6; }
.install summary { cursor: pointer; color: #f3f1ea; font-weight: 500; }
.install ol { text-align: left; margin: 14px auto 0; padding-left: 20px; display: grid; gap: 6px; max-width: 460px; }
.updates { width: min(460px, 100%); margin-top: 52px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,.12); }
.updates input { background: #1d1c19; color: #f3f1ea; border-color: rgba(255,255,255,.14); }
.updates .btn { background: #282723; color: #f3f1ea; border-color: rgba(255,255,255,.14); }
.updates .request__note, .updates .request__done p { color: #b3b0a6; }

/* ---------- Footer ---------- */
.footer { padding-block: 36px 40px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.footer__links a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--ink); }
.footer__legal { font-size: 12px; color: var(--ink-3); margin-top: 22px; }

/* ---------- Video dialog ---------- */
.video { padding: 0; border: 0; background: #000; border-radius: 16px; width: min(1100px, 94vw); overflow: visible; }
.video::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(6px); }
.video video { display: block; width: 100%; height: auto; border-radius: 16px; }
.video__close { position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 22px; line-height: 1; cursor: pointer; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease var(--d, 0s), transform .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-io .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bpm__dot { animation: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__links { position: fixed; inset: 60px 0 auto; flex-direction: column; gap: 0; padding: 8px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s; }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 13px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-left: auto; }
  .nav__toggle { display: grid; gap: 6px; width: 36px; height: 36px; place-content: center; border: 0; background: none; cursor: pointer; }
  .nav__toggle span { width: 20px; height: 1.5px; background: var(--ink); transition: .2s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .hero .window { max-height: 300px; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat { padding: 24px; }
  .bento { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .tile--video { min-height: 240px; }
  .section-head { margin-bottom: 32px; }
  .section-head p:not(.eyebrow) { font-size: 17px; }
  .ask__row { flex-direction: column; }
  .ask__row .btn { width: 100%; }
  .devices { padding: 18px; }
  .devices dd { flex-direction: column; gap: 4px; }
  .footer__links { margin-left: 0; }
}
