/* Ember Audio Labs — site styles.
   Materials come from the product itself: the oxblood rack modules, the brushed-gold
   faceplate and the LED colours of Ember Clip. Headings use Archivo at its widest
   setting, like the faceplate engraving. */

:root {
  --rack: #1a110e;
  --rack-deep: #120b09;
  --module: #261410;
  --module-edge: #6f5220;
  --gold: #c9a24a;
  --gold-hi: #e6cb7c;
  --gold-lo: #8d6a25;
  --ink: #f1e9d9;
  --ink-dim: #b9ac94;
  --led: #3dff6e;
  --led-dim: #1b4a2a;
  --amber: #ffa21f;
  --red: #ff4b3c;

  --wide: "wdth" 125;
  --measure: 66ch;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.2rem, 5vw, 3.2rem);
  --step-4: clamp(3rem, 9vw, 6.4rem);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--rack);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-hi); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: #fff3cf; }

:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3 {
  font-variation-settings: var(--wide);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-4); letter-spacing: 0.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }

p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink); max-width: 34ch; }
.dim { color: var(--ink-dim); }
.small { font-size: var(--step--1); }

/* ---- skip link + header -------------------------------------------------------- */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--gold); color: var(--rack); padding: 8px 12px; z-index: 10; }

.site-header {
  border-bottom: 1px solid rgba(201, 162, 74, 0.25);
  background: var(--rack-deep);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px; flex-wrap: wrap; padding-block: 10px;
}
.wordmark {
  color: var(--gold-hi); text-decoration: none;
  font-variation-settings: var(--wide); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.08em;
}
.wordmark:hover { color: #fff3cf; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: var(--step--1); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-hi); }
@media (max-width: 560px) { .nav .btn { display: none; } }

/* ---- buttons ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0.8em 1.2em; border-radius: 6px;
  font: inherit; font-weight: 700; font-size: var(--step-0); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; line-height: 1.2;
}
.btn-gold {
  color: #2b1d07;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  border-color: #f3dc98;
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 6px 18px rgba(0,0,0,0.35);
}
.btn-gold:hover { color: #1d1304; filter: brightness(1.06); }
.btn-ghost { color: var(--ink); border-color: rgba(241, 233, 217, 0.35); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { color: var(--ink); border-color: var(--gold-hi); }
.btn-small { padding: 0.55em 0.95em; font-size: var(--step--1); }
.btn.is-pending { opacity: 0.55; cursor: not-allowed; }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--led); box-shadow: 0 0 10px var(--led); flex: none; }
.btn-gold .led { background: #2b1d07; box-shadow: none; }

.store-note {
  margin-top: 14px; font-size: var(--step--1); color: var(--amber);
}

/* ---- hero ------------------------------------------------------------------------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 5vw, 56px); }
.hero h1 { color: var(--gold-hi); margin-bottom: 0.25em; }
.hero-grid { display: grid; gap: clamp(20px, 4vw, 48px); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-facts { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-dim); font-size: var(--step--1); }

/* the one motion moment: an LED ladder that lights once on load, like the plug-in's meter */
.ladder { display: flex; gap: clamp(4px, 0.8vw, 8px); margin: 6px 0 22px; }
.ladder i {
  width: clamp(8px, 1.3vw, 13px); aspect-ratio: 1; border-radius: 50%;
  background: var(--led-dim); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
  animation: led-on 140ms ease-out forwards; animation-delay: calc(var(--i) * 45ms + 250ms);
}
.ladder i:nth-last-child(-n+5) { background: #4a3a10; }
.ladder i:nth-last-child(-n+2) { background: #4a1a14; }
@keyframes led-on {
  to { background: var(--c, var(--led)); box-shadow: 0 0 10px var(--c, var(--led)); }
}
.ladder i:nth-last-child(-n+5) { --c: #ffd23a; }
.ladder i:nth-last-child(-n+2) { --c: var(--red); animation-name: led-on, led-off; animation-duration: 140ms, 600ms; animation-delay: calc(var(--i) * 45ms + 250ms), calc(var(--i) * 45ms + 900ms); }
@keyframes led-off { to { background: #4a1a14; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  .ladder i { animation: none; background: var(--c, var(--led)); }
  .ladder i:nth-last-child(-n+2) { background: #4a1a14; }
}

/* the plug-in mounted in a rack */
.rack {
  margin-top: clamp(28px, 5vw, 56px);
  padding: clamp(10px, 1.6vw, 18px) clamp(26px, 4vw, 52px);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.05), transparent 60%),
    linear-gradient(180deg, #2a1c16, #150d0a);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,162,74,0.18);
}
.rack::before, .rack::after {           /* rack rails with mounting holes */
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(14px, 2.4vw, 30px);
  background:
    radial-gradient(circle, #0a0605 38%, transparent 42%) 50% 12% / 100% 14% no-repeat,
    radial-gradient(circle, #0a0605 38%, transparent 42%) 50% 88% / 100% 14% no-repeat,
    linear-gradient(90deg, #3a2c22, #241811);
}
.rack::before { left: 0; border-radius: 6px 0 0 6px; }
.rack::after { right: 0; border-radius: 0 6px 6px 0; }
.rack img { border-radius: 2px; box-shadow: 0 2px 0 rgba(0,0,0,0.6); }
.caption { color: var(--ink-dim); font-size: var(--step--1); margin-top: 10px; }

/* ---- sections ---------------------------------------------------------------------- */
.section { padding-block: clamp(48px, 8vw, 104px); }
.section + .section { border-top: 1px solid rgba(201, 162, 74, 0.14); }
.section-head { max-width: 46rem; margin-bottom: clamp(24px, 4vw, 40px); }

/* modules: the same panels and order as the plug-in */
.modules { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .modules { grid-template-columns: repeat(3, 1fr); } }
.module {
  background: linear-gradient(180deg, #2a1611, #170c09);
  border: 1px solid var(--module-edge);
  border-radius: 5px;
  padding: 16px 18px 18px;
}
.module h3 {
  font-size: 1rem; letter-spacing: 0.06em; color: var(--ink); margin-bottom: 0.7em;
  display: flex; align-items: center; gap: 10px;
}
.module p { font-size: 0.95rem; color: var(--ink-dim); margin-bottom: 0.6em; }
.module p:last-child { margin-bottom: 0; }
.module strong { color: var(--ink); font-weight: 600; }

/* text + image pairs */
.pair { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .pair { grid-template-columns: 0.85fr 1.15fr; } }

/* specs */
.specs { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border-top: 1px solid rgba(201,162,74,0.25); }
.specs > div { display: grid; grid-template-columns: minmax(120px, 0.35fr) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(201,162,74,0.18); }
.specs dt { color: var(--ink-dim); }
.specs dd { margin: 0; }

/* buy: the nameplate */
.buy {
  display: grid; gap: clamp(24px, 4vw, 48px); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .buy { grid-template-columns: 1fr 1fr; } }
.nameplate {
  color: #2b1d07;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  border-radius: 8px;
  padding: clamp(22px, 4vw, 40px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 24px 48px rgba(0,0,0,0.45);
}
.nameplate h3 { font-size: var(--step-2); color: #2b1d07; margin-bottom: 0.2em; text-shadow: 0 1px 0 rgba(255,240,190,0.5); }
.price { font-variation-settings: var(--wide); font-weight: 800; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; margin: 6px 0 14px; color: #1f1504; }
.nameplate ul { margin: 0 0 22px; padding-left: 1.1em; }
.nameplate li { margin-bottom: 4px; }
.nameplate .btn { color: var(--ink); background: linear-gradient(180deg, #2f1914, #170c09); border-color: #1a0f0b; box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.nameplate .btn:hover { color: #fff; filter: brightness(1.15); }
.nameplate .small { color: #3a2a0e; margin: 14px 0 0; }
.nameplate .store-note { color: #5a1e0a; }

/* faq */
.faq { max-width: 50rem; }
.faq details { border-bottom: 1px solid rgba(201,162,74,0.2); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-hi); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-dim); }

/* steps (real sequences only) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 46px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--module); border: 1px solid var(--module-edge); color: var(--gold-hi); font-weight: 700; font-size: 0.9rem;
}
.callout { border-left: 3px solid var(--gold); background: rgba(201,162,74,0.07); padding: 14px 18px; border-radius: 0 6px 6px 0; max-width: 46rem; }
code, kbd { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.9em; background: rgba(255,255,255,0.06); padding: 0.1em 0.35em; border-radius: 4px; }

.two-col { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* legal pages */
.legal { max-width: 46rem; }
.legal h1 { font-size: var(--step-3); color: var(--gold-hi); }
.legal h2 { font-size: var(--step-1); margin-top: 1.8em; }
.legal li { margin-bottom: 0.4em; }

/* ---- footer ------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid rgba(201,162,74,0.25); background: var(--rack-deep); padding-block: 34px 44px; margin-top: 40px; font-size: var(--step--1); color: var(--ink-dim); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.site-footer a { color: var(--ink-dim); }
.site-footer a:hover { color: var(--gold-hi); }
.site-footer p { margin: 0; }
.callout code { display: block; width: fit-content; max-width: 100%; margin-top: 6px; overflow-wrap: anywhere; }
