/* Zamorak placeholder site.
   Palette: Zamorak's red and black; the white partyhat stays white.
   Type: Latin subsets of Computer Modern Unicode (SIL OFL, see ../fonts/OFL.txt),
   renamed as the licence requires for modified fonts. */

@font-face {
  font-family: "Zamorak Serif";
  src: url("../fonts/zamorak-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zamorak Mono";
  src: url("../fonts/zamorak-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0505;
  --surface: #150909;
  --line: rgb(255 72 56 / 0.1);
  --text: #ffffff;
  --text-2: #cdb2ac;
  --text-3: #9a716b;
  --red: #b3141b;
  --red-bright: #d11f26;
  --ember: #ff5a3c;
  --ember-soft: #ec9a8f;

  --serif: "Zamorak Serif", "Latin Modern Roman", "CMU Serif", Georgia, "Times New Roman", serif;
  --mono: "Zamorak Mono", "CMU Typewriter Text", "Courier New", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --header-h: 64px;

  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  background: var(--bg);
  scrollbar-color: #3d1411 var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}

img,
canvas,
svg {
  display: block;
}

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

h1,
h2,
p,
figure,
pre {
  margin: 0;
}

h1,
h2 {
  font-weight: 400;
  color: var(--text);
}

::selection {
  background: var(--red);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- lockup ---------- */

/* Proportions follow the 1b lockup: mark 1.24em tall, 0.37em gap, 0.02em tracking. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.37em;
  font-size: 1.5rem;
  color: var(--text);
}

.lockup__mark {
  width: auto;
  height: 1.24em;
}

.lockup__word {
  padding-top: 0.18em;
  font-family: var(--serif);
  line-height: 1;
  letter-spacing: 0.02em;
}

.lockup--sm {
  font-size: 1.25rem;
}

/* ---------- buttons & labels ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.15em;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.btn--sm {
  padding: 0.6em 0.9em;
  font-size: 0.875rem;
}

.btn--primary {
  border-color: rgb(255 110 90 / 0.25);
  background: var(--red);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--red-bright);
  box-shadow: 0 0 24px rgb(209 31 38 / 0.35);
}

.btn svg {
  flex: none;
  width: 1em;
  height: 1em;
  transition: transform 0.2s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.label {
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.pulse {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  animation: pulse 2.4s ease-out infinite;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: var(--header-h);
  transition: background-color 0.3s;
}

.site-header.is-scrolled {
  background: rgb(10 5 5 / 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + clamp(2rem, 7vh, 5rem)) var(--gutter) 0;
  overflow: hidden;
  background: radial-gradient(55% 45% at 50% 85%, rgb(150 14 16 / 0.22), transparent 70%);
  text-align: center;
}

.halftone {
  pointer-events: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, #000 86%, transparent);
}

.hero__copy {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  max-width: 60rem;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.5rem + 5.4vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  text-wrap: pretty;
}

.hero .actions {
  margin-top: 0.5rem;
}

.hero__stage {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  min-height: clamp(220px, 36vh, 560px);
  margin-block: clamp(1.25rem, 3.5vh, 2.5rem) clamp(1.5rem, 5vh, 3.5rem);
}

/* The plain mark, for when the halftone can't be drawn: scripts off, or
   halftone.js reports failure. */
.hero__fallback {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 100%;
  margin: auto;
  opacity: 0.9;
}

.js .hero__fallback {
  display: none;
}

.js .halftone-failed .hero__fallback {
  display: block;
}

/* ---------- status ---------- */

.section {
  padding-block: clamp(4.5rem, 11vw, 9rem);
}

.status__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: end;
}

@media (min-width: 960px) {
  .status__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

.statement {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--text-3);
  text-wrap: pretty;
}

.statement .hi {
  color: var(--text);
}

.squiggle {
  color: var(--text);
  text-decoration: underline wavy var(--ember);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

/* ---------- log ---------- */

/* A LaTeX console: the build log in the status section, the error on the 404 page. */
.log {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}

.log__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}

.log__state {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.log__state .pulse {
  width: 5px;
  height: 5px;
}

.log__body {
  padding: 1.1rem 1rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.log__body .warn {
  color: var(--ember-soft);
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 0.2em;
  vertical-align: text-bottom;
  background: var(--ember);
  animation: blink 1.1s steps(1) infinite;
}

/* ---------- call to action ---------- */

.cta__inner {
  display: grid;
  justify-items: center;
  gap: 2.25rem;
  text-align: center;
}

.cta h2 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

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

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: 2.5rem;
  background: linear-gradient(to bottom, transparent 30%, rgb(120 12 14 / 0.18));
}

.site-footer__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* The big pixel blaze, dimmed, behind everything else in the footer. */
.site-footer__inferno {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%);
  mask-image: linear-gradient(to bottom, transparent, #000 55%);
}

.site-footer__flames {
  position: relative;
  width: 100%;
  height: clamp(190px, 16vw, 240px);
  margin-top: 1.5rem;
  pointer-events: none;
}

/* ---------- 404 ---------- */

.hero--error {
  justify-content: center;
  padding-bottom: clamp(3rem, 10vh, 6rem);
}

.hero--error .log {
  width: 100%;
  max-width: 34rem;
  margin-top: 0.5rem;
}

/* The "Enter file name:" prompt, typed into like the terminal it mimics. */
.log__input {
  width: 22ch;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--ember);
  -webkit-appearance: none;
  appearance: none;
}

/* No focus box: the caret and a faint underline show where you're typing. */
.log__input:focus {
  outline: none;
  border-bottom-color: rgb(255 90 60 / 0.4);
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(255 90 60 / 0.5);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgb(255 90 60 / 0);
  }
}

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

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