/* --- Explore feed (vertical swipe between projects, horizontal swipe for details) --- */

html, body.explore-body {
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
}

.explore-shell {
  /* Leave room for the standard top nav (62px, same as every other page).
     Below 768px the bottom tab bar also appears (per the site-wide rule in
     styles.css), so reserve extra space for that too in the media query
     below — matching the same nav+tabbar sandwich every other page uses. */
  height: calc(100dvh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #0a0a0a;
}

@media (max-width: 768px) {
  .explore-shell { height: calc(100dvh - 62px - 64px); }
}

/* --- Dark theme for the standard nav + tab bar on this page ---
   Explore uses the same .nav / .mobile-tabbar components as every other
   page (for a consistent way back to the rest of the site), just
   recolored to match the black background. Visibility itself is left to
   the site-wide rules in styles.css (.nav always on, .mobile-tabbar only
   below 768px) so this page behaves exactly like everywhere else. */
.explore-body .nav {
  background: rgba(10,10,10,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.explore-body .nav-logo { color: #f4f5f0; }
.explore-body .nav-links a { color: rgba(255,255,255,0.65); }
.explore-body .nav-links a:hover { color: #c8f060; }
.mobile-tabbar {
  background: rgba(10,10,10,0.92);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.mobile-tabbar .tab-item { color: rgba(255,255,255,0.55); }
.mobile-tabbar .tab-item.active { color: #c8f060; }

/* Phone bezel — desktop only; on real mobile widths this collapses to full-bleed */
.phone-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

@media (min-width: 900px) {
  .phone-frame {
    width: 390px;
    height: 812px;
    border-radius: 44px;
    border: 10px solid #1c1c1c;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 2px #050505;
    overflow: hidden;
    flex-shrink: 0;
  }
  .phone-frame::before {
    content: "";
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 120px; height: 26px;
    background: #1c1c1c;
    border-radius: 0 0 16px 16px;
    z-index: 50;
  }
}

.feed {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  color: #fff;
}

/* Horizontal mini-carousel inside each card: pane 1 = pitch video, pane 2 = description.
   On mobile, swipe left/right to move between them. On desktop, pane 2 is replaced by
   an always-visible sidebar instead (see below), so the track is locked to pane 1. */
.card-track {
  display: flex;
  width: 100%; height: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.card-track::-webkit-scrollbar { display: none; }

.card-pane {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* --- Pitch (video) pane --- */
.pane-video { display: flex; align-items: flex-end; }

.card-bg {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.1) translate(-1%, -1%); }
}

.card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.75) 100%);
}

.card-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 0;
  z-index: 5;
}
.card-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.95rem;
  color: #fff; text-decoration: none;
}
.card-brand .pip {
  width: 26px; height: 26px; border-radius: 7px; background: #c8f060;
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.duration-badge {
  font-family: 'DM Mono', monospace; font-size: 0.68rem; letter-spacing: 0.04em;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.25);
  padding: 3px 8px; border-radius: 20px; display: flex; align-items: center; gap: 5px;
}
.duration-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #ff5c5c;
}

.card-body {
  position: relative; z-index: 5;
  width: 100%;
  padding: 0 16px 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.card-info { flex: 1; min-width: 0; padding-bottom: 4px; }

.card-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(200,240,96,0.18); color: #c8f060; border: 1px solid rgba(200,240,96,0.4);
  padding: 3px 9px; border-radius: 20px; margin-bottom: 10px;
}
.card-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.4rem; line-height: 1.15;
  margin: 0 0 6px;
}
.card-pitch {
  font-size: 0.88rem; line-height: 1.5; color: rgba(255,255,255,0.88);
  margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-creator {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.78rem; color: rgba(255,255,255,0.75); margin-bottom: 14px;
}
.card-creator .avatar {
  width: 20px; height: 20px; border-radius: 50%; background: #146538;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; color: #c8f060; flex-shrink: 0;
}

.fund-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.fund-bar-wrap {
  flex: 1; height: 5px; background: rgba(255,255,255,0.22); border-radius: 4px; overflow: hidden;
}
.fund-bar-fill { height: 100%; background: #c8f060; border-radius: 4px; }
.fund-pct { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: #c8f060; flex-shrink: 0; }

.card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c8f060; color: #0d4a2c; font-weight: 700; font-size: 0.82rem;
  padding: 10px 16px; border-radius: 10px; text-decoration: none; border: none;
}

.card-actions {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding-bottom: 8px; flex-shrink: 0;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; color: #fff; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.action-btn .icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; transition: transform 0.15s, background 0.15s;
}
.action-btn.liked .icon { background: rgba(255,92,92,0.25); border-color: #ff5c5c; }
.action-btn.saved .icon { background: rgba(200,240,96,0.25); border-color: #c8f060; }
.action-btn:active .icon { transform: scale(0.85); }
.action-count { font-size: 0.68rem; color: rgba(255,255,255,0.85); font-weight: 500; }

.play-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,0.3); border: 1.5px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff;
  opacity: 0; pointer-events: none; z-index: 4;
  animation: pulseHint 0.9s ease;
}
@keyframes pulseHint {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
  30% { opacity: 0.9; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.15); }
}

/* Global vertical progress (which of N projects) — fixed to the phone frame, not any one card */
.progress-dots {
  position: absolute; top: 60px; left: 16px; right: 16px;
  display: flex; gap: 4px; z-index: 6;
  pointer-events: none;
}
.progress-dots span {
  flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,0.3);
}
.progress-dots span.active { background: #fff; }

.toast {
  position: absolute; bottom: 46%; left: 50%; transform: translateX(-50%);
  background: rgba(20,20,20,0.92); color: #fff; font-size: 0.78rem;
  padding: 9px 16px; border-radius: 30px; z-index: 20;
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* Hint that there's more to the side (mobile only — swipe gesture).
   Right hint sits over the (non-scrolling) video pane, so a bottom position is safe.
   Left hint sits over the scrollable detail pane, so it's pinned to the top instead —
   detail-inner's top padding (60px) exists specifically to leave room for it. */
.pane-hint {
  position: absolute; z-index: 5;
  display: flex; align-items: center; gap: 4px;
  font-size: 0.72rem; color: rgba(255,255,255,0.65);
  font-family: 'DM Sans', sans-serif;
  pointer-events: none;
}
.pane-hint-right { bottom: 96px; right: 16px; }
.pane-hint-left { top: 20px; left: 20px; color: #8b9280; }

.page-dots {
  position: absolute; bottom: 78px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 5;
}
.page-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.35);
}
.page-dots span.active { background: #fff; }

/* --- Description pane (mobile: swipe-to reveal; desktop: hidden, mirrored into sidebar) --- */
.pane-detail {
  background: #f7f8f5; color: #14170f;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.detail-inner { padding: 60px 20px 90px; }

.detail-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: #eaf7d8; color: #0d4a2c;
  padding: 3px 9px; border-radius: 20px; margin-bottom: 10px;
}
.detail-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.3rem; color: #0d4a2c;
  margin: 0 0 4px;
}
.detail-stage {
  font-size: 0.78rem; color: #585f52; margin: 0 0 16px;
}
.detail-stats {
  display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap;
}
.detail-stat {
  background: #fff; border: 1px solid #e2e5da; border-radius: 10px;
  padding: 8px 12px; flex: 1; min-width: 84px;
}
.detail-stat .num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: #0d4a2c; display: block; }
.detail-stat .lbl { font-size: 0.66rem; color: #8b9280; text-transform: uppercase; letter-spacing: 0.05em; }
.detail-body p {
  font-size: 0.88rem; line-height: 1.65; color: #444; margin: 0 0 14px;
}
.detail-creator {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid #e2e5da; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 20px;
}
.detail-creator .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #0d4a2c;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #c8f060; flex-shrink: 0;
}
.detail-creator .name { font-size: 0.82rem; font-weight: 600; color: #14170f; }
.detail-creator .role { font-size: 0.7rem; color: #8b9280; }
.detail-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; background: #0d4a2c; color: #fff; font-weight: 600; font-size: 0.88rem;
  padding: 12px 16px; border-radius: 10px; text-decoration: none; border: none;
}

/* --- Desktop sidebar: description always visible, no swipe/click needed --- */
.desktop-detail {
  display: none;
}
@media (min-width: 900px) {
  /* The in-card detail pane and swipe hints only make sense as a touch gesture — on
     desktop the same content lives permanently in the sidebar instead. */
  .card-pane.pane-detail,
  .pane-hint,
  .page-dots {
    display: none;
  }

  .desktop-detail {
    display: block;
    width: 360px;
    height: 812px;
    flex-shrink: 0;
    background: #f7f8f5; color: #14170f;
    border-radius: 24px;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  }
  .desktop-detail .detail-inner { padding: 32px 26px 40px; }
}

.swipe-hint-desktop {
  display: none;
}
@media (min-width: 1300px) {
  .swipe-hint-desktop {
    display: block; position: fixed; top: 50%; left: calc(50% - 430px); transform: translateY(-50%);
    color: rgba(255,255,255,0.5); font-family: 'DM Sans', sans-serif; font-size: 0.8rem;
    text-align: right; max-width: 160px; line-height: 1.5;
  }
}
