/* styles.css — VSL Avend */

/* ───────── layout ───────── */
.page {
  height: 100dvh;
  width: 100vw;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  isolation: isolate;
}
@media (max-width: 720px) {
  .page { grid-template-rows: auto 1fr; }
  .footnote { display: none; }
}

/* ───────── header ───────── */
.header { padding: clamp(28px, 4.5vh, 48px) 24px clamp(24px, 4vh, 40px); }
.header-inner {
  display: flex; align-items: center; justify-content: center;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.brand img {
  height: 72px; width: auto; display: block;
  filter: drop-shadow(0 0 24px rgba(255,255,255,0.06));
}

/* ───────── main ───────── */
.main {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: clamp(18px, 3vh, 32px);
  padding: clamp(8px, 2vh, 24px) 24px clamp(16px, 3vh, 32px);
  min-height: 0;
  overflow: hidden;
  max-width: 1100px; margin: 0 auto; width: 100%;
}

/* ───────── hook ───────── */
.hook-title {
  text-align: center;
  max-width: 880px;
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.02em;
  margin: 0; color: var(--text); text-wrap: balance;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 999px; background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74,222,128,0.18); animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot { 50% { box-shadow: 0 0 0 6px rgba(74,222,128,0.05); } }

.hook-title-mobile-tighten {
  /* placeholder for media query overrides */
}

/* ───────── player ───────── */
.player-section {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}
.player-frame {
  width: 100%;
  max-width: min(960px, 60vh * (16/9));
  display: flex; flex-direction: column; gap: 10px;
}
.player {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-strong);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 30px 80px rgba(0,0,0,0.6),
    0 0 120px rgba(255,255,255,0.025);
}
.player video {
  width: 100%; height: 100%; display: block;
  object-fit: cover; pointer-events: none;
}
.click-guard {
  position: absolute; inset: 0; z-index: 1;
  cursor: default;
}
.wm {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  opacity: 0.55; pointer-events: none;
}
.wm img { height: 26px; width: auto; display: block; }

/* unmute gate overlay */
.unmute-gate {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  border: 0; padding: 0; cursor: pointer; color: #fff;
  background:
    radial-gradient(closest-side, rgba(0,0,0,0.55), rgba(0,0,0,0.85));
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.unmute-gate-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; padding: 22px 28px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(20,23,28,0.7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.unmute-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
}
.unmute-copy { display: flex; flex-direction: column; gap: 4px; }
.unmute-copy strong {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: #fff;
}
.unmute-copy span {
  font-size: 12.5px; color: rgba(255,255,255,0.7); letter-spacing: .04em;
  text-transform: uppercase; font-weight: 500;
}
.unmute-pulse {
  position: absolute; left: 50%; top: 50%;
  width: 80px; height: 80px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  transform: translate(-50%, -50%);
  animation: pulse 1.8s ease-out infinite;
  pointer-events: none;
  z-index: 1;
  margin-top: -28px;
}
@keyframes pulse {
  0%   { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* end overlay */
.end-overlay {
  position: absolute; inset: 0; z-index: 7;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(closest-side, rgba(10,12,16,0.92), rgba(0,0,0,0.96));
  animation: endFade .6s ease-out both;
}
@keyframes endFade { from { opacity: 0; transform: scale(0.985); } }

.end-card {
  text-align: center; max-width: 520px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.end-check {
  width: 44px; height: 44px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(74,222,128,0.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.35);
  margin-bottom: 4px;
}
.end-card h2 {
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 700; letter-spacing: -0.01em;
  margin: 0; color: #fff; line-height: 1.25; text-wrap: balance;
}
.end-card p {
  font-size: 13.5px; line-height: 1.55;
  color: rgba(255,255,255,0.62); margin: 0; max-width: 420px;
}
.end-meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); font-weight: 500;
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
  margin-top: 4px;
}
.end-meta .dot {
  width: 7px; height: 7px; border-radius: 999px; background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74,222,128,0.18);
  animation: pulseDot 1.6s ease-in-out infinite;
}

/* progress bar */
.progress-row {
  display: flex; align-items: center; gap: 12px;
  padding: 0 4px;
}
.progress-track {
  flex: 1; height: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  pointer-events: none;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.6), #fff);
  transition: width .25s linear;
}
.progress-time {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px; color: var(--text-mute); letter-spacing: .04em;
  display: flex; gap: 4px;
}
.progress-time .dim { color: rgba(255,255,255,0.25); }

/* hint */
.player-hint {
  font-size: 12px; color: var(--text-mute); letter-spacing: .02em;
  text-align: center; max-width: 540px; margin: 4px auto 0;
}

/* mid CTA */
.mid-cta {
  margin: 6px 0 2px;
  position: relative;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  background: #fff; color: #0a0b0d; font-weight: 600; font-size: 15px;
  text-decoration: none; letter-spacing: -0.005em;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 22px rgba(255,255,255,0.12);
  animation: ctaIn .5s ease both;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.mid-cta:hover { transform: translateY(-1px); }
.mid-cta:active { transform: translateY(0); }

/* Green variant — primary "Falar com um consultor" */
.mid-cta-green {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #04140a;
  border: 1px solid rgba(34, 197, 94, 0.55);
  box-shadow:
    0 8px 22px rgba(34, 197, 94, 0.32),
    0 0 0 1px rgba(34, 197, 94, 0.18) inset;
  animation: ctaIn .5s ease both, ctaPulseGreen 2.4s ease-in-out infinite;
}
.mid-cta-green:hover {
  background: linear-gradient(180deg, #2bd06a 0%, #19b352 100%);
  box-shadow: 0 10px 26px rgba(34, 197, 94, 0.4);
}
@keyframes ctaIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes ctaPulseGreen {
  0%, 100% { box-shadow: 0 8px 22px rgba(34, 197, 94, 0.32), 0 0 0 0 rgba(34, 197, 94, 0.35); }
  50%      { box-shadow: 0 8px 22px rgba(34, 197, 94, 0.32), 0 0 0 6px rgba(34, 197, 94, 0); }
}
@media (max-width: 720px) {
  .mid-cta { padding: 12px 22px; font-size: 14px; }
}

/* Mute toggle button (overlaid on player) */
.mute-btn,
.fs-btn {
  position: absolute;
  z-index: 5;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.55);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
  padding: 0;
}
.mute-btn { bottom: 12px; right: 12px; }
.fs-btn   { bottom: 12px; left: 12px; display: none; } /* desktop: hidden */
.mute-btn:hover,
.fs-btn:hover {
  background: rgba(20, 23, 28, 0.78);
  border-color: rgba(255,255,255,0.32);
}
.mute-btn:active,
.fs-btn:active { transform: scale(0.94); }
@media (max-width: 720px) {
  .mute-btn, .fs-btn { bottom: 10px; width: 34px; height: 34px; }
  .mute-btn { right: 10px; }
  .fs-btn   { left: 10px; display: flex; } /* mobile: show */
  .mute-btn svg, .fs-btn svg { width: 18px; height: 18px; }
}

/* Pseudo-fullscreen for the player frame — works on mobile without rotating */
.player-frame.is-fs {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  background: #000;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 0;
}
.player-frame.is-fs .player {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.player-frame.is-fs .player video {
  object-fit: contain;
}
.player-frame.is-fs .progress-row {
  position: absolute;
  left: 12px; right: 12px; bottom: 14px;
  z-index: 6;
}
.player-frame.is-fs .mute-btn,
.player-frame.is-fs .fs-btn {
  z-index: 10;
}

/* buffering */
.buffering {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.spinner {
  width: 28px; height: 28px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.9);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* footnote */
.footnote {
  text-align: center;
  padding: 10px 24px 14px;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mute);
}

/* ───────── responsive ───────── */

/* Tablet */
@media (max-width: 960px) {
  .header { padding: 24px 20px 4px; }
  .brand img { height: 64px; }
  .main { padding: 8px 20px 18px; gap: 18px; }
  .hook-title { font-size: clamp(18px, 3vw, 26px); }
}

/* Mobile */
@media (max-width: 720px) {
  /* Stack header + main as a single centered column on mobile so the logo
     sits right above the headline instead of pinned to the very top. */
  .page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 14px;
    padding: 0;
  }
  .header { padding: 0 16px; }
  .header-inner { justify-content: center; }
  .brand img { height: 110px; }

  .main {
    padding: 0 14px;
    gap: 14px;
    justify-content: flex-start;
    flex: 0 1 auto;
  }

  .hook-title {
    font-size: 18px;
    line-height: 1.25;
    max-width: 92%;
    padding: 0 4px;
  }

  .player-section { gap: 10px; }
  .player-frame { gap: 8px; max-width: 100%; }
  .player { border-radius: 12px; }
  .wm { top: 8px; right: 8px; }
  .wm img { height: 20px; }

  .unmute-gate-inner { padding: 14px 18px; gap: 10px; max-width: 86%; }
  .unmute-icon { width: 44px; height: 44px; }
  .unmute-copy strong { font-size: 14px; }
  .unmute-copy span { font-size: 10.5px; }

  .end-overlay { padding: 16px; }
  .end-card { gap: 8px; max-width: 100%; }
  .end-check { width: 36px; height: 36px; margin-bottom: 2px; }
  .end-check svg { width: 18px; height: 18px; }
  .end-card h2 { font-size: 14px; line-height: 1.3; }
  .end-card p { font-size: 11px; line-height: 1.45; max-width: 280px; }
  .end-meta { font-size: 9px; padding: 4px 9px; letter-spacing: .1em; }

  .progress-time { font-size: 10.5px; }
  .player-hint { font-size: 11px; padding: 0 8px; }

  .footnote { padding: 6px 14px 10px; font-size: 9px; }
}

/* Small mobile (iPhone SE etc) */
@media (max-width: 380px) {
  .header { padding: 14px 14px 6px; }
  .brand img { height: 92px; }
  .hook-title { font-size: 16px; }
  .main { gap: 12px; padding: 4px 12px 12px; }
}

/* Short heights — phones in landscape, small windows */
@media (max-height: 720px) {
  .header { padding: 14px 24px 4px; }
  .brand img { height: 110px; }
  .hook-title { font-size: clamp(15px, 3.4vw, 22px); }
  .main { gap: 12px; padding: 4px 24px 12px; }
}
@media (max-height: 560px) {
  .header { padding: 6px 24px 0; }
  .brand img { height: 80px; }
  .hook-title { display: none; }
  .footnote { display: none; }
  .main { gap: 8px; }
}

/* Phone landscape — give video more horizontal room */
@media (max-height: 480px) and (orientation: landscape) {
  .header { padding: 4px 16px 0; }
  .brand img { height: 64px; }
  .player-frame { max-width: min(680px, 80vh * (16/9)); }
  .player-hint { display: none; }
}
