/* ==========================================================================
   HPS home page refresh — additive overrides, loaded last.
   Scoped to #landing so portals and admin are untouched.
   Remove the <link> in index.html to undo everything in this file.
   ========================================================================== */

/* ---------- 1. Background depth ---------- */

/* very light paper grain over the whole landing page */
#landing {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* soft gold glow behind the hero, under the photo and the cream wash */
#landing .hero-s {
  background-color: #fffdf4;
  background-image:
    radial-gradient(55% 60% at 8% 12%, rgba(245, 200, 0, .20), transparent 65%),
    radial-gradient(45% 50% at 55% 105%, rgba(212, 168, 0, .14), transparent 65%);
}

/* faint woven-lattice pattern on the plain grey sections, fading out toward the edges */
#landing #howitworks,
#landing #subjects,
#landing #faq,
#landing #forwhom {
  position: relative;
  isolation: isolate;
}
#landing #howitworks::before,
#landing #subjects::before,
#landing #faq::before,
#landing #forwhom::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4 52 28 28 52 4 28Z' fill='none' stroke='%23B89500' stroke-opacity='.11' stroke-width='1'/%3E%3Cpath d='M28 16 40 28 28 40 16 28Z' fill='none' stroke='%23B89500' stroke-opacity='.07' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(75% 85% at 50% 50%, #000 0%, transparent 100%);
          mask-image: radial-gradient(75% 85% at 50% 50%, #000 0%, transparent 100%);
}

/* warm glow behind the testimonials so the white section is not flat */
#landing #testimonials {
  background-image: radial-gradient(60% 40% at 50% 0%, rgba(245, 200, 0, .10), transparent 70%) !important;
}

/* ---------- 3. Trust strip (moved directly under the hero) ---------- */

#landing .trust-s {
  padding: 22px 40px;
  background: linear-gradient(180deg, #fffdf4 0%, #fffaf0 100%);
  border-top: 1px solid rgba(212, 168, 0, .22);
  border-bottom: 1px solid rgba(212, 168, 0, .22);
}
#landing .trust-s .trust-hd { margin-bottom: 14px; }
#landing .trust-s .trust-hd h2 {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  margin: 0;
}
#landing .trust-s .trust-hd p { display: none; }
#landing .trust-s .trust-grid { gap: 12px; }
#landing .trust-s .trust-card {
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
@media (max-width: 900px) { #landing .trust-s { padding: 18px 16px; } }
@media (max-width: 600px) {
  #landing .trust-s .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  #landing .trust-s .trust-card { padding: 14px 10px; }
  #landing .trust-s .trust-hd h2 { font-size: 1.05rem; }
}

/* ---------- 5. Contrast on dark sections ---------- */

#landing .appdesc { color: rgba(255, 255, 255, .8); }
#landing .ctxt    { color: rgba(255, 255, 255, .88); }
#landing .clbl    { opacity: .95; }
#landing #countries .ssub { color: rgba(255, 255, 255, .78) !important; }
#landing #countries .si > p[style*="letter-spacing"] { color: rgba(245, 200, 0, .85) !important; }
#landing .marquee-item { color: rgba(245, 200, 0, .9); }

#landing footer .fdesc  { color: rgba(255, 255, 255, .68); }
#landing footer .fct    { color: rgba(255, 255, 255, .62); }
#landing footer .flinks a { color: rgba(255, 255, 255, .8); }
#landing footer .flinks a:hover { color: #fff; }
#landing footer .fbot   { color: rgba(255, 255, 255, .55); }
#landing footer .flinks a[style*="opacity"] { opacity: .75 !important; }

/* ---------- 7. Motion (only active when JS adds html.hps-motion) ---------- */

html.hps-motion #landing .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--rv-delay, 0ms);
}
html.hps-motion #landing .rv.rv-in {
  opacity: 1;
  transform: none;
}

#landing .eb-card,
#landing .sc,
#landing .trust-card,
#landing .cblk {
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
#landing .eb-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }

@media (prefers-reduced-motion: reduce) {
  html.hps-motion #landing .rv { opacity: 1; transform: none; transition: none; }
  #landing .eb-card:hover { transform: none; }
}

/* ---------- Hero photo: melt into the cream background ---------- */

/* multiply lets the photo's white walls take on the page's cream, so there is no visible edge;
   the mask fades the left side (behind the text) and the bottom (into the trust strip) */
#landing .hero-s .hero-bg-img {
  mix-blend-mode: multiply;
  -webkit-mask-image:
    linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,.18) 8%, rgba(0,0,0,.6) 18%, rgba(0,0,0,.92) 32%, #000 44%, #000 100%),
    linear-gradient(to bottom, #000 0%, #000 72%, rgba(0,0,0,.55) 88%, rgba(0,0,0,0) 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,.18) 8%, rgba(0,0,0,.6) 18%, rgba(0,0,0,.92) 32%, #000 44%, #000 100%),
    linear-gradient(to bottom, #000 0%, #000 72%, rgba(0,0,0,.55) 88%, rgba(0,0,0,0) 100%);
          mask-composite: intersect;
}

/* phones: crop toward the girl's face so the dark shirt does not sit behind the headline */
@media (max-width: 900px) {
  #landing .hero-s .hero-bg-img { object-position: 72% center; }
}

/* phones: same arrangement as the web (text left, whole photo right), nothing cropped or off-screen */
@media (max-width: 700px) {
  #landing .hero-s .hero-wrap {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0; padding: 26px 14px 24px 16px;
  }
  #landing .hero-s .hero-wrap .hright { display: none; }
  #landing .hero-s .hero-bg-img {
    top: calc(15.5vw + 34px); right: 0; bottom: auto; left: auto;
    width: 69% !important; height: auto !important;
    aspect-ratio: 1504 / 1046; object-fit: contain; object-position: right center;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, rgba(0,0,0,.45) 10%, #000 24%),
      linear-gradient(to bottom, transparent 0%, #000 8%, #000 80%, transparent 100%);
            mask-image:
      linear-gradient(to right, transparent 0%, rgba(0,0,0,.45) 10%, #000 24%),
      linear-gradient(to bottom, transparent 0%, #000 8%, #000 80%, transparent 100%);
  }
  #landing .hero-s .hero-wrap h1 { font-size: clamp(1.5rem, 7.4vw, 2.1rem); max-width: 56vw; margin-bottom: 12px; }
  #landing .hero-s .hero-wrap .hdesc { font-size: 12px; line-height: 1.5; max-width: 39vw; margin-bottom: 16px; }
  #landing .hero-s .hero-wrap .hacts { flex-direction: column; align-items: flex-start; gap: 9px; }
  #landing .hero-s .hero-wrap .htrust { max-width: 100%; }
}

/* phones: the reviews strip is 8px wider than the screen on each side, which lets the page slide sideways */
@media (max-width: 900px) {
  #landing .sec:has(> .rwrap), #landing .sec .rwrap { overflow-x: clip; }
  #landing .sec .rwrap { margin-left: 0 !important; margin-right: 0 !important; }
}

/* ---------- Hero slider: the frame (with its fade) stays still; photos slide a short way while cross-fading ---------- */
#landing .hero-s .hero-slides { overflow: hidden; }
#landing .hero-slides .hero-track { position: relative; width: 100%; height: 100%; }
#landing .hero-slides picture {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .9s ease;
}
#landing .hero-slides picture + picture { opacity: 0; transform: translateX(4%); }
#landing .hero-slides.is-second picture:first-child { opacity: 0; transform: translateX(-4%); }
#landing .hero-slides.is-second picture + picture { opacity: 1; transform: none; }
/* devices set to reduce motion still see both photos, with a plain fade and no sliding */
@media (prefers-reduced-motion: reduce) {
  #landing .hero-s .hero-slides picture { transform: none !important; transition: opacity .9s ease !important; }
}
#landing .hero-slides img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
#landing .hero-slides img:not([src]) { visibility: hidden; }
@media (max-width: 900px) {
  #landing .hero-slides picture:first-child img { object-position: 72% center; }
}
