/* Nadir — visual language
 *
 * Dark, quiet, precise. Near-black ground, one indigo accent used sparingly,
 * hairline borders instead of boxes, and a lot of vertical air. Type is tight
 * and slightly negative-tracked at display sizes; everything secondary drops
 * to a muted grey rather than a smaller size.
 *
 * One page for now — downloads. Nothing here styles anything that no longer
 * exists.
 */

:root {
  /* Ground */
  --bg: #08090a;
  --surface: rgba(255, 255, 255, 0.026);
  --surface-hover: rgba(255, 255, 255, 0.045);

  /* Lines */
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Ink */
  --text: #f7f8f8;
  --text-secondary: #d0d2d6;
  --text-muted: #8a8f98;

  /* Accent */
  --brand-bright: #828fff;
  --warn: #d9a15f;

  /* Rhythm */
  --page: 68rem;
  --gutter: 1.5rem;
  --header-h: 64px;
  --radius-lg: 14px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(94, 106, 210, 0.4);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
}

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

.container-narrow {
  max-width: 46rem;
}

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

.site-header {
  position: relative;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.mark {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding-inline: 1.15rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), transform 0.15s var(--ease);
}

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

.button-sm {
  height: 32px;
  padding-inline: 0.85rem;
  font-size: 0.8125rem;
}

.button-primary {
  background: var(--text);
  color: #08090a;
}

.button-primary:hover {
  background: #fff;
}

.button-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

.button-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
}

.google-mark {
  width: 16px;
  height: 16px;
  margin-right: 0.6rem;
}

/* Page -------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: 5rem 7rem;
  isolation: isolate;
}

/* The single wash of colour on the page. */
.glow {
  position: absolute;
  top: -24rem;
  left: 50%;
  z-index: -1;
  width: min(72rem, 140vw);
  height: 44rem;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    rgba(94, 106, 210, 0.22),
    rgba(94, 106, 210, 0.05) 45%,
    transparent 70%
  );
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--brand-bright);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hero h1 {
  margin: 0 0 2.25rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 44ch;
  margin: -1.5rem 0 2rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.hero-actions {
  margin: 0;
}

/* States ------------------------------------------------------------------ */

.empty,
.gate {
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.008));
  text-align: center;
}

.empty {
  border-style: dashed;
}

.empty p,
.gate p {
  max-width: 44ch;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.empty p {
  margin-bottom: 0;
}

.gate-refused {
  border-color: rgba(217, 161, 95, 0.22);
}

.gate form {
  margin: 0;
}

/* A one-off transient message from the sign-in flow. */
.notice {
  margin: 0 0 1.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(217, 161, 95, 0.22);
  border-radius: 8px;
  background: rgba(217, 161, 95, 0.06);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Who you are, above the list. */
.signed-in {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.signed-in strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.signed-in form {
  margin: 0;
}

/* A button that has to be a form (it posts), but should read as a link. */
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.linkish:hover {
  color: var(--text);
}

/* Release list ------------------------------------------------------------ */

.release-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.release {
  padding: 1.15rem 1.5rem;
  transition: background-color 0.15s var(--ease);
}

.release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.release:hover {
  background: var(--surface-hover);
}

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

.release-name {
  display: flex;
  flex-direction: column;
}

.release-name strong {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.detail,
.size {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.release-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Said before the click, not after it fails. */
.release-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(217, 161, 95, 0.22);
  border-radius: 8px;
  background: rgba(217, 161, 95, 0.06);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.note-icon {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--warn);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Narrow screens ---------------------------------------------------------- */

@media (max-width: 640px) {
  .hero {
    padding-block: 3rem 4.5rem;
  }

  .release-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .empty,
  .gate {
    padding: 2rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
