/* Refer & review page (refer.html). Builds on site.css: page hero, contact card, fields, checks. */

/* how a referral works */
.rf-steps-wrap { padding: clamp(48px, 6vw, 80px) 0 0; margin-top: calc(-1 * clamp(56px, 7vw, 104px)); position: relative; }
.rf-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rf-steps li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow-md); }
.rf-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 800; font-size: 1.1rem; margin-bottom: 18px; }
.rf-steps li:last-child .rf-n { background: var(--ink); color: var(--green); }
.rf-steps h3 { font-size: 1.15rem; letter-spacing: -.015em; margin: 0 0 6px; }
.rf-steps p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* referral section */
.rf-refer { padding: clamp(56px, 7vw, 96px) 0; }
.rf-title { font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); letter-spacing: -.035em; line-height: 1.05; margin: 0; }
.rf-sub { margin: 12px 0 0; color: var(--ink-2); }
.rf-share, .rf-terms { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.rf-share h3, .rf-terms h3 { font-size: 1rem; letter-spacing: -.005em; margin: 0 0 6px; }
.rf-share > p:not(.rf-msg) { margin: 0; color: var(--ink-2); font-size: .95rem; }
.rf-msg { margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: var(--tint); border: 1px solid #DDF3CC; font-size: .95rem; line-height: 1.55; color: var(--ink); }
.rf-share .btn { min-height: 44px; }
.rf-terms ul { margin: 8px 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: .92rem; display: grid; gap: 6px; }
.rf-gap { margin-top: 16px; }
.field textarea#f-note { min-height: 96px; }

/* reviews */
.rf-reviews { padding: clamp(64px, 8vw, 112px) 0; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rv-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.rv-list { display: grid; gap: 14px; }
.rv-empty { background: var(--white); border: 1.5px dashed #CDD1C7; border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); text-align: center; }
.rv-empty svg { width: 44px; height: 44px; fill: none; stroke: var(--edge); stroke-width: 1.8; stroke-linejoin: round; }
.rv-empty h3 { font-size: 1.2rem; margin: 12px 0 6px; letter-spacing: -.015em; }
.rv-empty p { margin: 0 auto 20px; color: var(--ink-2); max-width: 30em; }
.rv-summary { display: flex; align-items: baseline; gap: 12px; padding: 0 4px 6px; }
.rv-summary b { font-size: 2.4rem; letter-spacing: -.04em; line-height: 1; }
.rv-summary span { color: var(--ink-2); }
.rv-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.rv-card blockquote { margin: 10px 0 0; font-size: 1.02rem; line-height: 1.55; white-space: pre-line; }
.rv-card footer { margin-top: 14px; font-size: .9rem; color: var(--ink-2); }
.rv-card footer b { color: var(--ink); font-weight: 650; }
.rv-shown { display: inline-flex; gap: 2px; }
.rv-shown svg { width: 18px; height: 18px; }
.rv-shown .on { fill: var(--edge); }
.rv-shown .off { fill: #DADDD5; }

.rv-form-title { font-size: 1.3rem; letter-spacing: -.02em; margin: 0; }
.rv-stars { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.rv-stars legend { width: 100%; }
/* stars run 5→1 in the markup so "this and the ones before it" can be lit with ~ */
.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { width: 44px; height: 44px; cursor: pointer; border-radius: 10px; display: grid; place-items: center;
  background: center / 34px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.7 6.3.9-4.6 4.4 1.1 6.2L12 17.1 6.4 20l1.1-6.2L2.9 9.4l6.3-.9z' fill='%23DADDD5'/%3E%3C/svg%3E");
  transition: transform .12s ease-out; }
.stars label:active { transform: scale(.9); }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.7 6.3.9-4.6 4.4 1.1 6.2L12 17.1 6.4 20l1.1-6.2L2.9 9.4l6.3-.9z' fill='%2360F312' stroke='%2346C20A' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.stars input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 1px; }
.rv-stars[aria-invalid="true"] .stars { outline: 2px solid #C2453A; outline-offset: 4px; border-radius: 12px; }
.rv-rating-text { font-size: .92rem; font-weight: 600; color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) {
  .rf-steps { grid-template-columns: 1fr; }
  .rv-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .stars label { transition: none; } }
