/* ==============================
   DUGOOD CHECKING HERO
   ============================== */

.dg-checking-hero,
.dg-checking-hero *,
.dg-checking-hero *::before,
.dg-checking-hero *::after {
  box-sizing: border-box;
}

.dg-checking-hero {
  --dg-green-dark: #005c36;
  --dg-green: #006633;
  --dg-green-light: #00a657;
  --dg-gold: #f8ba32;
  --dg-white: #ffffff;

  position: relative;
  isolation: isolate;
  min-height: clamp(580px, 46vw, 720px);
  overflow: hidden;
  color: var(--dg-white);
  background-color: var(--dg-green-dark);
}

/* Full-width green artwork */

.dg-checking-hero__background {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  left: -350px;
  object-position: center;
}

/* Protects text contrast without hiding the artwork */

.dg-checking-hero__shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(0, 49, 29, 0.28) 0%,
      rgba(0, 49, 29, 0.13) 37%,
      rgba(0, 49, 29, 0) 62%
    );
}

/* Content container */

.dg-checking-hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  width: min(calc(100% - 48px), 1440px);
  min-height: inherit;
  margin-inline: auto;
}

.dg-checking-hero__content {
  width: 43%;
  max-width: 610px;
  padding-block: clamp(72px, 8vw, 128px);
}

.dg-checking-hero__eyebrow {
  margin: 0 0 18px;
  color: var(--dg-gold);
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.dg-checking-hero__title {
  max-width: 600px;
  margin: 0;
  color: var(--dg-white);
  font-size: clamp(3.25rem, 3.4vw, 3.6rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1;
}

.dg-checking-hero__description {
  max-width: 550px;
  margin: 28px 0 0;
  color: var(--dg-white);
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  line-height: 1.55;
}

.dg-checking-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  margin-top: 36px;
}

.dg-checking-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 30px;
  color: var(--dg-green) !important;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background-color: var(--dg-white);
  border: 2px solid var(--dg-green);
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(0, 43, 26, 0.2);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.dg-checking-hero__button:hover {
  transform: translateY(-2px);
}

.dg-checking-hero__secondary-link {
  color: var(--dg-white) !important;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color 180ms ease;
  text-decoration: underline !important;
  margin-left: 5px;
}

.dg-checking-hero__secondary-link:hover {
  text-decoration: none;
  cursor: pointer !important;
}

.dg-checking-hero__button:focus-visible,
.dg-checking-hero__secondary-link:focus-visible {
  outline: 3px solid var(--dg-white);
  outline-offset: 4px;
}

/* ==============================
   DESKTOP PHOTO
   ============================== */

.dg-checking-hero__media {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  overflow: hidden;
  background-color: var(--dg-green);

  /*
   * Creates the large curved window.
   * The ellipse extends beyond the right side,
   * producing one smooth curved left edge.
   */
  clip-path: ellipse(88% 115% at 100% 50%);
  filter: drop-shadow(-2px 0 0 var(--dg-green-light));
}

.dg-checking-hero__member-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  /*
   * Moves the crop slightly right to keep
   * both members centered in the window.
   */
  object-position: 62% center;
}

/* ==============================
   TABLET
   ============================== */

@media (max-width: 1050px) and (min-width: 768px) {
  .dg-checking-hero__content {
    width: 46%;
    max-width: 480px;
  }

  .dg-checking-hero__title {
    font-size: clamp(3rem, 6vw, 4.25rem);
  }

  .dg-checking-hero__media {
    width: 62%;
    clip-path: ellipse(84% 112% at 100% 50%);
  }
}

/* ==============================
   MOBILE
   ============================== */

@media (max-width: 767px) {
  .dg-checking-hero {
    min-height: 0;
  }

  .dg-checking-hero__background {
    object-position: 35% center;
    left: 0;
  }

  .dg-checking-hero__shade {
    background:
      linear-gradient(
        180deg,
        rgba(0, 49, 29, 0.22) 0%,
        rgba(0, 49, 29, 0.1) 58%,
        rgba(0, 49, 29, 0) 100%
      );
  }

  .dg-checking-hero__inner {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 52px 24px 0;
  }

  .dg-checking-hero__content {
    width: 100%;
    max-width: 540px;
    margin-inline: auto;
    padding: 0;
  }

  .dg-checking-hero__eyebrow {
    margin-bottom: 14px;
  }

  .dg-checking-hero__title {
    max-width: 450px;
    font-size: clamp(2.75rem, 12vw, 4rem);
    line-height: 1.02;
  }

  .dg-checking-hero__description {
    max-width: 460px;
    margin-top: 22px;
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .dg-checking-hero__actions {
    gap: 20px;
    margin-top: 30px;
  }

  .dg-checking-hero__button {
    min-height: 56px;
  }

  /*
   * Photo returns to normal document flow.
   * The desktop side curve becomes a curved
   * top transition underneath the content.
   */

  .dg-checking-hero__media {
    position: relative;
    z-index: 2;
    inset: auto;
    width: 100%;
    height: clamp(280px, 74vw, 380px);
    margin-top: 18px;
    clip-path: ellipse(95% 90% at 50% 100%);
    filter: drop-shadow(0 -2px 0 var(--dg-green-light));
  }

  .dg-checking-hero__member-image {
    object-position: 61% 45%;
  }
}

/* ==============================
   SMALL MOBILE
   ============================== */

@media (max-width: 480px) {
  .dg-checking-hero__inner {
    padding-inline: 20px;
  }

  .dg-checking-hero__title {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
  }

  .dg-checking-hero__button {
    width: 100%;
    max-width: 310px;
  }

  .dg-checking-hero__media {
    height: 300px;
  }
}

/* ==============================
   CLIP-PATH FALLBACK
   ============================== */

@supports not (clip-path: ellipse(50% 50% at 50% 50%)) {
  .dg-checking-hero__media {
    border-radius: 48% 0 0 48% / 50% 0 0 50%;
  }

  @media (max-width: 767px) {
    .dg-checking-hero__media {
      border-radius: 50% 50% 0 0 / 18% 18% 0 0;
    }
  }
}