/* Shared design system for Aloe Sound pages.
   Page-specific layout lives in each page's <style> block. */

:root {
  --bg: #202020;
  --cream: #c8c2bc;
  --ink: #171717;
  --arp: #f1d25d;
  --filter: #9fbb64;
  --osc: #b7c2be;

  /* License-panel surface language (borrowed from the S-40B license dialog):
     near-black glass, a single hairline ring, one soft top highlight, amber
     data accents and amber primary buttons. */
  --panel: rgba(27, 26, 26, .95);
  --row: rgba(255, 255, 255, .03);
  --hairline: rgba(255, 255, 255, .16);
  --hairline-soft: rgba(255, 255, 255, .1);
  --hairline-strong: rgba(255, 255, 255, .34);
  --panel-shadow: 0 24px 64px rgba(0, 0, 0, .72);
  --panel-ring: inset 0 0 0 1px var(--hairline);
  /* Raised hardware plate: product cards, the S-40B hero art and the
     download band all share this bevel. */
  --plate-shadow: 0 20px 48px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .3),
    inset 0 1px 0 rgba(255, 255, 255, .38);
  --accent: var(--arp);
  --accent-ink: #202020;
  --muted: rgba(200, 194, 188, .68);
  --headline: #ded9d3;
  /* Long-form body copy: one colour and leading for intro paragraphs,
     panels and the 404 message. */
  --copy: rgba(200, 194, 188, .82);
  --copy-line: 1.8;

  --font: Trebuchet, "Microsoft YaHei", system-ui, sans-serif;
  --tracking-label: .05em;
  --tracking-wide: .2em;

  --pad-inline: clamp(24px, 5vw, 70px);
  --radius: 4px;
  --radius-panel: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    var(--bg);
  color: var(--cream);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* The license dialog's surface, reusable for cards and floating panels.
   No backdrop blur: these panels sit on the solid page background, so a
   blur would only cost GPU time without changing a pixel. */
.glass-panel {
  background: var(--panel);
  border-radius: var(--radius-panel);
  box-shadow: var(--panel-shadow), var(--panel-ring);
}

/* ---- Small caps kicker -------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7em;
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Buttons ------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  transition: filter .12s ease, border-color .12s ease, background .12s ease;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  filter: brightness(1.05);
}

.button.ghost {
  border-color: var(--hairline-strong);
  color: var(--cream);
}

.button.ghost:hover {
  border-color: rgba(255, 255, 255, .6);
  background: var(--row);
}

/* ---- Top strip ---------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
  padding: 0 var(--pad-inline);
  background: rgba(27, 26, 26, .9);
  border-bottom: 1px solid var(--hairline-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.wordmark {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
}

.topbar-note {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Status LED --------------------------------------------------- */
.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(241, 210, 93, .55);
  animation: pulse 2.6s ease-out infinite;
  margin-left: 4px;
  margin-right: 4px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(241, 210, 93, .5);
  }

  70% {
    box-shadow: 0 0 0 9px rgba(241, 210, 93, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(241, 210, 93, 0);
  }
}

/* ---- Bottom strip ------------------------------------------------- */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  padding: 12px var(--pad-inline);
  background: rgba(27, 26, 26, .9);
  border-top: 1px solid var(--hairline-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Shared chrome / motion --------------------------------------- */
:focus-visible {
  outline: 2px solid var(--arp);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .topbar-note {
    display: none;
  }

  .bottombar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-block: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .led {
    animation: none;
  }

  .button {
    transition: none;
  }
}

/* ---- Top-right cluster + language switch -------------------------- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: .5em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: rgba(200, 194, 188, .55);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 2px;
  cursor: pointer;
  transition: color .12s ease;
}

.lang-switch button:hover {
  color: var(--cream);
}

.lang-switch button[aria-pressed="true"] {
  color: var(--cream);
}

.lang-switch .sep {
  color: rgba(200, 194, 188, .32);
}

/* Only the active language's long-form content is rendered. */
html[data-lang="zh"] [data-lang="en"],
html[data-lang="en"] [data-lang="zh"] {
  display: none !important;
}