/* Global */

:root {
  --bg-color: #003113;
  --main-color: #e8ded4;
}

/* Fonts */
@font-face {
  font-family: "Chicago Kare";
  src: url("./assets/fonts/ChicagoKare-Regular.eot");
  src:
    url("./assets/fonts/ChicagoKare-Regular.eot?#iefix")
      format("embedded-opentype"),
    url("./assets/fonts/ChicagoKare-Regular.woff2") format("woff2"),
    url("./assets/fonts/ChicagoKare-Regular.woff") format("woff"),
    url("./assets/fonts/ChicagoKare-Regular.ttf") format("truetype"),
    url("./assets/fonts/ChicagoKare-Regular.svg#ChicagoKare-Regular")
      format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Main */
* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  body {
    margin: 0;
    min-height: 100svh;
    background-color: var(--bg-color);
    main.home {
      min-height: 100svh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2rem;
      h1.sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }
      .brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 150px;
        max-width: calc(100vw - 3rem);
        img.logo {
          display: block;
          width: 100%;
          height: auto;
        }
        div.contact-wrapper {
          display: flex;
          justify-content: center;
          width: 100%;
          padding-left: 18%;
          margin-top: 1.5rem;
          a.contact-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 5px 16px;
            color: #000;
            background: var(--main-color);
            border: 2px solid #000;
            border-radius: 3px;
            box-shadow:
              inset 1px 1px 0 var(--main-color),
              inset -1px -1px 0 #777,
              1px 1px 0 #000;
            font-family: "Chicago Kare", "Geneva", sans-serif;
            font-size: 14px;
            text-decoration: none;
            cursor: pointer;
            transition:
              background-color 100ms linear,
              color 100ms linear,
              box-shadow 100ms linear;
          }
          a.contact-button:hover {
            background: #000;
            color: var(--main-color);
          }
          .contact-button:active {
            transform: translate(1px, 1px);
            box-shadow:
              inset 1px 1px 0 #777,
              inset -1px -1px 0 var(--main-color);
          }
          .contact-button:focus-visible {
            outline: 2px solid var(--main-color);
            outline-offset: 4px;
          }
        }
      }
    }
  }
}

/* Tablette */

@media (min-width: 768px) {
  .brand {
    width: 230px;
  }
}

/* Desktop */

@media (min-width: 1024px) {
  .brand {
    width: 280px;
  }
}

/* Animations */

.logo,
.contact-button {
  opacity: 0;
  animation: appear 1000ms ease-out forwards;
}

.logo {
  animation-delay: 100ms;
}

.contact-button {
  animation-delay: 350ms;
}

.contact-button {
  animation:
    appear 600ms 350ms ease-out forwards,
    button-flash 180ms 1s linear;
}

@keyframes button-flash {
  0%,
  100% {
    background: var(--main-color);
    color: #000;
  }

  50% {
    background: #000;
    color: var(--main-color);
  }
}

@keyframes appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accesibilité */
@media (prefers-reduced-motion: reduce) {
  .logo,
  .contact-button {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}
