/* ============================================================
   CTA — Photo-as-card with diagonal blend into pastel gradient
   "Ready to make every prescription accessible?"
   Sits below the features grid, inside #features.

   The pastel gradient is the EXACT live-site CTA atmosphere (orange
   wash from the top-right, turquoise from the bottom-left, purple-
   cream diagonal underneath). The pharmacy photo bleeds in from the
   right via a 55° mask, with a 23%-wide blend zone where the photo
   dissolves directly into the pastel — no hard boundary, no white
   intermediary band.
============================================================ */
.cta-photo-card{
  position:relative;
  isolation:isolate;
  margin-top:60px;
  border-radius:28px;
  overflow:hidden;
  min-height:380px;
  padding:64px 56px;
  /* Diagonal orange→purple flow across the visible pastel zone. Two
     well-separated radials (not multiple overlapping) create a clean
     gradient story: purple anchors the top-left where the headline
     lives, orange warms the bottom-right where the photo edge begins.
     Pastel base flows along the same diagonal to reinforce the motion. */
  background:
    /* Orange warmth — single concentrated spot at the bottom-right of
       the visible pastel (right at the photo edge), so it reads as warm
       light spilling out from the photo */
    radial-gradient(750px 550px at 45% 85%, rgba(225,133,10,0.20), transparent 62%),
    /* Purple atmospheric anchor — single concentrated spot top-left,
       holding down the content/headline area */
    radial-gradient(700px 500px at 8% 18%, rgba(143,83,161,0.18), transparent 62%),
    /* Pastel base flowing along the same diagonal — purple-cream at the
       top-left, soft peach-cream at the bottom-right */
    linear-gradient(155deg, rgba(238,225,245,0.40) 0%, rgba(245,232,240,0.34) 45%, rgba(250,240,232,0.30) 100%);
  display:flex;
  align-items:center;
}

.cta-photo-card::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.20) 0%, transparent 48%, rgba(255,255,255,0.12) 100%),
    radial-gradient(480px 260px at 82% 10%, rgba(255,255,255,0.32), transparent 68%);
}

/* Photo overflows the card horizontally (width:140%) so object-position
   can actually shift the source content — then a 55° linear mask reveals
   only the right portion, with a long blend through the middle. */
.cta-photo-card > .bg-img{
  position:absolute;
  top:0;left:0;right:auto;
  width:136%;height:100%;
  object-fit:cover;
  object-position:center 44%;
  transform:translateX(30%);
  filter:saturate(0.95) contrast(1.02) brightness(1.02);
  mask-image:linear-gradient(
    55deg,
    transparent 0%,
    transparent 24%,
    rgba(0,0,0,0.20) 30%,
    rgba(0,0,0,0.50) 36%,
    rgba(0,0,0,0.80) 42%,
    #000 47%,
    #000 100%
  );
  -webkit-mask-image:linear-gradient(
    55deg,
    transparent 0%,
    transparent 24%,
    rgba(0,0,0,0.20) 30%,
    rgba(0,0,0,0.50) 36%,
    rgba(0,0,0,0.80) 42%,
    #000 47%,
    #000 100%
  );
  z-index:0;
  pointer-events:none;
}

.cta-photo-content{
  position:relative;z-index:1;
  max-width:560px;
}
.cta-photo-content h3{
  font-family:var(--font-display);
  font-size:clamp(30px, 4vw, 46px);
  font-weight:500;
  letter-spacing:-0.025em;
  line-height:1.04;
  color:var(--ink);
  margin:0;
}
.cta-photo-content h3 .accent{
  color:var(--purple);
  font-weight:500;
}
.cta-photo-content p{
  margin-top:16px;
  color:var(--ink-dim);
  font-size:16px;
  line-height:1.55;
  max-width:460px;
}
.cta-photo-content .actions{
  margin-top:32px;
  display:flex;gap:12px;flex-wrap:wrap;
}

@media (max-width: 1020px){
  .cta-photo-card{
    padding:0 28px 40px;
    min-height:auto;
    flex-direction:column;
    align-items:flex-start;
  }
  .cta-photo-card::after{
    background:
      linear-gradient(180deg, transparent 0%, transparent 48%, rgba(255,255,255,0.14) 82%, transparent 100%),
      radial-gradient(360px 220px at 50% 86%, rgba(225,133,10,0.14), transparent 72%);
  }
  .cta-photo-card > .bg-img{
    position:relative;
    width:calc(100% + 56px);height:270px;
    max-width:none;
    margin:0 -28px 30px;
    transform:none;
    object-position:center 40%;
    border-radius:0;
    mask-image:linear-gradient(180deg, #000 0%, #000 74%, rgba(0,0,0,0.78) 86%, transparent 100%);
    -webkit-mask-image:linear-gradient(180deg, #000 0%, #000 74%, rgba(0,0,0,0.78) 86%, transparent 100%);
  }
  .cta-photo-content{max-width:none;}
  .cta-photo-content .actions{margin-top:28px;}
}

/* ---- Dark mode: tinted-dark pastel base + dimmed light spill ---- */
:root[data-theme="dark"] .cta-photo-card{
  background:
    radial-gradient(750px 550px at 45% 85%, rgba(255,167,51,0.16), transparent 62%),
    radial-gradient(700px 500px at 8% 18%, rgba(176,111,196,0.20), transparent 62%),
    linear-gradient(155deg, color-mix(in srgb, var(--purple) 16%, var(--bg-card)) 0%, var(--bg-card) 55%, color-mix(in srgb, var(--orange) 10%, var(--bg-card)) 100%);
}
/* Darken the photo so its luminance is close to the dark card — that's what
   makes the 55deg mask seam read smooth (in light both sides are bright; in
   dark, an undimmed photo against the dark base creates a hard edge). */
:root[data-theme="dark"] .cta-photo-card > .bg-img{
  filter:saturate(0.95) contrast(1.0) brightness(0.9);
  /* longer, more gradual fade than the light-mode mask so the photo dissolves
     into the dark card over a wider zone (smoother seam) */
  mask-image:linear-gradient(55deg,
    transparent 0%, transparent 12%,
    rgba(0,0,0,0.06) 24%, rgba(0,0,0,0.22) 34%, rgba(0,0,0,0.45) 45%,
    rgba(0,0,0,0.72) 57%, #000 70%, #000 100%);
  -webkit-mask-image:linear-gradient(55deg,
    transparent 0%, transparent 12%,
    rgba(0,0,0,0.06) 24%, rgba(0,0,0,0.22) 34%, rgba(0,0,0,0.45) 45%,
    rgba(0,0,0,0.72) 57%, #000 70%, #000 100%);
}
:root[data-theme="dark"] .cta-photo-card::after{
  background:
    radial-gradient(560px 320px at 84% 12%, rgba(176,111,196,0.16), transparent 70%),
    radial-gradient(440px 280px at 60% 96%, rgba(255,167,51,0.10), transparent 72%);
}
