* {
    margin: 0;
    padding: 0;
}
  
a {
    text-decoration: none;
}

:is(a[href], button:enabled, [role="button"]:not([aria-disabled="true"])) {
    cursor: pointer;
}
  
body {
    cursor: var(--cursor-default);
    background-color: var(--global-color-dark);
}
  
body a:hover {
    text-decoration: none;
}
  
p {
    margin-bottom: 0;
}

.work-category {
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255, 254, 234, 0.4);
    border-radius: 0;
    background: transparent;
    color: var(--text-color-light);
    font: 300 0.875rem/1.25 var(--font-quaternary), sans-serif;
    opacity: 0.7;
}



/*----------------------------------------------------------*/
/* ANIMATE */
/*----------------------------------------------------------*/
.animate {
    opacity: 0;
  }
  
  @keyframes fade-down {
    from {
        transform: translateY(-75px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
        animation-fill-mode: forwards;
    }
  }
  
  @keyframes fade-up {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
  }
  
  @keyframes fade-right {
    from {
        transform: translateX(-35px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
  }
  
  @keyframes fade-left {
    from {
        transform: translateX(75px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
  
  }
  
  @keyframes zoom-in {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
  }
  
  @keyframes fade-up-right {
    from {
        transform: translate(-60px, 60px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
  }
  
  @keyframes fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes fade-out {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
      display: none;
    }
}


/*----------------------------------------------------------*/
/* FONTS IMPORT */
/*----------------------------------------------------------*/
@font-face {
  font-family: "ID Grotesk";
  src: url(../fonts/IDGrotesk-Regular.ttf);
}

@font-face {
  font-family: "Geist";
  src: url(../fonts/Geist-Variable.ttf);
}


/*----------------------------------------------------------*/
/* PRE-SETS / VARIABLES */
/*----------------------------------------------------------*/
:root {
    /* global variables */
    --global-color-light: #FFFEEA;
    --global-color-dark: #06070A;
    --contact-panel-background: #0B0D11;
    --motion-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* text colors */
    --text-color-light: #FFFEEA;
  
    /* fonts */
    --font-primary: 'Host Grotesk';
    --font-secondary: 'Inter';
    --font-tertiary: 'ID Grotesk';
    --font-quaternary: 'Geist';
    --mobile-intro-font-size: clamp(1.5rem, calc(1.25rem + 1.6vw), 2rem);
}


/*----------------------------------------------------------*/
/* GLOBAL COMPONENT STYLE SETTINGS */
/*----------------------------------------------------------*/
.text-s {
    font-family: var(--font-quaternary);
    font-weight: 200;
    font-size: 0.9em;
    line-height: 1em;
    letter-spacing: 0.01em;
    cursor: default;
}

.section-actions .action-button hr {
    border: none;
    height: 1px;
    background-color: var(--text-color-light);
    opacity: 0.3;
    margin-bottom: 20px;
}

.section-actions .action-button-cont {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.section-actions .action-button-cont p {
    color: var(--text-color-light);
    font-family: var(--font-primary);
    font-size: 1.3em;
    font-weight: 100;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: .3s;
}

.section-actions .action-button-cont img {
    height: 20px;
    opacity: 0;
    margin-right: -10px;
    transition: all .3s ease-out;
}

.section-actions .action-button-cont:hover > img {
    opacity: .9;
    margin-right: 0;
    height: 25px;
}


/*----------------------------------------------------------*/
/* NOISE & TEXTURE */
/*----------------------------------------------------------*/
.noise-effect {
    position: fixed;
    overflow: none;
    left: -25%;
    top: -25%;
    pointer-events: none;
    z-index: 10003; /* Above the loader. */
    background-image: url("../imgs/noise-desktop.webp");
    height: 150%;
    width: 150%;
    opacity: 0.1;

    animation: noise 0.24s infinite;
    will-change: transform;
}

@keyframes noise {
    0% { transform: translate(0, 0) }
    5% { transform: translate(-2%, -2%) }
    10% { transform: translate(2%, 2%) }
    15% { transform: translate(-2%, 2%) }
    20% { transform: translate(2%, -2%) }
    25% { transform: translate(-2%, 0) }
    30% { transform: translate(2%, 0) }
    35% { transform: translate(0, -2%) }
    40% { transform: translate(0, 2%) }
    45% { transform: translate(-2%, -1%) }
    50% { transform: translate(2%, 1%) }
    55% { transform: translate(-1%, 2%) }
    60% { transform: translate(1%, -2%) }
    65% { transform: translate(-2%, 1%) }
    70% { transform: translate(2%, -1%) }
    75% { transform: translate(-1%, -2%) }
    80% { transform: translate(1%, 2%) }
    85% { transform: translate(-1%, 0) }
    90% { transform: translate(1%, 0) }
    95% { transform: translate(0, -1%) }
    100% { transform: translate(0, 0) }
}


/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    .noise-effect {
        opacity: 0.06;
        background-image: url("../imgs/noise-mobile.webp");
        animation: none;
        will-change: auto;
    }
}



/*----------------------------------------------------------*/
/* CURSOR MOUSE MOVEMENT */
/*----------------------------------------------------------*/
.cursor-dot {
    width: 10px;
    height: 10px;
    transform-origin: center;
    margin-left: -5px;
    margin-top: -5px;
    background: var(--global-color-light);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 98;
    transition: transform .1s ease, opacity .3s ease;
}

.cursor-dot.is-hovering {
    opacity: 0;
}

.cursor-ring {
    width: 30px;
    height: 30px;
    transform-origin: center;
    border: 1px solid var(--global-color-light);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    margin-left: -16px;
    margin-top: -16px;
    z-index: 98;
    transition: transform .1s ease,
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity .3s ease;
}
  
.cursor-ring.is-hovering {
    width: 80px;
    height: 80px;
    margin-left: -40px;
    margin-top: -40px;
}

@media (max-width: 768px) {
    .cursor-dot {
      display: none;
    }
  
    .cursor-ring {
      display: none;
    }
}


@media (prefers-reduced-motion: no-preference) {
    body[data-pointer-ease-out] .cursor-dot {
        transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }

    body[data-pointer-ease-out] .cursor-ring {
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/*----------------------------------------------------------*/
/* Link Hover Animation */
/*----------------------------------------------------------*/
/* Hide extra text */
.link .mask {
  position: relative;
  padding: 0;
  display: block;
  height: 15px;
  overflow: hidden;
}

.link-container {
  transition: transform 0.4s ease;
}

.link-text {
  display: block;

  /*  Set same font-size and line height  */
  font-size: 1em;
  line-height: 1em;

  transition: transform 0.4s ease;
}

.link-text-1 {
  transform-origin: right center;
}

.link-text-2 {
  transform-origin: left center;
  transform: rotate(20deg);
}

/* Hover Action*/

/* Move up two texts (20px = font-size) */
.link:hover .link-container {
  transform: translateY(-15px);
}

/* Rotate texts a little bit */
.link:hover .link-text-1 {
  transform: rotate(20deg);
}

.link:hover .link-text-2 {
  transform: rotate(0);
}


/*----------------------------------------------------------*/
/* LOADER ANIMATION */
/*----------------------------------------------------------*/
/* Loading Bar Content */
.loading-screen-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001; /* Higher than loading screens */
    width: 30%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

.loading-screen-content .loading-logo {
  height: 28px;
}

.loading-bar-container {
    width: 100%;
    height: 1px;
    background-color: var(--contact-panel-background);
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    border: solid 1px var(--global-color-light);
    background-color: var(--global-color-light);
    opacity: 0.6;
    width: 0%;
    animation: loading-progress 1.5s ease-out both;
}

@keyframes loading-progress {
    to { width: 85%; }
}

body.loaded .loading-bar {
    animation: none;
    width: 100%;
}

/* Hide loading content after animation */
body.loaded .loading-screen-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  height: 100%;
  width: 25%;
  background-color: var(--contact-panel-background);
  z-index: 10000;
  transform: translateY(0);
}

body.loaded .loading-screen {
  transform: translateY(-100%);
  pointer-events: none;
}

.screen-1 {
  left: 0;
  transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0s;
}
.screen-2 {
  left: 25%;
  transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.05s;
}
.screen-3 {
  left: 50%;
  transition: transform 2.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.1s;
}
.screen-4 {
  left: 75%;
  transition: transform 2.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.15s;
}

/* The loader and entrance are for the initial document only. */
@media (prefers-reduced-motion: no-preference) {
    body:not(.loaded) #main-content {
        transform: scale(0.74) translateY(50px) rotateX(5deg) skew(8deg, 8deg);
        opacity: 0;
    }

    [data-initial-entry] #main-content {
        transition: transform 2.1s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 2.1s cubic-bezier(0.16, 1, 0.3, 1);
        transition-delay: 0.15s;
    }

    @media (max-width: 768px) {
        body:not(.loaded) #main-content:not(.home-page) {
            transform: scale(0.9) translateY(50px);
        }

        body:not(.loaded) #main-content.home-page {
            transform: none;
            opacity: 1;
        }

        [data-initial-entry] #main-content:not(.home-page) {
            transition-duration: 1.6s;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-screen,
    .loading-screen-content {
        display: none;
    }
}

/*----------------------------------------------------------*/
/* LOADER ANIMATION */
/*----------------------------------------------------------*/
.intro p {
  font-size: 1em;
}


@media (max-width: 768px) {
    main {
      overflow-x: hidden !important;
    }

    .loading-screen-content {
      width: 60%;
    }
    
    .screen-1 {
      width: 100%;
    }

    .screen-2,
    .screen-3,
    .screen-4 {
      display: none;
    }
}
