.page-email-pro-plus {
  --page-bg: #050505;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.64);
  --keyboard-bg: #e5e5e5;
  --key-bg: #f3f4f6;
  --key-bg-active: rgba(243, 244, 246, 0.8);
  --key-text: #404040;
  --key-width: 29.5px;
  --key-height: 25.5px;
  --gap: 2px;
  --key-radius: 3.5px;
  --outer-radius: 12px;
  --shadow-key:
    0 0 1px 0 rgba(0, 0, 0, 0.5), 0 1px 1px 0 rgba(0, 0, 0, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 1);
  --shadow-key-active:
    0 0 1px 0 rgba(0, 0, 0, 0.5), 0 1px 1px 0 rgba(0, 0, 0, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.email-pro-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(18px, 3vh, 34px) 18px;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.03) 0%,
      rgba(0, 0, 0, 0.01) 42%,
      rgba(0, 0, 0, 0.06) 100%
    ),
    url("../../site/images/shared/menu/email-pro-plus-hero-bg.webp") center 42% / cover
      no-repeat,
    #050505;
}

.email-pro-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: none;
}

.email-pro-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(220px, 34vh, 420px);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0) 0%,
    rgba(5, 5, 5, 0.06) 18%,
    rgba(5, 5, 5, 0.16) 36%,
    rgba(5, 5, 5, 0.34) 56%,
    rgba(5, 5, 5, 0.62) 76%,
    var(--page-bg) 100%
  );
}

.email-pro-hero__inner {
  --typewriter-eyebrow-gap: clamp(22px, 2.9vh, 36px);
  --typewriter-action-gap: clamp(28px, 4.1vh, 44px);
  --typewriter-stage-gap: clamp(22px, 3.2vh, 34px);
  --typewriter-eyebrow-lift: clamp(-18px, -1.45vh, -12px);
  --keyboard-hero-drop: clamp(0px, calc(0.5vh - 3px), 5px);
  --email-pro-hero-block-offset: 10px;

  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(100%, 1120px);
  min-height: min(920px, calc(100svh - clamp(36px, 6vh, 68px)));
  align-items: stretch;
  justify-items: center;
  row-gap: 0;
  padding-top: clamp(104px, 12vh, 148px);
  padding-bottom: clamp(14px, 2.2vh, 26px);
  transform: translateY(var(--email-pro-hero-block-offset));
}

.typewriter {
  position: relative;
  display: grid;
  min-height: 0;
  max-width: min(920px, 92vw);
  align-self: end;
  margin-top: clamp(10px, 1.6vh, 18px);
  align-content: center;
  justify-items: center;
  padding-top: 0;
  padding-bottom: var(--typewriter-stage-gap);
  text-align: center;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.42),
    0 12px 38px rgba(0, 0, 0, 0.34);
}

.typewriter::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20px -56px -24px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 56%,
    rgba(0, 0, 0, 0.34),
    transparent 72%
  );
  filter: blur(18px);
}

.typewriter__eyebrow {
  margin: 0 0 var(--typewriter-eyebrow-gap);
  transform: translateY(var(--typewriter-eyebrow-lift));
  color: rgba(255, 255, 255, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.16vw, 1.28rem);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.035em;
  text-transform: none;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.typewriter__title {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 1fr;
  min-height: clamp(108px, 13.8vh, 152px);
  max-width: 920px;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: clamp(2.9rem, 5.35vw, 5.25rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.06em;
  text-transform: none;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.42),
    0 18px 62px rgba(0, 0, 0, 0.42),
    0 42px 118px rgba(0, 0, 0, 0.32);
  padding-block: 0.08em 0.1em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.typewriter__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  margin-top: var(--typewriter-action-gap);
  padding: 0 40px;
  border: 1px solid #faf5ed;
  border-radius: 0;
  background: #faf5ed;
  color: #231915;
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: none;
  transition:
    transform 0.28s var(--ease),
    background 0.28s var(--ease),
    border-color 0.28s var(--ease);
}

.typewriter__button:hover,
.typewriter__button:focus-visible {
  transform: translateY(-2px);
  background: #ece4db;
  border-color: #ece4db;
}

.typewriter__line {
  display: block;
  min-height: 1em;
  white-space: nowrap;
}

.typewriter__cursor {
  display: inline-block;
  width: clamp(2px, 0.35vw, 4px);
  height: 0.82em;
  margin-left: 0;
  transform: translateY(0.12em);
  background: currentColor;
  animation: cursorBlink 850ms steps(1) infinite;
}

.email-pro-hero:not(.is-performance-active) .typewriter__cursor {
  animation-play-state: paused;
}

.keyboard-zoom {
  width: min(100%, 1160px);
  overflow: visible;
  display: grid;
  justify-items: center;
  align-self: end;
  margin-top: 0;
  transform-origin: center bottom;
  transform: perspective(1850px) rotateX(31deg) translateY(var(--keyboard-hero-drop));
  zoom: 1.82;
}

.keyboard {
  width: fit-content;
  height: 100%;
  padding: 4px;
  border-radius: var(--outer-radius);
  background: var(--keyboard-bg);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    0 18px 48px rgba(0, 0, 0, 0.38),
    0 1px 2px rgba(0, 0, 0, 0.14);
  outline: 1px solid rgba(255, 255, 255, 0.12);
}

.keyboard__row {
  display: flex;
  width: 100%;
  flex-shrink: 0;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.keyboard__row:last-child {
  margin-bottom: 0;
}

.key-wrap {
  padding: 0.5px;
  border-radius: 4px;
}

.key-wrap--tl {
  border-top-left-radius: 12px;
}

.key-wrap--tr {
  border-top-right-radius: 12px;
}

.key-wrap--bl {
  border-bottom-left-radius: 12px;
}

.key-wrap--br {
  border-bottom-right-radius: 12px;
}

.key {
  display: flex;
  width: var(--key-width);
  height: var(--key-height);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: var(--key-radius);
  background: var(--key-bg);
  box-shadow: var(--shadow-key);
  color: var(--key-text);
  font-size: 5px;
  line-height: 1;
  user-select: none;
  transition:
    transform 75ms ease,
    background 75ms ease,
    box-shadow 75ms ease;
}

.key:focus-visible {
  outline: 1px solid rgba(0, 0, 0, 0.72);
  outline-offset: 1px;
}

.key span,
.key small {
  pointer-events: none;
}

.key--stack {
  flex-direction: column;
}

.key--active,
.key:active {
  transform: translateY(1px) scale(0.965);
  background: var(--key-bg-active);
  box-shadow: var(--shadow-key-active);
}

.key--tl {
  border-top-left-radius: 8px;
}

.key--tr {
  border-top-right-radius: 8px;
}

.key--bl {
  border-bottom-left-radius: 8px;
}

.key--br {
  border-bottom-right-radius: 8px;
}

.key--w40 {
  width: 45px;
}

.key--caps {
  width: 50px;
}

.key--return {
  width: 51px;
}

.key--shift {
  width: 65px;
}

.key--mod {
  width: 27px;
}

.key--cmd {
  width: 36px;
}

.key--space {
  width: 146px;
}

.key--start,
.key--end {
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
}

.key--mod,
.key--cmd {
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  text-align: center;
}

.key--mod span,
.key--cmd span,
.key--w40 span,
.key--caps span,
.key--return span,
.key--shift span {
  display: block;
  width: 100%;
  line-height: 1;
  text-align: center;
}

.mt {
  margin-top: 4px;
}

.icon {
  font-size: 6px;
}

.pause-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.pause-icon span {
  display: block;
  width: 2px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.key--pause-toggle.is-paused {
  background: rgba(229, 231, 235, 0.98);
}

.key--pause-toggle.is-paused .pause-icon span:first-child {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  border-radius: 0;
  background: transparent;
}

.key--pause-toggle.is-paused .pause-icon span:last-child {
  display: none;
}

.keyboard__arrows {
  display: flex;
  width: 81.4px;
  height: 24px;
  align-items: center;
  justify-content: flex-end;
  border-radius: 4px;
  padding: 0.5px;
}

.keyboard__arrows-vertical {
  display: flex;
  flex-direction: column;
}

.key--arrow {
  width: 27px;
  height: 24px;
}

.key--arrow-half {
  width: 27px;
  height: 12px;
}

.key--arrow span,
.key--arrow-half span {
  font-size: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes cursorBlink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 1180px) {
  .keyboard-zoom {
    zoom: 1.66;
    transform: perspective(1550px) rotateX(22deg) translateY(var(--keyboard-hero-drop));
  }
}

@media (max-width: 1180px) {
  .typewriter__title {
    font-size: clamp(2.7rem, 5.9vw, 4.75rem);
  }
}

@media (max-width: 980px) {
  .keyboard-zoom {
    zoom: 1.41;
    transform: perspective(1350px) rotateX(18deg) translateY(var(--keyboard-hero-drop));
  }
}

@media (max-width: 760px) {
  .email-pro-hero {
    align-items: center;
    padding-block: 22px;
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.03) 0%,
        rgba(0, 0, 0, 0.01) 42%,
        rgba(0, 0, 0, 0.06) 100%
      ),
      url("../../site/images/pages/email-pro-plus/hero/email-pro-mobile-hero-bg.webp") center center / cover
        no-repeat,
      #050505;
  }

  .email-pro-hero__inner {
    --typewriter-eyebrow-gap: clamp(18px, 3vh, 28px);
    --typewriter-action-gap: clamp(22px, 3.6vh, 34px);
    --typewriter-stage-gap: clamp(20px, 3vh, 30px);
    --keyboard-hero-drop: clamp(3px, calc(1.8vh - 3px), 15px);

    min-height: calc(100svh - 44px);
    grid-template-rows: minmax(0, 1fr) auto;
    row-gap: 0;
    padding-top: clamp(28px, 5vh, 56px);
    padding-bottom: clamp(14px, 3vh, 34px);
  }

  .typewriter {
    min-height: clamp(152px, 28vh, 194px);
    padding-top: clamp(4px, 1.4vh, 14px);
  }

  .typewriter__title {
    min-height: clamp(112px, 24vh, 144px);
    font-size: clamp(2.35rem, 10vw, 3.75rem);
    line-height: 1.02;
    letter-spacing: -0.056em;
  }

  .typewriter__button {
    min-height: 54px;
    padding-inline: 28px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .keyboard-zoom {
    width: calc(100vw - 10px);
    overflow-x: auto;
    overflow-y: hidden;
    justify-items: start;
    padding: 8px 2px 18px;
    transform: perspective(1250px) rotateX(12deg) translateY(var(--keyboard-hero-drop));
    zoom: 1.19;
    scrollbar-width: thin;
  }
}

@media (max-width: 520px) {
  .typewriter__title {
    font-size: clamp(2.15rem, 10vw, 3.15rem);
  }
}

@media (max-width: 560px) {
  .keyboard-zoom {
    zoom: 1;
  }
}

@media (max-width: 440px) {
  .keyboard-zoom {
    zoom: 0.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter__cursor {
    animation: none;
  }

  .key,
  .layout-switch {
    transition: none;
  }
}
