/* ==========================================================================
   BLACK FRIDAY DA PD VITALÍCIA - ACESSO PRIORITÁRIO
   Design System & Mobile Optimization
   ========================================================================== */

:root {
  --bg-dark: #07030e;
  --bg-darker: #040108;
  --card-bg: rgba(18, 8, 30, 0.9);
  --card-border: rgba(168, 85, 247, 0.28);
  --card-border-focus: #a855f7;
  
  --primary-purple: #9d2feb;
  --vibrant-magenta: #d926e8;
  --accent-blue: #2563eb;
  
  --cta-green: #1da855;
  --cta-green-hover: #169348;
  --cta-green-glow: rgba(29, 168, 85, 0.4);
  
  --text-white: #ffffff;
  --text-muted: #c4b5fd;
  --text-subtle: #948aa5;
  
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.16);
  --input-text: #ffffff;
  --input-placeholder: #8b809e;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-speed: 0.2s;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-white);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Background Atmosphere (GPU-optimized) */
.bg-ambience {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.glow-orb-1 {
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  background: radial-gradient(circle, rgba(157, 47, 235, 0.4) 0%, rgba(112, 26, 179, 0.08) 70%, transparent 100%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-orb-2 {
  width: min(400px, 80vw);
  height: min(400px, 80vw);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, transparent 70%);
  bottom: -50px;
  left: -50px;
}

.glow-orb-3 {
  width: min(350px, 70vw);
  height: min(350px, 70vw);
  background: radial-gradient(circle, rgba(217, 38, 232, 0.25) 0%, transparent 70%);
  top: 35%;
  right: -80px;
}

.bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.4;
}

/* ==========================================================================
   Top Animated Announcement Bar (Sem Sombra)
   ========================================================================== */
.top-banner-bar {
  width: 100%;
  position: relative;
  z-index: 20;
  padding: max(0.6rem, env(safe-area-inset-top, 0px)) 1rem 0.6rem;
  background: linear-gradient(90deg, #9d2feb, #d926e8, #2563eb, #ff0080, #9d2feb);
  background-size: 300% 100%;
  animation: bannerGradientFlow 4s linear infinite;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.top-banner-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: bannerShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bannerGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes bannerShimmer {
  0% { left: -100%; }
  50%, 100% { left: 160%; }
}

.top-banner-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}

.top-banner-text {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.top-banner-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e, 0 0 3px #ffffff;
  animation: pulseDot 1.2s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   Page Layout
   ========================================================================== */
.main-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 1rem max(2rem, env(safe-area-inset-bottom, 20px));
}

.content-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

/* Logo Header */
.logo-header {
  text-align: center;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  width: 100%;
}

.logo-header .brand-logo {
  max-width: 270px;
  width: 80%;
  height: auto;
  display: inline-block;
  filter: drop-shadow(0 8px 20px rgba(157, 47, 235, 0.4));
  transition: transform 0.25s ease;
}

.logo-header .brand-logo:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Form Card
   ========================================================================== */
.form-card {
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 1.85rem 1.6rem;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(157, 47, 235, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #2563eb, #9d2feb, #d926e8, #2563eb);
  background-size: 200% 100%;
  animation: borderShimmer 4s linear infinite;
}

@keyframes borderShimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.card-header-badge {
  text-align: center;
  margin-bottom: 1.25rem;
}

.card-header-badge h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-header-badge p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f0f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .required-mark {
  color: #ff5252;
  margin-left: 2px;
}

.form-label .optional-mark {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 400;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-textarea {
  width: 100%;
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 16px; /* Evita auto-zoom no iOS Safari */
  color: var(--input-text);
  outline: none;
  min-height: 48px;
  transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--input-placeholder);
  font-size: 0.92rem;
}

.form-input:hover, .form-textarea:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.08);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary-purple);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(157, 47, 235, 0.25);
}

/* Phone input with country selector */
.phone-field-wrapper {
  display: flex;
  position: relative;
  border-radius: 12px;
  border: 1.5px solid var(--input-border);
  background-color: var(--input-bg);
  min-height: 48px;
  transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.phone-field-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.08);
}

.phone-field-wrapper.focused {
  border-color: var(--primary-purple);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(157, 47, 235, 0.25);
}

.country-selector {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-right: 1.5px solid rgba(255, 255, 255, 0.12);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  cursor: pointer;
  user-select: none;
  min-height: 48px;
}

.country-selector:hover, .country-selector:active {
  background: rgba(255, 255, 255, 0.09);
}

.country-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.country-arrow {
  width: 10px;
  height: 6px;
  fill: #c4b5fd;
  transition: transform 0.2s ease;
}

.country-selector.active .country-arrow {
  transform: rotate(180deg);
}

.phone-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 10px 10px 0 !important;
  padding-left: 0.85rem !important;
  min-height: 48px !important;
  font-size: 16px !important;
}

/* Country Dropdown */
.country-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #190a2a;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
  z-index: 50;
  width: min(320px, calc(100vw - 2.5rem));
  flex-direction: column;
}

.country-dropdown.show {
  display: flex;
}

.country-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.45rem;
  padding: 0 0.15rem;
}

.country-search-icon {
  position: absolute;
  left: 0.8rem;
  width: 15px;
  height: 15px;
  color: #a855f7;
  pointer-events: none;
}

.country-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 8px;
  padding: 0.55rem 0.75rem 0.55rem 2.2rem;
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.country-search-input:focus {
  border-color: #d946ef;
  background: rgba(255, 255, 255, 0.13);
}

.country-search-input::placeholder {
  color: rgba(229, 224, 245, 0.45);
  font-size: 0.84rem;
}

.country-list {
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

/* Custom scrollbar for country list */
.country-list::-webkit-scrollbar {
  width: 6px;
}
.country-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.country-list::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.45);
  border-radius: 4px;
}
.country-list::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.75);
}

.country-divider {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(229, 224, 245, 0.5);
  padding: 0.45rem 0.65rem 0.25rem;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #e5e0f5;
  min-height: 38px;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.country-item:hover, .country-item:active, .country-item.selected {
  background: rgba(168, 85, 247, 0.28);
  color: #ffffff;
}

.country-item .item-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.country-item .item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.country-item .dial-code {
  color: #c084fc;
  font-weight: 600;
  margin-left: auto;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.country-no-results {
  padding: 1.2rem 0.75rem;
  text-align: center;
  color: rgba(229, 224, 245, 0.5);
  font-size: 0.85rem;
}

/* Textarea */
.form-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}

/* ==========================================================================
   Submit CTA Button
   ========================================================================== */
.submit-btn-wrapper {
  margin-top: 0.35rem;
}

.cta-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(0.88rem, 3.8vw, 1.02rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.15rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 
    0 10px 22px var(--cta-green-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: btnShine 3.5s infinite;
  pointer-events: none;
}

@keyframes btnShine {
  0% { left: -60%; }
  35%, 100% { left: 140%; }
}

.cta-button:hover {
  background: linear-gradient(180deg, #25d366 0%, #17b353 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 14px 28px rgba(34, 197, 94, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.cta-button:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.cta-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Security Note */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--text-subtle);
  margin-top: 0.85rem;
  text-align: center;
  line-height: 1.35;
}

.security-note svg {
  width: 14px;
  height: 14px;
  fill: #22c55e;
  flex-shrink: 0;
}

/* Field error */
.field-error {
  color: #ff6b6b;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  display: none;
}

.form-group.has-error .field-error {
  display: block;
}

.form-group.has-error .form-input,
.form-group.has-error .phone-field-wrapper {
  border-color: #ff5252 !important;
}

/* ==========================================================================
   Success State
   ========================================================================== */
.success-card {
  display: none;
  text-align: center;
  padding: 2rem 1.25rem;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: #22c55e;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.4);
}

.success-icon-badge svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.success-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.success-desc {
  font-size: 0.9rem;
  color: #d1c9e4;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  width: 100%;
  min-height: 50px;
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.4);
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.whatsapp-btn:hover {
  background: #22bf5b;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-btn:active {
  transform: scale(0.98);
}

.whatsapp-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.page-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.72rem;
  color: #746d88;
  max-width: 440px;
  line-height: 1.45;
  padding: 0 0.5rem;
}

/* ==========================================================================
   Mobile Breakpoints
   ========================================================================== */
@media (max-width: 480px) {
  .main-wrapper {
    padding: 0.75rem 0.85rem max(1.75rem, env(safe-area-inset-bottom, 16px));
  }
  
  .top-banner-bar {
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.75rem 0.5rem;
  }
  
  .top-banner-text {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
  }
  
  .logo-header {
    margin-top: 0.15rem;
    margin-bottom: 0.75rem;
  }
  
  .logo-header .brand-logo {
    max-width: 215px;
    width: 72%;
  }
  
  .form-card {
    padding: 1.35rem 1.1rem;
    border-radius: 18px;
  }
  
  .card-header-badge {
    margin-bottom: 1.05rem;
  }
  
  .card-header-badge h2 {
    font-size: 1.12rem;
  }
  
  .card-header-badge p {
    font-size: 0.8rem;
  }
  
  .lead-form {
    gap: 0.85rem;
  }
  
  .form-label {
    font-size: 0.84rem;
  }
  
  .form-input, .form-textarea, .phone-field-wrapper {
    min-height: 46px;
  }
  
  .form-textarea {
    min-height: 72px;
  }
  
  .cta-button {
    min-height: 50px;
    padding: 0.9rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 12px;
  }
  
  .security-note {
    font-size: 0.7rem;
    margin-top: 0.75rem;
  }
  
  .page-footer {
    margin-top: 1.35rem;
    font-size: 0.68rem;
  }
}

/* Extra small devices (<= 360px) */
@media (max-width: 360px) {
  .logo-header .brand-logo {
    max-width: 190px;
  }
  
  .cta-button {
    font-size: 0.84rem;
    letter-spacing: 0.01em;
  }
}
