/* ————————————————————————————————————————
   sonARe — the homepage stylesheet
   true black, porcelain, one signal tone.
   colour is never decoration — only "this is on".

   the grid is one left rail (--rail). the page-thread hairline runs
   24px inside it and every corner legend sits on that line.
   type: Switzer for prose, Fragment Mono for every label, number and
   hz value, Newsreader italic for one line only (the opening statement).
   tracking: 0.08em for labels, 0.14em reserved for instrument scale marks.
   rooms have their own piece.css — this file is not loaded there.
———————————————————————————————————————— */

:root {
  --black: #000000;
  --porcelain: #eaedef;
  --ink: rgba(234, 237, 239, 0.88); /* reading ink — full porcelain glows too hard on black (halation) */
  --porcelain-dim: rgba(234, 237, 239, 0.6);
  --porcelain-faint: rgba(234, 237, 239, 0.5);
  --hairline: rgba(255, 255, 255, 0.08);
  --signal: #9fd8d4;
  --signal-dim: rgba(159, 216, 212, 0.4);
  --sans: "Switzer", "Helvetica Neue", -apple-system, sans-serif;
  --mono: "Fragment Mono", "SF Mono", ui-monospace, monospace;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --tick: 150ms linear;
  --track: 0.08em;       /* labels, nav, marks */
  --track-scale: 0.14em; /* instrument scale marks only */
  --rail: clamp(64px, 8vw, 120px);        /* where content starts */
  --thread: calc(var(--rail) - 24px);     /* the hairline the content hangs from */
  --gutter: clamp(24px, 5vw, 80px);       /* right-hand air */
}

/* after dark the ink warms — blue-white light works against sleep */
body.night {
  --porcelain: #ece4d3;
  --ink: rgba(236, 228, 211, 0.88);
  --porcelain-dim: rgba(236, 228, 211, 0.6);
  --porcelain-faint: rgba(236, 228, 211, 0.5);
  --signal: #dcb98c;
  --signal-dim: rgba(220, 185, 140, 0.4);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--black);
  color: var(--porcelain);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--signal-dim); color: var(--black); }

/* keyboard users get the same hairline language */
:focus-visible { outline: 1px solid var(--porcelain-dim); outline-offset: 4px; }

/* ———— the menu — the rooms of the house ———— */

.menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 52px;
  padding: 0 24px;
  background: var(--black);
  border-bottom: 1px solid var(--hairline);
}
/* the toggle sits outside the scrolling list — sound on never drifts off-screen */
.menu > .snd { flex: none; }

.menu-mark {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--porcelain);
  text-decoration: none;
}
.menu-mark .ar, .wordmark .ar { font-weight: 400; }

.menu-rooms {
  display: flex;
  margin-left: auto;
  gap: clamp(16px, 3vw, 30px);
  /* the house has more doors than the bar has room for — the list scrolls, quietly */
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.menu-rooms::-webkit-scrollbar { display: none; }

.menu-rooms a {
  white-space: nowrap;
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--tick), border-color var(--tick);
}
.menu-rooms a:hover { color: var(--porcelain); }
.menu-rooms a.here { color: var(--porcelain); border-bottom-color: var(--porcelain-dim); }

@media (max-width: 480px) {
  .menu { padding: 0 16px; }
  .menu-rooms a { font-size: 10px; }
}

/* ———— the thread — one hairline the whole page hangs from ———— */

.page-thread {
  position: fixed;
  top: 0;
  left: var(--thread);
  width: 1px;
  height: 100%;
  background: var(--hairline);
  z-index: 5;
  pointer-events: none;
}

main { position: relative; z-index: 1; }

/* mono parentheticals — the asides, lowercase, no theatre */
.aside {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
  display: inline-block;
}
.aside::before { content: "( "; }
.aside::after { content: " )"; }
.aside a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--tick);
}
.aside a:hover { color: var(--porcelain); }

/* ———— the opening ———— */

.home-scope-bar {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
#homeScope { display: block; width: 100%; height: 100%; }

.home-opening {
  position: relative;
  z-index: 1;
  min-height: max(100svh, 580px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 clamp(64px, 10vh, 108px);
  overflow: hidden;
}
.opening-stage {
  padding-left: var(--rail);
  padding-right: var(--gutter);
}
.home-wordmark {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(82px, 17vw, 230px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--porcelain);
  cursor: pointer;
  transition: color var(--tick);
  margin-left: -0.025em;
  text-align: left;
}
.home-wordmark .ar { font-weight: 400; }
.home-wordmark:hover, .home-wordmark.sounding { color: var(--signal); }
.opening-rule {
  width: clamp(200px, 44vw, 560px);
  height: 1px;
  background: var(--hairline);
  margin: clamp(18px, 3vh, 32px) 0 clamp(16px, 2.5vh, 26px);
}
.opening-words {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: clamp(260px, 48vw, 560px);
}
/* the one italic line on the page */
.opening-statement {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.47;
  color: var(--porcelain);
  text-wrap: balance;
}
.opening-statement + .opening-statement { color: var(--porcelain-dim); }
.opening-press { display: block; margin-bottom: clamp(14px, 2vh, 22px); }

/* ———— the brief ———— */

.home-brief {
  padding: clamp(56px, 9vh, 112px) 0 clamp(36px, 6vh, 72px);
}
.brief-pull {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
  color: var(--porcelain-dim);
  text-wrap: pretty;
  padding-left: var(--rail);
  padding-right: var(--gutter);
  max-width: calc(560px + var(--rail));
  margin-bottom: 24px;
}

/* ———— chapters — about ———— */

.chapter {
  padding: clamp(80px, 14vh, 140px) 0;
  border-top: 1px solid var(--hairline);
}

.about-split {
  display: grid;
  grid-template-columns: clamp(140px, 18vw, 240px) minmax(0, 520px);
  gap: clamp(40px, 5vw, 80px);
  padding-left: var(--rail);
  padding-right: var(--gutter);
}
.about-instrument { padding-top: 4px; }
.about-num {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: var(--track);
  color: var(--porcelain-dim);
  display: block;
  margin-bottom: 28px;
}
.about-people { display: flex; flex-direction: column; gap: 28px; }
.about-person { display: flex; flex-direction: column; }
.about-avatar {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0;
  filter: grayscale(100%);
  opacity: 0.7;
  margin-bottom: 10px;
  display: block;
  transition: opacity var(--tick);
}
.about-avatar:hover { opacity: 1; }
.about-person-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: var(--track);
  color: var(--porcelain);
  display: block;
  margin-bottom: 3px;
}
.about-person-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
  line-height: 1.55;
  display: block;
  margin-bottom: 5px;
}
.about-person-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--tick);
  display: block;
}
.about-person-link:hover { color: var(--porcelain); }

/* the scan line — one sentence a tired eye can take in; the paragraph waits beneath it */
.ch-pull {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.45;
  color: var(--porcelain);
  margin-bottom: 20px;
  text-wrap: pretty;
}

.ch-body {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400; /* 300 thins out on black — light-on-dark erodes strokes */
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 30px;
  text-wrap: pretty;
}

/* ———— the instrument ———— */

.home-instrument {
  position: relative;
  min-height: 90svh;
  cursor: crosshair;
  border-top: 1px solid var(--hairline);
  z-index: 1;
}
.inst-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 42%;
  pointer-events: none;
  opacity: 0.85;
}
/* scale marks — the panel legend; the one place the wide tracking lives */
.inst-corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-scale);
  color: var(--porcelain-faint);
  opacity: 0.3;
  pointer-events: none;
  line-height: 1.9;
}
.inst-tl { top: 20px; left: var(--thread); }
.inst-bl { bottom: 20px; left: var(--thread); }
.inst-br { bottom: 20px; right: 24px; text-align: right; }
.inst-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
  opacity: 0;
  margin: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 1.8s ease;
}
.home-instrument.zone-visible .inst-hint { opacity: 0.4; }
.home-instrument.zone-playing .inst-hint { opacity: 0; transition: opacity 0.4s; }
.inst-freq {
  position: fixed;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: var(--track-scale);
  color: var(--signal);
  z-index: 20;
  opacity: 0;
  transition: opacity 0.25s;
  white-space: nowrap;
}
.inst-freq.visible { opacity: 0.7; }

/* ———— colophon ———— */

.colophon {
  padding: clamp(80px, 12vh, 130px) var(--gutter) 180px var(--rail);
  border-top: 1px solid var(--hairline);
}
.colophon .ch-body {
  max-width: 520px;
  font-size: 13.5px;
  color: var(--porcelain-dim);
}
.wordmark {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--porcelain);
  margin: 56px 0 8px;
}
.colophon-nav { display: flex; gap: 24px; margin: 14px 0 6px; }
.colophon-nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
  text-decoration: none;
  transition: color var(--tick);
}
.colophon-nav a:hover { color: var(--porcelain); }

/* the legal line — the quietest thing on the page, and the last */
.legal-line {
  margin-top: 56px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: var(--track);
  color: var(--porcelain-faint);
}
.legal-line a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--hairline); transition: color var(--tick); }
.legal-line a:hover { color: var(--porcelain); }

/* impressum + datenschutz pages */
.legal {
  max-width: 620px;
  padding: clamp(120px, 18vh, 180px) var(--gutter) 40px var(--rail);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
}
.legal h1 { font-weight: 300; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1; color: var(--porcelain); margin: 0 0 40px; }
.legal h2 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: var(--track); text-transform: lowercase; color: var(--porcelain-dim); margin: 40px 0 10px; }
.legal p { margin: 0 0 12px; }
.legal a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--porcelain-faint); }
.legal a:hover { color: var(--signal); border-color: var(--signal); }
.legal .small { font-family: var(--mono); font-size: 11px; color: var(--porcelain-faint); margin-top: 40px; }

/* ———— reveal ———— */

.reveal {
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; }

/* ———— small screens — the rail folds to 24px, the thread goes ———— */

@media (max-width: 640px) {
  :root { --rail: 24px; --gutter: 24px; }
  .page-thread { display: none; }
  .home-opening { padding: 0 0 clamp(48px, 8vh, 80px); }
  .home-brief { padding: clamp(40px, 7vh, 72px) 0; }
  .brief-pull { max-width: 100%; }
  .chapter { padding: clamp(56px, 10vh, 100px) 0; }
  .about-split { grid-template-columns: 1fr; gap: 24px; }
  .about-literature { order: 1; }
  .about-instrument { order: 2; padding-top: 0; }
  .about-people .about-person:first-child { order: 2; }
  .about-people .about-person:last-child { order: 1; }
  .home-instrument { cursor: default; }
  .inst-corner { font-size: 9px; }
  .inst-tl, .inst-bl { left: 24px; }
  .inst-br { right: 24px; }
}

/* ———— reduced motion ———— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transition: none; }
  .inst-hint { transition: none; }
}
