/*
* Custom properties..........Global variables
* Reset......................Remove browser default styles
* Typography.................Font sizes for text
* Reused Styles.................Repeated styles throughout website
*/

/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
  /* primary colors */
  --maximum-yellow-red_a10: hsla(41, 99%, 64%, 0.1);
  --maximum-yellow-red_a40: hsla(41, 99%, 64%, 0.4);
  --maximum-yellow-red: hsl(41, 99%, 64%);
  --olive-green: hsl(54, 22%, 34%);
  --olive-green_a30: hsl(54, 22%, 34%, 0.3);
  --eerie-black: hsl(210, 11%, 15%);
  --pink-accent: hsl(359, 100%, 77%);
  --pink-accent_a40: hsl(359, 100%, 77%, 0.2);

  /* popsicle colors */
  --clr-background: hsl(359, 87%, 78%);

  /* neutral colors */
  --davys-gray: hsl(0, 0%, 33%);
  --white_a80: hsla(0, 0%, 100%, 0.8);
  --white_a75: hsla(0, 0%, 100%, 0.75);
  --white_a10: hsla(0, 0%, 100%, 0.1);
  --jet_a10: hsla(0, 0%, 22%, 0.1);
  --black: hsl(0, 0%, 0%);
  --white: hsl(0, 0%, 100%);
  --jet: hsl(0, 0%, 22%);

  /* Typography */
  --ff-jost: "Jost", sans-serif;

  --fs-45: 4.5rem;
  --fs-38: 3.8rem;
  --fs-32: 3.2rem;
  --fs-27: 2.7rem;
  --fs-26: 2.6rem;
  --fs-22: 2.2rem;
  --fs-20: 2rem;
  --fs-18: 1.8rem;
  --fs-17: 1.7rem;
  --fs-14: 1.4rem;
  --fs-12: 1.2rem;

  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;

  --section-padding: 60px;

  --shadow: 0 2px 2px hsla(0, 0%, 22%, 0.08);

  --radius-50: 50px;
  --radius-pill: 100px;
  --radius-circle: 50%;

  /* transition */
  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease;
  --cubic-out: cubic-bezier(0.05, 0.83, 0.52, 0.97);
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

li {
  list-style: none;
}

a,
img,
span,
label,
button,
ion-icon {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

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

input,
button,
textarea {
  background: none;
  border: none;
  font: inherit;
}

button {
  cursor: pointer;
}

input,
textarea {
  width: 100%;
}

ion-icon {
  pointer-events: none;
}

address {
  font-style: normal;
}

html {
  font-family: var(--ff-jost);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--white);
  color: var(--davys-gray);
  font-size: 1.6rem; /* 16px */
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* overflow: hidden; */
}

body.loaded {
  overflow: visible;
}

:focus-visible {
  outline-offset: 4px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: hsl(0, 0%, 98%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 80%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 70%);
}

/*-----------------------------------*\
  #PRELOADER
\*-----------------------------------*/
.loader {
  background-color: var(--clr-background);
  z-index: 100;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  transition: opacity 1.75s, visibility 1.75s;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.popsicle {
  height: 18.75em;
  width: 13.75em;
  position: absolute;
  left: 50%;
  top: calc(50% - 3.25em);
  transform: translate(-50%, -50%);
  border-radius: 7.5em 7.5em 0.9em 0.9em;
  background: repeating-linear-gradient(
    -30deg,
    #eb288a 0,
    #eb288a 5em,
    #e9ca00 5em,
    #e9ca00 10em,
    #6cc258 10em,
    #6cc258 15em,
    #2ed3ec 15em,
    #2ed3ec 20em
  );
  background-size: 375em;
  animation: move 15s infinite linear;
}

.popsicle::before {
  position: absolute;
  content: "";
  height: 12.5em;
  width: 1.25em;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 1.25em;
  top: 5em;
  left: 1.25em;
}

.popsicle::after {
  position: absolute;
  content: "";
  height: 7.5em;
  width: 3.12em;
  background: linear-gradient(#975d39 1.25em, #d7965b 1.25em);
  left: 5.12em;
  top: 18.75em;
  border-radius: 0 0 1.87em 1.87em;
}

@keyframes move {
  100% {
    background-position: -312.5em;
  }
}

@media (min-width: 600px) {
  .popsicle {
    font-size: 1.2em;
  }
}

/*-----------------------------------*\
  #TYPOGRAPHY
\*-----------------------------------*/

.headline-lg {
  font-size: var(--fs-45);
}

.headline-md {
  font-size: var(--fs-38);
}

.headline-sm {
  font-size: var(--fs-32);
}

.title-lg {
  font-size: var(--fs-27);
}

.title-md {
  font-size: var(--fs-26);
}

.title-sm {
  font-size: var(--fs-22);
}

.body-lg {
  font-size: var(--fs-20);
}

.body-md {
  font-size: var(--fs-18);
}

.body-sm {
  font-size: var(--fs-17);
}

.label-lg {
  font-size: var(--fs-14);
}

.label-md {
  font-size: var(--fs-12);
}

/* font weight */
.headline-lg,
.headline-md,
.headline-sm,
.title-lg,
.title-md,
.title-sm,
.label-lg {
  color: var(--jet);
  font-weight: var(--fw-600);
  line-height: 1.2;
}

.body-lg {
  font-weight: var(--fw-500);
}

/*-----------------------------------*\
  #REUSED STYLES
\*-----------------------------------*/
.w-100 {
  width: 100%;
}

.wrapper {
  padding-inline: 20px;
}

.section {
  padding-block: var(--section-padding);
  background-color: var(--maximum-yellow-red_a10);
}

.section-title {
  margin-block-end: 30px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

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

/* .img-block {
  aspect-ratio: var(--width) / var(--height);
} */

/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header .btn {
  display: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 0;
  z-index: 4;
  background-color: transparent;
  transition: var(--transition-1);
}

.header.active {
  box-shadow: var(--shadow);
  background-color: var(--white);
}

.header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-toggle-btn {
  color: var(--jet);
  font-size: 3.8rem;
}

.logo {
  font-size: var(--fs-32);
  color: var(--pink-accent);
  font-weight: var(--fw-600);
}

.logo span {
  display: inline;
  color: var(--jet);
}

/*-----------------------------------*\
  #NAVBAR
\*-----------------------------------*/
.navbar {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--white);
  border-block: 2px solid var(--jet);
  transition: 0.24s var(--cubic-out);
  transition-delay: 0.15s;
  transform: scaleY(0);
  transform-origin: top;
  visibility: hidden;
}

.navbar.active {
  transform: scaleY(1);
  visibility: visible;
  transition-duration: 0.5s;
  transition-delay: 0s;
}

.navbar > * {
  opacity: 0;
  transition: var(--transition-1);
}

.navbar.active > * {
  opacity: 1;
  transition-delay: 0.4s;
}

.navbar__item:not(:last-child) {
  border-block: 1px solid var(--jet_a10);
}

.navbar-link {
  text-transform: uppercase;
  letter-spacing: 3px;
  padding: 16px 15px;
  transition: var(--transition-1);
}

.navbar-link:is(:hover, :focus-visible, .active) {
  color: var(--pink-accent);
}

/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer {
  background-color: var(--olive-green);
  color: var(--white);
  border-block-start: 1px solid var(--white_a10);
  padding-block: 18px;
  text-align: center;
}

.footer .social-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-block-end: 1rem;
}

.social-link {
  font-size: 1.8rem;
}

.social-link:is(:hover, :focus-visible) {
  color: var(--pink-accent);
}

.copyright a {
  display: inline-block;
}

/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/* larger than 768px */
@media (min-width: 768px) {
  /* TYPROGRAPHY */
  .headline-lg {
    --fs-45: 6rem;
  }

  .headline-md {
    --fs-38: 4.5rem;
  }

  .title-md {
    --fs-26: 3.2rem;
  }

  /* Reused Styles */
  .section {
    --section-padding: 100px;
  }

  .section-title {
    margin-block-end: 40px;
  }

  /* FOOTER */
  .footer {
    padding-block: 25px;
  }

  .footer .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .social-list {
    margin-block-end: 0;
  }
}

/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

@media (min-width: 992px) {
  /* typography */
  .headline-md {
    --fs-38: 5rem;
  }

  .title-lg {
    --fs-27: 4rem;
  }

  .title-sm {
    --fs-22: 2.4rem;
  }

  /* REUSED STYLES */
  .section-title {
    margin-block-end: 60px;
  }

  /* HEADER */
  /* hide navbar mobile menu */
  .nav-toggle-btn {
    display: none;
  }

  .navbar,
  .navbar.active,
  .navbar > * {
    all: unset;
    display: block;
  }

  .navbar__list {
    display: flex;
  }

  .navbar__item:not(:last-child) {
    border-block: none;
  }

  .navbar-link {
    position: relative;
  }

  .navbar-link::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: right;
    width: 80%;
    height: 2px;
    background-color: var(--pink-accent);
    transition: transfrom var(--transition-1);
  }

  .navbar-link:is(:hover, :focus-visible, .active)::after {
    transform: translateX(-50%) scaleX(1);
    transform-origin: left;
  }

  .header .btn {
    display: block;
  }
}

@media (min-width: 1200px) {
  .headline-lg {
    --fs-45: 7rem;
  }

  /* REUSED STYLES */
  .wrapper {
    max-width: 1248px;
    width: 100%;
    margin-inline: auto;
  }
}
