/* ============================================================
   Referrals page - custom polish layer
   ============================================================ */

/* ---------- Hero (photo band) ---------- */
.ref-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 150px 0 122px;
  background-image:
    linear-gradient(100deg, rgba(7, 25, 43, 0.96) 0%, rgba(10, 42, 70, 0.9) 45%, rgba(13, 110, 132, 0.5) 100%),
    linear-gradient(0deg, rgba(7, 25, 43, 0.35), rgba(7, 25, 43, 0.15)),
    url("../images/isto.jpg");
  background-size: cover;
  background-position: center 30%;
}

.ref-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(540px 380px at 88% 8%, rgba(78, 186, 40, 0.22), transparent 64%),
    radial-gradient(480px 360px at 4% 96%, rgba(20, 118, 168, 0.32), transparent 60%);
  pointer-events: none;
}

.ref-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(620px 460px at 78% 26%, #000 0%, transparent 72%);
  mask-image: radial-gradient(620px 460px at 78% 26%, #000 0%, transparent 72%);
  pointer-events: none;
}

.ref-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.ref-hero-inner h2 {
  text-shadow: 0 2px 30px rgba(4, 18, 32, 0.5);
}

.ref-hero-inner .grad {
  background: linear-gradient(118deg, #ffffff 8%, #CFE8FF 45%, #9BE7DD 105%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--white);
}

.ref-hero-inner p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.06rem;
  margin-bottom: 34px;
}

.ref-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--white);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.ref-pill svg {
  width: 17px;
  height: 17px;
  color: #9BE7DD;
  transition: transform 0.3s ease;
}

.ref-pill:hover svg {
  transform: scale(1.2) rotate(-8deg);
}

.ref-hero .crumbs {
  color: rgba(255, 255, 255, 0.72);
}

.ref-hero-btn-outline {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ref-hero-btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

/* ---------- Section heading accent ---------- */
.section-head h2::after {
  content: "";
  display: block;
  width: 66px;
  height: 4px;
  border-radius: 999px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, var(--teal), var(--green));
}

/* ---------- Why refer split ---------- */
.ref-split h2 {
  font-size: clamp(1.9rem, 3.3vw, 2.55rem);
  line-height: 1.16;
  margin-bottom: 18px;
}

.ref-split h2 .grad {
  background: linear-gradient(120deg, var(--teal) 10%, var(--teal-dark) 55%, var(--green-dark) 105%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--teal);
}

.ref-split p {
  color: var(--muted);
  margin-bottom: 16px;
}

.ref-split .check-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 14px 48px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  font-weight: 600;
  color: var(--navy);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ref-split .check-list li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}

.ref-split .check-list li::before {
  left: 12px;
  top: 12px;
}

/* image */
.ref-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--white);
  background: var(--teal-mist);
}

.ref-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3.4;
  transition: transform 0.55s ease;
}

.ref-media:hover img {
  transform: scale(1.04);
}

.ref-badge-hand {
  position: absolute;
  top: 18px;
  right: -12px;
  transform: rotate(3deg);
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  background: var(--white);
  padding: 12px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 2;
}

.ref-badge-card {
  position: absolute;
  left: 20px;
  bottom: -26px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  border-radius: 18px;
  padding: 16px 22px;
  box-shadow: var(--shadow);
  z-index: 2;
}

.ref-badge-card .num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
}

.ref-badge-card .lbl {
  font-size: 0.82rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- How it works ---------- */
.ref-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ref-step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 24px 28px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ref-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, var(--teal), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s ease;
}

.ref-step:nth-child(even) {
  transform: translateY(18px);
}

.ref-step:hover {
  transform: translateY(0);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.ref-step:hover::before {
  transform: scaleX(1);
}

.ref-step-num {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--teal-mist);
  color: var(--teal);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.ref-step:hover .ref-step-num {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(20, 80, 168, 0.3);
}

.ref-step h4 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.ref-step p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Rewards band ---------- */
.ref-rewards {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-deep);
}

.ref-rewards .ref-rewards-img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: 0.18;
}

.ref-rewards::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(7, 25, 43, 0.92) 0%, rgba(10, 42, 70, 0.88) 55%, rgba(13, 110, 132, 0.5) 100%),
    linear-gradient(0deg, rgba(7, 25, 43, 0.4), rgba(7, 25, 43, 0.2));
}

.ref-rewards .section-head h2 {
  color: var(--white);
}

.ref-rewards .section-head h2::after {
  background: linear-gradient(90deg, var(--white), #9BE7DD);
}

.ref-rewards .section-head p {
  color: rgba(255, 255, 255, 0.85);
}

.ref-rewards .kicker {
  color: #9BE7DD;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.reward-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 36px 30px 32px;
  text-align: center;
  color: var(--white);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.reward-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.reward-icon {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.reward-icon svg {
  width: 30px;
  height: 30px;
  transition: transform 0.35s ease;
}

.reward-card:hover .reward-icon {
  transform: translateY(-3px) scale(1.08) rotate(-4deg);
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 18px 36px rgba(78, 186, 40, 0.35);
}

.reward-card:hover .reward-icon svg {
  transform: scale(1.1);
}

.reward-card h3 {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.reward-card p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
}

/* ---------- Referral form ---------- */
.ref-form .form-card.ref-form-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.ref-form-card::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 80, 168, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ref-form-head {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 34px 38px 30px;
  background: linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 52%, var(--teal-deep) 100%);
  color: var(--white);
  overflow: hidden;
}

.ref-form-head::after {
  content: "";
  position: absolute;
  left: -70px;
  bottom: -110px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.ref-form-head > * {
  position: relative;
  z-index: 1;
}

.ref-form-icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ref-form-icon svg {
  width: 28px;
  height: 28px;
}

.ref-form-head:hover .ref-form-icon {
  transform: translateY(-3px) rotate(-4deg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.ref-form-head .kicker {
  color: #9BE7DD;
  margin-bottom: 8px;
}

.ref-form-head h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 6px;
}

.ref-form-head p {
  font-size: 0.89rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.ref-form-body {
  position: relative;
  z-index: 1;
  padding: 34px 38px 38px;
}

.ref-form .form-grid {
  gap: 20px;
}

.ref-form .form-group label {
  font-size: 0.82rem;
  letter-spacing: 0.015em;
}

.ref-form .form-group input,
.ref-form .form-group select,
.ref-form .form-group textarea {
  background: #F6FAFD;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 2px rgba(15, 45, 74, 0.04);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ref-form .form-group input:hover,
.ref-form .form-group select:hover,
.ref-form .form-group textarea:hover {
  border-color: #C7DCEE;
}

.ref-form .form-group input:focus,
.ref-form .form-group select:focus,
.ref-form .form-group textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 80, 168, 0.12);
  transform: translateY(-1px);
}

.ref-form .form-group textarea {
  min-height: 150px;
}

.ref-form-submit {
  width: 100%;
  margin-top: 26px;
  padding: 16px 30px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 30px rgba(20, 80, 168, 0.36);
}

.ref-form .contact-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ref-form .contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}

.ref-form .contact-item .icon {
  position: relative;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--white);
  box-shadow: 0 8px 20px rgba(20, 80, 168, 0.26);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.ref-form .contact-item .icon svg {
  width: 26px;
  height: 26px;
  transition: transform 0.3s ease;
}

.ref-form .contact-item:hover .icon {
  transform: translateY(-3px) scale(1.06) rotate(-4deg);
  background: linear-gradient(135deg, var(--teal-deep), var(--navy-deep));
  box-shadow: 0 12px 26px rgba(20, 80, 168, 0.34);
}

.ref-form .contact-item:hover .icon svg {
  transform: scale(1.08);
}

.ref-form .contact-item a {
  font-weight: 600;
}

.ref-form .form-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 14px;
  background: var(--teal-mist);
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--teal-dark);
}

.ref-form .form-note::before {
  content: "\1F512";
}

/* eligibility side card */
.ref-side-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-deep) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}

.ref-side-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.ref-side-card > * {
  position: relative;
  z-index: 1;
}

.ref-side-card .kicker {
  color: #9BE7DD;
}

.ref-side-card h3 {
  color: var(--white);
  margin-bottom: 14px;
}

.ref-side-card .check-list li {
  color: rgba(255, 255, 255, 0.92);
}

.ref-side-card .check-list li::before {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ref-steps {
    grid-template-columns: 1fr 1fr;
  }

  .ref-step:nth-child(even) {
    transform: none;
  }
}

@media (max-width: 920px) {
  .ref-hero {
    padding: 130px 0 90px;
  }

  .reward-grid {
    grid-template-columns: 1fr;
  }

  .ref-badge-hand {
    right: 6px;
  }

  .ref-form-head {
    padding: 28px 26px 24px;
  }

  .ref-form-body {
    padding: 26px 26px 30px;
  }
}

@media (max-width: 560px) {
  .ref-hero {
    padding: 130px 0 72px;
  }

  .ref-steps {
    grid-template-columns: 1fr;
  }

  .ref-badge-card {
    left: 50%;
    transform: translateX(-50%);
    bottom: -24px;
    white-space: nowrap;
  }

  .ref-badge-hand {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ref-hero::after,
  .ref-media:hover img,
  .ref-step::before,
  .ref-step-num,
  .reward-card,
  .reward-icon,
  .reward-icon svg,
  .ref-split .check-list li,
  .ref-form-icon,
  .ref-form .contact-item,
  .ref-form .contact-item .icon,
  .ref-form .contact-item .icon svg,
  .ref-pill svg {
    transition: none;
  }
}