/* index.css */

/* Link Grid */

.link-grid {
  display: flex;
  justify-content: center;
  gap: 70px;
  font-family: "franklin-gothic-atf", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 33px;
  z-index: 1;
  margin-top: 20px;
  margin-top: 40px;
  position: relative;
}

.link-grid a {
  text-decoration: none;
  text-transform: none;
  font-variant: normal;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.link-grid a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.link-grid a:hover::after {
  width: 100%;
}

.link-grid a:hover {
  transform: translateY(-3px);
}

.link-grid a:nth-child(1):hover {
  color: rgb(236, 22, 22);
}

.link-grid a:nth-child(2):hover {
  color: rgb(29, 29, 217);
}

.link-grid a:nth-child(3):hover {
  color: rgb(19, 187, 19);
}

.link-grid a:nth-child(4):hover {
  color: rgb(243, 175, 17);
}

.link-grid a:nth-child(5):hover {
  color: rgb(255, 0, 136);
}

.link-grid a:nth-child(6):hover {
  color: rgb(10, 214, 211);
}



/* Animations */


/* Design Rectangle Animation */

#design-rect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.2);
  width: 90%;
  max-width: 850px;
  height: 300px;
  display: block;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

#design-rect .rect-stroke {
  fill: none;
  stroke: #4f7fff;
  stroke-width: 3px;
  stroke-miterlimit: 10;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

#design-rect .corner-square {
  fill: #fff;
  stroke: #4f7fff;
  stroke-width: 0.5px;
  stroke-miterlimit: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}


#design-rect.visible {
  opacity: 1;
}

#design-rect.visible .corner-square {
  opacity: 1;
}

/* Film Animation (Help from Claude) */

#film-camera {
  position: absolute;
  bottom: -50px;
  right: 10%;
  width: 160px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: none;
}

#film-camera.visible {
  animation: cameraAppear 2.0s ease forwards;
}

@keyframes cameraAppear {
  0% {
    opacity: 0;
    bottom: -40px;
  }

  15% {
    opacity: 1;
    bottom: 80px;
  }

  65% {
    opacity: 1;
    bottom: 80px;
  }

  100% {
    opacity: 0;
    bottom: -40px;
  }
}


#film-flash {
  position: absolute;
  bottom: 80px;
  right: 0%;
  width: 200px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  /* On top of everything */
  transform: scale(0.5);
  transition: none;
}

#film-flash.visible {
  animation: flashBurst 1.8s ease forwards;
}

@keyframes flashBurst {

  0%,
  40% {
    opacity: 0;
    transform: scale(0.5);
  }

  /* Flash bursts out */
  50% {
    opacity: 1;
    transform: scale(1.2);
  }

  /* Quickly fades */
  65% {
    opacity: 0;
    transform: scale(1.5);
  }

  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}


/* Video Effect (Help from Claude)  */

.video-text-wrapper {
  position: relative;
  display: inline-block;
  min-height: 120px;
}

#name-title {
  font-family: "franklin-gothic-atf", sans-serif;
  font-size: 120px;
  font-weight: 800;
  color: black;
  margin: 0;
  position: relative;
  z-index: 2;
  transition: color 0.2s ease;
  min-height: 120px;
  height: 120px;
  line-height: 120px;
  display: flex;
  justify-content: center;
  min-width: 900px;
  align-items: center;
}

#name-title span {
  transition: all 0.2s ease;
}

.video-mask-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.video-active .video-mask-svg {
  opacity: 1;
}

.video-active #name-title {
  opacity: 0;
}


/* Draw Animation (Help from ChatGPT) */

#graffiti {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 1000px;
  height: auto;
  display: block;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

#graffiti path {
  fill: none;
  stroke: red;
  stroke-width: 4;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 3s ease-out;
}

/* Fade in when active */
#graffiti.visible {
  opacity: 1;
}

/* Animation for Contact */

#mailbox-flag {
  position: absolute;
  top: -25px;
  right: 36px;
  width: 25px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transform-origin: 20% 95%;
  transform: rotate(180deg);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#mailbox-flag.visible {
  opacity: 1;
  transform: rotate(0deg);
}

.flag-path {
  fill: #cc1515;
}





/* ======== RESPONSIVE STYLES ======== */

/* ——— Large Tablets (992px - 1200px) ——— */
@media (max-width: 1200px) {
  #name-title {
    font-size: 100px;
    min-width: 750px;
    height: 100px;
    line-height: 100px;
    min-height: 100px;
  }
  
  .video-text-wrapper {
    min-height: 100px;
  }
  
  .link-grid {
    gap: 50px;
    font-size: 30px;
  }
  
  #design-rect {
    max-width: 750px;
  }
  
  #graffiti {
    max-width: 850px;
  }
}

/* ——— Tablets (768px - 992px) ——— */
@media (max-width: 992px) {
  #name-title {
    font-size: 80px;
    min-width: 600px;
    height: 80px;
    line-height: 80px;
    min-height: 80px;
  }
  
  .video-text-wrapper {
    min-height: 80px;
  }
  
  .link-grid {
    gap: 40px;
    font-size: 26px;
    margin-top: 32px;
  }
  
  #design-rect {
    max-width: 650px;
    transform: translate(-50%, -50%) scale(1.1);
  }
  
  #graffiti {
    max-width: 700px;
    width: 85%;
  }
  
  #film-camera {
    width: 130px;
    bottom: -40px;
  }
  
  #film-camera.visible {
    animation: cameraAppearTablet 2.0s ease forwards;
  }
  
  @keyframes cameraAppearTablet {
    0% {
      opacity: 0;
      bottom: -35px;
    }
    15% {
      opacity: 1;
      bottom: 60px;
    }
    65% {
      opacity: 1;
      bottom: 60px;
    }
    100% {
      opacity: 0;
      bottom: -35px;
    }
  }
  
  #film-flash {
    width: 160px;
    bottom: 60px;
  }
  
  #mailbox-flag {
    width: 22px;
    top: -20px;
    right: 28px;
  }
}

/* ——— Mobile Landscape (481px - 768px) ——— */
@media (max-width: 768px) {
  #name-title {
    font-size: 60px;
    min-width: 450px;
    height: 60px;
    line-height: 60px;
    min-height: 60px;
  }
  
  .video-text-wrapper {
    min-height: 60px;
  }
  
  .link-grid {
    gap: 30px;
    font-size: 22px;
    margin-top: 28px;
    flex-wrap: wrap;
  }
  
  .link-grid a::after {
    bottom: -3px;
    height: 1.5px;
  }
  
  .link-grid a:hover {
    transform: translateY(-2px);
  }
  
  #design-rect {
    max-width: 500px;
    transform: translate(-50%, -50%) scale(1);
  }
  
  #graffiti {
    max-width: 550px;
    width: 90%;
  }
  
  #graffiti path {
    stroke-width: 3;
  }
  
  #film-camera {
    width: 100px;
    bottom: -30px;
    right: 8%;
  }
  
  #film-camera.visible {
    animation: cameraAppearMobile 2.0s ease forwards;
  }
  
  @keyframes cameraAppearMobile {
    0% {
      opacity: 0;
      bottom: -30px;
    }
    15% {
      opacity: 1;
      bottom: 45px;
    }
    65% {
      opacity: 1;
      bottom: 45px;
    }
    100% {
      opacity: 0;
      bottom: -30px;
    }
  }
  
  #film-flash {
    width: 130px;
    bottom: 45px;
  }
  
  #mailbox-flag {
    width: 18px;
    top: -15px;
    right: 22px;
  }
}

/* ——— Mobile Portrait (up to 480px) ——— */
@media (max-width: 480px) {
  .container {
    padding: 20px 0;
  }
  
  #name-title {
    font-size: 48px;
    min-width: 350px;
    height: 48px;
    line-height: 48px;
    min-height: 48px;
  }
  
}