/* HEADER */
.menu-toggle {
  display: none;
}

.menu-backdrop {
  display: none;
}

html.menu-open,
body.menu-open {
  overflow: hidden;
}

body.menu-open {
  background: var(--bg);
}

@media (max-width: 640px) {
  .hero-points {
    gap: 6px;
    font-size: 0.9rem;
  }
}

@media (max-width: 1200px) {
  .topbar {
    position: relative;
    z-index: 1000;
  }

  .topbar .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand {
    margin-left: 0;
    padding-left: 0;
    z-index: 1002;
  }

  .menu-toggle {
    display: inline-grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    place-content: center;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;

    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,0.06),
        rgba(255,255,255,0.02)
      ),
      rgba(7,21,46,0.25);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    cursor: pointer;
    z-index: 1002;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #dfe7f5;
  }

  .header-nav {
    display: none;

    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);

    width: 100vw;
    max-width: 100vw;
    padding: 24px 24px 32px;

    background:
      linear-gradient(
        180deg,
        #12386e 0%,
        #0b2a57 40%,
        var(--bg2) 75%,
        var(--bg) 100%
      );

    border-top: 1px solid rgba(255,255,255,0.08);

    box-shadow:
      0 24px 48px rgba(0,0,0,0.35),
      inset 0 1px 0 rgba(255,255,255,0.06);

    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;

    overflow: visible;

    z-index: 1001;
  }

  .header-nav::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -70px;

    height: 70px;

    background:
      linear-gradient(
        to bottom,
        var(--bg) 0%,
        rgba(7,21,46,0.85) 30%,
        rgba(7,21,46,0.45) 65%,
        rgba(7,21,46,0) 100%
      );

    pointer-events: none;
  }

  .header-nav.is-open {
    display: grid;
  }

  .header-link {
    width: auto;
    justify-content: center;
    text-align: center;
    padding: 10px 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .header-link::after {
    left: -12px;
    right: -12px;
  }

  .menu-backdrop {
    display: block;

    position: fixed;
    inset: 0;

    background:
      linear-gradient(
        180deg,
        rgba(7,21,46,0.15) 0%,
        rgba(7,21,46,0.45) 40%,
        rgba(7,21,46,0.75) 100%
      );

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;

    transition:
      opacity .25s ease,
      visibility .25s ease;

    z-index: 999;
  }

  .menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 640px) {
  .header-nav .header-link::after {
    left: 15%;
    right: 15%;
    opacity: 1;
    transform: scaleX(1);
  }
}



/*MAIN BANNER*/
@media (max-width: 640px) {
  .hero-content {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding-inline: 20px;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
  }

  .hero-content .sub {
    max-width: 40ch;
    margin-inline: auto;
  }

  .hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
  }

  .hero-cta .btn {
    width: min(280px, 100%);
    justify-content: center;
  }

  @media (max-width: 640px) {
  .hero-content h1 {
    max-width: 20ch;
    margin-inline: auto;
  }
}
}

/*O FIRME SECTION*/
@media (max-width: 640px) {
  .about-section .section-title,
  .about-section .section-text {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .about-section .section-title {
    max-width: 20ch;
    margin-inline: auto;
  }

  .about-section .section-text {
    max-width: 400px;
  }
}

/* PRICING + SERVICES MOBILE */

/* Hide carousel dots on desktop */
.pricing-dots,
.services-dots {
  display: none;
}

@media (max-width: 640px) {
  .pricing-carousel,
  .services-carousel {
    max-width: 100%;
    overflow: hidden;
  }

  .pricing-carousel {
    margin-top: 28px;
  }

  .services-carousel {
    margin-top: 34px;
  }

  .pricing-carousel .pricing-arrow,
  .services-carousel .pricing-arrow {
    display: none;
  }

  .cards,
  .services-cards {
    max-width: 100%;
    perspective: 1000px;
    touch-action: pan-y;
  }

  .cards {
    height: 390px;
    margin-top: 22px;
  }

  .services-cards {
    height: 500px;
    margin-top: 22px;
  }

  .card,
  .service {
    left: 50%;
  }

  .card {
    width: min(330px, calc(100% - 56px));
    min-height: 365px;
    padding: 20px 20px 18px;
  }

  .service {
    width: min(330px, calc(100% - 56px));
    min-height: 460px;
    padding: 22px 20px;
  }

  .card.is-active,
  .service.is-active {
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
  }

  .card.is-prev,
  .service.is-prev {
    opacity: 0.34;
    z-index: 1;
    pointer-events: none;
    transform: translateX(-122%) translateZ(-180px) rotateY(-34deg) scale(0.78);
  }

  .card.is-next,
  .service.is-next {
    opacity: 0.34;
    z-index: 1;
    pointer-events: none;
    transform: translateX(22%) translateZ(-180px) rotateY(34deg) scale(0.78);
  }

  .service.is-prev,
  .service.is-next {
    filter: none;
    -webkit-filter: none;
    border-color: rgba(255, 206, 10, 0.16);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
  }

  .service.is-prev > *,
  .service.is-next > * {
    opacity: 0.58;
    filter: blur(3px);
    -webkit-filter: blur(3px);
  }

  .service.is-active,
  .service.is-active > * {
    filter: none;
    -webkit-filter: none;
  }

  .card:not(.is-active):not(.is-prev):not(.is-next),
  .service:not(.is-active):not(.is-prev):not(.is-next) {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateZ(-260px) scale(0.7);
  }

  .pricing .section-text,
  .services-section .section-text {
    max-width: 34ch;
    margin-bottom: 0;
  }

  .card h3 {
    font-size: 30px;
  }

  .popular {
    top: 10px;
    right: 10px;
    gap: 3px;
    max-width: 104px;
    padding: 5px 6px;
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .popular::before {
    width: 9px;
    height: 9px;
    font-size: 7px;
  }

  .price {
    font-size: 23px;
    margin-bottom: 14px;
  }

  .card p.lead-card {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .card ul {
    gap: 9px;
    margin-bottom: 14px;
  }

  .included {
    padding-top: 12px;
    font-size: 15px;
  }

  .service h4 {
    font-size: 21px;
    line-height: 1.3;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .service p {
    font-size: 15px;
    line-height: 1.55;
  }

  .service .meta {
    font-size: 12px;
    line-height: 1.35;
    padding: 10px 12px;
  }

  .pricing-dots,
  .services-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
  }

  .pricing-dots input,
  .services-dots input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .pricing-dots label,
  .services-dots label {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    transition: width .22s ease, background .22s ease, border-color .22s ease;
  }

  .pricing-dots input:checked + label,
  .services-dots input:checked + label {
    width: 28px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-color: rgba(85,242,173,0.55);
  }

  .pricing .small-note {
    max-width: 34ch;
    margin-inline: auto;
    text-align: center;
  }

  /* Fix for Iphone highlighting blurred cards after few swipes */
  .service,
  .service > * {
    transition: none !important;
    animation: none !important;
  }

  .service {
    transition: transform .28s ease !important;
  }
}
