/* Main page styles */

.skip {
  z-index: -100;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

/**
 * =======================================
 * Buttons
 * =======================================
 */

.icon {
  transition: all 0.3s ease-in-out;
}

.btn-container {
  position: relative;
}

.btn-container .shadow {
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 6rem;
  box-shadow:
    0px 0px var(--dark-coffee),
    0px 1px var(--dark-coffee),
    0px 2px var(--dark-coffee),
    0px 3px var(--dark-coffee),
    0px 4px var(--dark-coffee),
    0px 5px var(--dark-coffee),
    0px 6px var(--dark-coffee);
}

.btn {
  z-index: 1;
  width: 100%;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  border: 2px solid var(--dark-coffee);
  border-radius: 6rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transform: translateY(3px);
  transition: all 0.1s ease-in-out;
}

.btn:hover {
  transform: translateY(0px);
}

.btn:active {
  transform: translateY(6px);
}

.btn > .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-sm {
  font-size: 1rem;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  gap: 0.75rem;
}

.btn-sm > .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-primary {
  background-color: var(--dark-teal);
  color: var(--white);
}

.btn-primary > .icon {
  stroke: var(--white);
}

.btn-secondary {
  background-color: var(--sandy-clay);
  color: var(--black);
}

.btn-secondary > .icon {
  stroke: var(--black);
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: none;
  cursor: pointer;
}

.icon-btn::before {
  z-index: -1;
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  transform: rotate(-45deg);
  transition: all 0.3s ease-in-out;
}

.icon-btn-primary::before {
  background-color: var(--brandy);
}

.icon-btn-secondary::before {
  background-color: var(--dark-teal);
}

.icon-btn-tertiary::before {
  background-color: var(--faded-copper);
}

.icon-btn > .icon {
  stroke: var(--parchment);
  width: 1.5rem;
  height: 1.5rem;
}

.icon-btn > .icon-fill {
  stroke: none !important;
  fill: var(--white);
}

/**
 * =======================================
 * Text and headings
 * =======================================
 */

h1 {
  color: var(--dark-coffee);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
}

h2 {
  color: var(--dark-teal);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1;
}

h3 {
  color: var(--brandy);
  font-size: 1.75rem;
  margin: 0.5rem 0;
}

h2::after, h3::after {
  content: ".";
  color: var(--sandy-clay);
}

h4 {
  color: var(--dark-teal);
}

.link {
  color: var(--brandy);
  text-decoration: underline;
}

.link:hover, .link:focus {
  color: var(--faded-copper);
}

p, ul, li {
  font-family: var(--font-body);
  color: var(--black);
  line-height: 1.2;
}

ul {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-left: 2.5rem;
}

/**
 * =======================================
 * Home section
 * =======================================
 */
.home-social-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.home-social-container > .icon-btn:hover,
.home-social-container > .icon-btn:focus {
  opacity: 1;
}

.home-social-container:has(> .icon-btn:hover) > .icon-btn:not(:hover),
.home-social-container:has(> .icon-btn:focus) > .icon-btn:not(:focus) {
  opacity: 0.3;
}

#main {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  line-height: 1;
  display: flex;
  flex-direction: row;
  gap: 3rem;
  padding: 5rem 1rem 2rem 1rem;
}

#bookmark {
  position: fixed;
  display: none;
  width: 0.6rem;
  aspect-ratio: 1;
  background-color: var(--sandy-clay);
}

#bookmark.introduction {
  transform: translate(-1.4rem, 0.66rem) rotate(-45deg);
}

#bookmark.core-values {
  transform: translate(-1.4rem, 3.93rem) rotate(-405deg);
}

#bookmark.expected-behaviour {
  transform: translate(-1.4rem, 7.25rem) rotate(-765deg);
}

#bookmark.protected-grounds {
  transform: translate(-1.4rem, 10.5rem) rotate(-1125deg);
}

#bookmark.prohibited-behaviour {
  transform: translate(-1.4rem, 13.77rem) rotate(-1485deg);
}

#bookmark.roles-and-responsibilities {
  transform: translate(-1.4rem, 17.1rem) rotate(-1845deg);
}

.table-of-contents {
  position: fixed;
  z-index: 10;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  flex-shrink: 0;
  width: 20rem;
  list-style-type: none;
}

.table-of-contents a {
  position: relative;
  color: var(--dark-coffee);
  font-size: 1.5rem;
  font-weight: 500;
}

#main:has(#bookmark.introduction) > .table-of-contents a[data-id="introduction"],
#main:has(#bookmark.core-values) > .table-of-contents a[data-id="core-values"],
#main:has(#bookmark.expected-behaviour) > .table-of-contents a[data-id="expected-behaviour"],
#main:has(#bookmark.protected-grounds) > .table-of-contents a[data-id="protected-grounds"],
#main:has(#bookmark.prohibited-behaviour) > .table-of-contents a[data-id="prohibited-behaviour"],
#main:has(#bookmark.roles-and-responsibilities) > .table-of-contents a[data-id="roles-and-responsibilities"] {
  color: var(--dark-teal);
}

.table-of-contents a::before {
  position: absolute;
  z-index: -1;
  bottom: 0;
  left: 0;
  right: 0;
  content: "";
  width: 0%;
  height: 2px;
  background-color: var(--sandy-clay);
  transition: all 0.3s ease-in-out;
}

.table-of-contents a:hover::before, .table-of-contents a:focus::before {
  width: 100%;
}

.table-of-contents.space {
  position: relative;
  left: auto;
  margin: 0;
  z-index: 0;
}

.code-of-conduct {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-grow: 1;
}

section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/**
 * =======================================
 * Footer section
 * =======================================
 */

footer {
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 6rem 1rem 2rem 1rem;
}

.footer-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.footer-top > .icon-btn:hover,
.footer-top > .icon-btn:focus {
  opacity: 1;
}

.footer-top:has(> .icon-btn:hover) > .icon-btn:not(:hover),
.footer-top:has(> .icon-btn:focus) > .icon-btn:not(:focus) {
  opacity: 0.3;
}

.footer-bottom, .footer-bottom-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-bottom a {
  color: var(--black);
}

.footer-bottom a:hover, .footer-bottom a:focus {
  color: var(--brandy);
}

/**
 * =======================================
 * Media queries
 * =======================================
 */

/* width >= 400px */
@media (min-width: 25rem) {
}

/* width >= 640px */
@media (min-width: 40rem) {
  #main {
    padding: 5rem 4rem 2rem 4rem;
  }
}

/* width >= 768px */
@media (min-width: 48rem) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.875rem;
  }

  p, ul, li, .arabic {
    font-size: 1.125rem;
  }

  #bookmark {
    display: flex;
  }

  #main {
    padding: 7rem 3rem 2rem 3rem;
  }

  .table-of-contents {
    display: flex;
    left: 0.5rem;
  }

  footer {
    padding: 5rem 3rem 2rem 3rem;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }

  .footer-bottom-left {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* width >= 1024px */
@media (min-width: 64rem) {
  .home-social-container {
    gap: 1.5rem;
  }

  #main {
    padding: 8rem 6rem 3rem 6rem;
  }

  .table-of-contents {
    display: flex;
    left: 3.5rem;
  }
}

/* width >= 1280px */
@media (min-width: 80rem) {
  .btn {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem 0.75rem 2rem;
    gap: 1rem;
  }

  .btn > .icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .btn-sm {
    font-size: 1rem;
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    gap: 0.75rem;
  }

  .btn-sm > .icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .icon-btn {
    width: 3.4rem;
    height: 3.4rem;
  }

  .icon-btn > .icon {
    width: 1.8rem;
    height: 1.8rem;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    padding-top: 6rem;
    font-size: 3rem;
  }

  h3 {
    font-size: 2rem;
  }

  p, ul, li, .arabic {
    font-size: 1.25rem;
  }

  #main {
    padding: 10rem 8rem 3rem 8rem;
  }

  .table-of-contents {
    left: 5.5rem;
  }

  .code-of-conduct {
    gap: 3rem;
  }

  section {
    margin-top: -6rem;
  }

  footer {
    padding: 8rem 4rem 2rem 4rem;
  }
}

/* width >= 1536px */
@media (min-width: 96rem) {
  /* #main {
    max-width: 96rem;
    margin: 0 auto;
  }

  #bookmark {
    left: calc(2rem + ((100vw - 96rem) / 2));
  }

  .table-of-contents {
    left: calc((100vw - 96rem) / 2);
  } */
}

/* width >= 1920px */
@media (min-width: 120rem) {
}
