/* The front page, in plus3.dev's style: black, big type, and a "stage" per feature with a frame
   and a highlights card hanging off its corner. The invite pages keep style.css. */

@font-face {
  font-family: "Inter Tight Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-tight-latin-wght-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  --bg: #000;
  --ink: #fff;
  --dim: #8a8a8a;
  --line: #222;
  --panel: #0c0c0e;
  --panel-2: #17171b;
  /* The launcher's colours, kept for the few places that are "the product". */
  --hot: #e2366b;
  --gradient: linear-gradient(135deg, #ff8a3d, #e2366b);

  --display: "Inter Tight Variable", "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 2.4vw, 48px);

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.mono {
  font-family: var(--mono);
  font-size: clamp(11px, 0.8vw, 14px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--dim);
}
.dim { color: var(--dim); }

/* Scroll reveal, armed by home.js only after it has marked what is already on screen. */
html.motion [data-reveal]:not(.in) { opacity: 0; translate: 0 4vh; }
html.motion [data-reveal] {
  transition:
    opacity 900ms cubic-bezier(0.2, 0.7, 0.2, 1),
    translate 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hero */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3svh, 40px) var(--gutter) var(--gutter);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin: 0 0 clamp(8px, 2svh, 24px);
  animation: rise 1300ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.eyebrow img { width: 2em; height: 2em; }

/* Sized so "playtest" spans the width. */
.mark {
  margin: -0.1em 0 0 -0.04em;
  font-size: min(30vw, 44svh);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1.02;
  white-space: nowrap;
  animation: rise 1300ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sub {
  max-width: 22ch;
  margin: calc(min(30vw, 44svh) * 0.08) 0 0;
  font-size: min(4.4vw, 7svh);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
  animation: rise 1300ms 150ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.index {
  margin-top: auto;
  padding-top: clamp(32px, 5svh, 64px);
  animation: rise 1300ms 300ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.index li + li { border-left: 1px solid var(--line); }
.index a {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1rem;
  transition: background 180ms, color 180ms;
}
.index .name {
  font-size: clamp(24px, 2.2vw, 52px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.index a:hover, .index a:focus-visible { background: var(--ink); color: var(--bg); outline: none; }
.index a:hover .mono, .index a:focus-visible .mono { color: var(--bg); }

.bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.bar .links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.bar a:hover { color: var(--ink); }

@keyframes rise {
  from { opacity: 0; translate: 0 0.25em; }
}

/* Ticker: the band of big words between sections. Every fourth word is solid. */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 0.12em;
  font-size: clamp(40px, 6.4vw, 150px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
}
.track { display: inline-flex; animation: ticker 70s linear infinite; }
.reverse .track { animation-direction: reverse; }
.track span { display: inline-flex; align-items: center; gap: 0.4em; padding-right: 0.4em; }
.track b { font-weight: inherit; color: transparent; -webkit-text-stroke: 1px var(--ink); }
.track b:nth-of-type(4n + 1) { color: var(--ink); }
.track i { font-style: normal; font-family: var(--mono); font-size: 0.3em; color: var(--dim); }
@keyframes ticker {
  to { translate: -50% 0; }
}

/* A feature: text on one side, the stage on the other, alternating. */

.feature {
  --pad: clamp(40px, 8svh, 110px);
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr);
  column-gap: clamp(32px, 4vw, 96px);
  align-items: center;
  padding: var(--pad) var(--gutter);
}
.flip { grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); }
.flip .text { order: 2; text-align: right; }

.feature .meta { margin: 0 0 1.2rem; }
.feature .name {
  margin: 0;
  font-size: min(7.8vw, 18svh);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.82;
}
.feature .line {
  margin: clamp(20px, 3svh, 40px) 0 0;
  max-width: 22ch;
  font-size: clamp(22px, 2.1vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}
.feature .note { margin: 1.5rem 0 0; max-width: 40ch; text-transform: none; line-height: 1.5; }
.flip .line, .flip .note { margin-left: auto; }

.stage {
  position: relative;
  width: min(100% - 48px, 920px);
  justify-self: center;
  margin-block: 40px;
  /* Its own stacking context, so the frame slabs (z-index -1) stay above the page background. */
  isolation: isolate;
}

/* A frame: a white-outlined panel with a hatched slab offset behind it. */
.frame {
  --shadow: 12px;
  position: relative;
  margin: 0;
  outline: 1px solid rgb(255 255 255 / 0.85);
  background: var(--panel);
  transition: scale 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  translate: var(--shadow) var(--shadow);
  border: 1px solid rgb(255 255 255 / 0.5);
  background: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.55) 0 1.5px, transparent 1.5px 7px);
  transition: translate 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.frame:hover { --shadow: 20px; }
.frame figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.35em 0.6em;
  background: var(--bg);
  color: var(--ink);
  border-top: 1px solid rgb(255 255 255 / 0.85);
  border-right: 1px solid rgb(255 255 255 / 0.85);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

/* The highlights card, overlapping one corner of the frame. */
.card {
  position: absolute;
  z-index: 2;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45em; color: var(--ink); }
.card li::before { content: "+ "; color: var(--dim); }
.card-br { right: -24px; bottom: -40px; }
.card-bl { left: -24px; bottom: -40px; }
.card-tl { left: -24px; top: -40px; }
.card-tr { right: -24px; top: -40px; }

/* Two screenshots on one stage: one behind, one in front of it, the front one coming forward on
   hover. mirror swaps their sides. */
.shots { aspect-ratio: 1.6; }
.shots .frame { position: absolute; transition: scale 380ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 300ms; }
.shots .back { top: 0; left: 0; width: 80%; }
.shots .front { right: 0; bottom: 0; width: 66%; z-index: 1; }
.shots.mirror .back { left: auto; right: 0; }
.shots.mirror .front { right: auto; left: 0; }
.shots .frame:hover { z-index: 3; }
.shots:has(.frame:hover) .frame:not(:hover) { filter: brightness(0.45); }
.frame img { display: block; width: 100%; height: auto; }

/* Frame contents: small, schematic versions of the real tools. */

.term {
  padding: clamp(18px, 2.4vw, 36px) clamp(18px, 2.4vw, 36px) 48px;
  min-height: 100%;
  overflow-x: auto;
}
.mono-text { font-family: var(--mono); font-size: clamp(11px, 0.95vw, 15px); line-height: 1.7; }
.term p { margin: 0; white-space: pre; }
.term .ok { color: #7ee2a8; }
.code .kw { color: #ff8a3d; }
.code .str { color: #f7b6c9; }
.code .num { color: #ffd166; }

.app {
  font-size: clamp(11px, 0.95vw, 15px);
  padding-bottom: 32px;
}
.small { font-size: 0.85em; }

.launcher { display: grid; grid-template-columns: 30% 1fr; min-height: 22em; padding-bottom: 0; }
.launcher .side { padding: 1.2em 0.8em; border-right: 1px solid var(--line); background: var(--bg); }
.launcher .label { margin: 0 0 0.8em 0.4em; font: 600 0.75em var(--mono); text-transform: uppercase; color: var(--dim); }
.launcher .game { display: flex; align-items: center; gap: 0.6em; margin: 0 0 0.3em; padding: 0.45em 0.4em; border-radius: 6px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.launcher .game.active { background: var(--panel-2); }
.launcher .icon { flex: none; width: 1.6em; height: 1.6em; border-radius: 5px; }
.icon.a { background: var(--gradient); }
.icon.b { background: linear-gradient(135deg, #4f7cff, #1b2a6b); }
.icon.c { background: linear-gradient(135deg, #3fd6b0, #136b5a); }
.launcher .page { padding: 1em 1em 40px; min-width: 0; }
.launcher .splash {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 2.4;
  padding: 0.8em 1em;
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 30%, #ffd16699 0 6%, transparent 7%),
    linear-gradient(180deg, transparent 40%, #0009),
    linear-gradient(160deg, #ff8a3d, #e2366b 55%, #3a1030);
}
.launcher .splash span { font-size: 1.6em; font-weight: 700; letter-spacing: -0.03em; }
.launcher .row { display: flex; align-items: center; gap: 0.9em; margin: 1em 0 0.8em; }
.launcher .play { flex: none; padding: 0.55em 1em; border-radius: 6px; background: var(--gradient); font-weight: 600; }
.launcher .progress { flex: 1; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.launcher .fill { display: block; width: 64%; height: 100%; background: var(--ink); }
.launcher .tabs { display: flex; flex-wrap: wrap; gap: 0 1.2em; border-bottom: 1px solid var(--line); color: var(--dim); }
.launcher .tabs span { padding-bottom: 0.5em; margin-bottom: -1px; border-bottom: 1px solid transparent; }
.launcher .tabs .on { color: var(--ink); border-color: var(--ink); }

.caret { display: inline-block; width: 0.5em; height: 1.1em; margin-left: 2px; vertical-align: -0.2em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink {
  50% { opacity: 0; }
}

.feedback { padding: 1.2em 1.4em 48px; }
.feedback .title { margin: 0 0 0.9em; font-size: 1.3em; font-weight: 600; letter-spacing: -0.02em; }
.feedback .shots { display: flex; gap: 0.6em; }
.feedback .shot { width: 26%; aspect-ratio: 16 / 9; border-radius: 6px; outline: 1px solid var(--line); }
.feedback .s1 { background: radial-gradient(circle at 70% 35%, #ffd166 0 5%, transparent 6%), linear-gradient(180deg, #2b3d6e, #132040 60%, #3a2a1a 61%); outline-color: var(--ink); outline-width: 2px; }
.feedback .s2 { background: linear-gradient(180deg, #4b6fa8, #a8c4e8 60%, #6b4a2a 61%); }
.feedback .add { display: grid; place-items: center; width: 12%; color: var(--dim); background: var(--panel-2); font-family: var(--mono); }
.feedback .input { margin: 1em 0 0; padding: 0.8em; min-height: 4.5em; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.feedback .chips { display: flex; flex-wrap: wrap; gap: 0.4em; margin-top: 0.8em; font-family: var(--mono); font-size: 0.8em; }
.feedback .chips span { padding: 0.15em 0.6em; border-radius: 999px; background: var(--panel-2); color: var(--dim); }
.feedback .actions { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-top: 1.2em; font-size: 0.85em; }
.feedback .send { flex: none; padding: 0.55em 1em; border-radius: 6px; background: var(--gradient); font-weight: 600; font-size: 1.15em; }

/* Footer */

.foot {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(40px, 8svh, 110px) var(--gutter) var(--gutter);
}
.foot .body { margin-block: auto; }
.foot .title {
  margin: 0;
  font-size: min(8.4vw, 19svh);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.82;
}
.prose {
  max-width: 30ch;
  margin: clamp(24px, 5svh, 64px) 0 0;
  font-size: clamp(20px, 2.1vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: pretty;
}
.mail {
  display: inline-block;
  margin-top: clamp(28px, 6svh, 80px);
  font-size: min(7.6vw, 15svh);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  overflow-wrap: anywhere;
  transition: color 200ms;
}
.mail:hover { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.foot .bar { margin-top: clamp(32px, 5svh, 64px); }

@media (max-width: 800px) {
  .mark { font-size: 30vw; }
  .sub { font-size: clamp(26px, 8vw, 40px); }
  .index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index li + li { border-left: 0; }
  .index li { border-bottom: 1px solid var(--line); }
  .index li:nth-child(even) { border-left: 1px solid var(--line); }

  .feature, .flip {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
    padding-block: 72px;
  }
  .flip .text { order: 0; text-align: left; }
  .flip .line, .flip .note { margin-left: 0; }
  .feature .name { font-size: clamp(56px, 18vw, 120px); }
  .stage { width: calc(100% - 12px); justify-self: start; margin-block: 0; display: flex; flex-direction: column; }
  .card { position: relative; inset: auto; order: -1; align-self: flex-start; margin-bottom: 28px; }
  .launcher { grid-template-columns: 1fr; }
  .launcher .side { display: none; }
  .shots { aspect-ratio: auto; gap: 28px; }
  .shots .frame { position: relative; inset: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker { white-space: normal; }
  .track { display: block; }
  .track span + span { display: none; }
  .track span { flex-wrap: wrap; }
}
