:root {
    --black:#3D3329;
    --black-soft:hsla(30, 20%, 20%,0.5); 
    --sand-light: #fbfaf8;
    --sand-medium: #ECE6DF;
    --sand-dark: #C2B3A3;
    --yellow: #f4c725;
    --green: #87AB6D;
    --gray: #d1cfc7;
    --brown: #A98C70;
    --white: #fff;
    --off-white: #eee;
    --yellow-background: hsla(47,90%,55%,0.7);
    --green-background:hsla(95,27%,55%,0.7);
    --brown-background: hsla(30,25%,55%,0.7);
}

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

html {
    font-size: 16px;
    overflow-x: hidden
}

body {
    width: 100%;
    color: var(--black);
    background-color: var(--sand-light);
    font-family: "questa-sans", sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
}

#defaultCanvas0 { /* This is the default ID given to a p5.js canvas */
    /* display: none; */
}

canvas {
    position: absolute;
    top:0;
    left:0;
    z-index:-500;
}

#particles {
    width: 100%;
    height: 100vh;
    position: absolute;
    top:0;
    left:0;
    background-image: url(/images/particles.png);
    background-repeat: no-repeat;
    background-size: cover;
}

/* Layout */

main {
    width: 90%;
    margin: 0 auto;
    max-width: 1280px;
}

article {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 50px;
}

article#intro {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    overflow: hidden;
}

#intro .illustration-background {
    position: absolute;
    width: 100%;
    height: 85%;
    background-image: url(/images/illustration-background.png);
    background-size: cover;
    left: 0;
    bottom: 0;
    z-index: -100;
}

.title, .intro-text {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.intro-text {
    opacity: 0;
}
.intro-text p {
    background: radial-gradient(circle, var(--sand-light) 0%, transparent 100%);
    
}


section.text {
    grid-column: 2 / 6;
}

section.chartSection {
    grid-column: 1 / 7;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 50px;
}

.chartSection aside {
    grid-column: 1 / 3;
}

.chartSection > div {
    grid-column: 3 / 7;
}

#gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 1rem;
    width: 100%;
    margin-top: 6rem;
    font-size: 0.8rem;
}

#gallery figcaption {
    padding: 0 0.5em;
    border-left: 0.15em solid var(--black-soft);
    border-right: 0.15em solid var(--black-soft);
}

#gallery figcaption p {
    font-size: inherit;
    font-weight: 200;
    margin-bottom: 1em;
}

#gallery img {
    width: 100%;
}

footer article {
    margin: 0 auto;
    max-width: 1280px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 50px;
    align-items: start;
}

footer article section:first-of-type {
    grid-column: 2 / 4;
}

footer article section:last-of-type {
    grid-column: 4 / 6;
    margin-top: 0;
}

/* Font styles */

h1 {
    font-family: "questa", serif;
    font-weight: 500;
    font-size: 5rem;
    font-style: italic;
    line-height: 1.3;
}

h1 span {
    font-family: "questa-sans", serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 6rem;
    font-style: normal;
}

h2 {
    font-weight: 600;
    font-size: 2.5rem;
}

h3 {
    font-weight: 700;
    font-size: 1.5rem;
}

h4 {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h5 {
    font-weight: 700;
    font-size: 1.25em;
    line-height: 1.2;
}

article#intro p {
    font-size:2rem;
    max-width: 680px;
    margin: 0 auto;
}

.text p {
    font-size: 1.3rem;
}

small {
    font-size: 0.8em;
    font-weight: 200;
    display: inline-block;
}

a {
    color: inherit;
}

/* Margings */

h1, h2, h3, h4 {
    margin-bottom: 0.5em;
}

p+h4 {
    margin-top: 2.5em;
}

h5 {
    margin-bottom: 0;
    margin-top:0.5em;
}

p+p {
    margin-top: 0.5em;
}

p+small, div+small {
    margin-top: 1.5em;
}

section+section {
    margin-top: 6rem;
}

footer {
    padding: 10% 5% 10% 5%;
    margin-top: 6rem;
    background-color: var(--sand-dark);
    position: relative;
}

footer img {
    position: absolute;
    object-fit: cover;
    bottom: 0;
    mix-blend-mode: multiply;
    image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

#illustration-footer-left {
    width: 15%;
    left: 2%;
}

#illustration-footer-right {
    width: 25%;
    right: 3%;
}

/* animations */

.fade-in {
    animation: fade-in;
    animation-duration: 9s;
    animation-iteration-count: 1;
    opacity: 1;
}

.fade-in-fast {
    animation: fade-in-fast;
    animation-fill-mode: both;
    animation-delay: 2s;
    animation-duration: 2s;
    animation-iteration-count: 1;
    opacity: 1;
}

.fade-out {
    animation: fade-out;
    animation-duration: 4s;
    animation-iteration-count: 1;
    opacity: 0;
}

.fade-out-canvas {
    animation: fade-out 2s forwards; /* Adjust '2s' if you want a slower or faster fade */
  }

  @keyframes fade-in-fast {
      0% {
          opacity: 0;
      }



      100% {
          opacity: 1;
      }
  }

@keyframes fade-in {
    0%    { opacity: 0; }
    90%   { opacity: 0;}
    100%  { opacity: 1; }
  }

  @keyframes fade-out {
    0%    { opacity: 0; }
    10%   { opacity: 100%;}
    80%   { opacity: 100%;}
    100%  { opacity: 0; }
  }

  @keyframes fade-out-canvas {
    from { opacity: 1; }
    to { opacity: 0; }
  }


/* utility classes */

.align-center {
    text-align: center;
}

.hidden {
    display: none;
}

/* media queries */

@media(min-width: 1440px) {
    html {
        font-size: 18px;
    }
}

@keyframes rotateAnimation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
#intro-arrow-circle {
    transform: translateY(100px);
}
#intro-arrow {
    animation: intro-arrow 1s infinite alternate;
}
@keyframes intro-arrow {
    from {
        transform: translateY(-1px);
    }
    to {
        transform: translateY(3px);
    }
}

