/* Lodestone Launcher landing page. Colors follow the launcher
   (launcher/crates/lodestone-ui/src/theme.rs); the headline uses Clash
   Grotesk, the dashboard's title font. */

@font-face {
  font-family: 'Satoshi';
  src: url('/fonts/Satoshi-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Grotesk';
  src: url('/fonts/ClashGrotesk-Variable.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --bg: #1d1e21;
  --bg-raised: #26282c;
  --border: #36393f;
  --text: #e3e3e4;
  --text-muted: #bcbdc4;
  --text-faint: #8f939b;
  --accent: #59b2f3;
  --accent-strong: #037aa0;
  --button: #13668a;
  --button-hover: #1d8eb2;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A soft blue glow behind the hero, the same blue as the launcher's accents. */
body::before {
  content: '';
  position: fixed;
  inset: -20vh -20vw auto;
  height: 80vh;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(89, 178, 243, 0.16),
    rgba(89, 178, 243, 0) 60%
  );
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
}

/* Header */

/* Moving between the home page and a product page, the logo stays where it is
   and changes into the next page's (where the browser supports it). */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

.brand {
  display: flex;
}

.brand img {
  height: 22px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.15s;
}

.github:hover {
  border-color: var(--text-faint);
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.stars[hidden] {
  display: none;
}

/* Hero */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(28px, 7vh, 88px) 24px 0;
}

/* The product's own logo, above everything else in the hero: the same box,
   at the same height, as the home page's logo, so it stays put when someone
   clicks through from there. */
.product-mark {
  display: block;
  box-sizing: border-box;
  width: 140px;
  height: 140px;
  margin: 0 0 22px;
  view-transition-name: hero-logo;
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 20px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(38, 40, 44, 0.7);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.eyebrow-stat {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

h1 {
  margin: 0;
  max-width: 24ch;
  font-family: 'Clash Grotesk', 'Satoshi', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

/* Wrap the headline at the comma, not mid-phrase. */
h1 .phrase {
  display: inline-block;
}

.lede {
  margin: 16px 0 0;
  max-width: 46ch;
  color: var(--text-muted);
  font-weight: 500;
  font-size: clamp(17px, 2vw, 20px);
}

.download {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--button);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.15s;
}

.button:hover {
  background: var(--button-hover);
}

.button:focus-visible,
.github:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button[aria-disabled='true'] {
  background: var(--bg-raised);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: default;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 14px;
}

.meta a {
  color: var(--text-muted);
}

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

/* Screenshot tour: a row of tabs that swaps the screenshot below it */

.tour {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1080px;
  margin-top: clamp(28px, 5vh, 52px);
}

.tabs {
  display: flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

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

.tabs button[aria-selected='true'] {
  background: var(--border);
  color: var(--text);
}

.tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.shot {
  position: relative;
  width: 100%;
  margin: 16px 0 0;
}

.shot img {
  transition: opacity 0.15s;
}

.shot img.is-loading {
  opacity: 0.6;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 30px 80px rgba(0, 0, 0, 0.5);
}

/* A few more things the launcher does, under the screenshots */

.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 40px;
  width: 100%;
  max-width: 880px;
  margin: clamp(32px, 6vh, 56px) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  text-align: left;
}

.points li {
  position: relative;
  padding-left: 18px;
}

.points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-strong);
}

.points strong {
  color: var(--text);
  font-weight: 700;
}

/* How fast it is next to the others: one chart per measure, our row in the
   page's accent and the others in grey. Text stays in text colours. */

.speed {
  width: 100%;
  max-width: 1080px;
  margin: clamp(56px, 10vh, 96px) 0 0;
  text-align: left;
}

.speed h2 {
  margin: 0;
  font-family: 'Clash Grotesk', 'Satoshi', system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-align: center;
}

.speed-lede {
  max-width: 56ch;
  margin: 12px auto 0;
  color: var(--text-muted);
  font-size: 17px;
  text-align: center;
}

.speed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.speed-chart {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-raised);
}

.speed-chart figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.speed-chart figcaption b {
  font-size: 16px;
  font-weight: 700;
}

.speed-chart figcaption span {
  color: var(--text-muted);
  font-size: 13px;
}

.speed-chart ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.speed-chart li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.speed-chart li.is-us {
  color: var(--text);
  font-weight: 700;
}

.speed-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.speed-bar i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}

.is-us .speed-bar i {
  background: var(--accent);
}

.speed-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.speed-value.is-note {
  font-size: 12px;
  font-weight: 400;
}

.speed-foot {
  max-width: 80ch;
  margin: 16px auto 0;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
}

.speed-foot a {
  color: var(--text-muted);
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 28px;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 14px;
}

.foot a {
  color: var(--text-muted);
}

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

@media (max-width: 560px) {
  .hero {
    padding-top: 28px;
  }

  .product-mark {
    width: 104px;
    height: 104px;
    margin-bottom: 18px;
  }

  .speed-grid {
    grid-template-columns: 1fr;
  }

  .speed-chart li {
    grid-template-columns: 92px minmax(0, 1fr) 64px;
    gap: 8px;
  }

  .top {
    padding: 16px;
  }

  .nav {
    gap: 12px;
  }


  .github-label {
    display: none;
  }


  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .shot img {
    border-radius: 8px;
  }

  .points {
    grid-template-columns: 1fr;
  }

  .foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}
