/* scotia.mute — one object in a dark room, and a readout laid over it. */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --violet: #7263EE;
  --violet-hi: #8F84FF;
  --violet-dim: #4A3E9E;
  --violet-ghost: rgba(114, 99, 238, 0.13);
  --violet-line: rgba(114, 99, 238, 0.34);

  --ink: #000000;
  --glass: rgba(8, 8, 12, 0.74);
  --glass-hi: rgba(16, 16, 23, 0.82);
  --foam: #2A2A2F;
  --foam-dark: rgba(255, 255, 255, 0.045);

  --text: #E8E8EE;
  --muted: #8A8A98;
  --faint: #55555f;
  --line: rgba(232, 232, 238, 0.10);

  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gut: 24px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { background: #000; }

body {
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------- the stage */

/* the three.js canvas lives here, behind everything, mounted once per page */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.stage canvas { width: 100%; height: 100%; display: block; }

/* the room falls off at the edges so the readout always has something to sit on */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(130% 92% at 50% 42%, transparent 38%, rgba(0, 0, 0, 0.62) 78%, #000 100%),
    linear-gradient(180deg, rgba(0,0,0,.78) 0%, transparent 18%, transparent 72%, rgba(0,0,0,.9) 100%);
}

/* everything readable sits above the stage */
.nav, main, footer { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  background: rgba(0, 0, 0, 0.56);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 22px; height: 22px; display: block; }
.brand b { font-weight: 600; letter-spacing: -0.015em; font-size: 16px; }

.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a {
  font-size: 13.5px; color: var(--muted); font-weight: 500;
  padding: 5px 0; border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current] { color: var(--text); border-bottom-color: var(--violet); }
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 21px; cursor: pointer; margin-left: auto; }

/* ---------------------------------------------------------------------- shell */

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) 96px; }

.page-head { padding: 48px 0 26px; max-width: 70ch; }
.eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--violet); margin: 0 0 13px;
}
h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 15px; font-weight: 600; }
h2 { font-size: 20px; letter-spacing: -0.015em; margin: 0 0 13px; font-weight: 600; }
h3 { font-size: 14.5px; letter-spacing: -0.005em; margin: 0 0 7px; font-weight: 600; }
.lede { font-size: 16.5px; color: var(--muted); max-width: 60ch; margin: 0; }
p { margin: 0 0 13px; }

.panel {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 21px;
}
.panel.lit { border-color: var(--violet-line); box-shadow: 0 0 0 1px rgba(114,99,238,.08), 0 24px 60px -30px rgba(114,99,238,.5); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------------------------------------------------------------- the readout */

/* the meter, across the top of the home page, the way a boss bar sits across a screen */
.meter {
  padding: 26px 0 0;
}
.meter-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.reading { font-family: var(--mono); display: flex; align-items: baseline; gap: 9px; }
.reading .n {
  font-size: clamp(54px, 9vw, 104px);
  font-weight: 500; letter-spacing: -0.05em; line-height: .92;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-shadow: 0 0 46px rgba(114, 99, 238, 0.5);
}
.reading .n:not(.live) { font-size: clamp(34px, 5vw, 52px); color: var(--faint); text-shadow: none; }
.reading .u { font-size: 20px; color: var(--violet); font-weight: 500; }
.reading-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--faint); margin: 8px 0 0;
}

/* the scale: 94 dB on the left, the target on the right, a filled run between */
.scale { margin-top: 18px; }
.scale-bar {
  position: relative; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, rgba(114,99,238,.10), rgba(114,99,238,.05));
  border: 1px solid var(--line);
  overflow: hidden;
}
.scale-bar i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--violet-dim), var(--violet));
  box-shadow: 0 0 22px rgba(114,99,238,.65);
  transition: width .9s cubic-bezier(.2,.7,.2,1);
}
.scale-bar s {
  position: absolute; top: -1px; bottom: -1px; width: 2px;
  background: var(--violet-hi); box-shadow: 0 0 12px var(--violet-hi);
  transition: left .9s cubic-bezier(.2,.7,.2,1);
}
.scale-ticks {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  letter-spacing: .1em; margin-top: 8px;
}

.caption {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  border-left: 2px solid var(--violet); padding-left: 12px; line-height: 1.75;
}

.meter-say { text-align: right; max-width: 42ch; }
.meter-say h1 { font-size: clamp(19px, 2.3vw, 29px); line-height: 1.12; margin: 0 0 6px; }
.meter-say .note { margin: 0 0 0 auto; }

/* The readout is pushed to the two edges and the middle column is left EMPTY on purpose:
   that gap is where the object shows through. Nothing is allowed to sit on top of it. */
.hud {
  display: grid;
  grid-template-columns: minmax(0, 340px) 1fr minmax(0, 420px);
  gap: 20px;
  align-items: end;
  min-height: 56vh;
  padding: 26px 0 34px;
}
.hud-left { grid-column: 1; display: grid; gap: 14px; align-content: end; }
.hud-right { grid-column: 3; display: grid; gap: 12px; align-content: end; }

/* ---------------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 10px 14px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--violet); }

.sheet[hidden] { display: none; }

/* ---------------------------------------------------------------------- pinned labels */

/* the books, pinned around the object rather than listed under it */
.pins { display: flex; flex-wrap: wrap; gap: 8px; }
.pin {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px;
  background: var(--glass-hi);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-left: 2px solid var(--violet);
  border-radius: 8px; padding: 7px 11px;
  white-space: nowrap;
}
.pin b { font-weight: 600; letter-spacing: -.01em; }
.pin span { color: var(--muted); }

/* ---------------------------------------------------------------------- the menu */

/* numbered, bottom-left, the way a game lists what you can do */
.menu { display: grid; gap: 2px; }
.menu a {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 15px; padding: 9px 12px; border-radius: 9px;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s, transform .14s;
}
.menu a:hover { background: var(--violet-ghost); border-color: var(--violet-line); transform: translateX(3px); }
.menu a i { font-family: var(--mono); font-size: 11px; color: var(--violet); font-style: normal; width: 14px; }
.menu a em { font-style: normal; color: var(--muted); font-size: 12.5px; margin-left: auto; }

/* ---------------------------------------------------------------------- stats */

.stat .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 7px;
}
.stat .v {
  font-family: var(--mono); font-size: 22px; font-weight: 500;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.stat .s { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------------- tables */

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--faint);
  font-weight: 500; padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; padding-right: 0; }
.sym { font-weight: 600; letter-spacing: -0.01em; }
.addr { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------------- controls */

label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }

input[type=text], input[type=number], select {
  width: 100%; background: var(--foam-dark);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font-family: var(--mono); font-size: 14.5px; padding: 11px 13px;
  outline: none; transition: border-color .15s, background .15s;
}
input:focus, select:focus { border-color: var(--violet); background: rgba(114,99,238,.06); }
select { appearance: none; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--violet); color: #fff; border: 0; border-radius: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 11px 19px; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--violet-hi); box-shadow: 0 10px 30px -12px rgba(114,99,238,.9); }
.btn:disabled { background: rgba(255,255,255,.06); color: var(--faint); cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--violet); background: var(--violet-ghost); }
.btn.wide { width: 100%; }

.row { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }

.note { font-size: 13px; color: var(--muted); }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }
.em { color: var(--violet); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--violet);
  background: var(--violet-ghost); border: 1px solid var(--violet-line);
  border-radius: 999px; padding: 4px 11px;
}

.status { font-family: var(--mono); font-size: 12.5px; color: var(--muted); min-height: 20px; margin-top: 12px; word-break: break-word; }
.status.bad { color: #FF8080; }
.status.good { color: var(--violet-hi); }
.steps { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-left: 18px; }
.steps li { margin-bottom: 3px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }

.epoch { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.epoch .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px var(--violet); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

.chart { width: 100%; height: 250px; display: block; }

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

footer { border-top: 1px solid var(--line); margin-top: 52px; background: rgba(0,0,0,.4); }
.foot-in {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gut) 48px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--faint);
}
.foot-in a { color: var(--muted); }
.foot-in a:hover { color: var(--text); }

/* ---------------------------------------------------------------------- small */

@media (max-width: 1080px) {
  .hud { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
  .hud-left { grid-column: 1; }
  .hud-right { grid-column: 2; }
}

@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --gut: 16px; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(0, 0, 0, 0.97); border-bottom: 1px solid var(--line);
    padding: 6px var(--gut) 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .page-head { padding: 30px 0 20px; }
  .panel { padding: 16px; }
  table { font-size: 12.5px; }
  thead th, tbody td { padding-right: 10px; }
  .tabs { gap: 0; }
  .tab { padding: 9px 10px; font-size: 13.5px; }
  .tabs .epoch { width: 100%; margin: 6px 0 8px !important; }
  .meter { padding-top: 16px; }
  .meter-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .meter-say { text-align: left; }
  .meter-say .note { margin: 0; }
  /* the object gets a band of its own between the reading and the menu, instead of being
     a postage stamp behind a wall of text */
  .hud { grid-template-columns: 1fr; gap: 16px; padding-top: 42vh; }
  .hud-left, .hud-right { grid-column: 1; }
  .scale-ticks span:nth-child(2), .scale-ticks span:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
