/*
  Audio Editor — site styles.

  The palette is the application's own spectral colour ramp, the one the
  spectrogram and the app icon are drawn with: near-black through deep blue into
  amber and white-hot. Copied here deliberately so the site and the product cannot
  drift apart visually.
*/

:root {
  /* Ramp stops, low to high. */
  --ramp-0: #0a0c1e;
  --ramp-1: #1e2a78;
  --ramp-2: #4453b4;
  --ramp-3: #dc6614;
  --ramp-4: #ffb24a;
  --ramp-5: #ffe3b8;

  --bg-dark: #07080f;
  --surface: #101322;
  --surface-hover: #171b2e;
  --primary: #dc6614;
  --primary-hot: #ffb24a;
  --primary-glow: rgba(220, 102, 20, 0.36);
  --accent: #4453b4;

  /* Neutrals biased toward the ramp's blue end rather than a flat grey. */
  --text-main: #f2f4fb;
  --text-muted: #949cbb;
  --border: rgba(190, 200, 235, 0.10);
  --border-strong: rgba(190, 200, 235, 0.20);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root.light-mode {
  --bg-dark: #f7f8fc;
  --surface: #ffffff;
  --surface-hover: #eef0f8;
  --primary: #b4500c;
  --primary-hot: #dc6614;
  --primary-glow: rgba(220, 102, 20, 0.16);
  --accent: #3a47a0;

  --text-main: #0d1020;
  --text-muted: #545c7a;
  --border: rgba(13, 16, 32, 0.10);
  --border-strong: rgba(13, 16, 32, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/*
  `overflow-x: clip` on the root, not just `hidden` on the body. The decorative
  glows are wider than a phone, and hidden on the body alone still left the
  document 635px wide at a 375px viewport — the page scrolled sideways.
*/
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: clip;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/*
  Background glows, drawn from the ramp's two ends.

  They live inside a fixed, clipped wrapper rather than being positioned against the
  document. Sitting loose they extended the page past the viewport — `right: -12%` on
  the second one made every page scroll sideways by 12% on a phone, and neither
  `overflow-x: hidden` nor `clip` on the body reliably took it back.
*/
.glow-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-1,
.glow-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
/* Sized against the viewport as well as in pixels, so they stay decoration on a
   phone instead of dictating the width of the document. */
.glow-1 {
  top: -12%;
  left: 4%;
  width: min(620px, 85vw);
  height: min(620px, 85vw);
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.7;
}
.glow-2 {
  top: 38%;
  right: -12%;
  width: min(540px, 80vw);
  height: min(540px, 80vw);
  background: radial-gradient(circle, rgba(68, 83, 180, 0.30) 0%, transparent 70%);
}

/* ---------------------------------------------------------------- navbar */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 40px;
  background: color-mix(in srgb, var(--bg-dark) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }

.nav-btn {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: all 0.2s;
}
.nav-btn:hover {
  background: var(--primary-hot);
  transform: translateY(-1px);
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  transition: 0.2s;
}
.icon-btn:hover { background: var(--surface-hover); }

/* ------------------------------------------------------------------ hero */

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 180px 40px 100px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-hot);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
  margin-bottom: 22px;
}
.hero h1 .hot {
  background: linear-gradient(100deg, var(--ramp-3), var(--ramp-4) 60%, var(--ramp-5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: 1.13rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 auto 38px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-fill {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 30px -10px var(--primary-glow);
}
.btn-fill:hover { background: var(--primary-hot); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); transform: translateY(-2px); }

.hero-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* The hero visual: the product's own spectrogram, drawn with its own ramp. */
.hero-canvas-wrap {
  margin: 56px auto 0;
  max-width: 980px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ramp-0);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
}
.hero-canvas-wrap canvas { display: block; width: 100%; height: 260px; }

.canvas-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------------- sections */

section { padding: 90px 40px; max-width: 1160px; margin: 0 auto; }

.section-head { max-width: 62ch; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
  margin-bottom: 14px;
}
.section-head p { color: var(--text-muted); font-size: 1.03rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: all 0.25s;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-3px);
}
.card .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(220, 102, 20, 0.20), rgba(68, 83, 180, 0.14));
  color: var(--primary-hot);
}
.card h3 { font-size: 1.03rem; font-weight: 650; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); font-size: 0.92rem; }

/* Spec strip */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.spec { background: var(--surface); padding: 24px; }
.spec dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.spec dd {
  font-size: 1.24rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- downloads */

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.os-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.os-card.available { border-color: rgba(220, 102, 20, 0.34); }

.os-header {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.14rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.os-header .tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.os-header .tag.live {
  color: var(--primary-hot);
  border-color: rgba(220, 102, 20, 0.42);
  background: rgba(220, 102, 20, 0.10);
}

.btn-pill {
  display: block;
  background: var(--primary);
  color: #fff;
  border-radius: 100px;
  padding: 14px 22px;
  text-align: center;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-pill:hover { background: var(--primary-hot); transform: translateY(-1px); }

/* Not a button. An unavailable download must not look pressable. */
.btn-pill.unavailable,
.btn-pill[aria-disabled='true'] {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  cursor: not-allowed;
  font-weight: 500;
}
.btn-pill.unavailable:hover { background: transparent; transform: none; }

.meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.req h4 {
  font-size: 0.86rem;
  font-weight: 650;
  margin-bottom: 6px;
}
.req p { font-size: 0.85rem; line-height: 1.6; color: var(--text-muted); }

/* Notices */
.notice {
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.notice i { flex-shrink: 0; margin-top: 3px; }
.notice h3 { margin-bottom: 6px; font-size: 1.02rem; font-weight: 650; }
.notice p { line-height: 1.6; color: var(--text-muted); font-size: 0.93rem; }
.notice p + p { margin-top: 10px; }
.notice code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
}
:root.light-mode .notice code { background: rgba(0, 0, 0, 0.06); }

.notice.info {
  background: rgba(68, 83, 180, 0.09);
  border: 1px solid rgba(68, 83, 180, 0.26);
}
.notice.info i { color: var(--ramp-2); }

.notice.warn {
  background: rgba(220, 102, 20, 0.08);
  border: 1px solid rgba(220, 102, 20, 0.26);
}
.notice.warn i { color: var(--primary-hot); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 56px 40px 28px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
}
.footer-brand { max-width: 34ch; }
.footer-logo { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-links h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; color: var(--text-muted); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--text-main); text-decoration: none; font-size: 0.9rem; opacity: 0.85; }
.footer-links a:hover { opacity: 1; color: var(--primary-hot); }
.footer-mail-btn {
  display: inline-block;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 0.86rem;
  text-decoration: none;
  color: var(--text-main);
  transition: 0.2s;
}
.footer-mail-btn:hover { background: var(--surface-hover); }
.footer-bottom {
  max-width: 1160px;
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }

/* ------------------------------------------------------------ animation */

.fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade.visible { opacity: 1; transform: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .fade { opacity: 1; transform: none; }
}

/*
  Long unbroken strings are the usual cause of a page that scrolls sideways on a
  phone — here the Terminal command in the signing notice, and the download URL in
  a title. Breaking them is cheaper than discovering it on someone's handset.
*/
.notice code,
.notice p,
.meta,
.req p { overflow-wrap: anywhere; }

/* Grid and flex children default to min-width:auto, which lets wide content push
   a column past its track instead of wrapping inside it. */
.os-card,
.card,
.spec,
.os-header { min-width: 0; }

@media (max-width: 820px) {
  .navbar { padding: 14px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a.hide-sm { display: none; }
  .hero { padding: 140px 20px 70px; }
  section { padding: 64px 20px; }
  .site-footer { padding: 44px 20px 24px; }
  .footer-links { gap: 36px; }
}

@media (max-width: 460px) {
  .navbar { padding: 12px 14px; gap: 10px; }
  .nav-links { gap: 10px; }
  .brand { font-size: 0.95rem; gap: 9px; }
  .brand img { width: 27px; height: 27px; }
  .nav-btn { padding: 8px 14px; font-size: 0.86rem; }
  .icon-btn { width: 34px; height: 34px; }

  .hero { padding: 116px 16px 56px; }
  section { padding: 52px 16px; }
  .os-card, .card { padding: 20px; }
  .hero-canvas-wrap canvas { height: 190px; }
  .canvas-caption { font-size: 0.64rem; padding: 9px 12px; }
  .footer-links { gap: 28px; }
  .site-footer { padding: 40px 16px 22px; }
}
