/* ============================================================
   Javis Slide Pro — Frontend Styles
   Premium, modern, Apple/Tesla-level aesthetics
   ============================================================ */

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  --jsp-height: 100vh;
  --jsp-accent: #c9a96e;
  --jsp-white: #ffffff;
  --jsp-black: #000000;
  --jsp-transition: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --jsp-font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --jsp-font-body: 'Jost', 'Inter', system-ui, sans-serif;
  --jsp-blur: 0px;
}

/* ─── Wrapper ────────────────────────────────────────────── */
.jsp-wrapper {
  position: relative;
  width: 100%;
  height: var(--jsp-height, 100vh);
  overflow: hidden;
  background: #0a0a0a;
  font-family: var(--jsp-font-body);
}

/* ─── Swiper container ────────────────────────────────────── */
.jsp-swiper,
.jsp-wrapper .swiper {
  width: 100%;
  height: 100%;
  /* Prevent Swiper's own styles from collapsing height */
  min-height: var(--jsp-height, 100vh);
}

/* Swiper wrapper (the inner ul-like div) must also fill height */
.jsp-wrapper .swiper-wrapper {
  height: 100%;
}

/* Swiper slide — explicit height so content doesn't collapse */
.jsp-wrapper .swiper-slide {
  height: 100%;
  overflow: hidden;
}

/* ─── Slide base ─────────────────────────────────────────── */
.jsp-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* ─── Backgrounds ────────────────────────────────────────── */
.jsp-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
}

.jsp-bg-image {
  transition: transform 7s ease-out;
}

/* Ken Burns */
.jsp-ken-burns .jsp-bg-image {
  animation: jsp-ken-burns 12s ease-out forwards;
}
@keyframes jsp-ken-burns {
  0%   { transform: scale(1.08) translate(0, 0); }
  100% { transform: scale(1.0) translate(-1%, -0.5%); }
}

/* Video backgrounds */
.jsp-bg-video,
.jsp-bg-youtube {
  overflow: hidden;
}

.jsp-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

.jsp-yt-player {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh; /* 16:9 */
  height: 100%;
  min-width: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ─── Overlays ───────────────────────────────────────────── */
.jsp-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(var(--jsp-blur, 0px));
}

.jsp-overlay-dark {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.7) 100%
  );
}

.jsp-overlay-gradient {
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.2) 60%,
    rgba(0,0,0,0.05) 100%
  );
}

.jsp-overlay-light {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.1) 0%,
    rgba(255,255,255,0.45) 100%
  );
}

.jsp-overlay-custom {
  background: var(--jsp-overlay-color, rgba(0,0,0,0.5));
}

/* ─── Content ────────────────────────────────────────────── */
.jsp-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 5vw;
  box-sizing: border-box;
}

/* Alignment variants */
.jsp-align-left  .jsp-content { justify-content: flex-start; }
.jsp-align-center .jsp-content { justify-content: center; }
.jsp-align-right  .jsp-content { justify-content: flex-end; }

.jsp-content-inner {
  max-width: 800px;
  padding: 40px 0;
}

.jsp-align-center .jsp-content-inner {
  text-align: center;
}
.jsp-align-right .jsp-content-inner {
  text-align: right;
}

/* ─── Typography ─────────────────────────────────────────── */
.jsp-tagline {
  font-family: var(--jsp-font-body);
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--jsp-accent, #c9a96e);
  margin: 0 0 18px 0;
  opacity: 0;
}

.jsp-heading {
  font-family: var(--jsp-font-display);
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--jsp-white);
  margin: 0 0 20px 0;
  opacity: 0;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}

.jsp-subheading {
  font-family: var(--jsp-font-display);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255,255,255,0.88);
  margin: 0 0 16px 0;
  opacity: 0;
}

.jsp-description {
  font-family: var(--jsp-font-body);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
  margin: 0 0 36px 0;
  max-width: 560px;
  opacity: 0;
}

.jsp-align-center .jsp-description {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.jsp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
}

.jsp-align-center .jsp-buttons { justify-content: center; }
.jsp-align-right  .jsp-buttons { justify-content: flex-end; }

.jsp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-family: var(--jsp-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.jsp-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s ease;
}
.jsp-btn:hover::after { background: rgba(255,255,255,0.1); }

/* Solid */
.jsp-btn-solid {
  background: var(--jsp-accent, #c9a96e);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.jsp-btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* Outline */
.jsp-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.7);
}
.jsp-btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* Ghost */
.jsp-btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  backdrop-filter: blur(10px);
}
.jsp-btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* Gradient */
.jsp-btn-gradient {
  background: linear-gradient(135deg, var(--jsp-accent, #c9a96e), #e8c99a);
  color: #1a1a1a;
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.jsp-btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(0,0,0,0.45);
}

/* ─── Text animations ────────────────────────────────────── */

/* fade-up (default) */
.jsp-anim-fade-up .swiper-slide-active .jsp-tagline {
  animation: jsp-fade-up 0.7s ease forwards 0.3s;
}
.jsp-anim-fade-up .swiper-slide-active .jsp-heading {
  animation: jsp-fade-up 0.8s ease forwards 0.5s;
}
.jsp-anim-fade-up .swiper-slide-active .jsp-subheading {
  animation: jsp-fade-up 0.8s ease forwards 0.65s;
}
.jsp-anim-fade-up .swiper-slide-active .jsp-description {
  animation: jsp-fade-up 0.8s ease forwards 0.8s;
}
.jsp-anim-fade-up .swiper-slide-active .jsp-buttons {
  animation: jsp-fade-up 0.8s ease forwards 0.95s;
}

@keyframes jsp-fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* slide-up */
.jsp-anim-slide-up .swiper-slide-active .jsp-tagline    { animation: jsp-slide-up 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards 0.25s; }
.jsp-anim-slide-up .swiper-slide-active .jsp-heading    { animation: jsp-slide-up 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards 0.4s; }
.jsp-anim-slide-up .swiper-slide-active .jsp-subheading { animation: jsp-slide-up 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards 0.55s; }
.jsp-anim-slide-up .swiper-slide-active .jsp-description{ animation: jsp-slide-up 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards 0.7s; }
.jsp-anim-slide-up .swiper-slide-active .jsp-buttons    { animation: jsp-slide-up 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards 0.85s; }

@keyframes jsp-slide-up {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* stagger — each child offset */
.jsp-anim-stagger .swiper-slide-active [data-anim] {
  animation: jsp-fade-up 0.8s ease forwards;
}
.jsp-anim-stagger .swiper-slide-active [data-anim="tagline"]     { animation-delay: 0.2s; }
.jsp-anim-stagger .swiper-slide-active [data-anim="heading"]     { animation-delay: 0.4s; }
.jsp-anim-stagger .swiper-slide-active [data-anim="subheading"]  { animation-delay: 0.55s; }
.jsp-anim-stagger .swiper-slide-active [data-anim="description"] { animation-delay: 0.7s; }
.jsp-anim-stagger .swiper-slide-active [data-anim="buttons"]     { animation-delay: 0.85s; }

/* plain fade */
.jsp-anim-fade .swiper-slide-active .jsp-tagline,
.jsp-anim-fade .swiper-slide-active .jsp-heading,
.jsp-anim-fade .swiper-slide-active .jsp-subheading,
.jsp-anim-fade .swiper-slide-active .jsp-description,
.jsp-anim-fade .swiper-slide-active .jsp-buttons {
  animation: jsp-simple-fade 0.9s ease forwards 0.4s;
}
@keyframes jsp-simple-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* no animation */
.jsp-anim-none .jsp-tagline,
.jsp-anim-none .jsp-heading,
.jsp-anim-none .jsp-subheading,
.jsp-anim-none .jsp-description,
.jsp-anim-none .jsp-buttons { opacity: 1 !important; animation: none !important; }

/* ─── Navigation Arrows ──────────────────────────────────── */
.jsp-arrow {
  position: absolute;
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  transition: all 0.25s ease;
  user-select: none;
}
.jsp-arrow:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-50%) scale(1.08);
}
.jsp-arrow-prev { left: 28px; }
.jsp-arrow-next { right: 28px; }
.jsp-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Pagination Dots ────────────────────────────────────── */
.jsp-pagination {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}
.jsp-pagination .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  opacity: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
}
.jsp-pagination .swiper-pagination-bullet-active {
  background: var(--jsp-accent, #c9a96e);
  width: 28px;
  border-radius: 3px;
}

/* ─── Progress Bar ───────────────────────────────────────── */
.jsp-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 15;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.jsp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jsp-accent, #c9a96e), #e8c99a);
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── Scroll Indicator ───────────────────────────────────── */
.jsp-scroll-indicator {
  position: absolute;
  bottom: 30px;
  right: 36px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.jsp-scroll-indicator:hover { opacity: 1; }

.jsp-scroll-text {
  font-family: var(--jsp-font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  writing-mode: vertical-rl;
}

.jsp-scroll-mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 11px;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.jsp-scroll-wheel {
  width: 3px;
  height: 7px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  animation: jsp-scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes jsp-scroll-wheel {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ─── Split layout ───────────────────────────────────────── */
.jsp-align-split .jsp-content {
  align-items: stretch;
}
.jsp-align-split .jsp-content-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  width: 100%;
  max-width: 100%;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .jsp-content { padding: 0 6vw; }
  
  .jsp-heading { font-size: clamp(2rem, 9vw, 3.5rem); }
  .jsp-subheading { font-size: 1.1rem; }
  .jsp-description { font-size: 0.9rem; }

  .jsp-arrow { width: 40px; height: 40px; }
  .jsp-arrow-prev { left: 12px; }
  .jsp-arrow-next { right: 12px; }
  .jsp-arrow svg { width: 16px; height: 16px; }

  .jsp-scroll-indicator { display: none; }

  .jsp-align-split .jsp-content-inner {
    grid-template-columns: 1fr;
  }

  /* Mobile alignment overrides */
  .jsp-mobile-center .jsp-content { justify-content: center; }
  .jsp-mobile-center .jsp-content-inner { text-align: center; }
  .jsp-mobile-center .jsp-buttons { justify-content: center; }
  .jsp-mobile-center .jsp-description { margin: 0 auto 36px; }

  .jsp-mobile-left .jsp-content { justify-content: flex-start; }
  .jsp-mobile-left .jsp-content-inner { text-align: left; }

  .jsp-mobile-right .jsp-content { justify-content: flex-end; }
  .jsp-mobile-right .jsp-content-inner { text-align: right; }

  /* Mobile hide flags */
  .jsp-mobile-hide-heading .jsp-heading { display: none; }
  .jsp-mobile-hide-desc .jsp-description { display: none; }

  .jsp-btn { padding: 12px 26px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .jsp-buttons { flex-direction: column; }
  .jsp-btn { width: 100%; max-width: 280px; }
  .jsp-align-center .jsp-buttons { align-items: center; }
}

/* ─── Swiper effect overrides ────────────────────────────── */

/* Cube */
.jsp-wrapper .swiper-cube .swiper-slide { backface-visibility: hidden; }

/* Cards */
.jsp-wrapper .swiper-cards .swiper-slide {
  border-radius: 4px;
  overflow: hidden;
}

/* Coverflow */
.jsp-wrapper .swiper-coverflow .swiper-slide {
  width: 80%;
  max-width: 1200px;
}

/* Creative — custom asymmetric */
.jsp-wrapper .swiper-creative .swiper-slide-shadow-left,
.jsp-wrapper .swiper-creative .swiper-slide-shadow-right {
  background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}
