@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --amber: oklch(0.78 0.15 60);
  --amber-glow: oklch(0.7 0.17 35 / .6);
  --green: oklch(0.8 0.15 150);
  --red: oklch(0.7 0.17 20);
  --text: oklch(0.92 0.02 300);
  --muted: oklch(0.7 0.03 300);
  --soft: oklch(0.8 0.03 300);
  --prose: oklch(0.85 0.02 300);
  --window: rgba(16, 14, 26, .9);
  --panel: rgba(16, 14, 26, .82);
  --line: rgba(255, 255, 255, .08);
  --input: rgba(255, 255, 255, .05);
  --input-line: rgba(255, 255, 255, .15);
  --cream: oklch(0.95 0.03 70);
  --ink: #1c1422;
  --gap: 12px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

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

html {
  background: oklch(0.28 0.1 290);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mono);
  color: var(--text);
  background: linear-gradient(170deg, oklch(0.28 0.1 290) 0%, oklch(0.45 0.16 330) 45%, oklch(0.68 0.17 35) 80%, oklch(0.82 0.13 70) 100%);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: .75; }
input, select, button { font: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Desktop: waybar, tiled windows, bottom bar */

.desktop {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
}
.workspaces { display: flex; gap: 6px; }
.ws { padding: 2px 10px; border-radius: 5px; text-decoration: none; }
.ws[aria-current] { background: var(--amber); color: #16121f; font-weight: 700; }
.ws[aria-current]:hover { opacity: 1; }
.ws-empty { opacity: .5; }
.bar-title { font-weight: 700; }
.bar-status { display: flex; justify-content: flex-end; gap: 18px; color: var(--soft); white-space: nowrap; }

.tiles {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.tile {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--window);
  border: 2px solid var(--line);
  border-radius: 10px;
  scroll-margin-top: var(--gap);
  transition: border-color .15s ease;
}
.tile.is-active { border-color: var(--amber); }
.tile-title {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* Focus follows mouse, like Hyprland: the hovered window gets the active border. */
@media (hover: hover) {
  .tiles:has(.tile:hover) .tile { border-color: var(--line); }
  .tiles:has(.tile:hover) .tile-hero { border-color: transparent; }
  .tiles:has(.tile:hover) .tile:hover { border-color: var(--amber); }
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  background: var(--panel);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
}
.footer p { margin: 0; color: var(--soft); }
.footer nav { display: flex; gap: 24px; }

/* Terminal */

.tile-term { box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 18px 40px rgba(20, 0, 30, .35); }
.term {
  container-type: inline-size;
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 15px;
}
.prompt { margin: 0; }
.prompt-user { color: var(--green); }
.prompt-path { color: var(--muted); }
.prompt-cmd {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  white-space: nowrap;
  animation: type 1.26s steps(9, end) both;
}
.cursor {
  display: inline-block;
  width: 9px;
  height: 18px;
  margin-left: 2px;
  vertical-align: -3px;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}
.fetch {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: reveal 0s 1.26s both;
}
.fetch-logo {
  display: block;
  width: 320px;
  max-width: 100%;
  height: auto;
  overflow: visible; /* block glyphs overhang their line box, like the terminal font's */
  fill: var(--amber);
  filter: drop-shadow(0 0 18px var(--amber-glow));
}
.fetch-info {
  display: grid;
  grid-template-columns: 150px 1fr;
  row-gap: 6px;
  margin: 0;
  line-height: 1.5;
}
.fetch-info div { display: contents; }
.fetch-info dt { color: var(--amber); }
.fetch-info dd { margin: 0; }
.palette { display: flex; }
.palette span { width: 34px; height: 18px; }
.palette span:nth-child(1) { background: oklch(0.7 0.17 20); }
.palette span:nth-child(2) { background: oklch(0.78 0.15 60); }
.palette span:nth-child(3) { background: oklch(0.8 0.15 150); }
.palette span:nth-child(4) { background: oklch(0.75 0.13 230); }
.palette span:nth-child(5) { background: oklch(0.65 0.17 300); }
.palette span:nth-child(6) { background: oklch(0.7 0.15 340); }
.palette span:nth-child(7) { background: oklch(0.92 0.02 300); }

/* Real fastfetch puts the logo beside the info; do that when the window is wide enough. */
@container (min-width: 780px) {
  .fetch { display: grid; grid-template-columns: auto 1fr; align-items: start; column-gap: 40px; }
  .fetch-logo { grid-row: span 2; }
}

@keyframes type { from { width: 0; } to { width: 9ch; } }
@keyframes reveal { from { visibility: hidden; } to { visibility: visible; } }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .prompt-cmd, .fetch, .cursor { animation: none; }
  .tile { transition: none; }
}

/* Hero */

.tile-hero {
  gap: 20px;
  padding: 34px 30px; /* the design's 36px 32px, less the 2px window border */
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  border-color: transparent;
  z-index: 1; /* sits above the terminal's drop shadow, as in the design */
}
.hero-title {
  margin: 0;
  font-size: 60px;
  line-height: .95;
  font-weight: 700;
  letter-spacing: -.04em;
  text-wrap: pretty;
}
.hero-lede { margin: 0; font-size: 17px; line-height: 1.55; color: #4a3f4f; }
.cta {
  align-self: flex-start;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.cta kbd {
  font: 500 12px var(--mono);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 4px;
  padding: 3px 7px;
}

/* Keybindings */

.keys {
  margin: 0;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}
.keys div { display: flex; gap: 14px; align-items: center; }
.keys dt { flex: none; min-width: 110px; color: var(--green); }
.keys dd { margin: 0; }

/* About docs */

.doc { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.doc h2 { margin: 0; font: 700 28px var(--sans); color: var(--amber); }
.doc p { margin: 0; max-width: 72ch; font-size: 15px; line-height: 1.75; color: var(--prose); }

/* Register interest */

.tile-join { background: rgba(16, 14, 26, .94); }
.join {
  padding: 44px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
}
.join-intro { display: flex; flex-direction: column; gap: 16px; }
.join-intro h2 { margin: 0; font: 700 44px/1 var(--sans); letter-spacing: -.03em; }
.join-intro p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--soft); }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 12px; color: var(--amber); }
.field input, .field select {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--input-line);
  border-radius: 6px;
  background: var(--input);
  color: #fff;
  font-size: 15px;
  outline: none;
}
.field select { background: #221d30; }
.field select:invalid { color: oklch(0.65 0.02 300); }
.field option { color: #fff; }
.field input::placeholder { color: oklch(0.65 0.02 300); }
.field input:focus-visible, .field select:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px oklch(0.78 0.15 60 / .25);
}
.field [aria-invalid="true"] { border-color: var(--red); }
.field [aria-invalid="true"]:focus-visible { border-color: var(--red); box-shadow: 0 0 0 3px oklch(0.7 0.17 20 / .25); }

.fieldset { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: none; }
.fieldset legend { padding: 0; margin-bottom: 10px; font-size: 12px; color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 15px;
  border: 1px solid var(--input-line);
  border-radius: 6px;
  background: var(--input);
  font-size: 14px;
  cursor: pointer;
}
.chip:has(input:checked) { border-color: oklch(0.78 0.15 60 / .7); }
.chip:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
.chip input { width: 16px; height: 16px; accent-color: var(--amber); }
.chip input:focus-visible { outline: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.turnstile { grid-column: 1 / -1; min-height: 65px; }
.turnstile[data-sitekey=""] { display: none; }

.form-error { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.6; color: var(--red); }

.submit {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 15px 24px;
  border: none;
  border-radius: 6px;
  background: var(--amber);
  color: #16121f;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 0 28px oklch(0.7 0.17 35 / .5);
}
.submit:disabled { cursor: progress; opacity: .7; }

.done {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px;
  border: 1px dashed var(--green);
  border-radius: 8px;
}
.done[hidden] { display: none; }
.done:focus { outline: none; }
.done-status { margin: 0; font-size: 14px; color: var(--green); }
.done-status.is-error { color: var(--red); }
.done-title { margin: 0; font: 700 34px var(--sans); }
.done-text { margin: 0; font-size: 15px; line-height: 1.7; color: var(--soft); }
.btn-ghost {
  align-self: flex-start;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 6px;
  background: none;
  color: inherit;
  font-size: inherit;
  text-decoration: none;
  cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions form { display: contents; }
.actions .submit { justify-self: auto; }

/* Standalone status pages (no-JS form posts, unsubscribe, 404) */

.status-page { width: 100%; max-width: 760px; margin: 0 auto; }
.status-page .done { border: none; padding: 44px; }

/* Layout: tiling on desktop, stacked below */

@media (min-width: 1024px) {
  .tile-term { grid-column: 1 / span 7; grid-row: 1 / span 2; }
  .tile-hero { grid-column: 8 / span 5; grid-row: 1; }
  .tile-keys { grid-column: 8 / span 5; grid-row: 2; }
  .tile-about { grid-column: span 6; }
}

@media (max-width: 1023px) {
  .join { grid-template-columns: 1fr; gap: 32px; }
  .join-intro p { max-width: 60ch; }
}

@media (max-width: 640px) {
  :root { --gap: 8px; }
  .bar { padding: 8px 10px; font-size: 12px; gap: 8px; }
  .ws { padding: 2px 8px; }
  .term { padding: 20px 18px 24px; font-size: 14px; }
  .fetch-info { grid-template-columns: 112px 1fr; }
  .tile-hero { padding: 28px 22px; }
  .hero-title { font-size: clamp(40px, 11.5vw, 60px); }
  .keys { padding: 18px; }
  .keys dt { min-width: 96px; }
  .doc { padding: 22px 18px; }
  .doc h2 { font-size: 24px; }
  .join { padding: 28px 18px 32px; }
  .join-intro h2 { font-size: 36px; }
  .form { grid-template-columns: 1fr; }
  .done, .status-page .done { padding: 28px 22px; }
  .done-title { font-size: 28px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .ws-empty, .bar-where { display: none; }
}
