:root {
  --text-sm: 1.4rem;
  --text-base: 1.6rem;
  --text-paragraph: 2rem;
  --text-h5: 2rem;
  --text-h4: 2.4rem;
  --text-h3: 2rem;
  --text-h2: 2.8rem;
  --text-h1: 3.2rem;

  --font-weight-normal: 400;
  --font-weight-bold: 600;
  --font-weight-lighter: 500;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-larger: 1.8;

  --text-color: rgb(33 37 41);
  --text-color-dim: rgb(33 37 41 / 0.6);

  --rounded-circle-color: rgb(128 128 128);
  --hero-background-color: rgb(25 25 25);
  --footer-height: 4rem;

  --navbar-brand-color: #fff;
  --navbar-background: rgb(52 58 64);
  --navbar-color: rgb(255 255 255 / 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* 10px / 16px = 62.5% */
  font-size: 62.5%;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  min-height: 100%;
  position: relative;
}

body {
  margin-bottom: 6rem;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--line-height-normal);
}

h2 {
  font-size: var(--text-h2);
  font-weight: var(--font-weight-lighter);
}

h3 {
  font-size: var(--text-h3);
  font-weight: var(--font-weight-lighter);
}

h4 {
  font-size: var(--text-h4);
}

h5 {
  font-size: var(--text-h5);
}

a {
  text-decoration: none;
  display: inline-block;
}

ul {
  list-style: none;
}

p {
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  margin-bottom: var(--text-base);
  color: var(--text-color);
}

/* NAVIGATION BAR START */

nav {
  background-color: var(--navbar-background);
  color: var(--navbar-color);
  display: flex;
  align-items: center;
  padding: .8rem 1rem;
  position: relative;
  gap: 2rem;
  font-size: var(--text-paragraph);
  line-height: var(--line-height-larger);
}

.navbar-container {
  display: flex;
  flex-direction: row;
  margin-right: auto;
  gap: 2rem;
  font-size: var(--text-base);
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-size: 2.6rem;
  margin-left: auto;
}

.home-link:is(:hover, :active, :link, :visited),
.nav-link:is(:hover, :active, :link, :visited) {
  color: var(--navbar-brand-color);
}

/* Show hamburger menu */
@media (max-width: 43rem) {

  .nav-toggle-label {
    display: block;
  }

  .navbar-container {
    flex-direction: column;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--navbar-background);
    padding: 1rem 1rem;
  }

  .nav-toggle:checked~.navbar-container {
    display: flex;
  }
}

/* NAVIGATION BAR END */

/* MAIN CONTENT START */

main {
  padding-block-end: 1rem;
}

.main-container {
  margin: 0 auto;
  max-width: 1140px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5rem;
  margin-block-start: 1.6rem;
  padding-inline: 2rem;
}

.hbb-img {
  width: 12rem;
  height: 12rem;
}

.rounded-circle {
  background-color: var(--rounded-circle-color);
  border-radius: 50%;
}

.hero-image {
  background-color: var(--hero-background-color);
  width: 100%;
  max-height: 600px;
}

/* MAIN CONTENT END */

/* FOOTER START */

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-top: #252525 1px solid;
  line-height: var(--footer-height);
  white-space: nowrap;
}

.footer-nav-container {
  display: flex;
  height: var(--footer-height);
  gap: 2rem;
  font-size: var(--text-sm);
  justify-content: left;
  justify-items: space-between;
  margin-left: 2rem;
}

.footer-nav-container li:first-child {
  color: var(--text-color-dim)
}

footer a:is(:hover, :active, :link, :visited) {
  color: var(--text-color);
}

/* FOOTER END */

/* OTHER PAGES */

.top-banner {
  background-image: url(../img/PlanetGrid-gray.jpg);
  height: 200px;
  background-position-y: 100%
}

.hbb-document {
  margin-inline: auto;
  margin-block-end: 1.5rem;
  max-width: 800px;
  border: 1px solid #ccc;
  padding: 1rem 2rem;
  border-radius: .5rem;
  background-image: url("../img/HBBRing.svg");
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 150px;

  h1 {
    font-size: 3rem;
    margin-block-end: 1rem;
  }

  h2 {
    font-size: 2.1rem;
    margin-block-end: 1rem;
  }

  p {
    font-size: 1.33rem;
  }

  /* .hbb-ring {
    position: relative;
    bottom: 1rem;
    right: 1rem;
    width: 120px;
    height: 120px;
    opacity: 0.1;
  } */
}

.subtitle {
  font-weight: var(--font-weight-bold);
  margin-block-end: .5rem;

  ~p {
    margin-block-start: 0;
    margin-block-end: 0;
  }
}

div :has(> .subtitle) {
  margin-block-end: 1.5rem;
}

.hbb-ring {
  width: 80px;
  height: 80px;
}

div :has(> img.hbb-ring) {
  display: flex;
  justify-content: end;
}

.text-danger {
  color: red;
}

/* LG - SMALL LAPTOPS: 1024px - 1280px */

@media (max-width: 72rem) {
  /* 1150px / 16px = 72rem */
  /* 72rem x 16px = 1152px */

  html {
    font-size: 56.25%;
    /* 9px / 16px = 56.25% */
  }

  .main-container {
    max-width: 960px;
  }
}

/* MD - TABLETS: 768px - 1024px */

@media (max-width: 51rem) {
  /* 815px / 16px = 51rem */
  /* 51rem x 16px = 816px */

  html {
    font-size: 56.25%;
    /* 9px / 16px = 56.25% */
  }

  .main-container {
    max-width: 720px;
  }
}

/* SM - PHONE LANDSCAPE: 576px - 768px */

@media (max-width: 43rem) {
  /* 680px / 16px = 43rem */
  /* 43rem x 16px = 688px */

  html {
    font-size: 56.25%;
    /* 9px / 16px = 56.25% */
  }

  .main-container {
    max-width: 540px;
  }

  .main-content {
    grid-template-columns: 1fr;
  }
}

/* XS - PHONE PORTRAIT:  < 576px */

@media (max-width: 34rem) {
  /* 530px / 16px = 34rem */
  /* 34rem x 16px = 544px */

  html {
    font-size: 50%;
  }
}
