/* =============================================
   KOSMAN LIQUEUR — Premium Hero Slider
   File: css/slider.css
   ============================================= */

/* ─── Slider Container ──────────────────────── */
#hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: #0a0010;
  user-select: none;
}

/* ─── Track (holds all slides) ──────────────── */
.ks-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ─── Individual Slide ──────────────────────── */
.ks-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 1.1s cubic-bezier(0.77, 0, 0.175, 1),
              visibility 1.1s cubic-bezier(0.77, 0, 0.175, 1);
}

.ks-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.ks-slide.is-prev {
  z-index: 1;
  opacity: 0;
  visibility: visible;
}

/* ─── Background Image (Ken Burns) ─────────── */
.ks-slide-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.ks-bg-img {
  position: absolute;
  inset: -5%;   /* slight overscan for zoom room */
  width: 110%;
  height: 110%;
  object-fit: cover;
  object-position: center;
  transform-origin: center;
  transform: scale(1);
  transition: none;
  will-change: transform;
}

.ks-slide.is-active .ks-bg-img {
  animation: kenburns 7s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1);    }
}

/* ─── Cinematic Overlay Gradient ────────────── */
.ks-cinematic-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      105deg,
      rgba(26, 4, 50, 0.82) 0%,
      rgba(58, 0, 80, 0.62) 45%,
      rgba(0, 0, 0, 0.18) 100%
    );
}

/* Slide-specific overlay tints */
.ks-overlay-champagne {
  background:
    linear-gradient(
      105deg,
      rgba(20, 8, 40, 0.85) 0%,
      rgba(90, 50, 10, 0.55) 55%,
      rgba(0,0,0,0.1) 100%
    );
}

.ks-overlay-cognac {
  background:
    linear-gradient(
      105deg,
      rgba(30, 6, 10, 0.88) 0%,
      rgba(90, 20, 0, 0.60) 55%,
      rgba(0,0,0,0.1) 100%
    );
}

.ks-overlay-tequila {
  background:
    linear-gradient(
      105deg,
      rgba(0, 18, 30, 0.88) 0%,
      rgba(0, 50, 40, 0.55) 55%,
      rgba(0,0,0,0.1) 100%
    );
}

.ks-overlay-gold {
  background:
    linear-gradient(
      105deg,
      rgba(22, 5, 40, 0.88) 0%,
      rgba(80, 50, 0, 0.55) 55%,
      rgba(0,0,0,0.1) 100%
    );
}

/* ─── Film Grain ────────────────────────────── */
.ks-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  animation: grain-shift 0.15s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { background-position:   0%   0%; }
  25%  { background-position: 100%  25%; }
  50%  { background-position:  33%  75%; }
  75%  { background-position:  66%  50%; }
  100% { background-position:   0%   0%; }
}

/* ─── Vignette ──────────────────────────────── */
.ks-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* ─── Content Block ─────────────────────────── */
.ks-content {
  position: relative;
  z-index: 10;
  padding: 0 8% 0 7%;
  max-width: 680px;
  color: #fff;
}

/* Eyebrow */
.ks-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.ks-slide.is-active .ks-eyebrow {
  opacity: 1;
  transform: translateX(0);
}

.ks-eyebrow-line {
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold, #d4af37);
  border-radius: 99px;
  flex-shrink: 0;
}

.ks-eyebrow-text {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.9);
}

/* Headline */
.ks-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 6.5vw, 6rem);
  font-weight: 600;
  line-height: 1.07;
  margin-bottom: 24px;
  color: #fff;
}

.ks-headline .ks-word {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ks-slide.is-active .ks-headline .ks-word:nth-child(1) {
  opacity: 1; transform: translateY(0); transition-delay: 0.35s;
}
.ks-slide.is-active .ks-headline .ks-word:nth-child(2) {
  opacity: 1; transform: translateY(0); transition-delay: 0.5s;
}
.ks-slide.is-active .ks-headline .ks-word:nth-child(3) {
  opacity: 1; transform: translateY(0); transition-delay: 0.65s;
}

.ks-gold {
  color: var(--gold, #d4af37);
  font-style: italic;
}

/* Body text */
.ks-subtext {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.78);
  max-width: 520px;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.75s, transform 0.7s ease 0.75s;
}

.ks-slide.is-active .ks-subtext {
  opacity: 1;
  transform: translateY(0);
}

/* CTA row */
.ks-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.95s, transform 0.6s ease 0.95s;
}

.ks-slide.is-active .ks-cta-row {
  opacity: 1;
  transform: translateY(0);
}

.ks-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #d4af37, #a8851e);
  color: #1a0e2e;
  padding: 15px 32px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(212,175,55,0.38);
}

.ks-btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transition: left 0.5s ease;
}

.ks-btn-primary:hover::before { left: 100%; }
.ks-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(212,175,55,0.48);
}

.ks-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 15px 32px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.22);
  transition: all 0.25s ease;
}

.ks-btn-ghost:hover {
  background: rgba(255,255,255,0.14);
  border-color: #d4af37;
  color: #f0d060;
  transform: translateY(-2px);
}

/* Stats strip */
.ks-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease 1.1s, transform 0.6s ease 1.1s;
}

.ks-slide.is-active .ks-stats {
  opacity: 1;
  transform: translateY(0);
}

.ks-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ks-stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #d4af37;
  line-height: 1;
}

.ks-stat-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.ks-stat-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.18);
  align-self: center;
}

/* ─── Bottle Showcase (right side) ──────────── */
.ks-bottle-showcase {
  position: absolute;
  right: 6%;
  bottom: 0;
  top: 0;
  width: 35%;
  max-width: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.ks-bottle-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(90,0,119,0.55), transparent 65%);
  border-radius: 50%;
  filter: blur(40px);
  animation: bottle-glow-pulse 3.5s ease-in-out infinite;
  pointer-events: none;
}

.ks-glow-gold  { background: radial-gradient(circle, rgba(212,175,55,0.45), transparent 65%); }
.ks-glow-amber { background: radial-gradient(circle, rgba(180,90,0,0.5),   transparent 65%); }
.ks-glow-teal  { background: radial-gradient(circle, rgba(0,140,100,0.4),  transparent 65%); }

@keyframes bottle-glow-pulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1);    }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.12); }
}

.ks-bottle-img {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6));
  opacity: 0;
  transform: translateY(60px) scale(0.94);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
  will-change: transform, opacity;
}

.ks-slide.is-active .ks-bottle-img {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bottle-idle 5s ease-in-out 1.2s infinite;
}

@keyframes bottle-idle {
  0%, 100% { transform: translateY(0)    rotate(-0.5deg); }
  50%       { transform: translateY(-14px) rotate(0.5deg); }
}

/* ─── Progress Bar ──────────────────────────── */
.ks-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.12);
  z-index: 20;
}

.ks-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5a0077, #d4af37);
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── Navigation Arrows ─────────────────────── */
.ks-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 54px;
  height: 54px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.ks-arrow-prev { left:  28px; }
.ks-arrow-next { right: 28px; }

.ks-arrow:hover {
  background: rgba(212,175,55,0.22);
  border-color: rgba(212,175,55,0.55);
  color: #d4af37;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 30px rgba(212,175,55,0.2);
}

/* ─── Dot Navigation ────────────────────────── */
.ks-dots {
  position: absolute;
  bottom: 36px;
  left: 7%;
  display: flex;
  gap: 10px;
  z-index: 20;
}

.ks-dot {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.ks-dot::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0;
  background: #d4af37;
  border-radius: 2px;
  transition: width 0.35s ease;
}

.ks-dot.active {
  width: 52px;
  background: rgba(212,175,55,0.25);
}

.ks-dot.active::after {
  width: 100%;
}

/* ─── Slide Counter ─────────────────────────── */
.ks-counter {
  position: absolute;
  bottom: 30px;
  right: 7%;
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.ks-counter-cur {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  transition: all 0.35s ease;
}

.ks-counter-sep {
  font-size: 1rem;
  color: rgba(255,255,255,0.3);
}

.ks-counter-tot {
  font-size: 0.9rem;
}

/* ─── Touch / Swipe Hint ────────────────────── */
.ks-swipe-hint {
  position: absolute;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  animation: swipe-fade 3s ease 2s forwards;
}

@keyframes swipe-fade {
  0%   { opacity: 0.4; }
  100% { opacity: 0; pointer-events: none; }
}

.ks-swipe-hint i { font-size: 1.2rem; color: #fff; animation: swipe-bounce 1.2s ease-in-out infinite; }

@keyframes swipe-bounce {
  0%, 100% { transform: translateX(0);   }
  50%       { transform: translateX(8px); }
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .ks-bottle-showcase { width: 32%; }
  .ks-headline { font-size: clamp(2.4rem, 5.5vw, 4.5rem); }
}

@media (max-width: 768px) {
  #hero-slider { height: 100svh; min-height: 580px; }

  .ks-content { padding: 0 6%; max-width: 100%; }
  .ks-bottle-showcase { display: none; }

  .ks-cinematic-overlay,
  .ks-overlay-champagne,
  .ks-overlay-cognac,
  .ks-overlay-tequila,
  .ks-overlay-gold {
    background: linear-gradient(180deg, rgba(10,0,20,0.78) 0%, rgba(30,0,50,0.85) 100%);
  }

  .ks-headline { font-size: clamp(2.4rem, 9vw, 3.6rem); }
  .ks-subtext  { font-size: 0.92rem; }

  .ks-arrow { display: none; }
  .ks-dots  { left: 50%; transform: translateX(-50%); bottom: 28px; }
  .ks-counter { display: none; }
}

@media (max-width: 480px) {
  .ks-cta-row { flex-direction: column; }
  .ks-btn-primary,
  .ks-btn-ghost { justify-content: center; }
  .ks-stats { gap: 14px; flex-wrap: wrap; }
  .ks-eyebrow { margin-bottom: 18px; }
}
