/* ═══════════════════════════════════════════════════════════
   MOBILE FIXES — public/assets/css/mobile-fixes.css
   Replaces previous version. Upload to same path.
═══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   HERO SECTION — complete mobile overhaul
   Fixes: image overflow · subtitle wrapping · scroll overlap
══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {

  /* ── Contain the right column so float cards don't overflow ── */
  .hero-right {
    min-height: 260px !important;
    overflow: hidden !important;        /* clips float cards to container */
    width: 100% !important;
    border-radius: 8px;
  }

  /* ── Profile card: centered, sensible size ── */
  .profile-card {
    width: clamp(140px, 36vw, 180px) !important;
    margin: 0 auto;
  }

  /* ── Float cards: hide all on mobile (too cluttered) ── */
  .float-card {
    display: none !important;
  }

  /* ── Orbit rings: hide on mobile ── */
  .orbit-ring,
  .orbit-ring-2,
  .portrait-glow {
    display: none !important;
  }

  /* ── Hero sub-title: don't let words split across lines ── */
  .hero-sub-title {
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: clamp(0.7rem, 2.8vw, 0.85rem) !important;
    letter-spacing: 0.1em !important;
    line-height: 1.5;
  }
  /* Each word group stays together */
  .hero-sub-title .sep {
    display: none;               /* hide dots between items */
  }

  /* ── Hero headline: ensure it doesn't overflow ── */
  .hero-headline {
    font-size: clamp(2.6rem, 11vw, 4rem) !important;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  /* ── Trust strip: single scrollable row ── */
  .hero-trust {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.85rem !important;
    padding-bottom: 0.5rem;
    padding-top: 1rem !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
  }
  .hero-trust::-webkit-scrollbar { display: none; }
  .trust-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 0.58rem !important;
    opacity: 1 !important;
    color: var(--silver) !important;
  }

  /* ── Scroll cue: flow normally below trust strip ── */
  .scroll-cue {
    position: static !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    margin-top: 1.5rem !important;
    padding-bottom: 2rem;
  }
  .scroll-cue span {
    writing-mode: horizontal-tb !important;
    font-size: 0.56rem;
  }
  .scroll-line {
    width: 36px !important;
    height: 1px !important;
  }

  /* ── Hero micro trust ── */
  .hero-micro-trust {
    font-size: 0.58rem;
    white-space: normal;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  /* ── Hero para: full width on mobile ── */
  .hero-para {
    max-width: 100% !important;
  }
}

/* ─── Extra small screens ≤480px ─── */
@media (max-width: 480px) {
  .hero-right {
    min-height: 200px !important;
  }
  .profile-card {
    width: clamp(120px, 42vw, 155px) !important;
  }
  .hero-headline {
    font-size: clamp(2.4rem, 13vw, 3.4rem) !important;
  }
  .hero-inner {
    gap: 1.5rem !important;
    padding: 0.5rem 1.25rem 4rem !important;
  }
  .hero-sub-title {
    font-size: 0.68rem !important;
  }
}

/* ══════════════════════════════════════════════════════════
   PRELOADER — fix subtitle wrapping on narrow screens
══════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
  #mk-preloader {
    padding: 0 1.5rem;
    text-align: center;
  }
  .pl-logo {
    font-size: clamp(3.5rem, 18vw, 5rem) !important;
  }
  .pl-name {
    font-size: clamp(0.55rem, 3.2vw, 0.75rem) !important;
    letter-spacing: 0.18em !important;
    white-space: normal !important;
    text-align: center;
  }
  .pl-domains {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    max-width: 260px !important;
    margin: 0 auto !important;
  }
  .pl-domains span {
    font-size: clamp(0.5rem, 2.6vw, 0.65rem) !important;
    letter-spacing: 0.08em !important;
    white-space: nowrap !important;
  }
  .pl-sep {
    display: none !important;
  }
  .pl-bar-wrap {
    width: 85% !important;
    max-width: 260px !important;
  }
}

/* ══════════════════════════════════════════════════════════
   FLIP CARDS — mobile crossfade tap behavior
══════════════════════════════════════════════════════════ */
@media (hover: none), (pointer: coarse) {

  /* ── Kill 3D on touch — use crossfade ── */
  .gallery-item.flip-card {
    perspective: none !important;
  }
  .gallery-item.flip-card .gallery-flip-inner {
    transform-style: flat !important;
    transform: none !important;
    transition: none !important;
  }

  /* Both faces stack, opacity controls which is visible */
  .gallery-item.flip-card .gallery-flip-front,
  .gallery-item.flip-card .gallery-flip-back {
    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
    -webkit-transform: none !important;
    transform: none !important;
    transition: opacity 0.32s ease !important;
    position: absolute;
    inset: 0;
  }

  /* Front visible, back hidden — default */
  .gallery-item.flip-card .gallery-flip-front {
    opacity: 1;
    z-index: 2;
  }
  .gallery-item.flip-card .gallery-flip-back {
    opacity: 0;
    z-index: 1;
  }

  /* Hover has no effect on touch — only .tapped (JS) controls flip */
  .gallery-item.flip-card:hover .gallery-flip-inner {
    transform: none !important;
  }

  /* Tapped state: front fades out, back fades in */
  .gallery-item.flip-card.tapped .gallery-flip-front {
    opacity: 0;
    z-index: 1;
  }
  .gallery-item.flip-card.tapped .gallery-flip-back {
    opacity: 1;
    z-index: 3;
  }

  /* Flip badge: TAP on front, TAP AGAIN on back */
  .flip-indicator {
    font-size: 0.52rem;
    padding: 3px 8px;
  }
  .gallery-item.flip-card .flip-indicator::before {
    content: '⟳ TAP';
  }
  /* Override any hardcoded text in the span */
  .gallery-item.flip-card .flip-indicator {
    font-size: 0;     /* hide original text */
  }
  .gallery-item.flip-card .flip-indicator::before {
    font-size: 0.52rem;
    content: 'TAP TO FLIP';
  }
  .gallery-item.flip-card.tapped .flip-indicator::before {
    content: 'TAP TO CLOSE';
  }
}

/* ══════════════════════════════════════════════════════════
   TRUST STRIP — ensure full brightness on all items
══════════════════════════════════════════════════════════ */
.trust-item {
  opacity: 1 !important;
  color: var(--silver) !important;
}
.trust-item::before {
  background: var(--gold) !important;
  opacity: 0.9 !important;
}

/* ══════════════════════════════════════════════════════════
   ACHIEVEMENT CARD SVG icon sizing
══════════════════════════════════════════════════════════ */
.ach-icon svg,
.ach-icon .ach-svg-icon {
  width: 52px;
  height: 52px;
  display: block;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════
   OPPORTUNITY CTA BADGE — SVG icon alignment
══════════════════════════════════════════════════════════ */
.opp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.opp-badge svg,
.opp-badge .cta-badge-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}