/* ===========================================================================
   Ability Access — Referrals page styles (referrals.css)
   Built at the 1440px design width. Loads AFTER styles.css; only NEW classes.
   Shared classes (.container/.btn/.eyebrow/.accent/.lead/.cta/.site-footer/.ph)
   are defined in styles.css and are NOT redefined here.
   =========================================================================== */

/* =========================================================================
   REFERRAL HERO  (split: text + who-can-refer list  /  photo + floating card)
   ========================================================================= */
.rf-hero { position: relative; padding: 132px 0 56px; }
.rf-hero-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 64px; align-items: center;
}
.rf-hero-text .eyebrow { margin-bottom: 18px; }
.rf-hero h1 { font-size: 56px; line-height: 1.08; letter-spacing: -.01em; }
.rf-hero h1 .accent { display: block; font-size: 0.62em; margin-top: 8px; }
.rf-hero .lead { max-width: 480px; font-size: 16px; margin: 22px 0 26px; }

/* who-can-refer checklist (two columns of pills) */
.rf-who {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
  max-width: 500px; margin-bottom: 32px;
}
.rf-who li {
  display: flex; align-items: center; gap: 11px;
  font: 500 14.5px/1.3 var(--sans); color: var(--ink);
}
.rf-who svg { width: 19px; height: 19px; color: var(--teal); flex-shrink: 0; }

.rf-hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* hero media + floating card (mirrors the Careers "real impact" card) */
.rf-hero-media { position: relative; }
.rf-hero-photo {
  background: var(--ph-bg); border-radius: 0 0 0 110px; aspect-ratio: 5/6; min-height: 420px;
}
.rf-hero-card {
  position: absolute; right: -14px; bottom: -26px; width: 256px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 30px 60px -30px rgba(4,43,50,.28);
}
.rf-hero-card .ic {
  width: 44px; height: 44px; border-radius: 12px; background: #e9f3f3;
  display: grid; place-items: center; margin-bottom: 14px;
}
.rf-hero-card .ic svg { width: 22px; height: 22px; color: var(--teal); }
.rf-hero-card b { display: block; font: 600 17px/1.25 var(--sans); color: var(--ink); margin-bottom: 6px; }
.rf-hero-card p { font-size: 13px; line-height: 1.5; color: var(--body); }

/* =========================================================================
   REFERRAL FORM  (the centrepiece — large card on a pale band)
   ========================================================================= */
.rf-form-sec { background: var(--pale); padding: 64px 0 78px; }
.rf-form-head { text-align: center; max-width: 620px; margin: 0 auto 38px; }
.rf-form-head .eyebrow { margin-bottom: 14px; }
.rf-form-head h2 { font-size: 42px; line-height: 1.1; }
.rf-form-head p { margin-top: 16px; font-size: 16px; line-height: 1.7; color: var(--body); }

.rf-form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 18px 48px 44px;
  max-width: 980px; margin: 0 auto;
  box-shadow: 0 50px 90px -55px rgba(4,43,50,.35);
}

/* ---- grouped fieldsets ---- */
.rf-group { border: 0; padding: 30px 0; }
.rf-group + .rf-group { border-top: 1px solid var(--line); }
.rf-group-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 0;
}
.rf-step {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  background: #e9f3f3; color: var(--teal);
  display: grid; place-items: center;
  font: 700 15px/1 var(--sans);
}
.rf-group-titles b { display: block; font: 600 20px/1.2 var(--serif); color: var(--ink); }
.rf-group-titles small { display: block; margin-top: 3px; font: 500 13px/1 var(--sans); color: var(--muted); }

/* ---- field grid ---- */
.rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rf-col-2 { grid-column: 1 / -1; }
.rf-field { display: flex; flex-direction: column; min-width: 0; }
.rf-field label,
.rf-legend { font: 600 13px/1.2 var(--sans); color: var(--ink); margin-bottom: 9px; display: block; }

/* ---- text-style inputs / selects / textareas ---- */
.rf-field input[type="text"],
.rf-field input[type="tel"],
.rf-field input[type="email"],
.rf-field input[type="date"],
.rf-field select,
.rf-field textarea {
  width: 100%;
  font: 400 15px/1.4 var(--sans);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.rf-field input::placeholder,
.rf-field textarea::placeholder { color: #9aa9ac; }
.rf-field textarea { resize: vertical; min-height: 112px; line-height: 1.6; }
.rf-field input[type="date"] { color: var(--ink); cursor: text; }
.rf-field input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

.rf-field input:hover,
.rf-field select:hover,
.rf-field textarea:hover { border-color: #cfdbdc; }

.rf-field input:focus,
.rf-field select:focus,
.rf-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(19,138,130,.16);
}

/* ---- select with custom chevron ---- */
.rf-select-wrap { position: relative; }
.rf-select-wrap select { padding-right: 44px; cursor: pointer; }
.rf-select-wrap select:invalid { color: #9aa9ac; }
.rf-select-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--teal); pointer-events: none;
}

/* ---- radio rows ---- */
.rf-radio-row { display: flex; flex-wrap: wrap; gap: 12px; }
.rf-radio {
  display: inline-flex; align-items: center; gap: 11px; cursor: pointer;
  font: 500 14.5px/1 var(--sans); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 20px; transition: border-color .15s, background .15s;
  user-select: none;
}
.rf-radio:hover { border-color: #cfdbdc; }
.rf-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.rf-dot {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid #cfdbdc; background: #fff;
  display: inline-block; position: relative; transition: .15s;
}
.rf-radio:has(input:checked) { border-color: var(--teal); background: #eef7f6; }
.rf-radio input:checked ~ .rf-dot { border-color: var(--teal); }
.rf-radio input:checked ~ .rf-dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--teal);
}
.rf-radio input:focus-visible ~ .rf-dot { box-shadow: 0 0 0 3px rgba(19,138,130,.16); }

/* ---- file uploads ---- */
.rf-file {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  border: 1.5px dashed #cfdbdc; border-radius: 12px;
  padding: 14px 16px; background: #fbfdfd; transition: border-color .15s, background .15s;
}
.rf-file:hover { border-color: var(--teal); background: #f4fafa; }
.rf-file-ic {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px;
  background: #e9f3f3; display: grid; place-items: center;
}
.rf-file-ic svg { width: 20px; height: 20px; color: var(--teal); }
.rf-file-text { display: flex; flex-direction: column; min-width: 0; }
.rf-file-text b { font: 600 14.5px/1.2 var(--sans); color: var(--ink); }
.rf-file-text small { font: 400 12.5px/1.3 var(--sans); color: var(--muted); margin-top: 3px; }
.rf-file input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.rf-file input[type="file"]:focus-visible + .rf-file-ic,
.rf-file:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(19,138,130,.16); }

/* ---- form footer (closing note + submit) ---- */
.rf-form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line);
}
.rf-closing {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; line-height: 1.6; color: var(--body); max-width: 560px;
}
.rf-closing svg { width: 20px; height: 20px; color: var(--teal); flex-shrink: 0; margin-top: 2px; }
.rf-submit { flex-shrink: 0; padding: 16px 30px; }

/* =========================================================================
   RESPONSIVE  (improvised below the 1440px source width)
   ========================================================================= */
@media (max-width: 1024px) {
  .rf-hero { padding-top: 110px; }
  .rf-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .rf-hero-media { max-width: 560px; }
  .rf-hero-photo { border-radius: 18px; min-height: 360px; aspect-ratio: 16/11; }
  .rf-hero-card { right: 0; bottom: -20px; }
  .rf-hero h1 { font-size: 46px; }
}

@media (max-width: 768px) {
  .rf-hero h1 { font-size: 38px; }
  .rf-who { grid-template-columns: 1fr; gap: 11px; }
  .rf-form-head h2 { font-size: 32px; }
  .rf-form-card { padding: 12px 26px 34px; border-radius: 18px; }
  .rf-grid { grid-template-columns: 1fr; gap: 18px; }
  .rf-form-foot { flex-direction: column; align-items: stretch; gap: 22px; }
  .rf-submit { align-self: stretch; justify-content: center; }
}

@media (max-width: 480px) {
  .rf-hero h1 { font-size: 32px; }
  .rf-hero-photo { border-radius: 16px; min-height: 280px; }
  .rf-hero-card { position: static; width: auto; margin-top: 18px; }
  .rf-form-card { padding: 8px 18px 28px; border-radius: 14px; }
  .rf-group-head { gap: 13px; }
  .rf-group-titles b { font-size: 18px; }
  .rf-radio { padding: 12px 15px; }
}

/* =========================================================================
   MOTION POLISH (step-spine, file states, submit)
   ========================================================================= */
.rf-group[data-activate] .rf-step {
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-back), box-shadow var(--dur-2) var(--ease-out);
}
.rf-group.is-active .rf-step {
  background: var(--teal); color: #fff; transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(19,138,130,.12);
}

.rf-file { transition: border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.rf-file.is-dragging { border-color: var(--teal); background: #f4fafa; transform: scale(1.01); }
.rf-file.has-file { border-style: solid; border-color: var(--teal); background: #f4fafa; }
.rf-file.has-file .rf-file-ic { background: var(--teal); }
.rf-file.has-file .rf-file-ic svg { color: #fff; }

.rf-submit:disabled, .btn:disabled { opacity: .72; cursor: default; transform: none; box-shadow: none; }

.rf-form-sec { padding-top: var(--section-y); padding-bottom: var(--section-y); }
