/* ═══════════════════════════════════════════
   Mobile-first global reset + fixes
   Positivo Brasil Funnel
═══════════════════════════════════════════ */

/* ── Base reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #f0f2f5;
  color: #1e293b;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  padding-top: 0;
}

/* ── Fluid typography ── */
h1 { font-size: clamp(1.4rem, 5vw, 2.25rem); font-weight: 800; line-height: 1.2; color: #1e293b; }
h2 { font-size: clamp(1.2rem, 4vw, 1.75rem); font-weight: 700; line-height: 1.25; color: #1e293b; }
h3 { font-size: clamp(1rem, 3vw, 1.25rem); font-weight: 600; line-height: 1.3; color: #1e293b; }
p  { font-size: clamp(0.9rem, 2.5vw, 1rem); color: #64748b; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ── Main content padding (accounts for sticky header) ── */
.main-content {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 77px);
  min-height: calc(100dvh - 77px);
}
@media (min-width: 481px) { .main-content { padding: 32px 20px; justify-content: center; } }

/* ── Card mobile overrides ── */
.card {
  width: 100%;
  padding: 24px 18px;
  border-radius: 16px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
@media (min-width: 481px) { .card { padding: 36px 28px; } }
@media (min-width: 768px) { .card { padding: 40px 32px; } }

/* ── Inputs: PREVENT iOS zoom ── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
textarea,
select {
  font-size: 16px !important; /* Critical: prevents iOS auto-zoom */
  -webkit-appearance: none;
  appearance: none;
  border-radius: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #1e293b;
  transition: border-color 0.2s;
  touch-action: manipulation;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}

/* ── Buttons: touch-friendly ── */
button, .btn, [role="button"] {
  min-height: 48px;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  font-size: 16px;
  border-radius: 12px;
  width: 100%;
  display: block;
  border: none;
  font-weight: 700;
  padding: 14px 24px;
  transition: all 0.2s ease;
}

/* Only apply hover on real pointer devices */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #2563eb; transform: translateY(-1px); }
  .btn-yellow:hover  { background: #e6b200; }
  .btn-outline:hover { background: #3b82f6; color: #fff; }
}

/* ── Images responsive ── */
img, video, svg {
  max-width: 100%;
  height: auto;
}

/* ── Credit card mockup ── */
.card-mockup {
  max-width: min(340px, 90vw);
  width: 100%;
  margin: 0 auto;
  font-size: clamp(10px, 2.5vw, 14px);
}

/* ── Quiz grid mobile ── */
.quiz-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 360px) {
  .quiz-grid { grid-template-columns: 1fr; }
}

/* ── Date grid mobile ── */
.date-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Modals ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 32px 24px;
  background: #fff;
  text-align: center;
}
@media (max-width: 480px) {
  .modal { padding: 28px 20px; border-radius: 16px; }
}

/* ── Progress bar ── */
.progress-bar-wrapper { margin-bottom: 28px; }
.progress-bar-track { height: 7px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.progress-bar-fill  { height: 100%; background: #3b82f6; border-radius: 99px; transition: width 0.4s ease-out; }

/* ── Toast notifications ── */
.toast-container {
  position: fixed;
  bottom: 16px;
  left: 12px;
  z-index: 9999;
  max-width: calc(100vw - 24px);
}
.toast {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  animation: slide-in-left 0.4s ease both;
  margin-bottom: 8px;
}
@media (max-width: 480px) {
  .toast { max-width: calc(100vw - 28px); font-size: 13px; }
}

/* ── Countdown ── */
.countdown-box {
  border-radius: 12px;
  padding: 14px 16px;
}
.countdown-time {
  font-size: clamp(24px, 7vw, 32px);
  font-variant-numeric: tabular-nums;
}

/* ── Accordion ── */
.accordion-trigger {
  min-height: 52px;
  padding: 14px 16px;
  font-size: 14px;
}

/* ── Shipping options ── */
.shipping-option { padding: 16px; }

/* ── Safe area bottom for fixed elements ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .toast-container {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Breakpoint helpers ── */
@media (max-width: 480px) {
  .hide-mobile  { display: none !important; }
  .show-mobile  { display: block !important; }
  .stack-mobile { flex-direction: column !important; }
  .full-mobile  { width: 100% !important; max-width: 100% !important; }
}
@media (min-width: 481px) {
  .show-mobile { display: none !important; }
}
