/* =========================================================
   Share2Care — visual redesign layer (PREVIEW, 11-16-2026)
   Loaded after styles.css on every page. Visual only: layout,
   spacing, shape, imagery and motion.
   · Every colour is a :root token from styles.css (or an rgba()
     / color-mix() of one). Fonts are unchanged.
   · No text is added: every pseudo-element is content: "".
   · The QR code in "Get the App" is untouched — its canvas keeps
     the original 224 / 190 / 168 / 128px display widths and 10px
     radius from styles.css; only the stage around it is new.
   · New imagery and video (Higgsfield) live in assets/rd/.
   ========================================================= */

:root {
  --rd-radius: 28px;
  --rd-radius-lg: 36px;
  --rd-ease: cubic-bezier(.2, .7, .2, 1);
  --rd-shadow-card: 0 1px 0 rgba(var(--shadow-rgb), .04), 0 14px 34px rgba(var(--shadow-rgb), .08);
  --rd-shadow-lift: 0 2px 0 rgba(var(--shadow-rgb), .04), 0 28px 64px rgba(var(--shadow-rgb), .17);
  --rd-teal-a: color-mix(in srgb, var(--brand-teal) 32%, transparent);
  --rd-teal-b: color-mix(in srgb, var(--brand-teal) 14%, transparent);
  --rd-blush2-a: color-mix(in srgb, var(--blush-2) 94%, transparent);
  --rd-blush2-b: color-mix(in srgb, var(--blush-2) 70%, transparent);
}

/* ---------- 1. Base ---------- */
::selection { background: var(--secondary-soft); color: var(--ink); }
h1, h2 { letter-spacing: -0.02em; }
body { text-rendering: optimizeLegibility; }

/* ---------- 2. Eyebrows become small chips with a teal dot ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 12px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .06);
  border: 1px solid rgba(var(--primary-rgb), .1);
  letter-spacing: 2px;
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 0 0 3px var(--secondary-soft);
}

/* ---------- 3. Section rhythm + headings ---------- */
.section, .how, .care-types, .trust, .both-sides, .stories { padding-top: 116px; padding-bottom: 116px; }
.section-head { margin-bottom: 60px; }
.section-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.06; }
.section-lead { font-size: 1.14rem; line-height: 1.7; }
@media (max-width: 760px) {
  .section, .how, .care-types, .trust, .both-sides, .stories { padding-top: 76px; padding-bottom: 76px; }
  .section-head { margin-bottom: 40px; }
}

/* ---------- 4. Buttons: soft depth + a light sheen on hover ---------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  letter-spacing: .01em;
  transition: transform .25s var(--rd-ease), box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s var(--rd-ease);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { box-shadow: 0 10px 24px rgba(var(--primary-rgb), .22); }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(var(--primary-rgb), .3); }
.btn-accent { box-shadow: 0 10px 26px rgba(var(--accent-rgb), .35); }
.btn-accent:hover { box-shadow: 0 16px 36px rgba(var(--accent-rgb), .45); }

/* ---------- 5. Header: a floating rounded bar on desktop ---------- */
.site-header { transition: box-shadow .35s ease; }
@media (min-width: 981px) {
  .site-header {
    top: 12px;
    margin: 12px 16px 0;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 14px 36px rgba(var(--shadow-rgb), .16);
  }
  html.rd-scrolled .site-header { box-shadow: 0 20px 50px rgba(var(--shadow-rgb), .3); }
}

/* ---------- 6. Shared decorative motion ---------- */
@keyframes rd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes rd-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -26px) scale(1.08); } }
@keyframes rd-kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes rd-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rd-sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Scroll reveal (redesign.js tags elements; only ones still hidden animate).
   fill-mode "backwards" only, so hover transforms work once it finishes. */
.rd-motion .rd-reveal:not(.rd-in) { opacity: 0; }
.rd-motion .rd-reveal.rd-in { animation: rd-rise .9s var(--rd-ease) var(--rd-delay, 0ms) backwards; }

/* ---------- 7. Homepage hero ---------- */
.hero { position: relative; isolation: isolate; padding-bottom: 124px; }
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}
.hero::before {
  width: 620px; height: 620px;
  right: -160px; top: 220px;
  background: radial-gradient(circle, var(--rd-teal-a) 0%, transparent 65%);
  animation: rd-drift 18s ease-in-out infinite;
}
.hero::after {
  width: 520px; height: 520px;
  left: -180px; bottom: -160px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .35) 0%, transparent 65%);
  animation: rd-drift 22s ease-in-out infinite reverse;
}

/* The film strip becomes a large rounded cinematic band. Clips are spaced
   with a transparent right border (not margin/gap) so script.js's
   scrollWidth-based loop stays seamless. */
.video-strip {
  margin: 18px 16px 60px;
  padding-top: 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--rd-shadow-card);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
/* Clip size is the ORIGINAL strip's (viewport height and clip width come from
   styles.css untouched). The spacer border is added on top of that width, so
   each picture stays exactly as wide as before. */
.strip-clip {
  width: calc(clamp(150px, 15vw, 220px) + 10px);
  border-right: 10px solid transparent;
}
.strip-video { border-radius: 14px; background: var(--primary-soft); }
.strip-clip::after { border-radius: 0 0 14px 14px; }
.strip-clip-label {
  left: 8px; bottom: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  background: rgba(var(--scrim-rgb), .42);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  text-shadow: none;
}
.video-strip-caption { padding: 14px 22px 16px; }
.video-toggle {
  top: 14px; right: 22px;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: var(--rd-shadow-card);
}

.hero-inner { gap: 72px; }
.hero-title { font-size: clamp(3rem, 6.2vw, 5.4rem); line-height: .98; letter-spacing: -0.03em; }
.hero-sub { font-size: 1.2rem; line-height: 1.7; max-width: 520px; }
.hero-trustline {
  display: inline-flex;
  margin-top: 26px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--rd-shadow-card);
}

/* The Care Bank card: gradient hairline border + a soft glow */
.hero-cb-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 42px 40px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, var(--brand-teal), var(--primary) 55%, var(--accent)) border-box;
  box-shadow: var(--rd-shadow-lift);
}
.hero-cb-card::after {
  content: "";
  position: absolute;
  right: -90px; top: -90px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rd-teal-b) 0%, transparent 70%);
  pointer-events: none;
}

@media (max-width: 980px) {
  .hero-inner { gap: 44px; }
  .hero::before { width: 420px; height: 420px; top: 320px; }
}
@media (max-width: 620px) {
  .video-strip { margin: 12px 12px 36px; border-radius: 22px; padding-top: 10px; }
  .strip-clip { width: calc(clamp(130px, 42vw, 190px) + 8px); border-right-width: 8px; }
  .strip-video { border-radius: 12px; }
  .strip-clip::after { border-radius: 0 0 12px 12px; }
  .strip-clip-label { left: 6px; bottom: 6px; padding: 3px 8px 3px 7px; font-size: .66rem; gap: 5px; }
  .video-toggle { right: 18px; }
  .hero-cb-card { padding: 32px 26px; border-radius: 26px; }
}

/* ---------- 8. Page heroes: brand-ribbon artwork behind the text ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 100px 0 88px;
  background:
    url("assets/rd/rd-texture-ribbons.jpg") right center / cover no-repeat,
    linear-gradient(160deg, var(--blush) 0%, var(--primary-soft) 60%, var(--accent-soft) 100%);
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--rd-blush2-a) 0%, var(--rd-blush2-a) 38%, var(--rd-blush2-b) 62%, transparent 100%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.2rem); line-height: 1.04; letter-spacing: -0.025em; }
.page-hero.community-hero { padding: 72px 0 88px; }
@media (max-width: 760px) {
  .page-hero { padding: 72px 0 64px; background-position: 70% top, 0 0; }
  .page-hero::after { background: linear-gradient(180deg, var(--rd-blush2-b) 0%, var(--rd-blush2-a) 45%, var(--rd-blush2-a) 100%); }
}

/* Detail pages (.care-page): the same artwork, faded in at the top */
.care-page { position: relative; isolation: isolate; }
.care-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 560px;
  z-index: -1;
  background: url("assets/rd/rd-texture-ribbons.jpg") right top / cover no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent);
          mask-image: linear-gradient(to bottom, #000 35%, transparent);
  pointer-events: none;
}

/* ---------- 9. Two-column heroes: arched photo with a soft glow ----------
   (The dashed rotating ring that used to circle these photos was removed.) */
.community-hero-grid { gap: 64px; }
.community-hero-media { position: relative; isolation: isolate; }
.community-hero-media::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 70%;
  aspect-ratio: 1;
  left: -12%; bottom: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .4) 0%, transparent 66%);
  pointer-events: none;
}
.community-media-card {
  border: 0;
  border-radius: 260px 260px 32px 32px;
  box-shadow: var(--rd-shadow-lift);
  background: var(--primary-soft);
}
.community-media-card img {
  aspect-ratio: 4 / 4.7;
  object-fit: cover;
  animation: rd-kenburns 24s ease-in-out infinite alternate;
}
.community-floating-badge { left: 20px; right: 20px; bottom: 20px; border-radius: 18px; z-index: 2; }

@media (max-width: 980px) {
  .community-media-card { border-radius: 200px 200px 26px 26px; }
  .community-media-card img { aspect-ratio: 4 / 3.8; }
}
@media (max-width: 620px) {
  .community-media-card { border-radius: 150px 150px 22px 22px; }
}

/* Advisory + Subscription: the hero card sits over an arched photo */
.adv-page .community-hero-media::before,
.rd-sub .community-hero-media::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 72%;
  aspect-ratio: 4 / 5;
  right: 0; top: 0;
  border-radius: 240px 240px 30px 30px;
  background: var(--primary-soft) center / cover no-repeat;
  box-shadow: var(--rd-shadow-lift);
}
.adv-page .community-hero-media::before { background-image: url("assets/rd/rd-advisory-hero.jpg"); }
.rd-sub .community-hero-media::before { background-image: url("assets/rd/rd-sub-family.jpg"); }
.adv-page .community-hero-media .hero-cb-card,
.rd-sub .community-hero-media .hero-cb-card { margin: 38% 24% 0 0; }
@media (max-width: 980px) {
  .adv-page .community-hero-media::before,
  .rd-sub .community-hero-media::before {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 200px 200px 26px 26px;
    right: auto; top: auto;
    margin-bottom: -60px;
  }
  .adv-page .community-hero-media .hero-cb-card,
  .rd-sub .community-hero-media .hero-cb-card { margin: 0 14px; }
}

/* Join as a Pro: arched portrait to the right of the hero copy */
@media (min-width: 981px) {
  .rd-join .page-hero { min-height: 600px; display: flex; align-items: center; }
  .rd-join .page-hero .container { text-align: left; }
  .rd-join .page-hero .container > * { max-width: 560px; }
  .rd-join .page-hero p { margin-left: 0; margin-right: 0; }
  .rd-join .page-hero .hero-actions { justify-content: flex-start; }
  .rd-join .page-hero::before {
    content: "";
    position: absolute;
    right: max(24px, calc((100vw - var(--container)) / 2 + 24px));
    top: 48px; bottom: 48px;
    width: min(420px, 34vw);
    border-radius: 240px 240px 30px 30px;
    background: var(--primary-soft) url("assets/rd/rd-pro-portrait.jpg") center 18% / cover no-repeat;
    box-shadow: var(--rd-shadow-lift);
  }
}

/* ---------- 10. Feature photos ---------- */
.community-feature-photo,
.spotlight-art-card {
  border: 0;
  border-radius: 32px;
  box-shadow: var(--rd-shadow-lift);
}
.community-feature-photo img,
.spotlight-art-card img { transition: transform 1.2s var(--rd-ease); }
.community-feature-photo:hover img,
.spotlight-art-card:hover img { transform: scale(1.04); }
.community-spotlight-banner { border-radius: var(--rd-radius-lg); border-color: var(--line); box-shadow: var(--rd-shadow-card); }

/* ---------- 11. Cards ---------- */
.type-card, .trust-card, .dual-card, .story-card, .value-card, .ct-card,
.cb-person, .cb-side, .rt-role, .rr-service, .abt-mv-card, .cb-member,
.cb-panel, .auth-card, .app-section, .adv-contact, .pv-plain, .rt-jobs-panel {
  border-radius: var(--rd-radius);
}
.type-card, .trust-card, .dual-card, .value-card, .ct-card, .cb-person, .cb-side,
.rt-role, .rr-service, .abt-mv-card {
  box-shadow: var(--rd-shadow-card);
  transition: transform .4s var(--rd-ease), box-shadow .4s ease, border-color .3s ease;
}
.type-card:hover, .trust-card:hover, .dual-card:hover, .value-card:hover,
.cb-person:hover, .rt-role:hover, .rr-service:hover {
  transform: translateY(-6px);
  box-shadow: var(--rd-shadow-lift);
}
.type-icon { border-radius: 18px; transition: transform .45s var(--rd-ease); }
.type-card:hover .type-icon, .value-card:hover .type-icon,
.rt-role:hover .type-icon, .trust-card:hover .trust-icon { transform: rotate(-6deg) scale(1.07); }
.trust-icon { transition: transform .45s var(--rd-ease); }

/* Care types: a gradient rule that grows across the top on hover */
.care-types .type-card { overflow: hidden; }
.care-types .type-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--brand-teal), var(--accent));
  transform: scaleX(.22);
  transform-origin: left;
  transition: transform .6s var(--rd-ease);
}
.care-types .type-card:hover::before { transform: scaleX(1); }

/* ---------- 12. How it works: each step on its own card ---------- */
.how .step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--rd-radius);
  padding: 30px 26px 28px;
  box-shadow: var(--rd-shadow-card);
  transition: transform .4s var(--rd-ease), box-shadow .4s ease;
}
.how .step:hover { transform: translateY(-6px); box-shadow: var(--rd-shadow-lift); }
.how .step-num { box-shadow: 0 0 0 8px var(--white), 0 12px 24px rgba(var(--shadow-rgb), .18); }
.how .steps-line {
  top: 58px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-teal), var(--primary));
  opacity: .35;
}

/* ---------- 13. Why we're different: a deep gradient panel ---------- */
.why-card {
  overflow: hidden;
  border-radius: var(--rd-radius-lg);
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(circle at 88% 12%, var(--rd-teal-a), transparent 42%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--secondary-dark) 100%);
  box-shadow: var(--rd-shadow-lift);
}
.why-card::after {
  content: "";
  position: absolute;
  right: -90px; bottom: -90px;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 46px solid rgba(255, 255, 255, .05);
  pointer-events: none;
}

/* ---------- 14. Both sides ---------- */
.dual-card { padding: 44px; }
.dual-card--pro {
  background:
    radial-gradient(circle at 100% 0%, var(--rd-teal-b), transparent 45%),
    linear-gradient(165deg, var(--secondary-soft) 0%, var(--blush-2) 100%);
}

/* ---------- 15. Stories: a quote mark on each card ----------
   Sits on its own line just above the quote. It used to be pinned top-right,
   where it landed on the "✓ Certified Caregiver" / "Verified Family" badge,
   and the bottom-right corner is no better: on phones the name and location
   run right to the card edge. In the flow it can't collide at any width. */
.story-card { position: relative; border-radius: var(--rd-radius); }
.story-card p::before {
  content: "";
  display: block;
  width: 30px; height: 23px;
  margin: 6px 0 12px;
  background: var(--secondary);
  opacity: .45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 36'%3E%3Cpath d='M0 36V22C0 9.5 6.5 2 19 0l2 5C14 7 11 11 11 17h8v19H0zm25 0V22C25 9.5 31.5 2 44 0l2 5c-7 2-10 6-10 12h8v19H25z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 36'%3E%3Cpath d='M0 36V22C0 9.5 6.5 2 19 0l2 5C14 7 11 11 11 17h8v19H0zm25 0V22C25 9.5 31.5 2 44 0l2 5c-7 2-10 6-10 12h8v19H25z'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
}

/* ---------- 16. Get the App: a navy stage around the (unchanged) QR code ---------- */
.app-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 124px 0;
  background: var(--primary-dark) url("assets/rd/rd-qr-stage.jpg") center bottom / cover no-repeat;
}
.app-cta::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(var(--primary-rgb), .94) 0%, rgba(var(--primary-rgb), .78) 42%, rgba(var(--primary-rgb), .2) 100%);
  pointer-events: none;
}
.app-cta .app-inner { max-width: var(--container); }
.app-copy .section-title { color: var(--white); }
.app-copy .section-lead { color: rgba(255, 255, 255, .84); }
.app-cta .eyebrow { color: var(--accent); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
.app-cta .eyebrow::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25); }
.app-tags li {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .24);
  color: var(--white);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.app-hint-line { color: rgba(255, 255, 255, .86); }

/* The scan stage: frosted panel, glow behind the code, floating phone */
.app-scan-row {
  position: relative;
  isolation: isolate;
  justify-content: center;
  padding: 36px 38px;
  border-radius: 34px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(var(--scrim-rgb), .35);
}
.app-scan-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%; top: 6%;
  width: 62%; height: 88%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .3) 0%, var(--rd-teal-b) 45%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.app-qr-card {
  background: var(--white);
  border: 0;
  border-radius: 26px;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .14),
    0 26px 60px rgba(var(--scrim-rgb), .4);
}
.app-phone svg { animation: rd-float 6.5s ease-in-out infinite; }

@media (min-width: 981px) {
  .app-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "eyebrow scan"
      "title   scan"
      "lead    scan"
      "tags    scan"
      "actions scan";
    column-gap: 64px;
    align-items: center;
  }
  .app-copy > .eyebrow { grid-area: eyebrow; justify-self: start; align-self: end; }
  .app-copy > .section-title { grid-area: title; }
  .app-copy > .section-lead { grid-area: lead; }
  .app-copy > .app-scan-row { grid-area: scan; margin: 0; }
  .app-copy > .app-tags { grid-area: tags; }
  .app-copy > .app-actions { grid-area: actions; align-items: flex-start; align-self: start; }
  .app-cta .app-hint-line { text-align: left; }
}
@media (max-width: 980px) {
  .app-cta { padding: 84px 0; }
  .app-cta::before { background: linear-gradient(180deg, rgba(var(--primary-rgb), .92) 0%, rgba(var(--primary-rgb), .82) 60%, rgba(var(--primary-rgb), .55) 100%); }
  .app-scan-row { padding: 26px 22px; border-radius: 28px; }
}
@media (max-width: 430px) {
  .app-scan-row { padding: 18px 14px; border-radius: 24px; }
}

/* ---------- 17. Closing CTA band: full width over generated artwork ----------
   Every closing band (About, Community, Facilities, For Families, Help, Home,
   Retire in PH, Subscription) runs edge to edge with square top corners, so it
   joins the section above with a straight line instead of sitting inset with
   light notches at its corners. Bottom corners stay rounded above the footer. */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 16px;
  border-radius: 0 0 var(--rd-radius-lg) var(--rd-radius-lg);
  padding: 112px 0;
  background: var(--primary) url("assets/rd/rd-cta-navy.jpg") center / cover no-repeat;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .55) 0%, rgba(var(--primary-rgb), .15) 100%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); letter-spacing: -0.02em; }
.cta-band .eyebrow { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
@media (max-width: 620px) {
  .cta-band { margin: 0 0 10px; border-radius: 0 0 26px 26px; padding: 76px 0; }
}

/* Homepage: the section above ("Care doesn't wait for a laptop") is navy too,
   so both backgrounds fade to the same deep navy at the seam and the two
   images meet as one surface. */
.app-cta + .cta-band { margin-top: -1px; }   /* 1px overlap: no hairline at a fractional seam */
.app-cta + .cta-band::after,
.app-cta:has(+ .cta-band)::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  z-index: -1;
  pointer-events: none;
}
.app-cta + .cta-band::after { top: 0; background: linear-gradient(180deg, var(--primary-dark) 0, var(--primary-dark) 24px, transparent 100%); }
.app-cta:has(+ .cta-band)::after { bottom: 0; background: linear-gradient(0deg, var(--primary-dark) 0, var(--primary-dark) 24px, transparent 100%); }

/* ---------- 18. Footer ---------- */
.site-footer {
  border-radius: var(--rd-radius-lg) var(--rd-radius-lg) 0 0;
  background:
    radial-gradient(circle at 12% 0%, var(--rd-teal-b), transparent 38%),
    radial-gradient(circle at 92% 100%, rgba(var(--accent-rgb), .07), transparent 40%),
    var(--footer-bg);
}

/* ---------- 19. Sign in / sign up: a photo panel beside the card ---------- */
@media (min-width: 981px) {
  .auth {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    padding: 40px 40px 56px;
    align-items: center;
  }
  .auth::before {
    content: "";
    justify-self: stretch;
    align-self: stretch;
    min-height: 560px;
    border-radius: 240px 240px var(--rd-radius-lg) var(--rd-radius-lg);
    background: var(--primary-soft) url("assets/rd/rd-auth-room.jpg") center / cover no-repeat;
    box-shadow: var(--rd-shadow-lift);
  }
}
.auth-card {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, var(--line), var(--secondary-soft) 50%, var(--primary-soft)) border-box;
  box-shadow: var(--rd-shadow-lift);
}

/* ---------- 20. Form fields ---------- */
.form-field input,
.form-field select,
.form-field textarea { border-radius: 14px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 4px var(--rd-teal-b);
}

/* ---------- 21. Care Bank: a cinematic media band under the hero ---------- */
.rd-cb-media {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 52px;
  aspect-ratio: 21 / 8;
  border-radius: var(--rd-radius-lg);
  overflow: hidden;
  box-shadow: var(--rd-shadow-lift);
  background: var(--primary-soft) url("assets/rd/rd-carebank-hands.jpg") center / cover no-repeat;
}
.rd-cb-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) {
  .rd-cb-media { aspect-ratio: 16 / 10; border-radius: 26px; margin-bottom: 36px; }
}

/* ---------- 22. Phone fit: Join as a Pro "Ready to apply?" card ----------
   Pre-existing overflow (also on the original): the card's one-line button
   set the grid column's minimum width, pushing the page 50px wider than a
   375px screen. Let the column shrink and the button wrap. */
@media (max-width: 980px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .apply-card { padding: 28px 22px; }
  .apply-card .btn { white-space: normal; text-align: center; }
  /* Circles (also pre-existing): on a phone the Message / role controls left
     the name ~43px, breaking it letter by letter. Give them their own line. */
  .circle-row { flex-wrap: wrap; row-gap: 10px; }
  .circle-actions { flex: 1 0 100%; justify-content: flex-end; }
}

/* ---------- 24. For Families filter panel (11-16-2026) ----------
   Laid out from a Higgsfield design concept; the five care-type tiles are
   Higgsfield illustrations (assets/rd/rd-filter-*.jpg) drawn in the brand
   palette. Tokens only. The hidden selects behind the tiles and the toggle are
   still the controls caregivers.js reads (see the markup comment). */
.filters.rdf {
  display: flex; flex-direction: column; gap: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--rd-radius-lg);
  padding: 28px;
  box-shadow: var(--rd-shadow-card);
  margin-bottom: 32px;
  align-items: stretch;            /* styles.css's old grid set `end`, shrinking every row */
}
.rdf-top { display: flex; align-items: flex-end; gap: 16px; }
.rdf-top .rdf-search { flex: 1 1 auto; min-width: 0; }
.rdf-sr, .rdf-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rdf-search { position: relative; }
.rdf-search-ico {
  position: absolute; left: 20px; bottom: 19px;   /* centred on the 58px field, below its label */
  color: var(--primary); pointer-events: none;
}
.filters.rdf .rdf-search input {
  width: 100%; height: 58px; padding: 0 22px 0 52px;
  border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--blush); color: var(--ink); font-size: 1rem;
}
.filters.rdf .rdf-search input:focus {
  outline: none; border-color: var(--secondary); background: var(--white);
  box-shadow: 0 0 0 4px var(--rd-teal-b);
}
.rdf-label,
.filters.rdf .rdf-pill label {
  display: block; margin-bottom: 9px;
  font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-strong);
}

.rdf-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.rdf-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 10px 10px 16px; border-radius: 22px; border: 2px solid transparent;
  background: var(--blush); color: var(--ink); font: inherit; cursor: pointer;
  transition: transform .25s var(--rd-ease), box-shadow .25s var(--rd-ease), border-color .2s, background-color .2s;
}
.rdf-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; }
.rdf-tile span { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; line-height: 1.2; text-align: center; }
.rdf-tile:hover { transform: translateY(-3px); box-shadow: var(--rd-shadow-card); }
.rdf-tile[aria-pressed="true"] { border-color: var(--primary); background: var(--white); box-shadow: var(--rd-shadow-card); }
.rdf-tile[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 9px; right: 9px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--ink); font-size: .9rem; font-weight: 800;
  box-shadow: 0 2px 8px rgba(var(--shadow-rgb), .22);
}
.rdf-tile:focus-visible, .rdf-seg button:focus-visible, .rdf-chip:focus-visible {
  outline: 3px solid var(--secondary); outline-offset: 3px;
}

.rdf-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 14px; }
.rdf-seg-wrap { flex: none; }
.rdf-seg {
  display: inline-flex; padding: 4px; gap: 2px;
  border: 1.5px solid var(--primary-soft); border-radius: 999px; background: var(--white);
}
.rdf-seg button {
  min-height: 47px; padding: 0 20px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted-strong); font: inherit; font-weight: 600; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.rdf-seg button:hover { color: var(--primary); }
.rdf-seg button[aria-pressed="true"] { background: var(--primary); color: var(--white); }
.filters.rdf .rdf-pill { min-width: 0; margin: 0; }
.filters.rdf .rdf-pill select {
  height: 52px; border-radius: 999px; border: 1.5px solid var(--line);
  background-color: var(--white); color: var(--ink); font-weight: 600;
}
.filters.rdf .rdf-pill select:focus { border-color: var(--secondary); }

.rdf-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.rdf-active { flex: 1 1 260px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 38px; }
.rdf-active-label { font-family: var(--serif); font-weight: 700; color: var(--ink); margin-right: 4px; }
.rdf-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 14px; border: 0; border-radius: 999px;
  background: var(--secondary-soft); color: var(--secondary-dark);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.rdf-chip span { font-size: 1.1rem; line-height: 1; }
.rdf-chip:hover { background: var(--primary-soft); color: var(--primary); }
.rdf-foot #f-reset { margin-left: auto; }

@media (max-width: 980px) {
  /* Tiles become one swipeable row; the selects pair up two by two. */
  .rdf-tiles {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 132px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 10px; margin: -4px -4px -10px;
    scrollbar-width: thin;
  }
  .rdf-tile { scroll-snap-align: start; }
  .rdf-tile span { font-size: .92rem; }
  .rdf-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rdf-top { flex-direction: column; align-items: stretch; }
  .rdf-seg { display: flex; }
  .rdf-seg button { flex: 1; }
}
@media (max-width: 620px) {
  .filters.rdf { padding: 18px; gap: 18px; border-radius: 26px; }
  .filters.rdf .rdf-search input { height: 52px; }
  .rdf-search-ico { bottom: 16px; }
  .rdf-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }   /* one column, as the original panel had on phones */
  .rdf-seg button { min-height: 42px; padding: 0 10px; white-space: nowrap; }
  .rdf-tiles { grid-auto-columns: 118px; gap: 10px; }
  .rdf-foot #f-reset { width: 100%; margin-left: 0; }
}

/* ---------- 25. Preview accounts (11-16-2026) ----------
   Sample profiles carry a "Preview" tag (STCPreviewTag in shared.js) wherever
   they are listed. Logo yellow with ink text, the one pill shape on a card that
   isn't the navy "Verified" one, so the two are never confused. */
.preview-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none; vertical-align: middle;
  padding: 4px 9px; border-radius: 999px;
  background: var(--accent); color: var(--ink);
  font-family: var(--sans); font-size: .66rem; font-weight: 700; letter-spacing: .07em;
  line-height: 1; text-transform: uppercase; white-space: nowrap;
}
.preview-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .55; }
.cgc-top .preview-badge { margin-left: auto; }
.preview-note {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 16px;
  background: var(--accent-soft); border: 1px dashed var(--accent-dark);
  color: var(--ink); font-size: .92rem; line-height: 1.55;
}
.preview-note a { color: var(--primary); font-weight: 600; }
/* Admin panel family cards: a long email must wrap rather than push the status
   pill off the card on a phone. Scoped to the new family cards ([data-email]). */
.admin-card[data-email] .admin-card-head { flex-wrap: wrap; }
.admin-card[data-email] .admin-card-head > div { min-width: 0; flex: 1 1 200px; }
.admin-card[data-email] .admin-sub { overflow-wrap: anywhere; }
/* Account card: the membership rows carry longer values ("Care Seeker · free until …"). */
.account-rows .row { gap: 14px; }
.account-rows .row > span:last-child { text-align: right; }
/* Subscription page: what happened after "Start free" (or the plan you are on). */
.sub-status { margin: 12px 0 0; color: var(--muted-strong); font-size: .9rem; line-height: 1.5; text-align: center; }

/* ---------- 26. Facilities: Partner Facilities cards (11-16-2026) ----------
   Same treatment as the For Families filter tiles: a Higgsfield photo set
   inset in a rounded card, soft navy-tinted shadow, a lift on hover. Each
   cover is that facility's own entrance photo from its "Take a look inside"
   set (assets/rd/facilities/). Tokens only. */
.facility-grid { gap: 26px; }
.facility-card {
  padding: 12px 12px 22px;
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow-card);
  overflow: hidden;
}
.facility-card > :not(.facility-photo) { margin-left: 12px; margin-right: 12px; }
.facility-card:hover { box-shadow: var(--rd-shadow-lift); }
.facility-photo {
  position: relative; aspect-ratio: 16 / 10; margin-bottom: 18px;
  border-radius: 20px; overflow: hidden; background: var(--primary-soft);
}
.facility-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--rd-ease);
}
.facility-card:hover .facility-photo img { transform: scale(1.04); }
.facility-photo.is-blank img { opacity: .75; }
/* "Take a look inside": the gallery tiles pick up the same rounded corners. */
.fac-tile { border-radius: 22px; box-shadow: var(--rd-shadow-card); }
.fac-tile .fac-photo { transition: transform .6s var(--rd-ease); }
.fac-tile:hover .fac-photo { transform: scale(1.04); }
@media (max-width: 620px) {
  .facility-card { padding: 10px 10px 20px; }
  .facility-card > :not(.facility-photo) { margin-left: 10px; margin-right: 10px; }
  .facility-photo { border-radius: 18px; }
  .fac-tile { border-radius: 16px; }
}
/* Two ~120px columns on a phone left the caption covering most of each photo. */
@media (max-width: 480px) {
  .fac-gallery { grid-template-columns: 1fr; }
}

/* ---------- 23. Reduced motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after,
  .community-media-card img, .app-phone svg { animation: none !important; }
  .rd-motion .rd-reveal { opacity: 1 !important; animation: none !important; }
  .btn::after { display: none; }
  .rdf-tile { transition: none; }
  .rdf-tile:hover { transform: none; }
  .facility-photo img, .fac-tile .fac-photo { transition: none; }
  .facility-card:hover .facility-photo img, .fac-tile:hover .fac-photo { transform: none; }
}
@media print {
  .rd-reveal { opacity: 1 !important; animation: none !important; }
}

/* ---------- 27. Preview-only For Families + Facilities (11-30-2026) ----------
   Both pages list placeholders instead of accounts or example facilities
   (PREVIEW_ONLY in caregivers.js / facilities.js / facility.js). A banner
   above each list says so, and every placeholder card carries the same
   yellow Preview pill as section 25, a dashed edge and nothing to click. */
.preview-banner {
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 860px; margin: 0 auto 28px; padding: 14px 18px;
}
.preview-banner .preview-badge { margin-top: 3px; }
.preview-banner p { margin: 0; }
.caregiver-card.is-preview,
.facility-card.is-preview { border: 1.5px dashed var(--accent-dark); }
.caregiver-card.is-preview:hover,
.facility-card.is-preview:hover { transform: none; }
.cgc-avatar.is-preview { background: var(--accent-soft); color: var(--ink); border: 1.5px dashed var(--accent-dark); }
.is-preview .btn[disabled] { opacity: .6; cursor: not-allowed; }
.facility-top .preview-badge { margin-top: 4px; }
.facility-card.is-preview .facility-desc { margin-top: 10px; }   /* no rating line above it */
.facility-photo.is-preview { display: grid; place-items: center; }
.facility-photo.is-preview img { position: absolute; inset: 0; }
.facility-card.is-preview:hover .facility-photo img { transform: none; }
.facility-photo-note {
  position: relative; padding: 8px 16px; border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-size: .85rem; font-weight: 600; box-shadow: var(--rd-shadow-card);
}
.table-wrap.is-preview { border: 1.5px dashed var(--accent-dark); }
.referral-table .mini-select:disabled { opacity: 1; color: var(--muted-strong); background: var(--blush-2); cursor: default; }
@media (max-width: 480px) {
  .preview-banner { flex-direction: column; gap: 8px; padding: 14px 16px; }
}

/* ---------- 28. Caregiver application: proficiency documents (11-30-2026) ----------
   Step 7 of caregiver-application.html. Documents go by email to the address
   shown, so the address is the most prominent thing in the step. */
.docs-mail {
  display: flex; align-items: center; gap: 14px; margin: 4px 0 18px;
  padding: 14px 18px; border-radius: 20px;
  background: var(--blush-2); border: 1px solid var(--line);
}
.docs-mail .type-icon { width: 46px; height: 46px; margin: 0; flex: none; border-radius: 14px; }
.docs-mail-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.docs-mail-label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.docs-mail-addr { font-size: 1.1rem; font-weight: 700; color: var(--primary); overflow-wrap: break-word; }   /* breaks at the <wbr> before "@" */
.docs-steps { margin: 0 0 18px; padding-left: 1.3em; color: var(--muted-strong); font-size: .94rem; line-height: 1.6; }
.docs-fallback { margin: 10px 0 18px; }
.docs-confirm { padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  #docs .js-docs-mailto { width: 100%; }
  .docs-mail { padding: 12px 14px; gap: 12px; }
  .docs-mail .type-icon { width: 40px; height: 40px; }
  .docs-mail-addr { font-size: 1rem; }
}
