/* Referral page: the base44 referral program, rebuilt in Evergreen 2 with the Home page's lens panels and floating cards */

/* the challenge page stands alone: no site header or footer, just its own bar with the countdown and the action */
html[data-page="referral"] header.site, html[data-page="referral"] footer.site { display: none; }
.ref-bar { position: sticky; top: 0; z-index: 20; background: rgb(8 8 6 / 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.ref-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.ref-title { font: 800 18px var(--display); letter-spacing: -0.02em; color: var(--white); white-space: nowrap; }
.ref-bar-r { display: flex; align-items: center; gap: 12px; flex: none; }
.ref-ends { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.ref-cd.sm { gap: 4px; }
.ref-cd.sm span { min-width: 36px; padding: 5px 4px 4px; border-radius: 7px; }
.ref-cd.sm span b { font-size: 15px; }
.ref-cd.sm span em { font-size: 8px; margin-top: 2px; }

.ref-rv { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d, 0) * 110ms); }
.ref-rv.on { opacity: 1; transform: none; }
[data-view="referral"] section[id] { scroll-margin-top: 64px; }
.ref-sec { padding-block: clamp(72px, 9vw, 120px); overflow: hidden; }

/* hero and closing band: near black with the lens rings sweeping behind the headline */
.ref-hero { position: relative; isolation: isolate; overflow: hidden; text-align: center; background: radial-gradient(60% 55% at 50% 40%, rgb(17 80 61 / 0.5), transparent 70%), #080806; padding-block: clamp(88px, 12vw, 168px); }
.ref-hero .wrap { position: relative; z-index: 2; }
.ref-hero h1, .ref-hero h2 { margin: 6px auto 0; max-width: 15ch; font-weight: 800; font-size: clamp(40px, 6.6vw, 82px); line-height: 1.02; letter-spacing: -0.035em; color: var(--white); }
.ref-hero .lead { margin: 24px auto 0; max-width: 56ch; font-size: 19px; }
.ref-hero .ctas { justify-content: center; margin-top: 34px; }
.ref-rings { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ref-rings::before, .ref-rings::after { content: ""; position: absolute; border-radius: 50%; }
.ref-rings::before { width: min(1100px, 120vw); aspect-ratio: 1; left: -18%; top: 38%; border: 3px solid rgb(255 255 255 / 0.85); box-shadow: 0 0 40px rgb(255 255 255 / 0.35), inset 0 0 60px rgb(168 220 198 / 0.3), 0 0 0 16px rgb(255 255 255 / 0.04); filter: blur(1px); -webkit-mask: linear-gradient(115deg, #000 20%, transparent 70%); mask: linear-gradient(115deg, #000 20%, transparent 70%); animation: ref-drift 14s ease-in-out infinite alternate; }
.ref-rings::after { width: min(900px, 100vw); aspect-ratio: 1; right: -20%; top: -52%; border: 2.5px solid rgb(255 210 63 / 0.8); box-shadow: 0 0 44px rgb(255 210 63 / 0.3), inset 0 0 40px rgb(255 210 63 / 0.16); filter: blur(1.2px); -webkit-mask: linear-gradient(235deg, #000 25%, transparent 80%); mask: linear-gradient(235deg, #000 25%, transparent 80%); animation: ref-drift 16s ease-in-out -6s infinite alternate-reverse; }
@keyframes ref-drift { to { translate: 2% -3%; rotate: 4deg; } }
.ref-end { padding-block: clamp(96px, 12vw, 160px); }

/* copy plus panel rows, like How it works on Home */
.ref-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.ref-copy { max-width: 480px; }
.ref-copy .lead b { color: var(--ink); font-weight: 600; }
.ref-h3 { font: 800 clamp(26px, 2.6vw, 34px)/1.12 var(--display); letter-spacing: -0.02em; }
.ref-art { aspect-ratio: 16 / 12; }

/* payout: the money card and a three step podium for the prizes */
.ref-money { position: absolute; left: 50%; top: 7%; translate: -50% 0; display: flex; align-items: baseline; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--gold); color: var(--ink); box-shadow: 0 0 0 6px rgb(255 210 63 / 0.14), 0 20px 40px -14px rgb(255 210 63 / 0.45); white-space: nowrap; }
.ref-money b { font: 800 30px/1 var(--display); letter-spacing: -0.02em; }
.ref-money span { font-size: 13px; font-weight: 600; }
.ref-steps { position: absolute; left: 5%; right: 5%; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.ref-steps > div { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 18px 12px 0; border-radius: 16px 16px 0 0; border-bottom: 0; }
.ref-steps .p1 { height: 72%; min-height: 250px; background: linear-gradient(rgb(168 220 198 / 0.16), rgb(255 255 255 / 0.04)); border-color: rgb(168 220 198 / 0.45); }
.ref-steps .p2 { height: 62%; min-height: 220px; }
.ref-steps .p3 { height: 56%; min-height: 210px; }
.ref-steps b { font: 700 14.5px/1.2 var(--display); letter-spacing: -0.01em; }
.ref-steps small { font-size: 10.5px; line-height: 1.35; color: var(--fog); }
.ref-steps i { margin-top: auto; padding-bottom: 8px; font: italic 400 clamp(40px, 5vw, 64px)/1 var(--accent); color: rgb(255 255 255 / 0.2); }
.ref-steps .p1 i { color: var(--mint); }
.ref-prize { width: 46px; height: 46px; border-radius: 12px; background: rgb(255 255 255 / 0.08); display: grid; place-items: center; margin-bottom: 4px; }
.ref-prize svg { width: 28px; height: 28px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ref-steps .p1 .ref-prize { background: rgb(168 220 198 / 0.2); } .ref-steps .p1 .ref-prize svg { stroke: var(--mint); }
.ref-pod .hz-in { transform: translateY(40px); }
.ref-pod.on .hz-in { transform: none; }
.ref-pod .ref-money.hz-in { transform: translateY(-14px) scale(.9); }
.ref-pod.on .ref-money.hz-in { transform: none; }

/* how it works: five steps on a line that fills as they arrive */
.ref-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; }
.ref-flow::before { content: ""; position: absolute; left: 3%; right: 3%; top: 31px; height: 2px; background: rgb(255 255 255 / 0.12); }
.ref-flow::after { content: ""; position: absolute; left: 3%; top: 31px; height: 2px; width: calc(94% * var(--p, 0)); background: linear-gradient(90deg, rgb(168 220 198 / 0.3), var(--mint)); box-shadow: 0 0 14px rgb(168 220 198 / 0.6); transition: width 1.2s cubic-bezier(.4,0,.2,1); }
.ref-flow li { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.ref-flow i { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; font: italic 400 26px/1 var(--accent); color: var(--white); background: #0a2a20; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); transition: background .5s, color .5s, box-shadow .5s; }
.ref-flow li.lit i { background: var(--mint); color: var(--ink); box-shadow: 0 0 0 6px rgb(168 220 198 / 0.18), 0 0 30px rgb(168 220 198 / 0.4); }
.ref-flow b { font: 700 19px/1.2 var(--display); letter-spacing: -0.015em; }
.ref-flow span { font-size: 15px; line-height: 1.55; color: var(--mist); }

/* dates: two dark panels with live countdowns */
.ref-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ref-date::before { top: 78%; }
.ref-date { aspect-ratio: auto; padding: clamp(24px, 3vw, 36px); color: var(--white); display: flex; flex-direction: column; }
.ref-date-hd { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgb(255 255 255 / 0.12); }
.ref-date-hd > span { display: grid; gap: 4px; }
.ref-date small { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.ref-date-hd b { font: 800 clamp(28px, 3vw, 38px)/1.05 var(--display); letter-spacing: -0.025em; }
.ref-tm { justify-items: end; }
.ref-cd { display: flex; gap: 6px; }
.ref-cd span { display: grid; justify-items: center; min-width: 44px; padding: 7px 6px 6px; border-radius: 9px; background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
.ref-cd span b { font: 700 19px/1 var(--display); font-variant-numeric: tabular-nums; }
.ref-cd span em { font-style: normal; margin-top: 3px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); }
.ref-date h3 { font: 700 20px var(--display); letter-spacing: -0.015em; }
.ref-date p { margin-top: 10px; font-size: 15.5px; line-height: 1.6; color: var(--mist); }

/* Submit a name: the Typeform in a modal */
.ref-tf { width: min(760px, calc(100vw - 32px)); height: min(680px, calc(100dvh - 48px)); padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--white); box-shadow: 0 40px 100px -20px rgb(0 0 0 / 0.7); }
.ref-tf::backdrop { background: rgb(3 20 14 / 0.72); backdrop-filter: blur(6px); }
.ref-tf iframe { width: 100%; height: 100%; border: 0; display: block; }
.ref-tf-x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; background: rgb(19 17 10 / 0.08); display: grid; place-items: center; }
.ref-tf-x svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

@media (max-width: 900px) {
  .ref-ends { display: none; }
  .ref-cd.sm em { display: none; }
  .ref-row { grid-template-columns: 1fr; }
  .ref-flow { grid-template-columns: 1fr; gap: 26px; }
  .ref-flow::before, .ref-flow::after { left: 31px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .ref-flow::after { height: calc((100% - 20px) * var(--p, 0)); bottom: auto; transition-property: height; }
  .ref-flow li { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; row-gap: 4px; }
  .ref-flow i { grid-row: span 2; margin: 0; }
  .ref-dates { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ref-title { font-size: 14px; }
  .ref-cd.sm span:last-child { display: none; }
  .ref-bar-r { gap: 8px; }
  .ref-cd.sm span { min-width: 27px; padding-inline: 3px; }
  .ref-cd.sm span b { font-size: 13px; }
  .ref-bar .btn-sm { padding: 8px 10px; font-size: 12.5px; }
  .ref-art.ref-pod { aspect-ratio: auto; min-height: 430px; }
  .ref-steps { left: 3%; right: 3%; gap: 6px; }
  .ref-steps > div { padding-inline: 6px; }
  .ref-steps small { font-size: 9.5px; }
  .ref-steps .p1 { min-height: 270px; } .ref-steps .p2 { min-height: 240px; } .ref-steps .p3 { min-height: 250px; }
  .ref-date-hd { flex-direction: column; }
  .ref-tm { justify-items: start; }
  .ref-cd span { min-width: 40px; }
  .ref-hero .lead { font-size: 17px; }
  .ref-rings::before { top: 74%; left: -60%; }
  .ref-date::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ref-rv { opacity: 1; transform: none; transition: none; }
  .ref-rings::before, .ref-rings::after { animation: none; }
  .ref-flow::after { transition: none; }
}
