/* ===================================================================
 * hero-cta.css
 *
 * 1. Primary call to action on the home screen — "Calculate your
 *    phishing risk" (opens the calculator dialog).
 * 2. A small mobile layout block at the bottom so the CTA (and the rest
 *    of the page) is actually reachable on phones.
 *
 * All motion is transform/opacity only and is disabled under
 * prefers-reduced-motion.
 * =================================================================== */

@property --risk-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.hero-cta {
  --risk-pink: #ac145a;
  --risk-pink-bright: #ff3d8f;

  position: relative;
  display: flex;
  justify-content: flex-start;
  margin: 4.4rem 0 1.6rem;
}

/* entrance — starts once the page has finished loading, same trigger
   as the rest of the hero so nothing pops in out of order */
html.ss-preload .hero-cta {
  opacity: 0;
}

html.ss-loaded .hero-cta {
  animation: risk-cta-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

@keyframes risk-cta-in {
  from {
    opacity: 0;
    transform: translate3d(0, 1.6rem, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------------
 * the button
 * ------------------------------------------------------------------- */
.risk-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1.3rem 1.9rem 1.3rem 1.5rem;
  margin: 0; /* the template's `button` rule adds `margin: 0 .3rem 1.2rem 0` */
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  isolation: isolate;
  color: #ffffff;
  font-family: "metropolis-medium", sans-serif;
  text-align: left;
  white-space: normal; /* the template's global button rule sets nowrap */

  background:
    radial-gradient(130% 160% at 0% 0%, rgba(255, 61, 143, 0.22), transparent 55%),
    rgba(255, 255, 255, 0.045);

  box-shadow:
    0 16px 36px -22px rgba(172, 20, 90, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);

  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.38s ease,
    background-color 0.38s ease;
}

/* rotating conic "scanner" border */
.risk-cta__beam {
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;

  background: conic-gradient(
    from var(--risk-angle),
    rgba(255, 255, 255, 0.13) 0deg,
    rgba(255, 255, 255, 0.13) 322deg,
    rgba(255, 61, 143, 0.65) 340deg,
    #ffd6e8 350deg,
    rgba(255, 61, 143, 0.75) 356deg,
    rgba(255, 255, 255, 0.13) 360deg
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  animation: risk-beam-spin 5s linear infinite;
}

@keyframes risk-beam-spin {
  to {
    --risk-angle: 360deg;
  }
}

/* soft halo behind the icon */
.risk-cta__ring {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;

  background: radial-gradient(circle, rgba(255, 61, 143, 0.45), transparent 66%);
  filter: blur(7px);
  animation: risk-halo 3.6s ease-in-out infinite;
}

@keyframes risk-halo {
  0%,
  100% {
    opacity: 0.35;
    transform: translate3d(0, -50%, 0) scale(0.9);
  }

  50% {
    opacity: 0.8;
    transform: translate3d(0, -50%, 0) scale(1.15);
  }
}

/* icon */
.risk-cta__icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  color: var(--risk-pink-bright);

  background: linear-gradient(160deg, rgba(255, 61, 143, 0.3), rgba(172, 20, 90, 0.08));
  border: 1px solid rgba(255, 61, 143, 0.38);
  transition: border-color 0.38s ease, color 0.38s ease;
}

.risk-cta__icon svg {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

.risk-cta__shield {
  opacity: 0.9;
}

/* the heartbeat line inside the shield draws itself */
.risk-cta__pulse {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: risk-pulse-draw 3.4s cubic-bezier(0.6, 0, 0.2, 1) infinite;
}

@keyframes risk-pulse-draw {
  0% {
    stroke-dashoffset: 22;
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  55% {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  86% {
    stroke-dashoffset: 0;
    opacity: 0;
  }

  100% {
    stroke-dashoffset: 22;
    opacity: 0;
  }
}

/* copy */
.risk-cta__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
}

.risk-cta__title {
  font-family: "metropolis-semibold", sans-serif;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.risk-cta__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "metropolis-medium", sans-serif;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.risk-cta__dot {
  width: 0.6rem;
  height: 0.6rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--risk-pink-bright);
  animation: risk-dot-ping 2.6s ease-out infinite;
}

@keyframes risk-dot-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 61, 143, 0.6);
  }

  70% {
    box-shadow: 0 0 0 0.85rem rgba(255, 61, 143, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 61, 143, 0);
  }
}

/* arrow */
.risk-cta__arrow {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.38s ease,
    color 0.38s ease;
}

.risk-cta__arrow svg {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
}

/* -------------------------------------------------------------------
 * states
 * ------------------------------------------------------------------- */
.risk-cta:hover,
.risk-cta:focus-visible {
  /* the template ships a global `button:hover { background-color:#b8b8b8 }`
     that has to be explicitly overridden here */
  color: #ffffff;
  background-color: rgba(255, 61, 143, 0.12);
  transform: translate3d(0, -3px, 0);
  box-shadow:
    0 22px 46px -18px rgba(255, 61, 143, 0.85),
    0 0 0 1px rgba(255, 61, 143, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.risk-cta:hover .risk-cta__arrow,
.risk-cta:focus-visible .risk-cta__arrow {
  transform: translate3d(0.4rem, 0, 0);
  background: var(--risk-pink-bright);
  color: #14000a;
}

.risk-cta:hover .risk-cta__icon,
.risk-cta:focus-visible .risk-cta__icon {
  border-color: rgba(255, 61, 143, 0.75);
  color: #ffffff;
}

.risk-cta:active {
  transform: translate3d(0, -1px, 0) scale(0.99);
}

/* the template also styles plain `button:focus`, which is what you get
   after a mouse click — without this the pill flashes grey/black */
.risk-cta:focus {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.045);
  outline: 0;
}

.risk-cta:focus-visible {
  color: #ffffff;
  background-color: rgba(255, 61, 143, 0.12);
  outline: 2px solid var(--risk-pink-bright);
  outline-offset: 4px;
}

/* -------------------------------------------------------------------
 * responsive
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  .hero-cta {
    margin-top: 3.4rem;
  }

  .risk-cta {
    gap: 1.25rem;
    padding: 1.15rem 1.6rem 1.15rem 1.25rem;
  }

  .risk-cta__icon {
    width: 3.9rem;
    height: 3.9rem;
  }

  .risk-cta__title {
    font-size: 1.6rem;
  }
}

@media screen and (max-width: 600px) {
  .hero-cta {
    margin-top: 3rem;
  }

  .risk-cta {
    width: 100%;
    gap: 1.1rem;
    padding: 1.1rem 1.3rem;
  }

  .risk-cta__title {
    font-size: 1.5rem;
  }

  .risk-cta__meta {
    font-size: 1rem;
    letter-spacing: 0.03em;
  }

  .risk-cta__arrow {
    width: 3.2rem;
    height: 3.2rem;
    margin-left: auto;
  }
}

/* -------------------------------------------------------------------
 * reduced motion
 * ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-cta,
  .risk-cta,
  .risk-cta__beam,
  .risk-cta__ring,
  .risk-cta__pulse,
  .risk-cta__dot,
  .risk-cta__arrow,
  .risk-cta__icon {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  html.ss-preload .hero-cta {
    opacity: 1;
  }

  .risk-cta__pulse {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}


/* ===================================================================
 * Mobile layout
 *
 * The hero is a centred statement now: headline, copy, call to action.
 * Page-level scrolling lives in sections.css, so this block only makes
 * the hero flex so its content stays optically centred in the viewport.
 * =================================================================== */
@media screen and (max-width: 900px) {
  .s-home {
    display: flex;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 0;
  }

  .home-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 12rem 0 3rem;
  }

  .home-content__main {
    padding-top: 0;
    overflow: visible;
  }

  /* the call to action is centred and shares the copy column's edges */
  .hero-cta {
    width: 100%;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .risk-cta {
    width: 100%;
    margin: 0;
  }

  .risk-cta__arrow {
    margin-left: auto;
  }

  /* keep the fixed chrome clear of the headline, and let it scroll away
     instead of hovering over the copy */
  .info-toggle {
    position: absolute;
    left: 1.8rem;
    top: 1.8rem;
  }

  .home-logo {
    right: 2.4rem;
    top: 1.6rem;
  }

  .home-logo img {
    width: 9.5rem;
    height: 4.75rem;
  }

  /* the social rail sits under the hero instead of floating over it */
  .home-social {
    position: static;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.6rem 2.4rem;
    margin: 3.6rem 0 0;
    padding: 0 2.4rem;
  }

  .home-social li {
    padding: 0;
  }

  .home-social li a {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    width: auto;
    height: auto;
  }

  .home-social i {
    position: static;
    line-height: 1;
  }

  .home-social span {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    line-height: 1;
    font-size: 1.3rem;
  }

  .home-social span::after {
    display: none;
  }
}
