/*==================================================
    FAREWELL WEBSITE
    STYLE.CSS - PART 1
==================================================*/

/*==============================
RESET
==============================*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #60a5fa;
  --secondary: #2563eb;
  --white: #ffffff;
  --text: #e5e7eb;

  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);

  --shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  height: 100%;

  overflow: hidden;

  font-family: "Poppins", sans-serif;

  background: #020617;

  color: white;
}

/*==============================
BODY LIGHT EFFECT
==============================*/

body::before {
  content: "";

  position: fixed;

  left: var(--mouseX, 50%);
  top: var(--mouseY, 50%);

  width: 450px;
  height: 450px;

  transform: translate(-50%, -50%);

  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.15),
    transparent 70%
  );

  pointer-events: none;

  z-index: 1;

  transition: 0.08s;
}

/*==============================
BACKGROUND
==============================*/

.background {
  position: fixed;

  inset: 0;

  overflow: hidden;
}

.slide {
  position: absolute;

  inset: 0;

  background-size: cover;

  background-position: center;

  opacity: 0;

  transform: scale(1);

  transition: opacity 2s ease;
}

.slide.active {
  opacity: 1;

  animation: kenburns 10s linear forwards;
}

@keyframes kenburns {
  from {
    transform: scale(1) rotate(0.3deg);
  }

  to {
    transform: scale(1.15) rotate(-0.3deg);
  }
}

/*==============================
OVERLAY
==============================*/

.overlay {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.35);
}

.overlay-gradient {
  position: absolute;

  inset: 0;

  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.2),
    rgba(2, 6, 23, 0.55),
    rgba(2, 6, 23, 0.95)
  );
}

.overlay-vignette {
  position: absolute;

  inset: 0;

  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.8);
}

/*==============================
AURORA
==============================*/

.background::before {
  content: "";

  position: absolute;

  width: 900px;
  height: 900px;

  left: -200px;
  top: -250px;

  border-radius: 50%;

  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%);

  filter: blur(90px);

  animation: auroraOne 18s ease-in-out infinite alternate;
}

.background::after {
  content: "";

  position: absolute;

  width: 800px;
  height: 800px;

  right: -150px;
  bottom: -250px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.22),
    transparent 70%
  );

  filter: blur(90px);

  animation: auroraTwo 20s ease-in-out infinite alternate;
}

@keyframes auroraOne {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(180px, 120px);
  }
}

@keyframes auroraTwo {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(-180px, -100px);
  }
}

/*==============================
HERO
==============================*/

.hero {
  position: relative;

  z-index: 5;

  width: 100%;
  height: 100vh;

  display: flex;

  justify-content: center;

  align-items: center;

  text-align: center;

  padding: 40px;
}

/*==============================
HERO CONTENT
==============================*/

.hero-content {
  max-width: 820px;

  animation: heroFade 1.6s ease;
}

@keyframes heroFade {
  from {
    opacity: 0;

    transform: translateY(40px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

/*==============================
TAG
==============================*/

.tag {
  display: inline-block;

  padding: 10px 24px;

  border-radius: 50px;

  background: rgba(255, 255, 255, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.15);

  letter-spacing: 4px;

  font-size: 13px;

  text-transform: uppercase;

  backdrop-filter: blur(20px);
}

/*==============================
TITLE
==============================*/

.hero-content h1 {
  margin-top: 30px;

  font-size: 84px;

  font-weight: 700;

  line-height: 1;

  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.hero-content h2 {
  margin-top: 18px;

  font-size: 34px;

  font-weight: 300;

  color: #dbeafe;
}

.hero-content p {
  margin: 30px auto;

  max-width: 700px;

  line-height: 1.9;

  color: #f1f5f9;

  font-size: 18px;

  opacity: 0.9;
}

/*==================================================
    BUTTON
==================================================*/

#playButton {
  position: relative;

  overflow: hidden;

  margin-top: 35px;

  padding: 18px 42px;

  border: none;

  border-radius: 60px;

  cursor: pointer;

  color: #fff;

  font-size: 17px;

  font-weight: 600;

  letter-spacing: 1px;

  background: linear-gradient(135deg, #2563eb, #60a5fa);

  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.45);

  transition: 0.35s;
}

#playButton span {
  margin-right: 12px;
}

#playButton:hover {
  transform: translateY(-6px) scale(1.03);

  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.6);
}

#playButton::before {
  content: "";

  position: absolute;

  top: 0;

  left: -120%;

  width: 60%;

  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );

  transform: skewX(-25deg);
}

#playButton:hover::before {
  animation: shine 0.9s;
}

@keyframes shine {
  to {
    left: 150%;
  }
}

/*==================================================
    SCROLL INDICATOR
==================================================*/

.scroll-indicator {
  position: absolute;

  left: 50%;

  bottom: 35px;

  transform: translateX(-50%);

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 12px;

  z-index: 8;
}

.scroll-indicator::before {
  content: "SCROLL";

  font-size: 11px;

  letter-spacing: 3px;

  opacity: 0.8;
}

.scroll-indicator span {
  display: block;

  width: 28px;

  height: 48px;

  border: 2px solid rgba(255, 255, 255, 0.6);

  border-radius: 30px;

  position: relative;
}

.scroll-indicator span::before {
  content: "";

  position: absolute;

  left: 50%;

  top: 8px;

  width: 5px;

  height: 8px;

  border-radius: 20px;

  background: white;

  transform: translateX(-50%);

  animation: scrollMove 2s infinite;
}

@keyframes scrollMove {
  0% {
    opacity: 0;

    top: 8px;
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    top: 26px;
  }
}

/*==================================================
    PARTICLES
==================================================*/

#particles {
  position: fixed;

  inset: 0;

  pointer-events: none;

  z-index: 2;
}

.particle {
  position: absolute;

  width: 4px;

  height: 4px;

  border-radius: 50%;

  background: white;

  opacity: 0.4;

  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  from {
    transform: translateY(0);

    opacity: 0;
  }

  20% {
    opacity: 0.5;
  }

  100% {
    transform: translateY(-120vh);

    opacity: 0;
  }
}

/*==================================================
    LOADER
==================================================*/

#loader {
  position: fixed;

  inset: 0;

  background: #020617;

  display: flex;

  justify-content: center;

  align-items: center;

  flex-direction: column;

  z-index: 99999;

  transition: 1s;
}

.loader-circle {
  width: 90px;

  height: 90px;

  border-radius: 50%;

  border: 4px solid rgba(255, 255, 255, 0.15);

  border-top-color: #60a5fa;

  animation: spin 1s linear infinite;
}

#loader h2 {
  margin-top: 25px;

  letter-spacing: 4px;

  font-weight: 300;

  font-size: 18px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/*==================================================
    HERO ANIMATION
==================================================*/

.hero-content > * {
  opacity: 0;

  transform: translateY(25px);

  animation: fadeUp 0.8s forwards;
}

.hero-content > *:nth-child(1) {
  animation-delay: 0.3s;
}

.hero-content > *:nth-child(2) {
  animation-delay: 0.6s;
}

.hero-content > *:nth-child(3) {
  animation-delay: 0.9s;
}

.hero-content > *:nth-child(4) {
  animation-delay: 1.2s;
}

.hero-content > *:nth-child(5) {
  animation-delay: 1.5s;
}

@keyframes fadeUp {
  to {
    opacity: 1;

    transform: none;
  }
}

/*==================================================
    VIDEO MODAL
==================================================*/

.video-modal {
  position: fixed;

  inset: 0;

  display: flex;

  justify-content: center;

  align-items: center;

  opacity: 0;

  visibility: hidden;

  transition: 0.5s ease;

  z-index: 9999;
}

.video-modal.active {
  opacity: 1;

  visibility: visible;
}

/*==================================================
    VIDEO BACKDROP
==================================================*/

.video-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.82);

  backdrop-filter: blur(18px);
}

/*==================================================
    VIDEO CONTAINER
==================================================*/

.video-container {
  position: relative;

  width: min(1200px, 92vw);

  border-radius: 28px;

  overflow: hidden;

  transform: scale(0.75);

  opacity: 0;

  transition: 0.45s ease;

  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-modal.active .video-container {
  transform: scale(1);

  opacity: 1;
}

/*==================================================
    VIDEO SHINE
==================================================*/

.video-container::before {
  content: "";

  position: absolute;

  left: -120%;

  top: 0;

  width: 40%;

  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );

  transform: skewX(-25deg);

  animation: videoShine 8s infinite;

  z-index: 2;
}

@keyframes videoShine {
  0% {
    left: -120%;
  }

  25% {
    left: 150%;
  }

  100% {
    left: 150%;
  }
}

/*==================================================
    VIDEO
==================================================*/

.video-container video {
  width: 100%;

  display: block;

  background: #000;
}

/*==================================================
    CLOSE BUTTON
==================================================*/

#closeVideo {
  position: absolute;

  top: 18px;

  right: 18px;

  width: 48px;

  height: 48px;

  border: none;

  border-radius: 50%;

  cursor: pointer;

  color: white;

  font-size: 20px;

  background: rgba(255, 255, 255, 0.15);

  backdrop-filter: blur(15px);

  transition: 0.35s;

  z-index: 5;
}

#closeVideo:hover {
  transform: rotate(90deg);

  background: #ef4444;
}

/*==================================================
    ENDING
==================================================*/

#ending {
  position: fixed;

  inset: 0;

  display: flex;

  justify-content: center;

  align-items: center;

  background: linear-gradient(rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.98));

  backdrop-filter: blur(18px);

  opacity: 0;

  visibility: hidden;

  transition: 0.7s;

  z-index: 10000;
}

#ending.show {
  opacity: 1;

  visibility: visible;
}

/*==================================================
    ENDING CARD
==================================================*/

.ending-card {
  text-align: center;

  max-width: 700px;

  padding: 60px;
}

.ending-card h2 {
  font-size: 64px;

  line-height: 1.2;

  margin-bottom: 30px;
}

.ending-card p {
  font-size: 20px;

  color: #dbeafe;

  line-height: 1.9;

  margin-bottom: 40px;
}

/*==================================================
    REPLAY BUTTON
==================================================*/

#replayButton {
  padding: 18px 36px;

  border: none;

  border-radius: 60px;

  background: linear-gradient(135deg, #2563eb, #60a5fa);

  color: #fff;

  cursor: pointer;

  font-size: 17px;

  font-weight: 600;

  transition: 0.35s;
}

#replayButton:hover {
  transform: translateY(-4px);

  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.45);
}

/*==================================================
    RESPONSIVE
==================================================*/

@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 64px;
  }

  .hero-content h2 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 25px;
  }

  .hero-content h1 {
    font-size: 46px;
  }

  .hero-content h2 {
    font-size: 22px;
  }

  .hero-content p {
    font-size: 16px;

    line-height: 1.7;
  }

  #playButton {
    width: 100%;
  }

  .video-container {
    width: 96vw;
  }

  .ending-card {
    padding: 35px;
  }

  .ending-card h2 {
    font-size: 42px;
  }

  .ending-card p {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content h2 {
    font-size: 19px;
  }

  .tag {
    font-size: 11px;

    letter-spacing: 2px;
  }
}

/*==========================================
    TYPEWRITER EFFECT
==========================================*/

#typingName,
#typingText {
  overflow: hidden;

  white-space: nowrap;
}

#typingName {
  min-height: 95px;
}

#typingText {
  min-height: 45px;
}

.cursor {
  display: inline-block;

  margin-left: 4px;

  animation: blink 0.8s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
