/* Basic reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #121212;
  overflow: hidden; /* keep background full-screen */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Animated gradient background */
.bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, #fff7ef, #ffe7d2, #fff);
  background-size: 200% 200%;
  background-attachment: fixed;
  animation: shift 12s ease-in-out infinite alternate;
  z-index: -2;
}
@keyframes shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Faint watermark in the back */
.watermark {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(90vmin, 560px);
  height: auto;
  max-width: 90vw;
  opacity: 0.15;
  filter: saturate(120%) brightness(105%);
  z-index: -1;
  pointer-events: none;
  object-fit: contain;
}

.card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.65);
  border-radius: 20px;
  padding: clamp(16px, 4vw, 28px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  width: min(95vw, 680px);
  max-width: 95vw;
}

.logo {
  width: min(240px, 40vw);
  display: block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
  border-radius: 8px;
  object-fit: cover;
}

/* Video-specific logo styling */
.logo video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

/* Ensure video is visible on mobile */
.logo video,
.logo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
  display: block;
}

/* Headings/text */
h1 {
  margin: 8px 0 6px;
  font-size: clamp(22px, 3.5vw, 34px);
}
p {
  margin: 0;
  color: #333;
  font-size: clamp(14px, 2.4vw, 18px);
}

/* Smoke particles */
#smoke-root {
  position: fixed;
  /* Adjust these two variables to align smoke with your logo’s cigar tip */
  --base-left: 51%;  /* horizontal position relative to viewport */
  --base-top: 50%;   /* vertical position relative to viewport */
  left: var(--base-left);
  top: var(--base-top);
  width: 1px; height: 1px;
  pointer-events: none;
  z-index: 2;
}

.smoke {
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(200,200,200,0.55), rgba(200,200,200,0.2) 60%, rgba(200,200,200,0.0) 70%);
  filter: blur(1px);
  opacity: 0;
  animation: puff linear forwards;
  will-change: transform, opacity, filter;
}

@keyframes puff {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; filter: blur(0.5px); }
  10%  { opacity: 0.8; }
  60%  { opacity: 0.35; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.6); opacity: 0; filter: blur(2.5px); }
}

/* Small disclaimer/footer (optional) */
footer {
  position: fixed;
  bottom: 10px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: #555;
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
  .watermark {
    width: 95vmin;
    max-width: 95vw;
  }
  
  .card {
    padding: 20px;
    border-radius: 16px;
  }
  
  .logo {
    width: min(200px, 50vw);
  }
  
  .logo video {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
  }
  
  /* Ensure fallback image is visible on mobile */
  .logo img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
  }
  
  h1 {
    font-size: clamp(20px, 4vw, 28px);
  }
  
  p {
    font-size: clamp(13px, 3vw, 16px);
  }
}

/* Ensure background stays visible on all devices */
@media (max-height: 600px) {
  .watermark {
    width: 80vmin;
    height: auto;
  }
}
