:root {
  --blue-400: hsl(180, 66%, 49%);
  --blue-400-light: hsl(180, 66%, 65%);
  --blue-400-dark: hsl(180, 66%, 40%);
  --purple-950: hsl(257, 27%, 26%);
  --red-400: hsl(0, 87%, 67%);

  --gray-400: hsl(0, 0%, 75%);
  --gray-500: hsl(257, 7%, 63%);
  --gray-900: hsl(255, 11%, 22%);
  --gray-950: hsl(260, 8%, 14%);
  --off-white: hsl(225, 33%, 97%);
  --white: hsl(0, 0%, 100%);

  --font: "Poppins", sans-serif;
  --font-size-body: 1.125rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-body);
  font-weight: 500;
  color: var(--gray-500);
  background-color: var(--white);
  overflow-x: hidden;
}

.btn-primary-teal {
  display: inline-block;
  background-color: var(--blue-400);
  color: var(--white);
  font-family: var(--font);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-primary-teal:hover {
  background-color: var(--blue-400-light);
  color: var(--white);
}
.btn-primary-teal:active {
  transform: scale(0.97);
}

.btn-cyan {
  font-size: 0.9375rem;
  border-radius: 100px;
  padding: 0.6875rem 1.75rem;
}

.btn-shorten {
  font-size: var(--font-size-body);
  border-radius: 10px;
  padding: 1rem 2.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy {
  font-size: 0.875rem;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  white-space: nowrap;
  min-width: 100px;
}

.btn-copy.copied {
  background-color: var(--purple-950);
}

.navbar {
  padding: 2rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.625rem;
  color: var(--gray-900) !important;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-500) !important;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--gray-900) !important;
}

.navbar-toggler {
  border: none;
  padding: 0;
}
.navbar-toggler:focus {
  box-shadow: none;
}

.hero-section {
  padding: 3rem 0 6rem;
  overflow: visible;
}

.hero-svg {
  width: 100%;
  max-width: 560px;
  position: relative;
  right: -20px;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.1;
  color: var(--gray-900);
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: var(--font-size-body);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 2rem;
}

.shorten-section {
  background-color: var(--off-white);
  padding-bottom: 2rem;
}

.shorten-card {
  background-color: var(--purple-950);
  border-radius: 10px;
  padding: 4rem 4rem;
  position: relative;
  overflow: hidden;
  background-image: url(images/bg-shorten-desktop.svg);
  background-size: cover;
}

.shorten-input-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.shorten-input-group {
  flex: 1;
}

.shorten-input {
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 10px;
  border: 3px solid transparent;
  font-family: var(--font);
  font-size: var(--font-size-body);
  font-weight: 500;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.2s;
}

.shorten-input::placeholder {
  color: hsl(257, 7%, 75%);
}
.shorten-input:focus {
  border-color: var(--blue-400);
}
.shorten-input.is-invalid {
  border-color: var(--red-400) !important;
  color: var(--red-400);
}
.shorten-input.is-invalid::placeholder {
  color: hsla(0, 87%, 67%, 0.5);
}

.shorten-error {
  display: none;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--red-400);
  margin-top: 0.375rem;
  padding-left: 0.25rem;
}

.shorten-error.visible {
  display: block;
}

.results-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-item {
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
  animation: slideIn 0.3s ease forwards;
}

.result-original {
  color: var(--gray-900);
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.result-divider {
  width: 100%;
  height: 1px;
  background: var(--off-white);
  display: none;
}

.result-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.result-short {
  color: var(--blue-400);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.result-short:hover {
  text-decoration: underline;
  color: var(--blue-400-dark);
}

.stats-section {
  background-color: var(--off-white);
  padding: 5rem 0 6rem;
}

.stats-title {
  font-weight: 700;
  font-size: clamp(1.625rem, 3vw, 2.5rem);
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.stats-subtitle {
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 5rem;
  line-height: 1.75;
}

.features-row {
  position: relative;
}

.features-row::before {
  content: "";
  position: absolute;
  top: 88px;
  left: calc(16.666% + 60px);
  right: calc(16.666% + 60px);
  height: 8px;
  background-color: var(--blue-400);
  z-index: 0;
}

.feature-card {
  background: var(--white);
  border-radius: 8px;
  padding: 4.5rem 2rem 2.5rem;
  position: relative;
  z-index: 1;
  height: 100%;
}

.feature-card:nth-child(2) {
  margin-top: 2.5rem;
}
.feature-card:nth-child(3) {
  margin-top: 5rem;
}

.feature-icon-wrap {
  position: absolute;
  top: -2.5rem;
  left: 2rem;
  width: 5.5rem;
  height: 5.5rem;
  background-color: var(--purple-950);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon-wrap svg {
  width: 2.5rem;
  height: 2.5rem;
}

.feature-title {
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.feature-text {
  font-size: 0.9375rem;
  line-height: 1.75;
}

.cta-section {
  background-color: var(--purple-950);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: url("images/bg-boost-desktop.svg");
  background-size: cover;
  background-position: center;
}

.cta-title {
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--white);
  margin-bottom: 2rem;
}

footer {
  background-color: var(--gray-950);
  padding: 4rem 0;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.625rem;
  color: var(--white);
}

.footer-col-title,
.footer-link {
  font-size: 0.9375rem;
}

.footer-col-title {
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-link {
  display: block;
  color: var(--gray-500);
  text-decoration: none;
  margin-bottom: 0.625rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--blue-400);
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

.social-icon {
  color: var(--white);
  font-size: 1.375rem;
  transition: color 0.2s;
}

.social-icon:hover {
  color: var(--blue-400);
}

.spinner-border-sm-custom {
  width: 1.1rem;
  height: 1.1rem;
  border-width: 2px;
}

@media (max-width: 991.98px) {
  .nav-auth-divider {
    display: none;
  }

  .navbar-collapse {
    background: var(--purple-950);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 1rem;
    text-align: center;
  }

  .navbar-collapse .nav-link {
    color: var(--white) !important;
    padding: 0.5rem 0;
    font-size: var(--font-size-body);
  }

  .navbar-collapse .nav-link:hover {
    color: var(--blue-400) !important;
  }

  .navbar-collapse .nav-sep {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 1rem 0;
  }

  .btn-signup-nav {
    width: 100%;
  }
  .btn-login-nav {
    color: var(--white) !important;
  }

  .hero-section {
    padding: 2rem 0 4rem;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-illustration-wrap {
    order: -1;
    margin-bottom: 2rem;
  }
  .hero-illustration-wrap img {
    right: -20px;
    max-width: 100%;
  }

  .features-row::before {
    top: 120px;
    left: 50%;
    right: auto;
    width: 8px;
    height: calc(100% - 120px);
    transform: translateX(-50%);
  }

  .feature-card {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .feature-card:nth-child(2),
  .feature-card:nth-child(3) {
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  .feature-icon-wrap {
    position: static;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .shorten-card {
    padding: 1.5rem;
    background-image: url("images/bg-shorten-mobile.svg");
  }

  .shorten-input-wrap {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-shorten {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }

  .features-row::before {
    top: 100px;
    height: calc(100% - 120px);
  }

  .result-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
  }

  .result-divider {
    display: block;
  }

  .result-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .btn-copy {
    width: 100%;
    text-align: center;
    padding: 0.625rem;
  }

  .footer-brand {
    display: block;
    text-align: center;
    margin-bottom: 2.5rem;
  }
  .footer-col-group {
    margin-bottom: 2rem;
  }
  .social-icons {
    justify-content: center;
  }

  footer .text-start {
    text-align: center !important;
  }
  footer .footer-cols {
    text-align: center;
  }
}
