:root {
  /* Vertical ratio */
  --ratio: 1.5;
  /* Default font size in any browser */
  --s0:  1rem;
  /* Positive harmonic scale, s1 = 1.5 */
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s1) * var(--ratio));
  --s3: calc(var(--s2) * var(--ratio));
  --s4: calc(var(--s3) * var(--ratio));
  /* Negative harmonic scale */
  --s-1: calc(var(--s0) / var(--ratio));
  --s-2: calc(var(--s-1) / var(--ratio));
  --s-3: calc(var(--s-2) / var(--ratio));
  --s-4: calc(var(--s-3) / var(--ratio));

  /* Colors */
  --brown: hsl(19, 54%, 20%);
  --light: hsla(0, 0%, 97%, 0.7);
  --orange: hsl(28, 100%, 46%);
  --white: hsl(0, 0%, 97%);

  /* Max width measure */
  --max-measure: 60ch;
}

* {
  /* Count border inside box */
  box-sizing: border-box;
  /* Prevent wide text */
  max-inline-size: var(--max-measure);
}

body {
  background-color: var(--brown);
  color: var(--light);
  font-family: "proxima-nova", sans-serif;
  font-weight: 400;
  line-height: var(--ratio);
  /* Fix MacOS font smoothing. */
  -webkit-font-smoothing: antialiased;
}

/* Override max measure */
html,
body,
div,
header,
nav,
main,
footer,
cluster {
  max-inline-size: none;
}

h1 {
  font-size: var(--s3);
}

h2 {
  font-size: var(--s2);
}

h3 {
  font-size: var(--s1);
}

/* Vertical stack */
.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  
}

/* Reset vertical margins (> * stop recursion) */
.stack > * {
  margin-block: 0;
}

/* Add marging start fron 2nd element  (> * + * stop recursion) */
.stack > * + * {
  margin-block-start: var(--s1);
}

/* Shorter stack */
.stack.short > * + * {
  margin-block-start: var(--s-1);
}

/* Center */
center, .center {
  /* Exclude padding from width */
  box-sixing: content-box;
  max-inline-size: var(--max-measure);
  /* Left and right margins */
  margin-inline: auto;
  /* Paddings */
  padding-inline-start: var(--s1);
  padding-inline-end: var(--s1);
}

/* Cluster */
cluster, .cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s0);
  /* Control layout */
  /* space-between: left and right */
  /* center: all center */
  justify-content: space-between;
  align-items: center;
}

/* Custom */

body {
  text-align: center;
  padding: var(--s1);
}

h1 {
  font-size: calc(var(--s1) + 0.4rem);
  color: var(--white);
}

a {
  color: var(--light);
  text-decoration: underline;

  &:hover {
    color: var(--white);
  }
}

.button {
  display: inline-block;
  background-color: hsl(28, 100%, 46%);
  color: var(--white);
  padding: var(--s0);
  text-decoration: none;
  border-radius: 3px;
  font-weight: 700;

  &:hover {
    background-color: hsl(28, 100%, 46%, 0.7);
  }
}

header {
  img {
    width: 350px;
  }
}

