@import url('./resets.css');
@font-face {
    font-family: 'Helvetica';
    src: url('../fonts/Helvetica.woff2') format('woff2'),
         url('./fonts/Helvetica.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-family: 'Didot';
    src: url('../fonts/Didot.woff2') format('woff2'),
         url('./fonts/Didot.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --hue-plage: #A3CAC5;
    --hue-peach: #EBE0D3;
    --hue-beige: #cdb293;
    --hue-aurus: #8d7c49;
    --hue-noire: #4e4e50;
    --hue-verre: hsla(34, 37%, 87%, 0.75);
    --font-sans: 'Helvetica', sans-serif;
    --font-serif: 'Didot', serif;
}

body {
    font-size: 1rem;
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100vw;
    min-height: 100vh;
    background: var(--hue-peach);
    color: var(--hue-noire);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Loading Indicator Styles */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hue-peach) 0%, var(--hue-verre) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: var(--font-sans);
    color: var(--hue-noire);
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#loading-indicator.fade-out {
    opacity: 0;
}

.loading-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-graphic {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.loading-text h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--hue-aurus);
    animation: pulse-text 2s ease-in-out infinite;
}

.loading-text p {
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
    opacity: 0.8;
    animation: fade-in-out 3s ease-in-out infinite;
}

.outer-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-top: 3px solid var(--hue-aurus);
    border-right: 3px solid var(--hue-aurus);
    border-radius: 50%;
    animation: rotate-clockwise 3s linear infinite;
}

.middle-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--hue-beige);
    border-left: 2px solid var(--hue-beige);
    border-radius: 50%;
    animation: rotate-counter 2s linear infinite;
}

.inner-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--hue-plage) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-scale 1.5s ease-in-out infinite;
}

.center-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--hue-aurus);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--hue-aurus);
}

/* Loading Animation Keyframes */
@keyframes rotate-clockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotate-counter {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes pulse-scale {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.9;
    }
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px var(--hue-aurus);
    }
    50% { 
        transform: scale(1.5);
        box-shadow: 0 0 40px var(--hue-aurus), 0 0 60px var(--hue-aurus);
    }
}

@keyframes pulse-text {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes fade-in-out {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Smooth loading for images */
.preview {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.preview.loaded {
    opacity: 1;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    margin: 0.5rem 0;
    font-weight: normal;
    text-transform: uppercase;
}
a:link {
    color: inherit;
    text-decoration: none;
}
a:visited {
    color: inherit;
}
a:hover {
    background: var(--hue-beige);
    border-radius: .25rem;
}
a:active {
    color: var(--hue-aurus);
}
a:focus {
    outline: 2px solid var(--hue-aurus);
    outline-offset: 2px;
}

header {
  background: var(--hue-verre);
    backdrop-filter: blur(.5rem);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0.25rem 0.375rem hsla(0, 0%, 0%, 0.1);
}
header img {
    height: 5rem;
    width: auto;
}

main {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
main article h1 {
    margin-bottom: 1rem;
}

article {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 1rem;
    width: 95%;
    max-width: 75rem;
}
article:nth-child(2) {
    min-width: 23.4375rem;
    margin: 0 auto;
}
section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
section a {
    position: relative;
}
.preview {
    object-fit: cover;
    width: 15rem;
    height: 15rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.375rem hsla(0, 0%, 0%, 0.1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.preview:hover {
    box-shadow: 0 0.5rem 0.75rem hsla(0, 0%, 0%, 0.2);
    transform: rotate(2deg) translateZ(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--hue-verre);
    will-change: transform;
}
#pdf-icon {
    position: absolute;
    width: 2rem;
    height: 2rem;
    top: 1%;
    right: 1%;

}
section h2 {
    bottom: 0;
    color: var(--hue-noire);
    width: 80%;
    font-size: small;
    padding: 1rem;
    position: absolute;
    text-align: center;
    border-radius: .25rem;
    background: var(--hue-verre);
    z-index: 1;
}
footer {
    margin: 1rem 0 0;
    font-size: small;
}

/* Background styles */
.background {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}
.rainbow {
  height: 100vh;
  width: 0;
  top: 0;
  position: absolute;
  transform: rotate(8deg);
  transform-origin: bottom left;
}
.rainbow:nth-child(1) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach),
              -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 44.1s linear infinite slide;
  animation-delay: -1.8s;
}
.rainbow:nth-child(2) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 43.2s linear infinite slide;
  animation-delay: -3.6s;
}
.rainbow:nth-child(3) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 42.3s linear infinite slide;
  animation-delay: -5.4s;
}
.rainbow:nth-child(4) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 41.4s linear infinite slide;
  animation-delay: -7.2s;
}
.rainbow:nth-child(5) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 40.5s linear infinite slide;
  animation-delay: -9s;
}
.rainbow:nth-child(6) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 39.6s linear infinite slide;
  animation-delay: -10.8s;
}
.rainbow:nth-child(7) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 38.7s linear infinite slide;
  animation-delay: -12.6s;
}
.rainbow:nth-child(8) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 37.8s linear infinite slide;
  animation-delay: -14.4s;
}
.rainbow:nth-child(9) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 36.9s linear infinite slide;
  animation-delay: -16.2s;
}
.rainbow:nth-child(10) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 36s linear infinite slide;
  animation-delay: -18s;
}
.rainbow:nth-child(11) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 35.1s linear infinite slide;
  animation-delay: -19.8s;
}
.rainbow:nth-child(12) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 34.2s linear infinite slide;
  animation-delay: -21.6s;
}
.rainbow:nth-child(13) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 33.3s linear infinite slide;
  animation-delay: -23.4s;
}
.rainbow:nth-child(14) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 32.4s linear infinite slide;
  animation-delay: -25.2s;
}
.rainbow:nth-child(15) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 31.5s linear infinite slide;
  animation-delay: -27s;
}
.rainbow:nth-child(16) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 30.6s linear infinite slide;
  animation-delay: -28.8s;
}
.rainbow:nth-child(17) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-beige), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 29.7s linear infinite slide;
  animation-delay: -30.6s;
}
.rainbow:nth-child(18) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 28.8s linear infinite slide;
  animation-delay: -32.4s;
}
.rainbow:nth-child(19) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 27.9s linear infinite slide;
  animation-delay: -34.2s;
}
.rainbow:nth-child(20) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 27s linear infinite slide;
  animation-delay: -36s;
}
.rainbow:nth-child(21) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 26.1s linear infinite slide;
  animation-delay: -37.8s;
}
.rainbow:nth-child(22) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-plage), 0 0 3.125rem 1.5625rem var(--hue-aurus), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 25.2s linear infinite slide;
  animation-delay: -39.6s;
}
.rainbow:nth-child(23) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 24.3s linear infinite slide;
  animation-delay: -41.4s;
}
.rainbow:nth-child(24) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 23.4s linear infinite slide;
  animation-delay: -43.2s;
}
.rainbow:nth-child(25) {
  box-shadow: -8.125rem 0 5rem 2.5rem var(--hue-peach), -3.125rem 0 3.125rem 1.5625rem var(--hue-aurus), 0 0 3.125rem 1.5625rem var(--hue-plage), 3.125rem 0 3.125rem 1.5625rem var(--hue-beige), 8.125rem 0 5rem 2.5rem var(--hue-peach);
  animation: 22.5s linear infinite slide;
  animation-delay: -45s;
}

@keyframes slide {
  from {
    right: -25vw;
  }
  to {
    right: 125vw;
  }
}
.h {
  box-shadow: 0 0 50vh 40vh var(--hue-peach);
  width: 100vw;
  height: 0;
  bottom: 0;
  left: 0;
  position: absolute;
}

.v {
  box-shadow: 0 0 35vw 25vw var(--hue-peach);
  width: 0;
  height: 100vh;
  bottom: 0;
  left: 0;
  position: absolute;
}
@media (orientation: portrait) {
    article:nth-child(2) {
        grid-template-columns: 1fr;
        place-self: center;
    }
    article:nth-child(2) section img {
        margin: 0 auto;
        width: 80%;
        height: auto;
    }
    #pdf-icon {
        top: 1%;
        right: 11%;
    }
}
@media (max-width: 55.625rem) {
    article {
        margin: 0 auto;
    }
  article:nth-child(2) {
    grid-template-columns: 1fr 1fr;
    place-items: center;
  }
  #pdf-icon {
    top: 1%;
    right: 11%;
  }
}