/*
 * The landing page, the search page and the globe. Loaded by those pages only, after the three design
 * system files. Every color and size comes from a design system token.
 */

/* ---- page frame: no sidebar on the landing page ----------------------------------------------------- */

.fb-page.fb-page--landing {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header"
    "content"
    "footer";
}

.fb-page--landing > .fb-header {
  justify-content: flex-end;
}

.fb-landing {
  grid-area: content;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: var(--fb-space-50) 0 var(--fb-space-200);
  text-align: center;
}

.fb-landing__title {
  margin: 0;
  font-family: var(--fb-font-serif);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
}

.fb-landing__descriptor {
  margin: var(--fb-space-25) 0 0;
  color: var(--fb-color-text-subtle);
}

/* ---- the globe -------------------------------------------------------------------------------------- */

.fb-globe {
  --fb-globe-ocean: var(--fb-surface-progressive-subtle);
  --fb-globe-land: var(--fb-border-subtle);
  --fb-globe-coast: var(--fb-border);
  --fb-globe-grid: var(--fb-border-muted);
  --fb-globe-rim: var(--fb-border);
  --fb-globe-paper: var(--fb-surface-page);
  --fb-globe-fold: var(--fb-surface-interactive);
  --fb-globe-ink: var(--fb-border-interactive);
  --fb-globe-faint: var(--fb-border-subtle);
  --fb-globe-data: var(--fb-color-progressive);

  position: relative;
  width: min(100%, 27.5rem, max(16rem, 50vh));
  aspect-ratio: 1;
  margin: 0 auto;
}

.fb-globe__canvas,
.fb-globe__still {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* The still drawing shows until the script starts, and stays if it never does. */
.fb-globe__canvas {
  display: none;
}

.fb-globe--live .fb-globe__canvas {
  display: block;
}

.fb-globe--live .fb-globe__still {
  display: none;
}

.fb-globe__ocean {
  fill: var(--fb-globe-ocean);
}

.fb-globe__grid {
  fill: none;
  stroke: var(--fb-globe-grid);
  stroke-width: 1;
}

.fb-globe__land {
  fill: var(--fb-globe-land);
  stroke: var(--fb-globe-coast);
  stroke-width: 0.75;
  stroke-linejoin: round;
}

.fb-globe__rim {
  fill: none;
  stroke: var(--fb-globe-rim);
  stroke-width: 1;
}

.fb-globe__paper,
.fb-globe__fold {
  stroke: var(--fb-globe-ink);
  stroke-width: 1;
  stroke-linejoin: round;
}

.fb-globe__paper {
  fill: var(--fb-globe-paper);
}

.fb-globe__fold {
  fill: var(--fb-globe-fold);
}

.fb-globe__writing {
  fill: none;
  stroke: var(--fb-globe-faint);
  stroke-width: 1.2;
}

.fb-globe__dot {
  fill: var(--fb-globe-ink);
}

.fb-globe__data {
  fill: var(--fb-globe-data);
}

.fb-globe__bit {
  fill: none;
  stroke: var(--fb-globe-data);
  stroke-width: 1;
}

.fb-globe__toggle,
.fb-globe__toggle:hover {
  margin-top: calc(-1 * var(--fb-space-150));
  color: var(--fb-color-text-subtle);
  font-size: var(--fb-text-xs);
  font-weight: 400;
}

/* ---- search box and the two links ------------------------------------------------------------------- */

.fb-landing__search {
  position: relative;
  width: min(100%, 31rem);
  margin-top: var(--fb-space-100);
}

.fb-landing__search .fb-input,
.fb-landing__search .fb-btn {
  min-height: 2.5rem;
  font-size: var(--fb-text-md);
}

.fb-suggest {
  width: min(100%, 31rem);
  border: var(--fb-border-width) solid var(--fb-border);
  border-top: 0;
  background: var(--fb-surface-page);
  text-align: left;
}

.fb-suggest__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fb-suggest__list > li {
  margin: 0;
  padding: var(--fb-space-50) var(--fb-space-75);
  border-top: var(--fb-border-width) solid var(--fb-border-muted);
}

.fb-suggest__list > li:first-child {
  border-top: 0;
}

.fb-suggest__meta {
  display: block;
}

.fb-landing__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fb-space-100) var(--fb-space-150);
  width: min(100%, 31rem);
  margin: var(--fb-space-150) 0 0;
  padding: 0;
  list-style: none;
}

.fb-landing__links > li {
  margin: 0;
}

.fb-landing__link {
  font-size: var(--fb-text-lg);
  font-weight: 700;
}

.fb-landing__note {
  display: block;
  color: var(--fb-color-text-subtle);
  font-size: var(--fb-text-sm);
}

.fb-landing__more {
  margin: var(--fb-space-150) 0 0;
  color: var(--fb-color-text-subtle);
  font-size: var(--fb-text-sm);
}

.fb-landing .fb-mbox {
  margin-top: var(--fb-space-150);
  text-align: left;
}

@media (max-width: 30rem) {
  .fb-landing__links {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- search page ------------------------------------------------------------------------------------ */

.fb-searchpage__form {
  max-width: 31rem;
  margin: var(--fb-space-100) 0;
}

.fb-searchpage__status {
  min-height: 1.6em;
  margin: var(--fb-space-50) 0;
  color: var(--fb-color-text-subtle);
}

.fb-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fb-results__item {
  max-width: var(--fb-width-content);
  margin: 0 0 var(--fb-space-100);
}

.fb-results__title {
  font-size: var(--fb-text-lg);
}

.fb-results__text {
  margin: var(--fb-space-25) 0 0;
}
