/* ============================================================
   MACI App — VSL Landing Page
   Estética: SaaS premium, escura, minimalista, foco em conversão.
   Mobile first.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f4f0;
  --text-muted: #a3a29c;
  --gold: #c9a86a;
  --gold-soft: #e2c99a;
  --teal: #2a6b78;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 18px 14px 28px;
}

.container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Headline ---------- */
.headline {
  font-size: clamp(1.12rem, 4.8vw, 1.7rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.subheadline {
  margin-top: 10px;
  font-size: clamp(0.78rem, 3.2vw, 0.95rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 38ch;
}

/* ---------- Vídeo vertical 9:16 ---------- */
.video-frame {
  position: relative;
  margin-top: 22px;
  width: min(100%, max(280px, calc((100dvh - 260px) * 9 / 16)));
  min-width: min(100%, 280px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
}

.video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface);
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Overlay "Clique para assistir com som" ---------- */
.sound-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  background: rgba(10, 10, 11, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 0;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}

.sound-overlay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(201, 168, 106, 0.14);
  border: 1px solid rgba(201, 168, 106, 0.45);
  color: var(--gold-soft);
  box-shadow: 0 10px 34px -10px rgba(201, 168, 106, 0.45);
}

.sound-overlay-icon svg {
  width: 38px;
  height: 38px;
}

.sound-overlay-text {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* ---------- Overlay de pausa (retorno à aba) ---------- */
.resume-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 10, 11, 0.55);
  border: 0;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}

.resume-overlay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.resume-overlay-icon svg {
  width: 32px;
  height: 32px;
  margin-left: 3px;
}

.resume-overlay-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Controles minimalistas ---------- */
.video-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Controles só existem visualmente depois que o visitante ativa o som. */
.video-frame.sound-activated:hover .video-controls,
.video-frame.sound-activated.show-controls .video-controls {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 10, 11, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
}

.control-btn svg {
  width: 19px;
  height: 19px;
}

/* ---------- Slider de volume ---------- */
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  align-self: center;
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text, #f5f2ec);
  border: none;
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text, #f5f2ec);
  border: none;
}

/* ---------- CTA ---------- */
.cta {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  padding: 18px 28px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #17130b;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 16px 40px -14px rgba(201, 168, 106, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px -14px rgba(201, 168, 106, 0.65);
}

/* Entrada suave do CTA: fade + leve movimento vertical */
.cta.cta-enter {
  animation: cta-in 0.55s ease both;
}

@keyframes cta-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .page {
    align-items: center;
    padding: 48px 24px 80px;
  }

  .container {
    max-width: 520px;
  }

  .headline {
    font-size: clamp(1.35rem, 2.6vw, 1.85rem);
    max-width: 26ch;
  }

  .subheadline {
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    max-width: 42ch;
  }

  .video-frame {
    width: min(100%, max(320px, calc((100dvh - 360px) * 9 / 16)));
    min-width: min(100%, 320px);
    max-width: 100%;
    margin-top: 28px;
  }

  .cta {
    width: auto;
    min-width: 320px;
    margin-top: 28px;
  }
}
