/* ScholaVal coming-soon page. tokens.css and fonts.css are copies of the
 * ritchot.me design system; this file holds the page itself. */

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

* {
  margin: 0;
}

html {
  font-size: var(--text-base);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text-0);
  line-height: var(--leading-body);
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

main {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  padding: 2rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* --- theme toggle: the ritchot.me control, top right of the column --- */

.bar {
  inline-size: 100%;
  max-inline-size: 52rem;
  margin-inline: auto;
  padding: 0.9rem 1.25rem 0;
  min-block-size: calc(0.9rem + 1.1rem * 1.65);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.theme-toggle {
  font-family: var(--font-mono);
  font-size: var(--text--1);
  line-height: 1;
  color: var(--ink-soft);
  background: none;
  border: none;
  padding: 0.1em 0.2em;
  cursor: pointer;
  /* space is reserved; /theme.js makes it visible */
  visibility: hidden;
  inline-size: 1.6em;
}

.theme-toggle:hover {
  color: var(--ink);
}

/* --- ASCII art, framed by crop marks with a label row above the drawing --- */

.art {
  --mark: var(--ink-faint);
  --arm: 0.9rem;
  width: 100%;
  padding: 0.75rem 1rem 0.5rem;
  background:
    linear-gradient(var(--mark), var(--mark)) top left / var(--arm) 1px no-repeat,
    linear-gradient(var(--mark), var(--mark)) top left / 1px var(--arm) no-repeat,
    linear-gradient(var(--mark), var(--mark)) top right / var(--arm) 1px no-repeat,
    linear-gradient(var(--mark), var(--mark)) top right / 1px var(--arm) no-repeat,
    linear-gradient(var(--mark), var(--mark)) bottom left / var(--arm) 1px no-repeat,
    linear-gradient(var(--mark), var(--mark)) bottom left / 1px var(--arm) no-repeat,
    linear-gradient(var(--mark), var(--mark)) bottom right / var(--arm) 1px no-repeat,
    linear-gradient(var(--mark), var(--mark)) bottom right / 1px var(--arm) no-repeat;
}

.art figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-align: start;
}

#art-subject {
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.stage {
  position: relative;
  height: clamp(12rem, 44vh, 23rem);
  margin-block-start: 0.5rem;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* shown only with JavaScript off: a still frame from the same renderer */
.art-still {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(5px, 1.3vw, 10px);
  line-height: 1.2;
  color: var(--ink-soft);
}

/* --- wordmark: Roman inscriptional capitals, words split by an interpunct --- */

.wordmark {
  margin-block-start: 2.1rem;
  font-size: clamp(2.3rem, 10.5vw, 5.1rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  /* letter-spacing trails the last letter; pad the start to keep it centred */
  padding-inline-start: 0.13em;
  text-wrap: nowrap;
}

.interpunct {
  color: var(--ai);
  margin-inline: -0.04em;
}

.subtitle {
  margin-block-start: 1.05rem;
  font-size: var(--text-1);
  line-height: var(--leading-tight);
  color: var(--ink-soft);
  text-wrap: balance;
}

.status {
  margin-block-start: 1.6rem;
  font-family: var(--font-mono);
  font-size: var(--text--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* a terminal cursor after the status line */
.status::after {
  content: '';
  display: inline-block;
  inline-size: 0.6em;
  block-size: 1.05em;
  margin-inline-start: 0.35em;
  vertical-align: -0.18em;
  background: var(--ink-faint);
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* --- reduced motion: no blinking cursor (the art draws one still frame) --- */

@media (prefers-reduced-motion: reduce) {
  .status::after {
    animation: none;
  }
}

/* --- 404 --- */

.wordmark-small {
  margin-block-start: 0;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
}

.status a {
  color: var(--signal);
}
