/* Goatexe — welcome page
   Structure is a rack elevation: the left rail is a real U scale, top of rack
   at the top of the page, 1U at the footer. */

/* ---------- fonts (self-hosted, see fonts/README.md) ---------- */

/* Anybody: variable weight and width. The wordmark animates the width axis. */
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("/fonts/anybody-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("/fonts/anybody-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --void:    #0B0E13;
  --steel:   #131A24;
  --rail:    #212C3A;
  --tick:    #2B3846;
  --dim:     #6B7A8F;
  --mist:    #8593A6;
  --bone:    #E7ECF3;
  --sodium:  #E8A33D;
  --signal:  #46D6BE;

  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --rail-w: 104px;
  --gutter: 40px;
  --max:    1040px;
}

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

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

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* One lamp above the rack, and darkness everywhere it does not reach. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(70% 55% at 24% 0%, rgba(232, 163, 62, 0.08), transparent 60%),
    radial-gradient(120% 90% at 50% 42%, transparent 34%, rgba(0, 0, 0, 0.62) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Grain. Keeps the flat dark from looking like a screenshot of nothing. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 3;
}

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: var(--steel);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- rack frame ---------- */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.bay {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  column-gap: var(--gutter);
  padding: 72px 0;
}

.bay + .bay { border-top: 1px solid var(--rail); }

/* Rail: hairline plus punched holes, continuous because the cells stack. */
.bay__u {
  border-right: 1px solid var(--rail);
  text-align: right;
  background:
    repeating-linear-gradient(to bottom, var(--tick) 0 1px, transparent 1px 22px)
    right -1px top / 9px 100% no-repeat;
}

.bay__u span {
  display: inline-block;
  padding-right: 20px;
  color: var(--sodium);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.bay__title {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  font-variation-settings: "wdth" 88, "wght" 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--mist);
}

/* Scroll reveal — only when scripting is on, so the page is never blank without it. */
.js .bay {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.js .bay.is-in { opacity: 1; transform: none; }

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

.bay--hero { padding-top: 96px; padding-bottom: 72px; }
.bay--hero .bay__body { position: relative; }
.bay--hero .bay__body > :not(.hud) { position: relative; z-index: 1; }

/* ---------- hud ---------- */

/* Ambient instrument panel. Transform and opacity only, so it stays cheap. */
.hud {
  position: absolute;
  top: calc(50% + 20px);
  right: -28px;
  width: 372px;
  height: 372px;
  transform: translate(var(--drift-x, 0px), calc(-50% + var(--drift-y, 0px)));
  transition: transform 0.9s cubic-bezier(0.22, 0.8, 0.24, 1);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: hud-in 2.2s 0.3s ease-out forwards;
}

.hud g,
.hud__core {
  transform-box: fill-box;
  transform-origin: center;
}

.hud__brackets { animation: spin 90s linear infinite reverse; }
.hud__ticks    { animation: spin 150s linear infinite; }
.hud__mid      { animation: spin 38s linear infinite reverse; }
.hud__sweep    { animation: spin 13s linear infinite; }
.hud__inner    { animation: spin 22s linear infinite reverse; }
.hud__radar    { animation: spin 7.5s linear infinite; }
.hud__core     { animation: core 5.5s ease-in-out infinite; }

@keyframes hud-in { to { opacity: 1; } }
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes core   {
  0%, 100% { opacity: 0.5; transform: scale(0.92); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

.eyebrow {
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sodium);
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 11vw, 7.4rem);
  line-height: 0.88;
  font-weight: 750;
  letter-spacing: -0.022em;
  text-transform: lowercase;
  font-variation-settings: "wdth" 120, "wght" 750;
  animation: slide-out 1.15s cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

/* The wordmark wears the same indicator the machines do. */
.wordmark::after {
  content: "";
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.05em;
  vertical-align: baseline;
  background: var(--sodium);
}

@keyframes slide-out {
  from { font-variation-settings: "wdth" 78, "wght" 860; opacity: 0; }
  to   { font-variation-settings: "wdth" 120, "wght" 750; opacity: 1; }
}

.lede {
  max-width: 38ch;
  margin: 30px 0 0;
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--mist);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--rail);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--bone);
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.btn:hover { border-color: var(--mist); }

.btn--primary {
  border-color: var(--sodium);
  color: var(--sodium);
}
.btn--primary:hover {
  background: var(--sodium);
  color: var(--void);
  border-color: var(--sodium);
}

/* ---------- rack elevation ---------- */

/* Three blank faceplates. Deliberately says nothing about what is in them. */
.rack {
  display: grid;
  gap: 3px;
}

.node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 26px;
  padding: 22px;
  background: var(--steel);
  border: 1px solid var(--rail);
}

.node__led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(70, 214, 190, 0.55);
  animation: breathe 4.2s ease-in-out infinite;
}

.node:nth-child(2) .node__led { animation-delay: -1.4s; }
.node:nth-child(3) .node__led { animation-delay: -2.6s; }

@keyframes breathe {
  0%, 100% { opacity: 0.32; }
  50%      { opacity: 1; }
}

/* Perforated vent panel. Each plate is punched a little differently. */
.node__vent {
  height: 26px;
  justify-self: start;
  width: 100%;
  background: radial-gradient(circle, var(--rail) 1px, transparent 1.2px) 0 0 / 6px 6px;
  opacity: 0.85;
}
.node:nth-child(2) .node__vent { max-width: 62%; opacity: 0.6; }
.node:nth-child(3) .node__vent { max-width: 84%; opacity: 0.72; }

.node__ports { display: flex; gap: 7px; }
.node__ports i {
  display: block;
  width: 15px;
  height: 9px;
  border: 1px solid var(--rail);
}

.rack__note {
  margin: 22px 0 0;
  font-size: 0.95rem;
  color: var(--mist);
}

/* ---------- what runs here ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 48px;
}

.item { margin: 0; }

.item__name {
  margin: 0 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rail);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  font-variation-settings: "wdth" 100, "wght" 700;
}

.item__copy {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.62;
  color: var(--mist);
}

/* ---------- colophon ---------- */

.bay--foot { padding-bottom: 96px; }

.colophon {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--mist);
}
.colophon--dim { margin-top: 8px; color: var(--dim); }
.sep { padding: 0 6px; }

/* ---------- small screens ---------- */

@media (max-width: 1080px) {
  .hud { width: 268px; height: 268px; right: -22px; }
}

/* Below this the type needs the whole column, and the hud is decoration. */
@media (max-width: 860px) {
  .hud { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .bay {
    grid-template-columns: minmax(0, 1fr);
    padding: 52px 0;
  }

  .bay--hero { padding-top: 64px; }

  .bay__u {
    border-right: 0;
    background: none;
    text-align: left;
    margin-bottom: 20px;
  }
  .bay__u span { padding: 0; left: 0; }
  .bay__u span::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 1px;
    margin-right: 10px;
    vertical-align: middle;
    background: var(--tick);
  }

  .lede { max-width: none; }

  .grid { grid-template-columns: minmax(0, 1fr); }

  .node { column-gap: 16px; padding: 18px; }
  .node__vent { height: 22px; }
  .node__ports i { width: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; }
  .hud { opacity: 1; animation: none; transition: none; }
  .hud g, .hud__core { animation: none; }
  .hud__radar { opacity: 0.5; }
  .node__led { animation: none; opacity: 0.85; }
  .bay { opacity: 1; transform: none; transition: none; }
  .port, .btn { transition: none; }
}
