/*
 * Groovium's page, in the app's own colours: espresso ground, brass accent,
 * cream type. No web fonts and no scripts — a page that is fast to load is
 * also one search engines rank better.
 */

:root {
  --ground: #16110d;
  --surface: #211912;
  --raised: #2c221a;
  --edge: rgba(224, 176, 113, 0.18);
  --brass: #e0b071;
  --brass-deep: #c8945a;
  --cream: #f6efe4;
  --muted: #cbbba4;
  --faint: #9a8a74;
  --radius: 18px;
  --wide: 1100px;
  /* The height of the bar across the top. */
  --top: 86px;
  /*
   * A pixel, as the opening sizes things: one everywhere else, and in the
   * opening more or less with the height there is for it; see .hero.
   */
  --u: 1px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(200, 148, 90, 0.18), transparent 70%),
    var(--ground);
  color: var(--cream);
  font:
    17px/1.6 'Segoe UI Variable Text',
    'Segoe UI',
    system-ui,
    -apple-system,
    'Helvetica Neue',
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brass);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--cream);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(var(--wide), 100% - 32px);
  margin-inline: auto;
}

/* The bar across the top: the name, and the other language. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--top);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
}

.brand img {
  width: 28px;
  height: 28px;
}

.lang {
  font-size: 14px;
  color: var(--muted);
}

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

.lang strong {
  color: var(--cream);
  font-weight: 600;
}

/* The opening: what it is, and the way to get it. */
/*
 * The opening has the first screen to itself: all the height the bar at the
 * top leaves, with what it says in the middle of it. Everything in it is sized
 * in --u, a pixel when there are 760 of them to fill, and as much more or less
 * as there are, from 0.7 to 1.35 of one, so it fills about the same share of
 * a short screen as of a tall one. The rest of the page comes on scrolling.
 */
.hero {
  --u: clamp(0.7px, (100svh - var(--top)) / 760, 1.35px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--top));
  min-height: calc(100svh - var(--top));
  padding-block: calc(24 * var(--u));
  text-align: center;
}

.hero .icon {
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  margin: 0 auto calc(20 * var(--u));
  filter: drop-shadow(0 10px 30px rgba(200, 148, 90, 0.35));
}

h1 {
  margin: 0;
  /* Smaller on a narrow screen, as before; never below 40px. */
  font-size: min(calc(64 * var(--u)), max(40px, 7vw));
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tagline {
  margin: calc(14 * var(--u)) auto 0;
  font-size: min(calc(26 * var(--u)), max(20px, 3vw));
  font-weight: 600;
  color: var(--brass);
}

.lede {
  max-width: calc(620 * var(--u));
  margin: calc(14 * var(--u)) auto 0;
  font-size: calc(17 * var(--u));
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(12 * var(--u));
  margin-top: calc(28 * var(--u));
}

.button {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(13 * var(--u)) calc(24 * var(--u));
  border-radius: 999px;
  font-size: calc(17 * var(--u));
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

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

.button.primary {
  background: linear-gradient(180deg, var(--brass), var(--brass-deep));
  color: #1b130c;
  box-shadow: 0 8px 24px rgba(200, 148, 90, 0.3);
}

.button.primary:hover {
  color: #1b130c;
}

.button.secondary {
  border: 1px solid var(--edge);
  color: var(--cream);
  background: var(--surface);
}

/* The version the button downloads, once GitHub has said which it is. */
.button .version {
  padding-left: calc(10 * var(--u));
  border-left: 1px solid rgba(27, 19, 12, 0.25);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.button svg {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  flex: none;
}

.note {
  margin: calc(14 * var(--u)) 0 0;
  font-size: calc(14 * var(--u));
  color: var(--faint);
}

/* The three screenshots, each with the words that go with it. */
.shot {
  /* A figure comes with 40px either side; the screenshots want the width. */
  margin: 56px 0;
  text-align: center;
}

.shot img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.shot p {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--muted);
}

.fiction {
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

/* What else it does, a card each. */
h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section {
  padding-block: 56px;
}

.section > .intro {
  max-width: 680px;
  color: var(--muted);
  margin: 0 0 28px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--edge);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--cream);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.facts {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
}

.facts li {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--edge);
}

.facts strong {
  color: var(--cream);
}

/* The last word: get it. */
.closing {
  text-align: center;
  padding-block: 64px;
}

footer {
  border-top: 1px solid var(--edge);
  padding-block: 28px 40px;
  font-size: 14px;
  color: var(--faint);
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

footer p {
  margin: 6px 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
  .button:hover {
    transform: none;
  }
}
