@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

/* GOBAL STYLES */

h1,h2,h3 {
  font-family: "Source Serif 4", serif;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}
html {
  scroll-behavior: smooth;

  --text-light: rgb(0 0 0 / 0.5);
  --background-secondary: #FAFAFA;
}
* {
  box-sizing: border-box;
}

a {
  color: rgb(0 0 0 / 0.8);
  text-decoration: underline solid rgb(0 0 0 / 0.2);
  transition: 0.2s ease;

  &:hover {
    text-decoration: underline solid rgb(0 0 0 / 0.4);
  }
}

.button {
  font: inherit;
  color: white;
  background: black;
  padding: 1rem;
  border-radius: 0.25rem;
  border: none;
  transition: 0.2s ease;

  &:hover {
    background: rgb(0 0 0 / 0.9);
    cursor: pointer;
  }
}

.global-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 10vw;

  .name {
    text-transform: uppercase;
    letter-spacing: -0.05em;
    font-weight: 600;
    text-decoration: none;
  }
  .nav-links {
    display: flex;
    gap: 1rem;

    .highlighted {
      background: rgba(153, 205, 50, 0.5);
    }
  }
}
.global-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 10vw;

  .name {
    text-transform: uppercase;
    letter-spacing: -0.05em;
    font-weight: 600;
  }
  .nav-links {
    display: flex;
    gap: 1rem;
  }
}

/* LANDING STYLES */

.main-header {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background-image: linear-gradient(0deg, rgb(255 255 255 / 0.9) 0%, rgb(255 255 255 / 1) 100%), url('./assets/background.jpg');
  backdrop-filter: blur(2px);
  background-size: cover;

  h1 {
    margin: 0;
    font-size: 4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
  }
  .subtitle {
    margin: 0;
    color: var(--text-light);
    max-width: 30ch;
    text-align: center;
  }
  .button {
    margin-top: 0.5rem;
  }
}

.posts {
  background: var(--background-secondary);
  padding: 6rem 10vw;

  display: flex;
  flex-wrap: wrap;

  gap: 2rem;

  .post {
    flex-basis: 25rem;
    flex-grow: 1;
    background: white;
    border: 1px solid rgb(0 0 0 / 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    transition: 0.3s ease;

    &:hover {
      transform: scale(0.99);
      opacity: 0.95;
    }

    img {
      width: 100%;
    }
    .post-info {
      padding: 1rem;

      h2 {
        margin: 0;
        font-weight: 500;
      }
      .date {
        margin: 0;
        color: var(--text-light);
      }
    }
  }
}

/* ABOUT */

.about-main {
  padding: 4rem 10vw;
  display: flex;
  align-items: center;
  gap: 10vw;
  min-height: 80vh;

  .main-content {
    h1 {
      font-size: 3rem;
    }
    p {
      line-height: 1.5;
    }
  }
  .image-container {
    flex-basis: min(30rem, 100%);
    flex-shrink: 0;
    flex-grow: 1;
  }
  img {
    max-width: 100%;
    border-radius: 0.25rem;
  }
}
@media (max-width: 1000px) {
  .about-main {
    flex-wrap: wrap;
    gap: 2rem;
  }
}

/* BLOG STYLES */

.blog-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  img {
    width: 100%;
    height: 40vh;
    object-fit: cover;
  }
  .back {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: white;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;

    transition: 0.2s ease;

    svg {
      display: block;
      margin-left: -0.125rem;
    }

    &:hover {
      transform: rotate(10deg) scale(0.95);
    }
  }

  .header-content {
    padding: 4rem 0;
    width: min(50rem, 80vw);

    h1 {
      font-size: 3rem;
      margin: 0;
    }
    p {
      margin: 0.25rem 0 0 0;
      color: var(--text-light);
    }
  }
}

.blog-main {
  margin: -6rem auto 0 auto;
  padding: 4rem 0;
  width: min(50rem, 80vw);

  img {
    max-width: 100%;
  }
  p {
    line-height: 1.5;
  }
}

/* SANDBOX STYLES */

.sandbox-header {
  padding: 8rem 10vw;

  h1 {
    font-size: 4rem;
    margin: 0;
  }
  p {
    margin: 0.5rem 0 0 0;
    color: var(--text-light);
  }
}

.sandbox-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 10vw;
  margin-bottom: 4rem; 

  .section {
    background: #f4f4f4;
    flex-basis: 30rem;
    flex-grow: 1;
    padding: 4rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

.tri-cards {
  display: flex;
  justify-content: center;

  .tri-card {
    width: 150px; 
    height: 150px;
    background: #9CA3AF; 
    border-radius: 8px;

    transition: 0.3s ease;

    &:nth-of-type(2) {
      margin: 0 -20%;
      z-index: 1;
      background: #D1D5DB; 
    }
    &:not(:nth-of-type(2)) {
      transform: scale(0.8)
    }
  }

  &:has(.tri-card:nth-of-type(1):hover) {
    .tri-card {
      &:nth-of-type(1) {
        transform: rotate(-5deg) translateX(-10%) scale(0.85);
        filter: brightness(1.05);
      }
      &:nth-of-type(2) {
        transform: rotate(5deg) translateX(10%) scale(0.95);
      }
    }
  }
  &:has(.tri-card:nth-of-type(2):hover) {
    .tri-card {
      &:nth-of-type(2) {
        transform: scale(1.025);
        filter: brightness(1.05);
      }
    }
  }
  &:has(.tri-card:nth-of-type(3):hover) {
    .tri-card {
      &:nth-of-type(3) {
        transform: rotate(5deg) translateX(10%) scale(0.85);
        filter: brightness(1.05);
      }
      &:nth-of-type(2) {
        transform: rotate(-5deg) translateX(-10%) scale(0.95);
      }
    }
  }
}

.social-proof {
  display: flex;
  gap: 0.5rem;
  align-items: center;

  .proof-users {
    display: flex;

    img {
      width: 2rem;
      height: 2rem;
      padding: 0.25rem;
      display: inline-block;

      border-radius: 50%;
      background: var(--background); 
      border: 2px solid #F4F4F4;

      &:not(:last-of-type) {
        margin-right: -1rem;
      }

      transition: 0.3s ease;
      transform: scale(1) rotate(0deg);
      &:hover {
        filter: brightness(1.05);
        transform: scale(1.05) rotate(-10deg) translate(-7%, -7%);
      }
    }
  }
  .proof-text {
    strong {
      font-weight: 500;
    }
  }
}

.text-highlight {
  text-align: center;
  font-weight: 500;
  font-size: 2rem;

  mark {
    padding: 0 0.1em;
    display: inline-block;
    transition: 0.1s ease;
  }
  .highlight-1 {
    background: #67E8F9;
    transform: rotate(-2deg);
    &:hover {
      transform: rotate(-4deg) scale(1.025);
    }
  }
  .highlight-2 {
    background: #BEF264;
    transform: rotate(1deg);
    &:hover {
      transform: rotate(2deg) scale(1.025);
    }
  }
  .highlight-3 {
    background: #F0ABFC;
    transform: rotate(-1deg);
    &:hover {
      transform: rotate(-2deg) scale(1.025);
    }
  }
}

.record-player {
  svg {
    width: 16rem;
    height: 12rem;
    aspect-ratio: 3/4;
    border-radius: 0.5rem;

    animation-name: pulse;
    animation-duration: 0.75s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;

    #disk {
      transform-origin: 41.625% 50%;
      animation-name: spin;
      animation-duration: 10s;
      animation-iteration-count: infinite;
      animation-timing-function: linear;
    }

    #needle {
      transform-origin: 84% 21%;
      transform: rotate(30deg);
      transition: 0.5s ease;
    }

    #volume {
      transform: translateY(0%);
      transition: 0.5s ease;
    }

    &:hover {
      animation-play-state: paused;
      #volume {
        transform: translateY(15%);
      }
      #needle {
        transform: rotate(0deg);
      }
    }
  }
}

@keyframes spin {
  from {transform: rotate(0deg);}
  to {transform: rotate(360deg);}
}
@keyframes pulse {
  0% {transform: scale(1);}
  50% {transform: scale(0.99);}
  100% {transform: scale(1);}
}