/* One clear invitation, a readable supporting line and a quiet discovery link. */
.edugen-hero-actions {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 440px);
}

/* The veil keeps the formula of the background image from competing with the buttons. */
.edugen-hero-actions::before {
  content: "";
  position: absolute;
  inset-block: -30px -12px;
  inset-inline: -24px;
  z-index: -1;
  background: radial-gradient(ellipse closest-side at center, rgb(255 255 255 / .9) 0%, rgb(255 255 255 / .7) 55%, rgb(255 255 255 / 0) 100%);
  pointer-events: none;
}

.edugen-hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.edugen-hero-primary,
.edugen-hero-secondary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  border-radius: 999px;
  font-family: "Google Sans Flex Variable", Arial, sans-serif;
  text-align: start;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.edugen-hero-primary > span:first-child,
.edugen-hero-secondary > span:first-child {
  min-width: 0;
}

.edugen-hero-primary:hover,
.edugen-hero-secondary:hover {
  transform: translateY(-1px);
}

.edugen-hero-primary:active,
.edugen-hero-secondary:active {
  transform: none;
}

.edugen-hero-primary:focus-visible,
.edugen-hero-secondary:focus-visible {
  outline: 3px solid #174c93;
  outline-offset: 3px;
}

.edugen-hero-primary {
  width: min(100%, 340px);
  padding-inline: 28px 10px;
  color: #fff;
  background: linear-gradient(125deg, #2e78e6, #205eb8);
  box-shadow: 0 10px 24px rgb(37 105 203 / .22);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -.005em;
}

.edugen-hero-primary-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #205eb8;
  background: #fff;
}

.edugen-hero-primary-icon svg {
  transition: transform 160ms ease;
}

.edugen-hero-primary:hover .edugen-hero-primary-icon svg {
  transform: translateX(3px);
}

.edugen-hero-secondary {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  color: #405878;
  background: transparent;
  font-size: 15px;
  font-weight: 580;
  line-height: 1.4;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgb(64 88 120 / .3);
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.edugen-hero-secondary:hover {
  color: #174c93;
  text-decoration-color: currentColor;
  transform: none;
}

.edugen-hero-secondary-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  width: 16px;
  height: 16px;
}

.edugen-hero-secondary-icon svg {
  width: 16px;
  height: 16px;
}

html[dir="rtl"] .edugen-hero-primary-icon svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .edugen-hero-primary:hover .edugen-hero-primary-icon svg {
  transform: scaleX(-1) translateX(3px);
}

.edugen-hero-note {
  /* A frosted plate, like the caption of the closing section, keeps the line readable on the book motif. */
  max-inline-size: 46ch;
  margin-block: 8px 0;
  margin-inline: auto;
  padding: 8px 16px;
  border-radius: 14px;
  color: #3f5069;
  background: rgb(255 255 255 / .76);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: "Google Sans Flex Variable", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .edugen-hero-actions {
    width: min(100%, 440px);
    max-width: 100%;
  }

  .edugen-hero-actions::before {
    inset-inline: -180px;
  }

  .edugen-hero-buttons {
    flex-direction: column;
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edugen-hero-primary,
  .edugen-hero-secondary,
  .edugen-hero-primary-icon svg {
    transition: none;
  }

  .edugen-hero-primary:hover,
  .edugen-hero-secondary:hover,
  .edugen-hero-primary:hover .edugen-hero-primary-icon svg {
    transform: none;
  }

  html[dir="rtl"] .edugen-hero-primary:hover .edugen-hero-primary-icon svg {
    transform: scaleX(-1);
  }
}

/* Magnetic invitation: a stationary layout box, bounded pointer motion and a local light reflection. */
.edugen-hero-primary[data-magnetic-cta] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.edugen-hero-primary[data-magnetic-cta]::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at var(--edugen-magnetic-light-x, 50%) var(--edugen-magnetic-light-y, 50%), rgb(255 255 255 / .28), rgb(255 255 255 / 0) 65%);
  opacity: 0;
}

.edugen-hero-primary[data-magnetic-cta] > span {
  position: relative;
  z-index: 1;
}

.edugen-hero-primary[data-magnetic-cta]:is(:hover, :active) {
  transform: none;
}

.edugen-hero-primary[data-magnetic-cta]:hover .edugen-hero-primary-icon svg {
  transform: none;
}

html[dir="rtl"] .edugen-hero-primary[data-magnetic-cta]:hover .edugen-hero-primary-icon svg {
  transform: scaleX(-1);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .edugen-hero-primary[data-magnetic-cta],
  .edugen-hero-primary[data-magnetic-cta]:hover {
    transform: translate3d(var(--edugen-magnetic-x, 0px), var(--edugen-magnetic-y, 0px), 0);
    transition: transform 320ms cubic-bezier(.2, .8, .2, 1), box-shadow 260ms ease;
  }

  .edugen-hero-primary[data-magnetic-cta]::before {
    transition: opacity 240ms ease;
  }

  .edugen-hero-primary[data-magnetic-cta]:is(:hover, :focus-visible)::before {
    opacity: 1;
  }

  .edugen-hero-primary[data-magnetic-cta]:hover {
    box-shadow: 0 17px 32px rgb(31 83 160 / .3);
  }

  .edugen-hero-primary[data-magnetic-cta] .edugen-hero-primary-icon {
    transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
  }

  .edugen-hero-primary[data-magnetic-cta]:is(:hover, :focus-visible) .edugen-hero-primary-icon {
    transform: rotate(-45deg);
  }

  html[dir="rtl"] .edugen-hero-primary[data-magnetic-cta]:is(:hover, :focus-visible) .edugen-hero-primary-icon {
    transform: rotate(45deg);
  }

  .edugen-hero-primary[data-magnetic-cta]:active {
    transform: scale(.985);
    transition-duration: 100ms;
  }
}
