/* FrachtPlanner homepage: video-first hero, annotated screenshot, pricing. */

/* Hero: headline and CTA left, recording right. On mobile the recording
   sits between the headline and the CTA, so all three fit one screen. */
main .fp-hero .section-wrapper {
  display: grid;
  grid-template-columns: 5fr 6fr;
  grid-template-areas: "head video" "cta video";
  align-content: center;
  align-items: end;
  column-gap: 48px;
  min-height: 0;
  padding-bottom: 32px;

  & .hero-head {
    grid-area: head;
  }

  & h1 {
    margin-bottom: 24px;
    font-size: 38px;
    line-height: 1.12;
  }

  & span {
    margin-bottom: 16px;
  }

  & .hero-cta {
    grid-area: cta;
    align-self: start;
  }

  & .hero-video {
    grid-area: video;
    align-self: center;
    margin: 0;

    & video {
      display: block;
      width: 100%;
      height: auto;
      border-radius: 11px;
      background: #f1f1f1;
    }

    & figcaption {
      margin-top: 8px;
      font-size: 13px;
      line-height: 1.4;
      color: #666666;
    }
  }
}

@media (max-width: 800px) {
  main section.fp-hero {
    padding-top: 56px;
  }

  main .fp-hero .section-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "video" "cta";
    row-gap: 16px;

    & span {
      display: none;
    }

    & h1 {
      margin-bottom: 0;
      font-size: 26px;
    }

    & .hero-video figcaption {
      display: none;
    }

    & .cta-box {
      margin-bottom: 8px;
    }
  }
}

/* What you see: screenshot with numbered pins, the legend beside it. */
.fp-annotated {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: center;

  & figure {
    position: relative;
    margin: 0;
  }

  /* numbered badge: pins on the screenshot and the legend numbers */
  & .pin,
  & ol li::before {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 15px;
    font-weight: 600;
  }

  & .pin {
    margin: -16px 0 0 -16px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }

  /* pin positions match the screenshot: dojazd, trasa, km, czas, opłaty */
  & .pin:nth-of-type(1) { left: 81.5%; top: 26.5%; }
  & .pin:nth-of-type(2) { left: 52%; top: 23.6%; }
  & .pin:nth-of-type(3) { left: 47.1%; top: 78%; }
  & .pin:nth-of-type(4) { left: 66.9%; top: 78%; }
  & .pin:nth-of-type(5) { left: 79.5%; top: 78%; }

  & ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: pin;

    & li {
      position: relative;
      padding: 12px 0 12px 48px;
      border-bottom: 1px solid #dddddd;
      font-size: 18px;
      counter-increment: pin;

      &::before {
        content: counter(pin);
        left: 0;
        top: 10px;
      }
    }
  }
}

@media (max-width: 800px) {
  .fp-annotated {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .fp-annotated .pin {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    font-size: 12px;
  }
}

/* Pricing: two equal cards, the regular price pinned to the bottom of each. */
.fp-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 24px 0;
  padding: 0;
  list-style: none;

  & > li {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #dddddd;
    border-radius: 7px;
  }

  /* The annual price is the one we lead with. */
  & > .fp-price-best {
    border: 2px solid var(--success);
  }

  & strong {
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 600;
  }

  & p {
    font-size: 16px;
    line-height: 1.5;
    color: #555555;
  }

  & .fp-price-label {
    align-self: flex-start;
    margin-bottom: 16px;
    padding: 2px 10px;
    background: #e6faf4;
    border-radius: 50px;
    color: #006b4f;
    font-size: 14px;
    font-weight: 600;
  }

  & .fp-price-amount {
    font-size: 18px;
    color: #1c1c1c;

    & b {
      font-size: 44px;
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1.1;
    }
  }

  & .fp-price-saving {
    margin-top: 12px;
    font-weight: 600;
    color: #006b4f;
  }

  & .fp-price-regular {
    margin-top: auto;
    padding-top: 16px;
    font-size: 14px;
    color: #666666;
  }
}

.fp-price-terms {
  margin-bottom: 32px;
  padding: 24px;
  background: #f5f6f9;
  border-radius: 7px;

  & strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
  }

  & ul {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
  }
}

.fp-price-cta {
  text-align: center;

  & .cta-box {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
  }

  & small {
    font-size: 16px;
    color: #666666;
  }
}

@media (max-width: 800px) {
  /* The FAQ links here: clear the fixed header, which covers the section top. */
  #cennik {
    scroll-margin-top: 60px;
  }

  .fp-prices {
    grid-template-columns: 1fr;
  }
}
