/*
 * Homepage hero component.
 * Kept separate from main.css so the component can be moved into
 * a WordPress/ACF block without carrying unrelated site styles.
 */

@layer components {
  .hero {
    position: static;
    display: grid;
    min-height: 0;
    margin-bottom: 15px;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    background: transparent;
    isolation: auto;
  }

  .hero__content,
  .hero__visual {
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1.06;
    border-radius: clamp(1rem, 1.5vw, 1.5rem);
  }

  .hero__content {
    display: grid;
    padding: clamp(1.5rem, 3vw, 3rem);
    grid-template-rows: auto 1fr auto;
    gap: clamp(1.25rem, 2.5vh, 2.25rem);
    overflow: hidden;
    background: var(--color-block);
  }

  .hero__reviews {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 4rem;
    padding: 0.45rem 1rem 0.45rem 0.5rem;
    align-items: center;
    gap: 0.85rem;
    background: var(--color-white);
    border-radius: 999px;
  }

  .hero__avatars,
  .hero__service-thumbs {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
  }

  .hero__avatars span {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    overflow: hidden;
    border: 2px solid var(--color-white);
    border-radius: 50%;
  }

  .hero__avatars span + span {
    margin-left: -0.7rem;
  }

  .hero__avatars img,
  .hero__service-thumbs img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }

  .hero__avatars span:nth-child(1) img,
  .hero__service-thumbs span:nth-child(1) img {
    object-position: left center;
  }

  .hero__avatars span:nth-child(2) img,
  .hero__service-thumbs span:nth-child(2) img {
    object-position: center;
  }

  .hero__avatars span:nth-child(3) img,
  .hero__service-thumbs span:nth-child(3) img {
    object-position: right center;
  }

  .hero__review-copy p {
    font-size: clamp(0.72rem, 0.66rem + 0.18vw, 0.82rem);
    line-height: 1.25;
  }

  .hero__review-copy strong {
    color: var(--color-accent);
    font-weight: var(--font-weight-medium);
  }

  .hero__google-proof {
    display: flex;
    margin-top: 0.2rem;
    align-items: center;
    gap: 0.25rem;
    color: color-mix(in srgb, var(--color-text) 58%, transparent);
    font-size: 0.6rem;
    line-height: 1.2;
  }

  .hero__google-proof svg {
    width: 0.75rem;
    fill: none;
    stroke: #4285f4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
  }

  .hero__google-mark {
    background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 43%, #fbbc05 0 68%, #ea4335 0 82%, #4285f4 0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .hero__copy {
    position: static;
    z-index: auto;
    width: auto;
    align-self: center;
  }

  .hero h1 {
    display: grid;
    width: fit-content;
    max-width: 100%;
    line-height: 1;
  }

  .hero__title-kicker {
    display: block;
    width: fit-content;
    margin: 0 0 clamp(0.65rem, 1.4vh, 1rem);
    padding-right: 0.04em;
    justify-self: end;
    color: var(--color-text);
    font-size: clamp(0.9rem, 1.15vw, 1.15rem);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .hero__title-brand {
    display: block;
    color: var(--color-accent);
    font-size: clamp(4rem, 5.75vw, 6.75rem);
    line-height: 0.86;
    letter-spacing: -0.08em;
    white-space: nowrap;
  }

  .hero__offer {
    display: grid;
    margin-top: clamp(1.75rem, 3.5vh, 2.75rem);
    grid-template-columns: 1fr;
    align-items: start;
    gap: clamp(1.3rem, 2vh, 1.65rem);
  }

  .hero__text {
    max-width: 30rem;
    margin-top: 0;
    color: color-mix(in srgb, var(--color-text) 78%, transparent);
    font-size: clamp(0.96rem, 0.9rem + 0.16vw, 1.075rem);
    line-height: 1.45;
  }

  .hero__actions {
    display: flex;
    width: auto;
    flex-direction: row;
    align-items: stretch;
    gap: 0.65rem;
  }

  .hero__primary {
    display: inline-flex;
    width: clamp(9.5rem, 11vw, 10.75rem);
    min-width: 0;
    min-height: 3.125rem;
    padding-inline: 1.25rem 0.85rem;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    color: var(--color-white);
    background: var(--color-text);
    border-radius: 999px;
    font-size: clamp(0.75rem, 0.7rem + 0.12vw, 0.82rem);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    text-decoration: none;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
  }

  .hero__primary svg {
    width: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
  }

  .hero__primary:hover,
  .hero__primary:focus-visible {
    background: var(--color-accent);
    transform: translateY(-2px);
  }

  .hero__primary--book {
    background: var(--color-accent);
  }

  .hero__primary--book:hover,
  .hero__primary--book:focus-visible {
    background: var(--color-text);
  }

  .hero__bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(1rem, 2vw, 1.5rem);
  }

  .hero__service-thumbs span {
    flex: 0 0 auto;
    width: clamp(3rem, 4vw, 4rem);
    height: clamp(3rem, 4vw, 4rem);
    overflow: hidden;
    border: 3px solid var(--color-block);
    border-radius: 50%;
  }

  .hero__service-thumbs span + span {
    margin-left: -0.3rem;
  }

  .hero__bottom > p {
    max-width: none;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.35vw, 1.35rem);
    font-weight: var(--font-weight-medium);
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-align: left;
  }

  .hero__bottom em {
    display: block;
    color: var(--color-accent);
    font-style: normal;
  }

  .hero__visual {
    margin: 0;
    overflow: hidden;
    background: var(--color-neutral);
  }

  .hero__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% top;
  }

  .hero::after {
    content: none;
  }
}

@media (max-width: 48rem) {
  @layer components {
    .hero {
      min-height: 0;
      grid-template-columns: 1fr;
    }

    .hero__content,
    .hero__visual {
      min-height: auto;
      aspect-ratio: auto;
    }

    .hero__content {
      min-height: 0;
      padding: clamp(1.5rem, 6vw, 3rem);
      grid-template-rows: auto auto;
      align-content: start;
      gap: clamp(1.5rem, 6vw, 2.25rem);
    }

    .hero__copy {
      align-self: start;
    }

    .hero h1 {
      max-width: 100%;
    }

    .hero__title-kicker {
      font-size: clamp(0.85rem, 3.4vw, 1.05rem);
    }

    .hero__title-brand {
      font-size: clamp(3rem, 13vw, 4.75rem);
    }

    .hero__offer {
      grid-template-columns: 1fr;
      align-items: start;
    }

    .hero__actions {
      width: 100%;
      flex-direction: row;
      gap: 0.65rem;
    }

    .hero__primary {
      min-width: 0;
      flex: 1 1 0;
      padding-inline: 1rem 0.75rem;
      gap: 0.5rem;
    }

    .hero__bottom {
      display: none;
    }

    .hero__visual {
      min-height: 0;
      aspect-ratio: 1;
    }
  }
}

@media (max-width: 32rem) {
  @layer components {
    .hero__reviews {
      align-items: flex-start;
      border-radius: 1.25rem;
    }

    .hero__google-proof {
      max-width: 12rem;
    }

    .hero__bottom {
      align-items: flex-start;
      flex-direction: column;
    }

    .hero__bottom > p {
      max-width: 14ch;
      text-align: left;
    }
  }
}
