/* ──────────────────────────────────────────────────────────────
   Mortivox — brand site
   Dark by design: these are instruments used in dark rooms, so
   there is no light theme to switch to.
   ────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  --bg: #06070a;
  --bg-2: #0a0c11;
  --panel: #0c0f15;
  --panel-2: #10141b;
  --line: rgba(232, 228, 220, 0.09);
  --line-2: rgba(232, 228, 220, 0.16);

  --bone: #e9e5dd;
  --dim: #8b8f99;
  --dimmer: #5f646e;

  --signal: #5ee4a6;   /* phosphor — scope trace, live state */
  --amber: #ffb340;    /* LED readout, locked state */

  --maxw: 1140px;
  --gutter: 16px;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* a faint, static film over everything — paper and sensor noise */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 40;
  background: var(--panel-2);
  color: var(--bone);
  padding: 12px 16px;
  border: 1px solid var(--line-2);
}
.skip:focus { left: 8px; top: 8px; }

a { color: inherit; }

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

/* ─────────────── header ─────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 7, 10, 0.86);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bone);
}

.brand-mark {
  width: 24px;
  height: 24px;
  color: var(--signal);
  flex: none;
}

.brand-word {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.22em;
}

.top-nav {
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.top-nav a {
  color: var(--dim);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.top-nav a:hover { color: var(--bone); border-bottom-color: var(--signal); }

/* ─────────────── hero ─────────────── */

.hero { padding: clamp(44px, 9vw, 104px) 0 clamp(36px, 6vw, 72px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--dim);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.display {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 8.6vw, 5.2rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.display .line { display: block; }
.display .line:last-child { color: var(--dim); }

.lede {
  max-width: 54ch;
  margin: 0 0 clamp(32px, 5vw, 52px);
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
  color: var(--dim);
}
.lede strong { color: var(--bone); font-weight: 500; }

/* ─────────────── the receiver ─────────────── */

.receiver {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(94, 228, 166, 0.055), transparent 62%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: clamp(14px, 2.4vw, 22px);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rx-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rx-readout {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.rx-freq {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 2.7rem);
  letter-spacing: 0.01em;
  color: var(--amber);
  text-shadow: 0 0 22px rgba(255, 179, 64, 0.32);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s, text-shadow 0.3s;
}
.rx-freq[data-locked="false"] {
  color: var(--bone);
  text-shadow: none;
}

.rx-unit {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--dimmer);
  text-transform: uppercase;
}

.rx-state {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 11px;
  margin-left: 4px;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.rx-state[data-state="scanning"] { color: var(--signal); border-color: rgba(94, 228, 166, 0.4); }
.rx-state[data-state="locked"] {
  color: var(--bg);
  background: var(--amber);
  border-color: var(--amber);
}

.rx-controls { display: flex; gap: 8px; }

.rx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.rx-btn:hover:not(:disabled) { color: var(--bone); border-color: rgba(232, 228, 220, 0.3); }
.rx-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rx-btn[aria-pressed="true"]:not(:disabled) { color: var(--bone); border-color: rgba(94, 228, 166, 0.45); }

.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2a2f38;
  flex: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.rx-btn[aria-pressed="true"]:not(:disabled) .led {
  background: var(--signal);
  box-shadow: 0 0 9px var(--signal);
}

.rx-scope {
  display: block;
  width: 100%;
  height: clamp(74px, 13vw, 108px);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px),
    #040507;
  border: 1px solid var(--line);
}

/* dial */

.rx-dialwrap {
  position: relative;
  margin-top: 14px;
  padding-top: 50px;
  touch-action: pan-y;
}

.rx-ticks {
  position: absolute;
  inset: 32px 0 auto 0;
  height: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.rx-ticks i {
  width: 1px;
  height: 7px;
  background: var(--line-2);
}
.rx-ticks i.major { height: 13px; background: rgba(232, 228, 220, 0.3); }

.rx-stations {
  position: relative;
  height: 0;
}

.rx-station {
  position: absolute;
  top: -50px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0 6px;
  cursor: pointer;
  color: var(--dimmer);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s;
}
.rx-station .st-n { display: none; }
.rx-station::after {
  content: "";
  width: 1px;
  height: 15px;
  background: currentColor;
  opacity: 0.55;
}
.rx-station:hover { color: var(--bone); }
.rx-station[data-active="true"] { color: var(--amber); }

.rx-dial {
  position: relative;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(232, 228, 220, 0.15) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.025));
  cursor: ew-resize;
  overflow: hidden;
}

.rx-needle {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--amber);
  box-shadow: 0 0 14px 1px rgba(255, 179, 64, 0.55);
  will-change: transform;
}

.rx-hint {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--dimmer);
}
.rx-hint strong { color: var(--dim); font-weight: 500; }

kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--dim);
}

.promise {
  margin: clamp(26px, 4vw, 40px) 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dimmer);
  line-height: 2;
}
.promise strong { color: var(--signal); font-weight: 500; }

/* ─────────────── sections ─────────────── */

section + section { border-top: 1px solid var(--line); }

.instruments,
.rule,
.about { padding: clamp(52px, 8vw, 96px) 0; }

.sec-h {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 4.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sec-n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--signal);
  flex: none;
}

.sec-sub {
  max-width: 62ch;
  margin: 0 0 clamp(32px, 5vw, 52px);
  color: var(--dim);
}

/* ─────────────── instrument cards ─────────────── */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: clamp(18px, 2.6vw, 26px);
  scroll-margin-top: 80px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.card[data-active="true"] {
  border-color: rgba(255, 179, 64, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 179, 64, 0.16), 0 24px 50px -36px rgba(255, 179, 64, 0.3);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dimmer);
}
.card-freq { color: var(--amber); }

.card h3 {
  margin: 0;
  font-size: clamp(1.22rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.card-kind {
  margin: -8px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
}

.card-body {
  margin: 0;
  font-size: 15.5px;
  color: var(--dim);
  flex: 1;
}

.card-spec {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-spec li {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 10px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 9px 13px;
  transition: border-color 0.18s, background 0.18s;
}
.store:hover { border-color: var(--signal); background: rgba(94, 228, 166, 0.07); }
.store svg { width: 14px; height: 14px; flex: none; opacity: 0.85; }

.card-price {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dimmer);
}

/* ─────────────── the rule ─────────────── */

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

.rulecard {
  border: 1px solid var(--line);
  border-left: 2px solid rgba(94, 228, 166, 0.4);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(94, 228, 166, 0.035), transparent 40%);
  padding: clamp(20px, 2.8vw, 28px);
}

.rulenum {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--signal);
}

.rulecard h3 {
  margin: 0 0 10px;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rulecard p:last-child {
  margin: 0;
  font-size: 15.5px;
  color: var(--dim);
}

/* ─────────────── about ─────────────── */

.about-in {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 880px) {
  .about-in { grid-template-columns: 1.15fr 0.85fr; }
}

.about-body {
  max-width: 54ch;
  margin: 0 0 16px;
  color: var(--dim);
}
.about-body strong { color: var(--bone); font-weight: 500; }

.about-contact { margin: 26px 0 0; }

.mail {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--signal);
  border-bottom: 1px solid rgba(94, 228, 166, 0.35);
  padding-bottom: 2px;
}
.mail:hover { border-bottom-color: var(--signal); }

.spec {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: clamp(18px, 2.6vw, 24px);
}

.spec h3 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.spec dl { margin: 0; }

.spec div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.spec div:first-child { border-top: 0; padding-top: 0; }

.spec dt {
  font-size: 14.5px;
  color: var(--bone);
}

.spec dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
}

/* ─────────────── footer ─────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 64px) 0 clamp(32px, 5vw, 48px);
  background: var(--bg-2);
}

.foot-in { display: grid; gap: 14px; }

.foot-brand {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--dim);
}

.foot-legal,
.foot-note {
  max-width: 68ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--dimmer);
}

/* ─────────────── narrow screens ─────────────── */

/* the four names collide long before the dial runs out of room, so the
   stations fall back to their numbers and the brand word gives up its space */
@media (max-width: 700px) {
  .rx-station .st-n { display: inline; }
  .rx-station .st-t { display: none; }
}

@media (max-width: 620px) {
  .brand-word { display: none; }
  .top-nav { gap: 15px; font-size: 10.5px; }
}

@media (max-width: 420px) {
  .rx-readout { gap: 6px; }
  .rx-state { margin-left: 0; }
}

/* ─────────────── motion ─────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .dot { animation: none; }
}
