/* rektonfone — the record, in plain text. */

/* fonts are self-hosted (SIL OFL). no third party knows you are reading this. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Anonymous Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/anonymous-pro-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Anonymous Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/anonymous-pro-latin-700-normal.woff2') format('woff2');
}

/* one font. two colors. the ice is only for the trace. */

:root {
  --background: #0b0e16;
  --foreground: #efe7d6;
  --primary: #efe7d6;
  --primary-foreground: #0b0e16;
  --border: rgb(239 231 214 / 16%);
  --ring: #efe7d6;
  --cream: #efe7d6;
  --ink: #0b0e16;
  --ink-text: #14100a;
  --ice: #d5e3f1;
  --fs-body: 1rem;
  --fs-meta: 0.78rem;
  --font-sans-stack: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-mono-stack: 'Anonymous Pro', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono-stack);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--ice);
  color: var(--ink);
}

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

.shell {
  min-height: 100svh;
  background: var(--ink);
}

.threshold-track {
  height: 200vh;
  height: 200svh;
}

.threshold {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}

.threshold[data-state='light'] {
  background-color: var(--ice);
  color: var(--ink);
  font-family: var(--font-sans-stack);
}

.threshold[data-state='light'] .brand {
  font-family: var(--font-mono-stack);
}

.threshold[data-state='dark'] {
  background-color: var(--ink);
  color: var(--cream);
}

/* both sides are always on the page. you only see the one you are standing in. */
.threshold[data-state='light'] .only-dark,
.threshold[data-state='dark'] .only-light {
  display: none;
}

.inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 1.1rem;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  min-width: 0;
}

.flow {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding: 4rem 1.25rem calc(3.5rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 4.5rem;
}

.block {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

/* ---------- markers ---------- */

.panel-index {
  margin: 0;
  font-size: var(--fs-meta);
  opacity: 0.55;
}

/* ---------- 00 / threshold ---------- */

.panel-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
}

.state-tag {
  opacity: 0.55;
  white-space: nowrap;
}

.threshold-copy {
  display: grid;
  gap: 0.9rem;
  margin-block: auto;
  padding-block: 1rem;
  animation: rise 0.45s ease both;
}

.threshold .only-dark.threshold-copy,
.threshold .only-light.threshold-copy {
  display: grid;
}

.threshold[data-state='light'] .only-dark.threshold-copy,
.threshold[data-state='dark'] .only-light.threshold-copy {
  display: none;
}

.lead {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 400;
  opacity: 0.7;
}

.beats {
  margin: 0;
  font-weight: 700;
}

.beats span {
  display: block;
}

.verdict {
  margin: 0;
  font-weight: 700;
}

.context {
  margin: 0;
  opacity: 0.55;
}

.scroll-hint {
  margin: 0;
  opacity: 0.6;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 01 / mirror ---------- */

.mirror-title {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 700;
}

.mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.mirror-col {
  min-width: 0;
}

.col-label {
  display: block;
  opacity: 0.55;
  margin-bottom: 0.6rem;
}

.mirror-col ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 700;
  line-height: 1.9;
}

.mirror-dark ol li:last-child {
  color: var(--ice);
}

.mirror-coda {
  margin: 0;
  opacity: 0.55;
}

.mirror-coda span {
  display: block;
}

/* ---------- 02 / origin ---------- */

.origin-title {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 700;
}

.facts {
  display: grid;
  gap: 0.6rem;
}

.facts p {
  margin: 0;
}

.human {
  margin: 0;
  opacity: 0.7;
}

.human span {
  display: block;
}

.disclaimer p {
  margin: 0;
}

/* ---------- 03 / signal ---------- */

.signal-title {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: 700;
}

.signal-title span {
  display: block;
}

.signal-title .trace {
  color: var(--ice);
}

.signal-note {
  margin: 0;
  opacity: 0.55;
}

.chorus {
  margin: 0;
  font-weight: 700;
}

.respect {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.respect-title {
  margin: 0;
  opacity: 0.55;
}

.respect-lines {
  margin: 0;
  opacity: 0.85;
}

.respect-lines span {
  display: block;
}

.respect-link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  width: fit-content;
}

.site-foot {
  display: grid;
  gap: 0.3rem;
  opacity: 0.55;
}

.site-foot p {
  margin: 0;
}

.site-foot a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- desktop: the same page, larger ---------- */

@media (min-width: 800px) {
  .threshold {
    padding-inline: 2rem;
  }

  .inner,
  .flow {
    max-width: 36rem;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .threshold {
    transition: none;
  }

  .threshold-copy {
    animation: none;
  }
}
