@font-face {
  font-family: "Switzer";
  font-style: normal;
  font-display: swap;
  src: url(../webfonts/Switzer-Variable.woff2) format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-display: swap;
  src: url(../webfonts/Instrument-Serif.woff2) format("woff2");
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --light: 247, 247, 247;
  --dark: 22, 22, 22;
  --beige: 231, 203, 167;
  --blue: 75, 148, 186;
  --red: 196, 75, 36;
  --purple: 62, 72, 135;
}

body {
  overflow-x: hidden;
  font-family: "Switzer";
  font-size: 1rem;
  background: rgb(var(--light));
  color: rgb(var(--dark));
  transition: background-color 0.2s ease-out;
}

/* WRAPPER */

.wrapper {
  padding-inline: 4rem;
}

/* ERASE */

header a,
.hero__presentation,
.hero__colors {
  transition: opacity 0.2s ease-out;
}

/* IMG/VIDEO */

img,
video {
  display: block;
  width: 100%;
  height: auto;
}

/* TEXT */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
}

h1 {
  font-size: 4rem;
  text-wrap: nowrap;
  font-family: "Instrument Serif";
  letter-spacing: 0.1rem;
}

h2 {
  font-size: 1.75rem;
}

h5 {
  font-size: 1.5rem;
}

h6 {
  font-size: 1.25rem;
}

a {
  display: inline-block;
  text-decoration: none;
  color: rgb(var(--dark));
}

small {
  font-size: 0.875rem;
}

strong {
  font-weight: 700;
}

/* HEADER */

header .wrapper {
  padding-block: 2.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

header img {
  width: 11rem;
}

.header__controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-self: center;
}

.header__erase {
  justify-self: end;
}

.control__item {
  position: relative;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out,
    background-color 0.2s ease-out;
}

.control__item:hover {
  color: rgb(var(--item-color));
  border-color: rgb(var(--item-color));
}

.control__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  z-index: -1;
  background: rgb(var(--item-color));
  transition: width 0.2s ease-out;
}

.header__controls .control__item::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 100%;
  height: 1px;
  background: rgb(var(--item-color));
  transition: all 0.2s ease-out;
}

.header__controls .control__item:has(input:checked)::after {
  transform-origin: right;
  transform: scaleX(0);
}

.control__item:has(input:checked)::before {
  width: 100%;
}

.control__item:has(input:checked) {
  color: rgb(var(--dark));
  border-color: rgb(var(--item-color));
}

.control__item input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.control__item.header__erase {
  border-color: rgb(var(--item-color));
}

.control__item:hover.header__erase {
  background: rgba(var(--dark), 0.25);
}

.control__item:has(input:checked).header__erase {
  color: rgb(var(--light));
}

/* SECTION - HERO */

#hero {
  position: relative;
  width: 100vw;
}

.hero__presentation {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  background: rgb(var(--light));
  mix-blend-mode: difference;
  pointer-events: none;
}

.hero__videos {
  position: relative;
  width: 100vw;
  aspect-ratio: 16/9;
}

.plane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  aspect-ratio: 16/9;
}

.plane video {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.plane #video-etudiant {
  z-index: 1;
}

.plane #video-detective {
  z-index: 1;
}

.plane #video-roland {
  z-index: 3;
}

.plane #video-louki {
  z-index: 2;
}

#canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.color__item {
  width: 100%;
  height: var(--item-height);
  background: rgb(var(--item-color));
}

/* SECTION - BOOK */

#book {
  margin-top: 4rem;
}

#book .wrapper {
  display: flex;
  justify-content: space-between;
}

.book__img {
  width: calc(33% - 2rem);
  border: 1px solid rgba(var(--dark), 0.5);
}

.book__information {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  padding-top: 1.5rem;
  width: calc(48% - 2rem);
}

.book__title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.book__description {
  text-align: justify;
  line-height: 1.5;
}

.book__cta {
  display: flex;
  gap: 1.5rem;
}

.book__additionnal {
  padding-top: 1.5rem;
  width: calc(19% - 2rem);
  display: flex;
  justify-content: space-between;
}

.btn {
  position: relative;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgb(var(--dark));
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  z-index: -1;
  background: rgb(var(--dark));
  transition: width 0.2s ease-out;
}

.btn:hover,
.btn.invert {
  color: rgb(var(--light));
}

.btn:hover::before,
.btn.invert::before {
  width: 100%;
}

.btn.invert:hover {
  color: rgb(var(--dark));
}

.btn.invert:hover::before {
  width: 0;
}

/* SECTION - QUOTE */

#quote {
  margin-block: 9rem;
  text-align: center;
}

.quote__group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

blockquote {
  font-family: "Instrument Serif";
  font-size: 2.625rem;
}

/* FOOTER */

footer {
  padding-block: 4rem 1rem;
  background: rgb(var(--dark));
  color: rgb(var(--light));
}

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

footer a:hover {
  text-decoration: none;
  color: rgba(var(--light), 0.5);
}

.footer__branding {
  width: 30%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer__branding img {
  width: 60%;
}

ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

footer .footer__group {
  display: flex;
  justify-content: space-between;
}

.footer__columns {
  display: flex;
  gap: 4rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

footer .wrapper {
  display: flex;
  flex-direction: column;
  gap: 7rem;
}

footer small {
  color: rgba(var(--light), 0.5);
}
