/*
 * Complex Care landing page.
 *
 * The brand system (plum, gold, Lato, 4px radii) comes from the shared Tailwind
 * config. Only what Tailwind cannot express lives here: the reveal animation,
 * the step rail, and the form control states.
 */

/* ── Reveal ──────────────────────────────────────────────────────────────
   Matched to the booking landing page: a transition rather than a keyframe
   animation, opted into via html.anim so content is visible if the script
   never runs. A transition also cannot be stranded mid-flight by a suspended
   animation clock. */
.fx { opacity: 1; }
html.anim .fx {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0ms);
}
html.anim .fx.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.anim .fx { opacity: 1; transform: none; transition: none; }
}

/* ── Animated hero backdrop ──────────────────────────────────────────────
   Lifted from the booking landing page so the two campaign pages share one
   hero. Three blurred radial blobs drift on long, offset loops over a masked
   dot grid that breathes. Pure CSS, transform/opacity only. */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.hero-bg .dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(85% 70% at 50% 28%, #000 8%, transparent 74%);
          mask-image: radial-gradient(85% 70% at 50% 28%, #000 8%, transparent 74%);
  will-change: transform, opacity;
  animation: hb-grid 12s ease-in-out infinite;
}

.hero-bg .g { position: absolute; border-radius: 50%; filter: blur(58px); will-change: transform, opacity; }

/* plum bloom, top centre */
.hero-bg .g1 {
  width: 820px; height: 580px; top: -190px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(rgba(122,74,112,.62) 0%, rgba(98,35,90,.30) 40%, rgba(98,35,90,.08) 62%, transparent 78%);
  transform-origin: 50% 35%;
  animation: hb-g1 23s ease-in-out infinite;
}
/* brand-gold warmth, right */
.hero-bg .g2 {
  width: 540px; height: 540px; top: 60px; right: -170px;
  background: radial-gradient(circle, rgba(255,226,52,.16) 0%, rgba(255,226,52,.05) 46%, transparent 70%);
  transform-origin: 70% 40%;
  animation: hb-g2 27s ease-in-out infinite;
}
/* deep magenta, bottom left, keeps the lower third from going flat */
.hero-bg .g3 {
  width: 620px; height: 460px; bottom: -200px; left: -140px;
  background: radial-gradient(circle, rgba(98,35,90,.5) 0%, rgba(47,1,42,.18) 52%, transparent 74%);
  animation: hb-g3 31s ease-in-out infinite;
}

/* fine film grain so the big gradients don't band on cheap panels */
.hero-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes hb-g1 {
  0%   { transform: translateX(-50%) translate(0,-10px)     scale(1.02); opacity: .70; }
  25%  { transform: translateX(-50%) translate(-155px,32px) scale(1.16); opacity: .90; }
  50%  { transform: translateX(-50%) translate(45px,62px)   scale(1.26); opacity: 1;   }
  75%  { transform: translateX(-50%) translate(170px,24px)  scale(1.11); opacity: .85; }
  100% { transform: translateX(-50%) translate(0,-10px)     scale(1.02); opacity: .70; }
}
@keyframes hb-g2 {
  0%   { transform: translate(0,0)          scale(1);    opacity: .55; }
  30%  { transform: translate(-120px,105px) scale(1.20); opacity: .95; }
  55%  { transform: translate(-35px,200px)  scale(1.08); opacity: 1;   }
  80%  { transform: translate(75px,65px)    scale(1.14); opacity: .80; }
  100% { transform: translate(0,0)          scale(1);    opacity: .55; }
}
@keyframes hb-g3 {
  0%   { transform: translate(0,0)         scale(1);    opacity: .55; }
  40%  { transform: translate(120px,-70px) scale(1.18); opacity: .85; }
  70%  { transform: translate(40px,-120px) scale(1.06); opacity: .70; }
  100% { transform: translate(0,0)         scale(1);    opacity: .55; }
}
@keyframes hb-grid {
  0%,100% { transform: scale(1);    opacity: .85; }
  50%     { transform: scale(1.05); opacity: 1;   }
}

.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The canvas draws its own idle grid, so drop the CSS one or dots are doubled. */
html.dots-live .hero-bg .dots { display: none; }

/* Motion is decoration: hold a still frame when the visitor asks for less. */
@media (prefers-reduced-motion: reduce) {
  .hero-bg .dots, .hero-bg .g { animation: none !important; }
}

/* ── Shared dark-section texture and dividers ────────────────────────────
   Same two helpers the booking page uses on its plum sections. */
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.rule { background: linear-gradient(90deg, transparent, rgba(98,35,90,.55), transparent); }
.dark-sec .rule { background: linear-gradient(90deg, transparent, rgba(255,226,52,.85), transparent); }

/* ── Trust marquee ───────────────────────────────────────────────────────
   Two identical tracks travelling -50%: at the end of the cycle copy two sits
   exactly where copy one began, so the loop has no seam. Transform only, so a
   suspended animation clock can never leave the strip blank, and the fade at
   each edge stops items appearing to pop in. */
.rtd-mq {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.rtd-mq__inner {
  display: flex;
  width: max-content;
  animation: rtd-mq 48s linear infinite;
}
/* Let someone stop it to read an item. */
.rtd-mq:hover .rtd-mq__inner,
.rtd-mq:focus-within .rtd-mq__inner { animation-play-state: paused; }

.rtd-mq__group {
  display: flex;
  align-items: center;
  flex: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rtd-mq__item {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  flex: none;
  padding-left: 2.25rem;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  white-space: nowrap;
  color: rgba(48,44,47,.7);
}
.rtd-mq__item::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(98,35,90,.45);
}
@keyframes rtd-mq {
  to { transform: translateX(-50%); }
}
/* Held still, and scrollable by hand, when less motion is asked for. */
@media (prefers-reduced-motion: reduce) {
  .rtd-mq__inner { animation: none; }
  .rtd-mq { overflow-x: auto; }
}

/* ── Journey rail ────────────────────────────────────────────────────────
   A connecting line behind the numbered markers. Drawn with a pseudo-element
   so the markers stay in normal flow and wrap properly on narrow screens. */
.rail { position: relative; }
@media (min-width: 1024px) {
  .rail::before {
    content: "";
    position: absolute;
    top: 22px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: rgba(255,255,255,.18);
  }
}

/* ── Form controls ───────────────────────────────────────────────────────
   Native inputs styled to the brand. Focus is a visible ring rather than the
   browser default, which the plum background washes out. */
.cc-field {
  width: 100%;
  border: 1px solid #DBD4D9;
  background: #fff;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 16px;          /* 16px or iOS zooms the page on focus */
  color: #302C2F;
  transition: border-color .15s, box-shadow .15s;
}
.cc-field::placeholder { color: rgba(48,44,47,.45); }
.cc-field:focus {
  outline: none;
  border-color: #62235A;
  box-shadow: 0 0 0 3px rgba(98,35,90,.14);
}
.cc-field:user-invalid { border-color: #b32d2e; }

/* Radio and checkbox cards: the whole tile is the target, not just the dot. */
.cc-pick {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #DBD4D9;
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
  min-height: 44px;
}
.cc-pick:hover { border-color: #7A4A70; background: #FDFBFC; }
.cc-pick input { margin-top: 2px; accent-color: #62235A; width: 18px; height: 18px; flex: none; }
.cc-pick:has(input:checked) {
  border-color: #4C2A42;
  background: #4C2A42;
}
.cc-pick:has(input:checked) span { color: #fff; }
.cc-pick:has(input:checked) input { accent-color: #FFE234; }
.cc-pick:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(98,35,90,.18); }

/* ── Wizard ──────────────────────────────────────────────────────────────
   One step visible at a time. The step transition moves but never fades: a
   suspended animation clock must not be able to leave a step invisible. */
.cc-step { display: none; }
.cc-step.is-on { display: block; animation: cc-step-in .22s ease; }
@keyframes cc-step-in {
  from { transform: translateY(6px); }
  to   { transform: none; }
}
.cc-step-title {
  display: block;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  color: #302C2F;
}
.cc-step-title:focus { outline: none; }
.cc-bar {
  height: 4px;
  border-radius: 999px;
  background: #EFE7ED;
  overflow: hidden;
}
.cc-bar > span {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: 999px;
  background: #4C2A42;
  transition: width .25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .cc-step.is-on { animation: none; }
  .cc-bar > span { transition: none; }
}

/* ── Sticky mobile CTA ───────────────────────────────────────────────────
   Clear of the home indicator on notched phones. */
@supports (padding: max(0px)) {
  .cc-sticky { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
}
.cc-sticky { transition: transform .2s ease, opacity .2s ease; }
.cc-sticky--off { transform: translateY(110%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .cc-sticky { transition: none; }
}

/* Results row: a slim scrollbar that still hints the row scrolls. */
.cc-res { scrollbar-width: thin; scrollbar-color: #DBD4D9 transparent; scroll-padding-left: 0; }
.cc-res::-webkit-scrollbar { height: 6px; }
.cc-res::-webkit-scrollbar-thumb { background: #DBD4D9; border-radius: 3px; }

/* Video dialog, portrait clip: size the frame to fit the viewport height. */
#cc-vmodal.is-portrait #cc-vbox { max-width: min(420px, calc((100vh - 120px) * 452 / 738)); }
#cc-vmodal.is-portrait #cc-vframe { aspect-ratio: 452 / 738; }
