/*
Theme Name: Nyoga
Theme URI: https://capitainewp.io
Author: Thomas Grandmagnac
Description: Portfolio pour les cours de yoga de Gwenaëlle
Version: 1.0
*/

/* RESET */
:is(*, *::before, *::after) {
  box-sizing: border-box;
}

:is(body, h1, h2, h3, h4, h5, h6, p) {
  margin: 0;
}

img {
  width: 100%;
}

/* GLOBAL */
:root {
  /* Colors */
  --main-color: #21565a;
  --main-light-color1: #a4e8e0;
  --main-light-color2: #BED8D4;
  --green: #21A179;
  --blue: #4cd7d0;
  --yellow: #f9f871;
  --yellow-light: #ffffcc;
  --text-color: #2f4858;
  --dark-color1: #260F26;
  --dark-color2: #160F29;
  --light-color: #f9f6f1;
  --tone1: #F3DFC1;
  --tone2: #DDBEA8;
  --black: #222;

  /* Shadows */
  --shadow-light: 0px 5px 20px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0px 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-maincolor-light: 0px 5px 20px rgb(33, 86, 90, 0.08);
  --shadow-maincolor-heavy: 0px 8px 40px rgba(33, 86, 90, 0.08);

  /* Transitions */
  --fast: all 200ms ease-out;
  --normal: all 350ms ease-out;
  --slow: all 500ms ease-out;
  --normal-custom-ease-out: all 300ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
  --linear-out-slow-in: cubic-bezier(0.0, 0.0, 0.2, 1);
}

::selection {
  background-color: var(--main-color);
  color: var(--light-color);
}

:is(h1, h2, h3, h4, h5, h6) {
  color: var(--main-color);
  font-family: 'Forum', serif;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--main-color);
  text-decoration: none;
  background-image: linear-gradient(to right, var(--green), var(--green));
  background-position: 0% 95%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: var(--normal-custom-ease-out);
}

a:hover {
  color: var(--green);
  background-size: 100% 2px
}

/* UTILITY */
.fancy-font {
  font-family: 'Dancing Script', cursive;
}

picture.logo-nyoga {
  position: relative;
}

picture.logo-nyoga a::before {
  content: '';
  position: absolute;
  inset: 1rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow-light);
  border: 2px solid var(--yellow);
  box-shadow: 0 0 0.5rem 0 var(--tone2);
  opacity: 0;
  z-index: -1;
  transition: var(--normal);
}

picture.logo-nyoga a::after {
  content: 'NYOGA';
  position: absolute;
  inset: 1rem;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  font-size: 0.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

picture.logo-nyoga a:hover,
body>header nav picture a:hover {
  background-size: 0;
}

picture.logo-nyoga a:hover::before {
  opacity: 1;
}

picture.logo-nyoga img {
  width: 4rem;
  object-fit: contain;
}

/* LAYOUT */
html {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  color: var(--text-color);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

:is(header, main, footer) {
  margin-left: 1rem;
  margin-right: 1rem;
  background-color: var(--light-color);
}

/* HEADER */
body>header {
  position: sticky;
  top: 0;
  box-shadow: 0 1.25rem 1rem -1rem var(--light-color);
  z-index: 2;
}

body>header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  box-shadow: inset 0 1rem 0 white;
}

body>header nav>a {
  display: none;
  animation-name: show;
  animation-duration: 5s;
  animation-delay: 5s;
  animation-fill-mode: both;
}

body>header nav picture {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: -3.2rem;
  padding: 0.5rem 1.5rem;
  border-radius: 50%;
  background: white;
  aspect-ratio: 1;
  animation-name: show;
  animation-duration: 5s;
  animation-delay: 5s;
  animation-fill-mode: both;
}

body>header nav picture a {
  position: relative;
}

/* MAIN */
body>main {
  overflow-x: hidden;
}

body>main section {
  display: flex;
  flex-flow: column wrap;
  padding: 1rem 2rem;
  position: relative;
  z-index: 1;
}

/* Hero section */
body>main section.hero::before {
  content: '';
  position: absolute;
  top: 9rem;
  right: -2rem;
  width: 50%;
  aspect-ratio: 1;
  background-image: url("https://nyoga.fr/wp-content/themes/nyoga/img/floral.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: invert(1) drop-shadow(0 0 4rem var(--green));
  animation-name: show;
  animation-duration: 3.6s;
  animation-delay: 3.6s;
  animation-fill-mode: both;
  z-index: 0;
}

body>main section.hero>div>* {
  display: flex;
}

body>main section.hero h1 {
  font-size: 4rem;
  font-weight: 100;
}

body>main section.hero h1 .reveal {
  animation-delay: 1.4s;
}

body>main section.hero h1 .reveal::after {
  animation-delay: 1s
}

body>main section.hero h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 100;
}

body>main section.hero h2:last-of-type {
  font-size: 1rem;
  font-weight: 400;
}

body>main section.hero h2:first-of-type .reveal {
  animation-delay: 2s;
}

body>main section.hero h2:first-of-type .reveal::after {
  animation-delay: 1.6s;
}

body>main section.hero h2:last-of-type .reveal {
  animation-delay: 2.4s;
}

body>main section.hero h2:last-of-type .reveal::after {
  animation-delay: 2s;
}

body>main section.hero h3 {
  font-size: 1.5rem;
  font-weight: 100;
}

body>main section.hero h3 .reveal {
  animation-delay: 0.6s;
}

body>main section.hero h3 .reveal::after {
  animation-delay: 0.2s;
}

body>main section.hero .button {
  margin-block: 1rem;
  animation-name: show;
  animation-duration: 4.2s;
  animation-delay: 4.2s;
  animation-fill-mode: both;
}

body>main section.hero picture {
  border-radius: 0.25rem;
  box-shadow: -4px 4px 1rem -10px var(--main-color);
}

body>main section.hero picture.reveal {
  animation-delay: 3.2s;
}

body>main section.hero picture.reveal::after {
  animation-delay: 2.6s;
  animation-direction: reverse;
}

body>main section.hero picture.reveal img {
  height: max(400px, 55vh);
  object-fit: cover;
  animation-name: show;
  animation-duration: 2.6s;
  animation-delay: 2.6s;
  animation-fill-mode: both;
}

/* Description section */
body>main section.description {
  gap: 1rem;
}

body>main section.description>div {
  opacity: 0;
  transition: all 1s ease;
}

body>main section.description picture img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.25rem;
  box-shadow: 4px -4px 1rem -10px var(--main-color);
}

body>main section.description article {
  padding-block: 1rem;
}

body>main section.description article > :last-child {
  margin-bottom: 0;
}

/* Formation and Experience sections */
body>main section:is(.formations, .experiences) article p {
  margin-bottom: 0;
}

body>main section:is(.formations, .experiences) article:not(:last-child) {
  margin-bottom: 1rem;
}

/* Contact section */
body>main section.contact {
  position: relative;
  max-width: 100%;
  isolation: isolate;
  background-image: url("https://nyoga.fr/wp-content/themes/nyoga/img/annie-spratt-8mqOw4DBBSg-unsplash.jpg");
}

body>main section.contact::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: sepia(1);
}

body>main section.contact h2 {
  color: var(--light-color);
  text-align: center;
  text-shadow: 0 0 1rem var(--black), 0 0 1rem var(--black), 0 0 1rem var(--black);
}

body>main section.contact .wpforms-container-full {
  padding: 2rem;
  border: 4px solid var(--tone2);
  border-radius: 0.5rem;
  background-color: var(--tone1);
}

body>main section.contact .wpforms-container-full .wpforms-form :is(input[type=text], input[type=email], textarea) {
  background: var(--light-color);
  border: 2px solid var(--tone2);
  border-radius: 0.3rem;
}

/* FOOTER */
body>footer {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  background-color: var(--tone1);
}

body>footer p {
  margin: 0;
}

body>footer picture.logo-nyoga a:hover img {
  animation-name: rotate;
  animation-duration: 1s;
  animation-fill-mode: both;
  animation-timing-function: var(--linear-out-slow-in);
}

/* RESPONSIVE */
@media (min-width: 768px) {
  body>header nav {
    gap: 1rem;
  }

  body>header nav a {
    display: flex;
  }
}

@media (min-width: 1200px) {
  h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
  }

  p {
    margin-bottom: 1rem;
  }

  body> :is(header, main, footer) {
    margin-left: 2rem;
    margin-right: 2rem
  }

  body>header nav {
    gap: 3rem;
    padding-top: 2rem;
    box-shadow: inset 0 2rem 0 white;
  }

  body>header nav picture {
    margin-top: -5rem;
    padding: 0.7rem 2rem;
  }

  body>header nav picture a::before {
    inset: 1.25rem;
  }

  body>header nav picture img {
    width: 5rem;
  }

  body>main section {
    margin: auto;
    padding: 4rem 2rem;
    max-width: 65rem;
  }

  body>main section.hero {
    flex-direction: row;
  }

  body>main section.hero::before {
    top: 40%;
    left: 50%;
    width: 30%;
    transform: translateX(-50%);
  }

  body>main section.hero>div {
    flex: 1;
  }

  body>main section.hero>div:first-child {
    margin-block: 2rem;
  }

  body>main section.hero h1 {
    font-size: 8rem;
  }

  body>main section.hero h2 {
    font-size: 2.1rem;
  }

  body>main section.hero h2:last-of-type {
    font-size: 1.2rem;
  }

  body>main section.hero .button {
    margin-top: 3rem;
  }

  body>main section.description {
    flex-direction: row-reverse;
    gap: 5rem;
  }

  body>main section.description picture {
    display: flex;
    height: 100%;
  }

  body>main section.description>div {
    flex: 1;
  }

  body>main section.contact .wpforms-container-full {
    min-width: 50ch;
  }

  body>footer {
    margin-bottom: 2rem;
    padding: 2rem;
  }
}

/* ANIMATIONS */
.reveal {
  position: relative;
  overflow: hidden;
  animation-name: show;
  animation-duration: 1s;
  animation-fill-mode: both;
  animation-timing-function: var(--linear-out-slow-in);
}

.reveal::after {
  content: '';
  position: absolute;
  background: var(--main-color);
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  animation-name: reveal;
  animation-duration: 1s;
  animation-fill-mode: both;
  animation-timing-function: var(--linear-out-slow-in);
}

@keyframes reveal {
  0% {
    transform: translate(-110%, 0);
  }

  50% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(110%, 0);
  }
}

@keyframes show {
  0% {
    opacity: 0;
  }

  50%,
  100% {
    opacity: 1;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg)
  }

  50% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(0deg);
  }
}