/* 
font-family: 'Roboto', sans-serif;
font-weight: 900;
 */

:root {
  box-sizing: border-box;
  --bg-color: black;
  --font-color: white;
  --clr-accent: goldenrod;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--font-color);
  text-align: center;
  width: 100vw;
  min-height: 100vh;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;

  /* Source: https://www.a11yproject.com/posts/how-to-hide-content/ */
}

.title {
  margin: 0;
  color: var(--clr-accent);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.15ch;
}

.subtitle {
  margin: 0;
}

.subtitle:first-of-type {
  margin-block-end: 1em;
}

.subtitle a:hover,
.subtitle a:focus-visible {
  text-decoration: underline;
}

a:link,
a:visited,
a:hover,
a:active {
  color: inherit;
  text-decoration: none;
}

.card-wrapper {
  width: 100vw;
  margin-block: auto;
  padding-block: 2rem;
  padding-block-end: 1rem;
  padding-inline: 1rem;
  background-color: var(--bg-color);
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  position: relative;
}
/*
.card-wrapper::before {
  content: "";
  /* This is for big screens. See rules in the media query below
}
*/

.main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer {
  margin: 0;
  color: #999;
}

.small {
  font-size: 0.75rem;
}

.flow {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
}

.flow--btns {
  gap: 2rem;
}

.flow .btn {
  flex-basis: 15ch;
}

.btn {
  display: inline-block;
  background-color: var(--bg-color);
  padding: 0.5em 1em;
  /* border: 1px solid var(--font-color); */
  /* box-shadow: 8px 8px 0 0 var(--font-color); */
  border: 1px solid hsla(0, 0%, 25%, 1);
  box-shadow: 8px 8px 0 0 hsla(0, 0%, 10%, 1);
  transition: transform 100ms ease-out, box-shadow 100ms ease-out,
    border 100ms ease-out;
  font-weight: 900;
}

.btn:link,
.btn:visited,
.btn:hover,
.btn:active {
  color: var(--font-color);
}

.btn:hover,
.btn:focus-visible,
.btn:active {
  color: var(--clr-accent);
  border: 1px solid var(--clr-accent);
  box-shadow: 14px 14px 0 0 var(--clr-accent);
  transform: translate(-3px, -3px);
}

a[target="_blank"]::after {
  /* External link icon */
  content: "";
  display: inline-block;
  -webkit-mask-image: url(./external-link-icon.svg);
  mask-image: url(./external-link-icon.svg);
  -webkit-mask-size: cover;
  mask-size: cover;
  background-color: currentColor;
  margin-inline-start: 0.5ch;
  width: 1ch;
  height: 1ch;
}

@media (hover: hover) {
  /* Make button smaller when clicked on device that support hovering */
  .btn:active {
    box-shadow: 8px 8px 0 0 var(--clr-accent);
    transform: none;
  }
}

.btn:focus-visible {
  outline: 1px dotted var(--clr-accent);
  outline-offset: 15px;
}

@media screen and (min-width: 50rem) {
  body {
    justify-content: center;
    align-items: center;
  }

  .title {
    font-size: 2.5em;
  }

  .subtitle:first-of-type {
    margin-block-end: 0.5em;
  }

  .card-wrapper {
    margin: 0;
    margin-block-start: auto;
    padding-block: 4.5rem;
    max-width: 47rem;
    border-radius: 0.75em;
    background-color: rgb(0 0 0 / 0.5);
    box-shadow: 0px 0px 1000px -50px var(--clr-accent);
  }
  /*
  .card-wrapper::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--clr-accent);
    filter: blur(200px);
    border-radius: 0.75em;
    z-index: -1;
  }
*/
  .btn {
    /* border: none; */
    /* box-shadow: 8px 8px 0 0 rgb(0 0 0 / 0.5); */
  }
  /*
  .btn:hover,
  .btn:focus-visible,
  .btn:active {
    border: none;
  }
  */
  /*
  @supports (-moz-appearance: none) {
    /* Normalize color difference in Firefox
    .card-wrapper {
      background-color: rgb(0 0 0 / 0.6);
    }
  }
*/

  .footer {
    margin-block-start: auto;
    margin-inline-start: auto;
    margin-inline-end: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Disables animations, transitions and smooth scrolling if user prefers that */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
