@import url("./assets/site-experience.css");

/* Shared visual polish loaded everywhere through the bilingual shell stylesheet. */
.age-gate { transition: opacity .17s ease; }
.age-gate.is-leaving { opacity: 0; pointer-events: none; }

/* Use Gabriel's transparent horizontal FRISKD export while retaining the legacy raster only as a sizing fallback. */
.site-header .brand-picture,
.footer-wordmark .brand-picture {
  background-image: url("./assets/brand/logo-friskd-wd-transp.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

/*
 * The transparent artwork is painted on the picture element while the raster
 * image underneath stays invisible and supplies layout dimensions. Scale the
 * actual visible picture, not only the hidden image, so the wordmark grows
 * without increasing the sticky header's layout height.
 */
.site-header .brand-picture {
  transform: scale(1.46);
  transform-origin: left center;
}

.site-header .brand-logo,
.footer-wordmark .brand-logo {
  opacity: 0;
}

/* Bilingual shell: user-controlled EN/ES switch without automatic redirects. */
.top-nav .nav-cta {
  order: 1;
}

.top-nav .language-switch {
  order: 2;
  min-width: 44px;
  justify-content: center;
  padding-inline: 11px;
  margin-inline: 3px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: #ededf1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 6px 18px rgba(0,0,0,.16);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.top-nav .language-switch:hover,
.top-nav .language-switch:focus-visible {
  border-color: rgba(255, 92, 124, .38);
  background: rgba(255, 92, 124, .09);
  color: var(--text);
}

/*
 * Desktop shell: keep the FRISKD wordmark exactly where it is, center the four
 * navigation actions across the whole header rail, and pin language choice to
 * the far right so it reads as a utility rather than another navigation item.
 */
@media (min-width: 821px) {
  .site-header .top-nav {
    position: absolute;
    inset-inline: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    pointer-events: none;
  }

  .site-header .top-nav > a {
    pointer-events: auto;
  }

  .site-header .top-nav > a:nth-of-type(1) { grid-column: 2; }
  .site-header .top-nav > a:nth-of-type(2) { grid-column: 3; }
  .site-header .top-nav > a:nth-of-type(3) { grid-column: 4; }

  .site-header .top-nav .nav-cta {
    grid-column: 5;
    order: 0;
  }

  .site-header .top-nav .language-switch {
    position: absolute;
    top: 50%;
    right: 0;
    margin: 0;
    order: 0;
    transform: translateY(-50%);
  }
}

/* Pull the opening signal slightly closer to the header without crowding it. */
.hero-v4 {
  padding-top: clamp(78px, 8vw, 114px);
}

html[lang="es"] .hero-v4-copy,
html[lang="es"] .capture-heading > p,
html[lang="es"] .v4-principle-grid p,
html[lang="es"] .policy-copy,
html[lang="es"] .policy-hero > p:last-child {
  text-wrap: pretty;
}

@media (max-width: 820px) {
  .site-header .brand-picture {
    transform: scale(1.62);
  }

  .top-nav .language-switch {
    display: inline-flex !important;
  }
}

@media (max-width: 680px) {
  .hero-v4 {
    padding-top: 64px;
  }
}

@media (max-width: 620px) {
  .site-header > .wordmark {
    align-self: center;
    margin-inline: auto;
  }

  .site-header .brand-picture {
    transform: scale(1.66);
    transform-origin: center center;
  }

  /*
   * Mobile shell: center the wordmark in the first row and the navigation in
   * the second. Language choice stays pinned at the right edge of the brand
   * row without participating in layout height.
   */
  .top-nav {
    position: static;
    display: flex;
    width: 100%;
    flex: none;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: visible;
    padding: 0 1px 1px;
  }

  .top-nav > a:not(.language-switch) {
    flex: 0 0 auto;
  }

  .top-nav .language-switch {
    position: absolute;
    top: 10px;
    right: 11px;
    z-index: 2;
    min-width: 42px;
    min-height: 34px;
    margin: 0;
    padding: 0 10px;
    border-color: rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .055);
    font-size: .7rem;
    letter-spacing: .11em;
  }

  /* A single centered mobile footer reads more cleanly than three left rails. */
  .site-footer-v4 {
    justify-items: center;
    text-align: center;
  }

  .footer-brand,
  .footer-links,
  .footer-connect {
    justify-self: center;
  }

  .footer-wordmark {
    justify-content: center;
  }

  .footer-links {
    justify-items: center;
  }

  .social-dock {
    justify-content: center;
  }

  .footer-email {
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  .top-nav {
    gap: 4px;
  }

  .top-nav > a:not(.language-switch) {
    padding-inline: clamp(5px, 2vw, 9px);
    font-size: clamp(.68rem, 2.55vw, .76rem);
  }
}
