/* ───────────────────────────────────────────────────────────────────────────
   Refer a Friend — /refer-a-friend/
   Mobile-first. Theme tokens throughout (tokens.css). Buttons are the site's
   .btn family. Everything below scales up from a 390px phone.
   ─────────────────────────────────────────────────────────────────────────── */

.refer { --refer-navy: var(--vrl-navy, #010f2d); --refer-navy-2: var(--vrl-navy-2, #0a1f47); --refer-green: var(--vrl-savings, #15803d); --refer-green-bright: var(--vrl-savings-bright, #16a34a); }
.refer h1, .refer h2, .refer h3 { font-family: var(--vrl-font-display); color: var(--vrl-fg-base); margin: 0; }
.refer p { margin: 0; }

.refer-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--vrl-font-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--refer-green);
}
.refer-eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--vrl-savings-border); }
.refer-eyebrow--light { color: #86efac; }
.refer-eyebrow--light::before { background: rgba(134, 239, 172, 0.45); }

.refer-head { display: grid; gap: 12px; margin-bottom: clamp(26px, 4vw, 40px); }
.refer-head h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.025em; line-height: 1.08; }

/* ─── Hero ─── */
.refer-hero {
	position: relative; overflow: hidden;
	padding-block: clamp(44px, 8vw, 104px) clamp(40px, 7vw, 88px);
	background:
		radial-gradient(ellipse 80% 60% at 0% 0%, var(--vrl-mint) 0%, transparent 60%),
		radial-gradient(ellipse 70% 60% at 100% 100%, var(--vrl-butter) 0%, transparent 60%),
		var(--vrl-white);
}
.refer-hero::before { /* faint dot grid: depth without noise */
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background-image: radial-gradient(rgba(1, 15, 45, 0.07) 1px, transparent 1.4px);
	background-size: 22px 22px;
	mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, #000 20%, transparent 75%);
}
.refer-hero__inner { position: relative; z-index: 1; display: grid; gap: clamp(30px, 5vw, 56px); max-width: var(--vrl-container-max); margin-inline: auto; padding-inline: var(--vrl-gutter); }
.refer-hero__copy { display: grid; gap: 18px; justify-items: start; }
.refer-hero__h1 { font-size: clamp(40px, 6vw, 70px); letter-spacing: -0.035em; line-height: 1.02; max-width: 12ch; }
.refer-hero__h1 em { font-style: normal; color: var(--refer-green); }
.refer-hero__sub { font-size: clamp(16px, 1.35vw, 18px); line-height: 1.6; color: var(--vrl-fg-subtle); max-width: 50ch; }
.refer-hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.refer-hero__ctas .btn { min-height: 50px; }

/* the partner cards, as they look in My Account */
.refer-hero__art { position: relative; display: grid; gap: 12px; max-width: 420px; }
.refer-hero__art::before { /* green glow behind the stack */
	content: ''; position: absolute; inset: 10% -6% -4%; border-radius: 40px; pointer-events: none;
	background: radial-gradient(ellipse at 60% 50%, rgba(22, 163, 74, 0.16), transparent 70%);
	filter: blur(10px);
}
.refer-card {
	position: relative; display: grid; gap: 8px;
	padding: 22px 22px 20px;
	border: 1px solid rgba(1, 15, 45, 0.25); border-radius: 18px;
	background: linear-gradient(160deg, #0a2a5c 0%, var(--refer-navy) 100%);
	color: #fff;
	box-shadow: 0 24px 50px -22px rgba(1, 15, 45, 0.6), var(--vrl-inset-hi-dark);
}
.refer-card small { font-family: var(--vrl-font-ui); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #7fc4ff; }
.refer-card strong { font-family: var(--vrl-font-display); font-size: clamp(32px, 4.6vw, 42px); font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.refer-card span { font-size: 14px; line-height: 1.5; color: #b8c9e6; }
.refer-card__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 8px; padding: 0 22px; border-radius: 999px; background: #2b7fe6; color: #fff; font-family: var(--vrl-font-ui); font-size: 15px; font-weight: 800; }
.refer-card--points { padding: 18px 20px; background: linear-gradient(160deg, #163d78 0%, #0b2450 100%); }
.refer-card--points strong { color: #86efac; }

/* ─── Steps ─── */
.refer-steps { padding-block: var(--vrl-section-py); background: var(--vrl-bg-subtle); }
.refer-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.refer-step {
	position: relative; display: grid; gap: 16px;
	padding: 24px 22px 22px;
	background: var(--vrl-white); border-radius: var(--vrl-radius-card-lg);
	box-shadow: var(--vrl-inset-hi), var(--vrl-shadow-sm), var(--vrl-ring);
}
.refer-step__num {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
	background: var(--vrl-savings-bg); border: 1px solid var(--vrl-savings-border); color: var(--refer-green);
	font-family: var(--vrl-font-display); font-size: 20px; font-weight: 800;
}
.refer-step__body { display: grid; gap: 8px; }
.refer-step__body h3 { font-size: 21px; letter-spacing: -0.02em; }
.refer-step__body p { font-size: 15.5px; line-height: 1.6; color: var(--vrl-fg-subtle); }
.refer-step__body a { color: var(--vrl-link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* the little pieces of real UI each step produces */
.refer-ui { display: grid; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--vrl-border); background: var(--vrl-bg-component); font-family: var(--vrl-font-ui); }
.refer-ui__label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vrl-fg-muted); }
.refer-ui__field { display: flex; gap: 8px; }
.refer-ui__input { flex: 1 1 auto; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--vrl-border-strong); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 800; letter-spacing: 0.04em; color: var(--vrl-fg-base); }
.refer-ui__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--refer-navy); color: #fff; font-size: 14px; font-weight: 800; }
.refer-ui__hint { font-size: 12px; color: var(--vrl-fg-muted); }
.refer-ui__bubble { align-self: flex-end; max-width: 92%; padding: 11px 14px; border-radius: 16px 16px 4px 16px; background: #2b7fe6; color: #fff; font-size: 14px; line-height: 1.5; }
.refer-ui__bubble b { font-weight: 900; }
.refer-ui__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--vrl-border); font-size: 14px; color: var(--vrl-fg-subtle); }
.refer-ui__row b { color: var(--refer-green); font-weight: 900; font-variant-numeric: tabular-nums; }
.refer-ui__balance { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--vrl-savings-bg); border: 1px solid var(--vrl-savings-border); }
.refer-ui__balance small { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--refer-green); }
.refer-ui__balance strong { font-family: var(--vrl-font-display); font-size: 26px; font-weight: 800; color: var(--vrl-savings-deep); letter-spacing: -0.02em; }

/* ─── Rules ─── */
.refer-rules { padding-block: var(--vrl-section-py); background: var(--vrl-white); }
.refer-rules__inner { display: grid; gap: 8px; }
.refer-rules__list { list-style: none; margin: 0; padding: 0; display: grid; }
.refer-rules__list li { position: relative; padding: 16px 0 16px 34px; border-top: 1px solid var(--vrl-border); font-size: 15.5px; line-height: 1.6; color: var(--vrl-fg-subtle); }
.refer-rules__list li:last-child { border-bottom: 1px solid var(--vrl-border); }
.refer-rules__list li strong { color: var(--vrl-fg-base); font-weight: 800; }
.refer-rules__list li::before { /* check mark, drawn — no icon font */
	content: ''; position: absolute; left: 0; top: 21px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--vrl-savings-bg); border: 1px solid var(--vrl-savings-border);
}
.refer-rules__list li::after {
	content: ''; position: absolute; left: 7px; top: 26px; width: 5px; height: 9px;
	border: solid var(--refer-green); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ─── Closing CTA ─── */
.refer-cta { padding-block: 0 var(--vrl-section-py); background: var(--vrl-white); }
.refer-cta__card {
	position: relative; overflow: hidden; display: grid; gap: 22px;
	padding: clamp(28px, 4vw, 44px);
	border-radius: var(--vrl-radius-card-lg);
	background: linear-gradient(135deg, #0a2a5c 0%, var(--refer-navy) 70%);
	color: #fff; box-shadow: 0 30px 60px -30px rgba(1, 15, 45, 0.6);
}
.refer-cta__card::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(22, 163, 74, 0.35), transparent 70%); pointer-events: none; }
.refer-cta__copy { display: grid; gap: 10px; position: relative; z-index: 1; }
.refer-cta__copy h2 { color: #fff; font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.025em; line-height: 1.1; }
.refer-cta__copy p { color: #b8c9e6; font-size: 15.5px; line-height: 1.55; max-width: 44ch; }
.refer-cta__btn { position: relative; z-index: 1; justify-self: start; min-height: 52px; background: #fff !important; color: var(--refer-navy) !important; border: 0 !important; }
.refer-cta__btn:hover { background: #eef5ff !important; }

/* ─── Phone: the primary action at the thumb ─── */
.refer-sticky {
	position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
	display: flex; padding: 8px; border-radius: 999px;
	background: rgba(253, 253, 254, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	box-shadow: 0 18px 40px -16px rgba(1, 15, 45, 0.5), var(--vrl-ring);
	transition: transform var(--vrl-dur-base) var(--vrl-ease-out), opacity var(--vrl-dur-base) var(--vrl-ease-out);
}
.refer-sticky .btn { flex: 1; justify-content: center; min-height: 52px; }
.refer-sticky.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
body:has(.refer) .vrla-bubble { bottom: 88px; } /* the chat bubble moves up so it never covers the bar */
body:has(.refer) { padding-bottom: 84px; }

/* ─── Scale up ─── */
@media (min-width: 700px) {
	.refer-steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
	.refer-step { grid-template-rows: auto 1fr auto; padding: 26px 24px 24px; }
	.refer-rules__inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
	.refer-rules__inner .refer-head { margin-bottom: 0; position: sticky; top: 96px; }
	.refer-cta__card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
	.refer-sticky { display: none; }
	body:has(.refer) .vrla-bubble { bottom: 20px; }
	body:has(.refer) { padding-bottom: 0; }
}
@media (min-width: 960px) {
	.refer-hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
	.refer-hero__art { justify-self: end; width: 100%; transform: rotate(-1.5deg); }
	.refer-card--points { width: min(78%, 300px); margin-left: auto; margin-top: -26px; transform: rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
	.refer-sticky { transition: none; }
}
