/* The palette comes from the extension itself: IntelliJ's dark editor and tool window
   greys, and its diff colours for conflicts, modifications and insertions. */
:root {
  --page: #1e1f22;
  --surface: #2b2d30;
  --line: #393b40;
  --text: #dfe1e5;
  --muted: #a8abb2;
  --accent: #3574f0;
  --accent-hover: #4682fa;
  --conflict: #45302b;
  --modified: #385570;
  --inserted: #294436;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --measure: 66ch;
  --wide: 1120px;
}

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

html {
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
}

a {
  color: inherit;
}

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

code,
kbd {
  font-family: var(--mono);
  font-size: 0.86em;
}

kbd {
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: var(--surface);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
}

.top__link {
  color: var(--muted);
  text-decoration: none;
}

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

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero: the merge miniature first, then the promise. */

.hero {
  padding: 72px 0 40px;
}

.merge {
  --row: 2.15em;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2em minmax(0, 1.15fr) 3.2em minmax(0, 1fr);
  row-gap: 0.7em;
  margin: 0 0 64px;
  padding: 1.6em 1.4em 1.8em;
  border-radius: 12px;
  background: var(--surface);
  font-size: clamp(8.5px, 1.32vw, 15px);
}

.merge__title {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.05em;
  padding-left: 0.9em;
}

.merge__pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.merge__pane code {
  display: block;
  height: var(--row);
  padding: 0 0.9em;
  overflow: hidden;
  font-size: 1em;
  line-height: var(--row);
  white-space: pre;
  text-overflow: clip;
}

.merge__bridge {
  width: 100%;
  height: calc(var(--row) * 5);
}

.band--modified,
.fill--modified {
  background: var(--modified);
  fill: var(--modified);
}

.band--inserted,
.fill--inserted {
  background: var(--inserted);
  fill: var(--inserted);
}

.band--conflict,
.fill--conflict {
  background: var(--conflict);
  fill: var(--conflict);
}

.hero__text {
  max-width: var(--measure);
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.install {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.install p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
}

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

/* Features: heading and text at reading width, the screenshot at full width. */

.feature {
  padding: 72px 0 0;
}

.feature h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.feature p {
  max-width: var(--measure);
  margin: 0 0 28px;
  color: var(--muted);
}

.feature img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: var(--surface);
  outline: 1px solid var(--line);
}

.feature--text p {
  margin-bottom: 0;
}

.glyph {
  color: var(--text);
  font-family: var(--mono);
}

.footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 96px 24px 48px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer p {
  max-width: var(--measure);
  margin: 0 0 12px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

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

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .top {
    padding: 20px 16px 0;
  }

  main {
    padding: 0 16px;
  }

  .hero {
    padding-top: 40px;
  }

  .merge {
    grid-template-columns: minmax(0, 1fr) 2em minmax(0, 1.15fr) 2em minmax(0, 1fr);
    margin-bottom: 40px;
    padding: 1.2em 0.6em 1.4em;
    font-size: 7.2px;
  }

  .merge__pane code,
  .merge__title {
    padding-left: 0.5em;
    padding-right: 0.5em;
  }

  .feature {
    padding-top: 56px;
  }

  .footer {
    padding: 72px 16px 40px;
  }
}

.install code {
  white-space: nowrap;
}

/* On a phone the full screenshots are too small to read, so each feature shows a
   readable part of it at its natural size and links to the whole picture. */

.shot {
  display: block;
  border-radius: 10px;
}

.shot-link {
  display: none;
}

@media (max-width: 640px) {
  .shot-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
  }

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