/*
  Archive 72 public site.

  Dark only, on purpose: every brand asset is drawn on the brand black, and the key art is lit
  night interiors. One accent: the orange of "72" in the logo.
  Corners are square everywhere. The status lamp is round because it is a lamp.
  Layers: 1 = site header over the hero image, 2 = skip link.
*/

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink-0: #0d0d0e; /* page: the logo's own background */
  --ink-1: #151514; /* raised: the status board */
  --line: rgb(255 238 220 / 0.12);
  --line-strong: rgb(255 238 220 / 0.26);
  --paper: #f1eee8;
  --paper-2: #bdb8af;
  --paper-3: #8d887f;
  --signal: #f96508; /* sampled from the logo */
  --signal-hover: #ff7a24;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --max: 1320px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(5rem, 11vw, 9rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base ------------------------------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--paper-2);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: inherit;
}

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

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

h2 {
  font: 600 clamp(2rem, 1.35rem + 2.2vw, 3.25rem) / 1.05 var(--sans);
  letter-spacing: -0.025em;
  color: var(--paper);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.skip {
  position: absolute;
  top: -4rem;
  left: var(--gutter);
  z-index: 2;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink-0);
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* Header ---------------------------------------------------------------------------------------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
}

.site-header-flow {
  position: static;
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 1.375rem;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-size: 0.9375rem;
}

.site-nav a,
.footer-nav a {
  color: var(--paper);
  text-decoration: none;
  text-underline-offset: 0.35em;
  padding-block: 0.5rem;
}

.site-nav a:hover,
.footer-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--signal);
}

@media (max-width: 639px) {
  .site-nav a:not(:last-child) {
    display: none;
  }
}

/* Shared pieces --------------------------------------------------------------------------------- */

.sign {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  background: rgb(13 13 14 / 0.6);
  color: var(--paper);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lamp {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0.2rem rgb(249 101 8 / 0.2);
}

.eyebrow {
  margin-bottom: 1.25rem;
  color: var(--paper-3);
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  font: 500 1rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--signal);
  color: var(--ink-0);
}

.button-primary:hover {
  background: var(--signal-hover);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--paper);
}

.button-secondary:hover {
  border-color: var(--paper-2);
  background: rgb(255 238 220 / 0.05);
}

.text-link {
  padding-block: 0.75rem;
  color: var(--paper);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.35em;
}

.text-link:hover {
  text-decoration-color: var(--signal);
}

figcaption {
  margin-top: 0.75rem;
  color: var(--paper-3);
  font-size: 0.875rem;
}

/* Hero ------------------------------------------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-areas: "media" "copy";
}

.hero-media {
  grid-area: media;
  position: relative;
  height: 48svh;
  min-height: 18rem;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% 22%;
}

/* Scrims, not decoration: legible header on top, image falls into the page below. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(13 13 14 / 0.8), rgb(13 13 14 / 0) 7rem),
    linear-gradient(to top, var(--ink-0), rgb(13 13 14 / 0) 45%);
}

.hero-copy {
  grid-area: copy;
  padding: 0.5rem var(--gutter) 4rem;
}

.wordmark {
  width: min(100%, 36rem);
  margin: 1.75rem 0 1.5rem;
}

.pitch {
  max-width: 36ch;
  color: var(--paper);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.45;
}

.pitch strong {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2.25rem;
}

@media (max-width: 639px) {
  .actions .button {
    flex: 1 1 auto;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-areas: "copy media";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  }

  .hero-media {
    height: auto;
    min-height: 0;
  }

  .hero-media img {
    position: absolute;
    inset: 0;
  }

  .hero-media::after {
    background:
      linear-gradient(to right, var(--ink-0), rgb(13 13 14 / 0) 30%),
      linear-gradient(to bottom, rgb(13 13 14 / 0.8), rgb(13 13 14 / 0) 8rem),
      linear-gradient(to top, var(--ink-0), rgb(13 13 14 / 0) 20%);
  }

  .hero-copy {
    align-self: center;
    max-width: 40rem;
    padding: 7rem 3rem 5rem 0;
  }
}

/* What is Archive 72 ---------------------------------------------------------------------------- */

.intro {
  display: grid;
  gap: 2.5rem;
  padding-block: var(--section);
}

.lede {
  max-width: 30ch;
  color: var(--paper);
  font-size: clamp(1.375rem, 1.05rem + 1.3vw, 2.125rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.tenets {
  display: grid;
  gap: 1.75rem;
}

.tenets div {
  display: grid;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.tenets dt {
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 600;
}

.tenets dd {
  max-width: 44ch;
}

@media (min-width: 960px) {
  .intro {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    row-gap: 3rem;
  }

  .intro h2 {
    grid-column: 1 / -1;
  }

  .lede {
    grid-column: 1 / span 7;
  }

  .tenets {
    grid-column: 9 / -1;
  }
}

/* The Archive ----------------------------------------------------------------------------------- */

.archive {
  padding-bottom: var(--section);
}

.archive-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.archive-head p {
  max-width: 46ch;
  font-size: 1.125rem;
}

.band img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 48% 50%;
}

.archive-row {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.archive-note {
  max-width: 34ch;
  color: var(--paper);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .band img {
    aspect-ratio: 1672 / 701;
  }
}

@media (min-width: 960px) {
  .archive-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: start;
    margin-top: 0;
  }

  .archive-note {
    grid-column: 1 / span 5;
    padding-top: 3.5rem;
  }

  /* Mounted over the band's lower edge; the frame in page colour cuts it out of the image below. */
  .mounted {
    grid-column: 7 / -1;
    margin-top: -9rem;
  }

  .mounted img {
    border: 0.625rem solid var(--ink-0);
  }

  .mounted figcaption {
    padding-inline: 0.625rem;
  }
}

/* Status ---------------------------------------------------------------------------------------- */

.status {
  padding-bottom: var(--section);
}

.board {
  display: grid;
  gap: 2.5rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line-strong);
  background: var(--ink-1);
}

.board h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.25rem);
}

.board h2 .lamp {
  width: 0.875rem;
  height: 0.875rem;
  box-shadow: 0 0 0 0.3rem rgb(249 101 8 / 0.2);
}

.board-main > p:last-child {
  max-width: 46ch;
  margin-top: 1.25rem;
  font-size: 1.0625rem;
}

.board-fields {
  display: grid;
  gap: 1.5rem 2rem;
  align-content: start;
}

.board-fields div {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.board-fields dt {
  color: var(--paper-3);
  font: 500 0.75rem/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.board-fields dd {
  margin-top: 0.4rem;
  color: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .board-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .board {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

/* Closed Alpha ---------------------------------------------------------------------------------- */

.register {
  padding-bottom: var(--section);
}

/* Three parallel strokes, the line structure the logo is drawn with. */
.rule-triple {
  height: 10px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  background: repeating-linear-gradient(to bottom, var(--signal) 0 2px, transparent 2px 4px);
}

.register-grid {
  display: grid;
  gap: 2rem;
}

.register h2 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.register-action {
  display: grid;
  justify-items: start;
  align-content: end;
  gap: 1.25rem;
}

.register-action > p:first-child {
  max-width: 36ch;
  color: var(--paper);
  font-size: 1.125rem;
}

.fine {
  color: var(--paper-3);
  font-size: 0.875rem;
}

@media (min-width: 960px) {
  .register-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    column-gap: 4rem;
  }
}

/* Footer ---------------------------------------------------------------------------------------- */

.site-footer {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

.footer-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer-lockup img {
  width: auto;
  height: 2rem;
}

/* The brand line from the key art. */
.tagline {
  display: flex;
  gap: 1.1em;
  color: var(--paper-2);
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
}

.legal {
  color: var(--paper-3);
  font-size: 0.8125rem;
}

@media (min-width: 960px) {
  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .footer-nav {
    justify-content: end;
  }

  .legal {
    grid-column: 1 / -1;
  }
}

/* Documents (privacy, terms, 404) --------------------------------------------------------------- */

.doc {
  max-width: 46rem;
  padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem);
}

.doc h1 {
  color: var(--paper);
  font: 600 clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem) / 1.05 var(--sans);
  letter-spacing: -0.025em;
}

.doc h2 {
  margin-top: 2.75rem;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc p,
.doc ul {
  margin-top: 0.9rem;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc a {
  color: var(--paper);
  text-decoration-color: var(--signal);
  text-underline-offset: 0.2em;
}

.doc-meta {
  color: var(--paper-3);
  font-size: 0.9375rem;
}

.draft {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--signal);
  background: var(--ink-1);
  color: var(--paper);
}

.doc .draft {
  margin-top: 2rem;
}

/* Text that still needs the operator's details or legal review. Visible on purpose. */
.todo {
  padding: 0.05em 0.35em;
  border: 1px dashed currentColor;
  background: none;
  color: var(--signal);
  font: 500 0.8125em/1.4 var(--mono);
}

/* Motion: the lights come up on the hall, then the title card settles. Nothing loops. -------------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero-media img {
    animation: lights-up 1.6s var(--ease) both;
  }

  .hero-copy > * {
    animation: rise 0.8s var(--ease) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 0.16s;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 0.24s;
  }

  .button {
    transition:
      background-color 0.2s var(--ease),
      border-color 0.2s var(--ease),
      transform 0.2s var(--ease);
  }
}

@keyframes lights-up {
  from {
    opacity: 0;
    transform: scale(1.035);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}
