/* ===== EVENING — APP PAGES (Olamim, Shuffle Date, I'm Home, Shalema) + apps hub cards =====
   Loaded after evening.css on lovesync.html, date-roulette.html, im-home.html,
   shalema.html and apps.html. Re-themes the "DEDICATED APP PAGES", "APP STORE
   CTAs" and "HEBREW APP VIDEO" sections of styles.css, plus the .cp-app cards
   on apps.html (couples.css).
   These pages carry paid traffic: the store badges stay in the hero, above
   the fold, and the sticky store bar stays. Class names containing "cta" are
   read by analytics.js, so they are only restyled, never renamed.
   Each app keeps a hint of its own colour (--app), used for glows only, the
   way the app panels on the homepage do. */

/* ---------- Per-app colour ---------- */
body { --app: var(--rose); --app-deep: #3B1630; }
body:has(.page-hero-logo[src*="lovesync"])      { --app: #F0668C; --app-deep: #3B1630; }
body:has(.page-hero-logo[src*="date_roulette"]) { --app: #FFB066; --app-deep: #3A2414; }
body:has(.page-hero-logo[src*="im_home"])       { --app: #F5C46A; --app-deep: #33280F; }
body:has(.page-hero-logo[src*="shalema"])       { --app: #E39AA3; --app-deep: #36202A; }

/* ---------- Hero ---------- */
.page-hero {
  /* the headline's highlighted words use var(--accent-pink) inline; inside
     the hero that becomes the app's own colour */
  --accent-pink: var(--app);
  min-height: min(78vh, 760px);
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3.5rem, 7vw, 6rem);
  background: var(--night);
}
.page-hero .hero-video-bg video { background: var(--night); filter: saturate(0.7); }
.page-hero .hero-video-overlay {
  background:
    radial-gradient(42% 60% at 82% 50%, color-mix(in srgb, var(--app) 30%, transparent), transparent 72%),
    linear-gradient(90deg, rgba(26, 22, 48, 0.95) 0%, rgba(26, 22, 48, 0.86) 48%, rgba(26, 22, 48, 0.6) 100%),
    linear-gradient(180deg, rgba(26, 22, 48, 0) 70%, var(--night) 100%);
}
[dir="rtl"] .page-hero .hero-video-overlay {
  background:
    radial-gradient(42% 60% at 18% 50%, color-mix(in srgb, var(--app) 30%, transparent), transparent 72%),
    linear-gradient(270deg, rgba(26, 22, 48, 0.95) 0%, rgba(26, 22, 48, 0.86) 48%, rgba(26, 22, 48, 0.6) 100%),
    linear-gradient(180deg, rgba(26, 22, 48, 0) 70%, var(--night) 100%);
}
.page-hero-content { gap: clamp(2rem, 6vw, 6rem); }
.page-hero-text { max-width: 40rem; }
.page-hero-text h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--candle);
  margin: 0.4rem 0 1.1rem;
  text-wrap: balance;
}
.page-hero-text .hero-subtitle {
  color: #DCD3EC;
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 34rem;
  margin: 0 0 1rem;
}
.page-hero-text .hero-subtitle strong { color: var(--candle); font-weight: 500; }
.page-hero .hero-actions { margin-top: 1.6rem; }

.page-hero .back-link,
.back-link { color: var(--haze); font-weight: 400; font-size: 0.92rem; }
.back-link:hover { color: var(--candle); }
[dir="rtl"] .back-link::before { content: "\2192"; }

.page-hero-logo {
  width: clamp(180px, 20vw, 280px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow:
    0 40px 90px -30px color-mix(in srgb, var(--app) 75%, transparent),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-secondary-link {
  color: var(--candle);
  font-weight: 400;
  opacity: 1;
  text-decoration-color: color-mix(in srgb, var(--app) 70%, transparent);
}
.hero-secondary-link:hover { color: var(--candle); text-decoration-thickness: 2px; }

/* Hebrew: text on the right (start), app icon on the left — the natural RTL
   order, instead of the old forced row-reverse. */
[dir="rtl"] .page-hero-content { flex-direction: row; }

@media (max-width: 900px) {
  .page-hero { min-height: 0; padding: 1.25rem 0 2.5rem; }
  .page-hero .hero-video-overlay,
  [dir="rtl"] .page-hero .hero-video-overlay {
    background:
      radial-gradient(70% 34% at 50% 8%, color-mix(in srgb, var(--app) 26%, transparent), transparent 75%),
      linear-gradient(180deg, rgba(26, 22, 48, 0.8) 0%, rgba(26, 22, 48, 0.9) 45%, var(--night) 100%);
  }
  .page-hero-content,
  [dir="rtl"] .page-hero-content {
    flex-direction: column-reverse;
    align-items: flex-start;
    text-align: start;
    gap: 1rem;
  }
  .page-hero-text .hero-subtitle { margin-left: 0; margin-right: 0; font-size: 0.98rem; margin-bottom: 0.8rem; }
  .page-hero-logo { width: 68px; border-radius: 18px; }
  .feature-block-visual { min-height: 170px; padding: 2rem; }
  .feature-block-visual .visual-icon { font-size: 3.4rem; }
  .page-hero-text h1 { margin-bottom: 0.9rem; }
  .page-hero .hero-actions { margin-top: 1.25rem; }
}

/* ---------- Store badges ---------- */
.store-cta-btn,
.store-cta-btn.is-light {
  gap: 10px;
  min-height: 52px;
  padding: 0 18px 0 14px;
  border-radius: 14px;
  border: 0;
  background: var(--candle);
  color: #1A1630;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s;
}
.store-cta-btn:hover,
.store-cta-btn.is-light:hover {
  background: #FFFFFF;
  color: #1A1630;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--app) 85%, transparent);
}
.store-cta-btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.store-cta-txt small {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.75;
}
.store-cta-txt strong { font-size: 1.02rem; font-weight: 500; }
.store-cta-note,
.page-hero .store-cta-note,
.cta-section .store-cta-note { color: var(--haze); font-weight: 400; font-size: 0.88rem; }

/* ---------- Content sections ---------- */
.page-hero ~ .section .section-header h2,
.store-band h2,
.cta-section h2,
.emotional-content h2,
.he-video h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--candle);
}

/* Cards: quiet raised surfaces on the night ground */
.page-hero ~ .section .card,
.feature-item,
.benefit-card {
  background: linear-gradient(180deg, rgba(255, 243, 228, 0.045), rgba(255, 243, 228, 0.015));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.page-hero ~ .section .card:hover,
.feature-item:hover,
.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px color-mix(in srgb, var(--app) 30%, transparent);
}
.page-hero ~ .section .card h3,
.feature-item h4,
.benefit-card h4,
.feature-block-content h3 { font-family: var(--sans); font-weight: 500; color: var(--candle); }
.page-hero ~ .section .card p,
.feature-item p,
.benefit-card p { color: var(--haze); }
.page-hero ~ .section .card-icon,
.feature-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: color-mix(in srgb, var(--app) 14%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--app) 22%, transparent) inset;
}

/* Feature blocks: the old layout flipped columns with `direction: rtl`, which
   forced the reversed blocks' text to LTR in Hebrew. Use order instead. */
.feature-block.reverse,
.feature-block.reverse > * { direction: inherit; }
@media (min-width: 901px) {
  .feature-block.reverse .feature-block-visual { order: -1; }
}
.feature-block-content h3 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem); }
.feature-block-content p { color: #DCD3EC; font-size: 1.02rem; }
.feature-block-content strong { color: var(--candle); }
.feature-block-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(55% 60% at 50% 50%, color-mix(in srgb, var(--app) 24%, transparent), transparent 75%),
    linear-gradient(180deg, var(--night-3), var(--night-2));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  min-height: 260px;
}
.feature-block-visual .visual-icon {
  font-size: 4.25rem;
  filter: drop-shadow(0 12px 30px color-mix(in srgb, var(--app) 55%, transparent));
}

/* ---------- Mid-page store bands ---------- */
.store-band {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background:
    radial-gradient(50% 120% at 50% 0%, color-mix(in srgb, var(--app) 16%, transparent), transparent 70%),
    var(--night-2);
  border-top: 1px solid color-mix(in srgb, var(--app) 25%, transparent);
  border-bottom: 1px solid var(--line);
}
.store-band h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); margin-bottom: 0.6rem; }
.store-band p { color: var(--haze); }
.store-band .store-cta { justify-content: center; }

/* ---------- Emotional section (video behind) ---------- */
.emotional-section { background: var(--night); padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.emotional-section .hero-video-bg video { filter: saturate(0.7); }
.emotional-section .hero-video-overlay {
  background:
    radial-gradient(50% 70% at 50% 50%, color-mix(in srgb, var(--app) 18%, transparent), transparent 75%),
    linear-gradient(180deg, var(--night) 0%, rgba(26, 22, 48, 0.82) 25%, rgba(26, 22, 48, 0.82) 75%, var(--night) 100%);
}
.emotional-content h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); }
.emotional-content p { color: #E6DDF0; font-size: 1.1rem; }

/* ---------- Closing download section ---------- */
.cta-section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  background:
    radial-gradient(50% 80% at 50% 100%, color-mix(in srgb, var(--app) 20%, transparent), transparent 75%),
    linear-gradient(180deg, var(--night-2), var(--app-deep));
  border-top: 1px solid var(--line);
}
.cta-section h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); }
.cta-section p { color: #DCD3EC; max-width: 34rem; }

/* ---------- Hebrew app video (shown only when <html lang="he">) ---------- */
.he-video {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background:
    radial-gradient(45% 55% at 50% 55%, color-mix(in srgb, var(--app) 18%, transparent), transparent 75%),
    var(--night-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.he-video h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.he-video p { color: var(--haze); }
.he-video-frame {
  border-radius: 28px;
  background: var(--night-3);
  box-shadow:
    0 40px 90px -30px color-mix(in srgb, var(--app) 65%, transparent),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}
.he-video-play { background: rgba(26, 22, 48, 0.28); }
.he-video-play:hover { background: rgba(26, 22, 48, 0.12); }
.he-video-play:focus-visible { outline: 2px solid var(--ember); outline-offset: -6px; }
.he-video-play span {
  background: var(--candle);
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.55), 0 0 0 8px color-mix(in srgb, var(--app) 22%, transparent);
}
.he-video-play svg { fill: #1A1630; }

/* ---------- Sticky store bar ---------- */
.app-sticky-cta {
  background: rgba(30, 25, 55, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid color-mix(in srgb, var(--app) 35%, transparent);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease-out);
}
.app-sticky-cta-app { color: var(--candle); font-weight: 500; }
.app-sticky-cta-app img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.app-sticky-cta .store-cta-btn { min-height: 44px; padding: 0 14px 0 12px; border-radius: 12px; box-shadow: none; }
@media (max-width: 720px) {
  .app-sticky-cta .store-cta-btn { min-height: 44px; padding: 0 12px; }
  .app-sticky-cta .store-cta-txt strong { font-size: 0.9rem; }
}

/* ---------- apps.html: the app cards (markup from couples.css) ---------- */
.cp-apps { gap: clamp(1rem, 2vw, 1.5rem); }
.cp-app { --app: var(--rose); }
.cp-app:has(.cp-app-icon[src*="lovesync"])      { --app: #F0668C; }
.cp-app:has(.cp-app-icon[src*="date_roulette"]) { --app: #FFB066; }
.cp-app:has(.cp-app-icon[src*="im_home"])       { --app: #F5C46A; }
.cp-app:has(.cp-app-icon[src*="shalema"])       { --app: #E39AA3; }
.cp-app {
  position: relative;
  background:
    radial-gradient(70% 45% at 15% 0%, color-mix(in srgb, var(--app) 20%, transparent), transparent 70%),
    linear-gradient(180deg, var(--night-2), #1D1835);
  border: 1px solid var(--line);
  border-top-color: color-mix(in srgb, var(--app) 40%, transparent);
  border-radius: 24px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
[dir="rtl"] .cp-app {
  background:
    radial-gradient(70% 45% at 85% 0%, color-mix(in srgb, var(--app) 20%, transparent), transparent 70%),
    linear-gradient(180deg, var(--night-2), #1D1835);
}
.cp-app:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px color-mix(in srgb, var(--app) 30%, transparent);
}
.cp-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 22%;
  box-shadow: 0 16px 36px -12px color-mix(in srgb, var(--app) 75%, transparent), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.cp-app-titles h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; color: var(--candle); }
.cp-app-tag { color: var(--haze); font-weight: 400; font-size: 0.9rem; }
.cp-app-badge {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--candle);
  background: color-mix(in srgb, var(--app) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--app) 40%, transparent);
  padding: 0.2rem 0.6rem;
}
.cp-app-desc { color: #DCD3EC; }
.cp-app-points { list-style: none; padding-inline-start: 0; }
.cp-app-points li { position: relative; padding-inline-start: 22px; color: var(--haze); }
.cp-app-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app);
  box-shadow: 0 0 10px var(--app);
}
.cp-app-fit {
  background: rgba(255, 243, 228, 0.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #DCD3EC;
}
.cp-app-fit strong { color: var(--candle); font-weight: 500; }
.cp-app-stores a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0;
  background: var(--candle);
  color: #1A1630;
  font-weight: 500;
  font-size: 0.92rem;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s;
}
.cp-app-stores a:hover {
  background: #FFFFFF;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--app) 85%, transparent);
}
.cp-app-link {
  color: var(--candle);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--app) 70%, transparent);
}
.cp-app-link:hover { text-decoration-thickness: 2px; }

@media (prefers-reduced-motion: reduce) {
  .store-cta-btn, .cp-app-stores a, .app-sticky-cta { transition: none; }
  .store-cta-btn:hover, .cp-app-stores a:hover, .feature-item:hover, .benefit-card:hover,
  .page-hero ~ .section .card:hover, .cp-app:hover { transform: none; }
}


/* ---------- Phones: store badges right under the headline ----------
   These are ad landing pages and the badges must be on the first screen.
   On a 360x640 phone the two intro paragraphs pushed them to ~756px, below
   the fold, so on phones the badges move up and the paragraphs follow. */
@media (max-width: 700px) {
  .page-hero-text { display: flex; flex-direction: column; }
  .page-hero-text > .back-link { order: 0; align-self: flex-start; }
  .page-hero-text > h1 { order: 1; }
  .page-hero-text > .hero-actions { order: 2; margin-top: 4px; }
  .page-hero-text > .store-cta-note { order: 3; }
  .page-hero-text > .hero-subtitle { order: 4; }
  .page-hero-text > .hero-secondary-link { order: 5; align-self: flex-start; }
  .page-hero-text > .hero-subtitle:first-of-type { margin-top: 18px; }
}

.cp-app-note { color: var(--haze, rgba(255,255,255,.6)); }
