/* =========================================================================
   Redshift landing page
   -------------------------------------------------------------------------
   Layout: left-aligned wordmark (75% width) on top, a six-column grid underneath with the
   copy stacked in one left-aligned column, a mono footer pinned to the bottom, and a fixed
   <canvas> backdrop drawn by light.js.
   ========================================================================= */


/* ---------- Fonts (all SIL Open Font License) ---------- */

/* Audiowide (Astigmatic): the wordmark. */
@font-face {
  font-family: "Audiowide";
  src: url("fonts/Audiowide-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Geist (Vercel): body text. */
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* JetBrains Mono (JetBrains): footer. */
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* ---------- Design tokens ---------- */
:root {
  --void: #050109;                     /* behind everything */
  --ink: #ffffff;
  --display: "Audiowide", "Arial Black", sans-serif;
  --text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;
  --margin: clamp(14px, 1.05vw, 20px); /* page edge */
  --gap: clamp(14px, 1.2vw, 22px);     /* column gutter */
  --drop: clamp(48px, 9vh, 110px);     /* wordmark → text */
}


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

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  background: var(--void);
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.32 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}


/* ---------- Backdrop ----------
   Fixed full-viewport canvas behind the content. The gradient is what
   people see before the first frame, or if WebGL is unavailable. */
.light {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 74% 58%,
      #fff1dc 0%, #ff6a17 9%, #c3122f 27%, #3a0730 54%, var(--void) 82%);
}

/* The wordmark doubles as a visually unstyled, keyboard-accessible palette button. */
.palette-toggle {
  display: inline;
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: default;
}

.palette-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}


/* Palette variations (set data-palette on <html>; light.js reads it too).
   These only change the page colour and the pre-WebGL fallback glow. */
:root[data-palette="amber"] { --void: #060305; }
:root[data-palette="amber"] .light {
  background: radial-gradient(60% 70% at 74% 58%,
    #fff2d1 0%, #ff9e29 9%, #db3d0d 27%, #470d0f 54%, var(--void) 82%);
}

:root[data-palette="dusk"] { --void: #03030d; }
:root[data-palette="dusk"] .light {
  background: radial-gradient(60% 70% at 74% 58%,
    #ffedeb 0%, #ff856b 9%, #c72975 27%, #2e0f5c 54%, var(--void) 82%);
}

:root[data-palette="aurora"] { --void: #02090b; }
:root[data-palette="aurora"] .light {
  background: radial-gradient(60% 70% at 74% 58%,
    #e5fff0 0%, #59ffd1 9%, #0db98b 27%, #075453 54%, var(--void) 82%);
}

:root[data-palette="glacier"] { --void: #020613; }
:root[data-palette="glacier"] .light {
  background: radial-gradient(60% 70% at 74% 58%,
    #eafaff 0%, #65d9ff 9%, #236ef2 27%, #17255f 54%, var(--void) 82%);
}

:root[data-palette="ultraviolet"] { --void: #080314; }
:root[data-palette="ultraviolet"] .light {
  background: radial-gradient(60% 70% at 74% 58%,
    #fff0ff 0%, #da79ff 9%, #8b30d8 27%, #35105d 54%, var(--void) 82%);
}


/* ---------- Page grid ---------- */
.page {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: auto auto 1fr auto;
  column-gap: var(--gap);
  min-height: 100vh;
  min-height: 100svh;  /* avoids mobile URL-bar jumps */
  padding: clamp(40px, 9.5vh, 95px) var(--margin) var(--margin);
  padding-left: clamp(24px, 3vw, 48px);
}


/* ---------- Wordmark ----------
   The masthead is a size container, so the wordmark scales with its own width
   (cqw) and always spans edge to edge. The masthead itself is left aligned
   and occupies 75% of the page width. */
.masthead {
  grid-column: 1 / -1;
  justify-self: start;
  width: 75%;
  container-type: inline-size;
  padding-top: calc(var(--margin) * 2.4);
}

.wordmark {
  margin: 0 0 0 -0.03em;  /* optical: pull the "r" to the margin */
  font-family: var(--display);
  font-weight: 400;
  font-size: 16.8vw;      /* fallback for browsers without cqw (75% of page) */
  font-size: 22.45cqw;
  line-height: 0.9;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-synthesis: none;
}


/* ---------- Text ---------- */
.label {
  grid-column: 1 / span 2;
  grid-row: 2;
  margin: var(--drop) 0 0;
}

.contact {
  grid-column: 1 / span 2;
  grid-row: 3;
  margin: 1em 0 0;
  font-style: normal;  /* <address> is italic by default */
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}


/* ---------- Footer ---------- */
.foot {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: end;
  display: flex;
  align-items: baseline;
  gap: 2em;
  padding-top: 48px;
  font: 400 12px/1.2 var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.foot-line {
  font-size: 13px;
  text-transform: none;
}


/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Keep the masthead prominent on narrow screens. */
  .masthead {
    width: calc(100% - clamp(10px, 2vw, 18px));
  }

  .label {
    max-width: 75%;
    margin-top: clamp(36px, 8vh, 80px);
  }

  .contact {
    max-width: 75%;
  }
}


/* Text selection: white highlight, dark text. */
::selection {
  background: var(--ink);
  color: var(--void);
}
