.referral-page {
  background: #f4f9ff;
}

.referral-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #23c3ed 0%, #4c93ed 56%, #8dacf2 100%);
  padding: clamp(3.5rem, 6vw, 6rem) var(--site-gutter) clamp(4rem, 8vw, 7rem);
}

.referral-cloud {
  position: absolute;
  width: clamp(12rem, 24vw, 25rem);
  opacity: 0.22;
  pointer-events: none;
}

.referral-cloud-left { left: -7rem; bottom: -5rem; animation: drift-cloud-right 24s linear infinite; animation-delay: -5s; }
.referral-cloud-right { right: -4rem; top: -7rem; animation: drift-cloud-left 29s linear infinite; animation-delay: -16s; }

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

.referral-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: var(--site-content-width);
  margin: 0 auto;
  text-align: center;
}

.referral-hero-copy { width: min(100%, 48rem); }

.referral-eyebrow,
.referral-kicker,
.referral-step-label {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.referral-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: white;
  padding: 0.55rem 1rem;
}

.referral-eyebrow span { color: #ffdf6f; }

.referral-hero h1 {
  max-width: 14ch;
  margin-inline: auto;
  color: white;
  font-family: "Recoleta Crunchi", Georgia, serif;
  font-size: clamp(3.4rem, 6.1vw, 6.2rem);
  line-height: 0.98;
  text-wrap: balance;
}

.referral-rainbow { display: inline-block; font-family: system-ui, sans-serif; font-size: 0.72em; }

.referral-summary {
  max-width: 39rem;
  margin: 1.6rem auto 0;
  color: #f6fbff;
  font-size: 1.05rem;
  font-weight: 550;
  line-height: 1.65;
}

.referral-download { display: block; width: 12.5rem; margin: 1.9rem auto 0; }

.referral-hero-art { position: relative; display: grid; width: 100%; min-height: 26rem; place-items: center; }

.referral-invite-card {
  display: flex;
  width: min(100%, 23.5rem);
  min-height: 23rem;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 2rem;
  background: #fffdf5;
  box-shadow: 0 1.5rem 3.5rem rgba(30, 66, 130, 0.24);
  padding: 2rem;
  text-align: center;
  transform: rotate(5deg);
}

.referral-invite-icon { font-size: 4.5rem; line-height: 1; }
.referral-invite-label { margin-top: 1.2rem; color: #287eaa; font-size: 0.9rem; font-weight: 900; letter-spacing: 0.2em; }
.referral-invite-copy { max-width: 13ch; margin-top: 0.6rem; font-family: "Recoleta Crunchi", Georgia, serif; font-size: 1.85rem; line-height: 1.12; }
.referral-invite-dashes { width: 100%; margin: 1.6rem 0 1rem; border-top: 2px dashed #b8d8e8; }
.referral-invite-foot { color: #657f8c; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.17em; }
.referral-sparkle { position: absolute; z-index: 1; color: #ffe174; font-size: 3.5rem; }
.referral-sparkle-one { top: 0; left: 0; transform: rotate(-18deg); }
.referral-sparkle-two { right: -0.5rem; bottom: 0; transform: rotate(12deg); }

.referral-guide { max-width: var(--site-content-width); margin: 0 auto; padding: clamp(4.5rem, 8vw, 7rem) var(--site-gutter) 6rem; }
.referral-section-heading { max-width: 41rem; margin: 0 auto 3rem; text-align: center; }
.referral-kicker { margin: 0 0 0.8rem; color: #3875be; }
.referral-section-heading h2,
.referral-finish h2 { margin: 0; font-family: "Recoleta Crunchi", Georgia, serif; font-size: clamp(2.6rem, 4.5vw, 4.3rem); line-height: 1.03; text-wrap: balance; }
.referral-section-heading > p:last-child { margin: 1rem 0 0; color: #5b7081; font-size: 1.08rem; }

.referral-first-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; }
.referral-small-step { display: flex; gap: 1.2rem; min-height: 14rem; border: 1px solid #dcecf5; border-radius: 2rem; background: white; box-shadow: 0 1rem 2rem rgba(76, 114, 170, 0.07); padding: clamp(1.5rem, 3vw, 2.2rem); }
.referral-step-number { display: inline-grid; flex: 0 0 auto; width: 3.25rem; height: 3.25rem; place-items: center; border-radius: 1rem; background: #ffdc60; color: #263c51; font-size: 1.12rem; font-weight: 900; line-height: 1; transform: rotate(-7deg); }
.referral-small-step h3 { margin: 0.2rem 0 0.5rem; font-family: "Recoleta Crunchi", Georgia, serif; font-size: clamp(1.5rem, 2.2vw, 2rem); }
.referral-small-step p { max-width: 25rem; margin: 0; color: #5b7081; line-height: 1.55; }
.referral-step-download { width: 10.75rem; margin: 1.1rem 0 0; }

.referral-screen-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.9fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  min-height: 38rem;
  overflow: hidden;
  margin-top: 1.2rem;
  border-radius: 2.5rem;
  padding: 3rem clamp(2rem, 6vw, 5rem);
}

.referral-screen-step-blue { background: #dcebff; }
.referral-screen-step-pink { background: #fff0f3; }
.referral-screen-step-yellow { background: #fff4ce; }
.referral-screen-step-pink .referral-screen-copy { order: 2; }
.referral-screen-step-pink .referral-phone-figure { order: 1; }
.referral-screen-copy { max-width: 28rem; }
.referral-step-label { margin: 1.8rem 0 0.7rem; color: #3278a1; }
.referral-screen-step-pink .referral-step-label { color: #ad5c78; }
.referral-screen-step-yellow .referral-step-label { color: #9a741d; }
.referral-screen-copy h3 { margin: 0; font-family: "Recoleta Crunchi", Georgia, serif; font-size: clamp(2.6rem, 4.3vw, 4.1rem); line-height: 1.04; text-wrap: balance; }
.referral-screen-copy > p:last-child { max-width: 27rem; margin: 1rem 0 0; color: #425a6c; font-size: 1.12rem; line-height: 1.6; }
.referral-phone-figure { display: grid; justify-items: center; margin: 0; }
.referral-phone { width: 16.5rem; max-width: 100%; margin: 0; transform: rotate(2deg); }
.referral-screen-step-pink .referral-phone { transform: rotate(-2deg); }
.referral-phone .phone-screen { inset: 0.2rem; border-radius: 1.8rem; }
.referral-phone .phone-screen::before,
.referral-phone .phone-screen::after { display: none; }
.referral-phone .phone-screenshot { display: block; object-fit: fill; }

.referral-finish { position: relative; overflow: hidden; margin-top: 1.2rem; border-radius: 2.5rem; background: linear-gradient(135deg, #25c3ed, #4a8aeb); color: white; padding: clamp(2.7rem, 7vw, 5.5rem); text-align: center; }
.referral-finish::before,
.referral-finish::after { position: absolute; width: 12rem; height: 8rem; background: url('/assets/home-cloud-001.png') center / contain no-repeat; content: ''; opacity: 0.25; }
.referral-finish::before { bottom: -2rem; left: -3rem; }
.referral-finish::after { top: -2rem; right: -3rem; }
.referral-finish .referral-step-number { margin-bottom: 1.2rem; }
.referral-finish h2 { color: white; }
.referral-finish p { margin: 1rem auto 1.4rem; font-size: 1.12rem; font-weight: 650; }
.referral-finish a { display: inline-block; border-radius: 999px; background: #ffdc60; color: #263c51; font-weight: 850; padding: 0.8rem 1.3rem; text-decoration: none; }
.referral-finish a:hover { background: #ffe889; }
.referral-footer { margin-top: auto; }

@media (max-width: 760px) {
  .referral-hero { padding-block: 3rem 3.5rem; }
  .referral-hero-inner { gap: 1.5rem; }
  .referral-hero h1 { max-width: 12ch; font-size: clamp(3.1rem, 13vw, 5rem); }
  .referral-hero-art { min-height: 19rem; }
  .referral-invite-card { width: 17.5rem; min-height: 17rem; padding: 1.4rem; }
  .referral-invite-icon { font-size: 3rem; }
  .referral-invite-copy { font-size: 1.45rem; }
  .referral-invite-dashes { margin: 1rem 0 0.75rem; }
  .referral-first-steps,
  .referral-screen-step { grid-template-columns: 1fr; }
  .referral-small-step { min-height: 0; }
  .referral-screen-step { gap: 2rem; min-height: 0; padding: 2.2rem 1.5rem; }
  .referral-screen-step-pink .referral-screen-copy,
  .referral-screen-step-pink .referral-phone-figure { order: initial; }
  .referral-phone { width: min(70vw, 16.5rem); }
  .referral-guide { padding: 4rem 1.25rem; }
  .referral-section-heading { margin-bottom: 2rem; }
}

@media (max-width: 440px) {
  .referral-eyebrow { font-size: 0.65rem; }
  .referral-summary { font-size: 0.98rem; }
  .referral-small-step { gap: 0.9rem; padding: 1.35rem; }
  .referral-step-number { width: 2.8rem; height: 2.8rem; font-size: 1rem; }
  .referral-screen-step { border-radius: 1.7rem; }
  .referral-finish { border-radius: 1.7rem; }
}
