/* GPlates Deconstructions.
 *
 * White paper, dark blue ink, hairline rules, no fills. The viewers it
 * indexes are all dark and saturated, so the page around them stays out of
 * the way: the only colour on it comes from the screenshots.
 */

:root {
  --bg: #ffffff;
  --ink: #16243c;
  --ink-mid: #5a6b85;
  --ink-faint: #8b97a8;
  --rule: #dde2ea;
  --rule-firm: #b9c2d0;
  --link: #1f4e8c;
  --maxw: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* Small caps labels do the work headings and boxes would otherwise do. */
.label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---- masthead ---------------------------------------------------------- */

.masthead .wrap { padding-top: 40px; padding-bottom: 28px; }

.wordmark {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
}

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

.masthead.compact .wrap { padding-top: 24px; padding-bottom: 18px; }
.masthead.compact .wordmark { font-size: 15px; color: var(--ink-mid); }

/* ---- filters ----------------------------------------------------------- */

.filters { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.filters .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chip {
  font: inherit;
  font-size: 13px;
  color: var(--ink-mid);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 1px 0;
  cursor: pointer;
}

.chip:hover { color: var(--ink); }

.chip[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---- panels ------------------------------------------------------------ */

main { padding: 36px 0 64px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 30px;
  row-gap: 42px;
}

.panel { display: block; text-decoration: none; color: inherit; }

.panel .shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #f4f6f9;
}

.panel .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.panel:hover .shot { border-color: var(--rule-firm); }

.panel h3 {
  margin: 14px 0 4px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.panel:hover h3 { color: var(--link); }

.panel .tagline { margin: 0 0 8px; color: var(--ink-mid); font-size: 14px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.badge.pending { color: #9a5b12; }

.shot.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty { display: none; color: var(--ink-mid); padding: 32px 0; }

/* ---- viewer page ------------------------------------------------------- */

.hero { border-top: 1px solid var(--rule); }

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 36px;
}

.hero h1 { margin: 0 0 6px; font-size: 27px; font-weight: 600; line-height: 1.25; }
.hero .tagline { margin: 0 0 22px; color: var(--ink-mid); }
.hero img { width: 100%; display: block; border: 1px solid var(--rule); }
.hero .shot.placeholder { aspect-ratio: 16 / 10; border: 1px solid var(--rule); }

.crumbs { margin: 0 0 14px; font-size: 13px; color: var(--ink-faint); }
.crumbs a { text-decoration: none; }

.launch {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--link);
  border-bottom: 2px solid var(--link);
  padding-bottom: 2px;
}

.launch.disabled { color: var(--ink-faint); border-bottom-style: dotted; border-bottom-color: var(--ink-faint); }

.launch-note { margin: 12px 0 0; font-size: 13px; color: var(--ink-faint); max-width: 48ch; }

/* ---- body sections ----------------------------------------------------- */

article > section { border-top: 1px solid var(--rule); padding: 26px 0; }

article h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }

.contents { list-style: none; padding: 0; margin: 0; max-width: 82ch; }

.contents li {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 18px;
  padding: 5px 0;
}

.contents .term { font-weight: 600; }
.contents .def { color: var(--ink-mid); }

.controls { margin: 0; padding: 0; list-style: none; max-width: 62ch; color: var(--ink-mid); }
.controls li { padding: 3px 0; }

/* ---- lessons ----------------------------------------------------------- */

.lessons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 34px;
}

.lesson h3 { margin: 6px 0 10px; font-size: 16px; font-weight: 600; line-height: 1.35; }

.lesson .meta {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lesson .steps { margin: 0; padding-left: 18px; font-size: 14.5px; }
.lesson .steps li { padding: 2px 0; }

.lesson .discussion { margin: 12px 0 0; font-size: 14.5px; color: var(--link); }

/* ---- footer ------------------------------------------------------------ */

footer { border-top: 1px solid var(--rule); padding: 28px 0 56px; color: var(--ink-faint); font-size: 13px; }
footer .wrap > p { margin: 0 0 8px; max-width: 70ch; }

/* Logos are drawn for white paper, which is what this page now is, so they
   need no chip. Greyed back so a row of six brands does not outweigh the
   content above it. */
.partners { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; padding-bottom: 22px; }

.partner { display: flex; align-items: center; height: 34px; opacity: 0.6; filter: grayscale(1); }
.partner:hover { opacity: 1; filter: none; }
.partner img { max-height: 30px; max-width: 150px; width: auto; display: block; }

.wordmark-fallback { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-mid); }

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .grid { grid-template-columns: 1fr; }
  .contents li { grid-template-columns: 1fr; gap: 2px; }
}
