/* Identidade Visual - MEDsimple */
:root {
  /* Fontes */
  --font-albert-sans: "Albert Sans", sans-serif;
  --font-caveat: "Caveat", cursive;
  --default-font-family: var(--font-albert-sans);

  /* Paleta de Cores */
  --color-bg: #fcfcfc; /* Branco levemente off-white como nas imagens */
  --color-text-primary: #171717;
  --color-text-secondary: #737373;
  --color-text-muted: #a3a3a3;
  --color-text-medium: #404040;
  
  /* Bordas */
  --border-gray-200: #e5e7eb;

  /* Emerald (Sucesso/Aprovação) */
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;

  /* Blue (Ação Principal) */
  --color-blue-500: #6366f1; /* Tom mais vibrante como no botão 'Comece a usar' */
  --color-blue-600: #4f46e5;
  --color-blue-accent: #818cf8;

  /* Tipografia */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Raio de Borda */
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;

  /* Transições */
  --default-transition-duration: 0.2s;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--default-font-family);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Grid Background como visto nas capturas */
  background-image: 
    linear-gradient(to right, #f1f1f1 1px, transparent 1px),
    linear-gradient(to bottom, #f1f1f1 1px, transparent 1px);
  background-size: 40px 40px;
}

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1024px) {
  .container {
    max-width: 1100px;
  }
}

.section-py {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Navbar */
.navbar {
  height: 5rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(252, 252, 252, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: none;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
    gap: 2.5rem;
  }
}

.nav-link {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  transition: opacity var(--default-transition-duration);
}

.nav-link:hover {
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--default-transition-duration) var(--easing);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-blue-500);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-blue-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.btn-ghost:hover {
  opacity: 0.7;
}

.btn-dark {
  background-color: #0c0f1d;
  color: white;
  padding: 0.625rem 1.25rem;
}

/* Hero - Estilo Centralizado conforme Captura 1 */
.hero {
  padding-top: 6rem;
  padding-bottom: 6rem;
  text-align: center;
}

.hero-social-proof {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: white;
  border: 1px solid var(--border-gray-200);
  border-radius: 9999px;
  margin-bottom: 2rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.social-avatars {
  display: flex;
}

.avatar-circle {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 2px solid white;
  background: #e5e7eb;
  margin-right: -0.5rem;
  overflow: hidden;
  position: relative;
}

.avatar-circle:last-child {
  margin-right: 0;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: clamp(var(--text-3xl), 8vw, var(--text-6xl));
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  color: var(--color-text-primary);
  max-width: 900px;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.hero-accent {
  color: var(--color-blue-accent);
  position: relative;
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 88%;
}

.hand-drawn {
  font-family: var(--font-caveat);
  position: relative;
}

.hand-drawn-underline {
  position: absolute;
  bottom: -0.2rem;
  left: 0;
  width: 100%;
  height: 6px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 Q50,0 100,5" stroke="%2310b981" stroke-width="4" fill="none" stroke-linecap="round"/></svg>');
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.badge-outline {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-gray-200);
  border-radius: 9999px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.section-title-highlight {
  color: var(--color-blue-600);
}

/* Info Box / Features */
.info-section {
  background: white;
  border-top: 1px solid var(--border-gray-200);
  border-bottom: 1px solid var(--border-gray-200);
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 4rem 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Bento Box - Seção de Benefícios */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(180px, auto);
  }
  .bento-col-3 { grid-column: span 3; }
  .bento-col-2 { grid-column: span 2; }
}

.bento-card {
  background-color: #ffffff !important; /* Garantir branco sólido */
  border: 1px solid #d1d5db; /* Borda um pouco mais escura para contraste */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  transition: all 0.4s var(--easing);
  position: relative;
  overflow: hidden;
  opacity: 1 !important; /* Forçar opacidade 1 */
}

.bento-card * {
  position: relative;
  z-index: 2;
}

.bento-card:hover {
  border-color: var(--color-emerald-500);
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.bento-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: block;
}

.bento-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.5rem;
}

.bento-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Scroll Storytelling - Como Funciona */
.story-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 0;
}

.story-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-gray-200);
  z-index: 1;
}

.story-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  background: var(--color-emerald-500);
  transition: height 0.1s linear;
}

.story-step {
  position: relative;
  z-index: 2;
  padding-left: 80px;
  margin-bottom: 6rem;
}

.story-step:last-child {
  margin-bottom: 0;
}

.story-number {
  position: absolute;
  left: 0;
  width: 50px;
  height: 50px;
  background: white;
  border: 2px solid var(--border-gray-200);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  transition: all 0.3s var(--easing);
}

.story-step.active .story-number {
  border-color: var(--color-emerald-500);
  background: var(--color-emerald-500);
  color: white;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.story-content h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
}

/* FAQ Split */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 1024px) {
  .faq-grid {
    grid-template-columns: 0.4fr 0.6fr;
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item-trigger {
  width: 100%;
  padding: 1.5rem;
  text-align: left;
  background: white;
  border: 1px solid var(--border-gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  transition: all 0.2s var(--easing);
}

.faq-item-trigger:hover, .faq-item-trigger.active {
  border-color: var(--color-blue-500);
  color: var(--color-blue-600);
}

.faq-ans-box {
  position: sticky;
  top: 8rem;
  padding: 3rem;
  background: white;
  border: 1px solid var(--border-gray-200);
  border-radius: var(--radius-2xl);
  min-height: 200px;
}

.faq-ans-box::before {
  content: "Resposta";
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
}

/* intl-tel-input v24 overrides para form dark */
.cta-poster .iti {
  width: 100%;
}

/* v24: country container e selected-country */
.cta-poster .iti__country-container,
.cta-poster .iti__selected-country {
  background: rgba(255, 255, 255, 0.1) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cta-poster .iti__selected-country:hover,
.cta-poster .iti__selected-country:focus {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* v24: dial-code text */
.cta-poster .iti__dial-code,
.cta-poster .iti__selected-dial-code {
  color: white !important;
}

/* v24: arrow */
.cta-poster .iti__arrow {
  border-top-color: rgba(255, 255, 255, 0.6) !important;
}

.cta-poster .iti__arrow--up {
  border-bottom-color: rgba(255, 255, 255, 0.6) !important;
  border-top-color: transparent !important;
}

/* CTA Final - Poster */
.cta-poster {
  background: #0c0f1d;
  color: white;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 8rem 0;
  border-radius: var(--radius-2xl);
}

.cta-poster .hero-title {
  color: white;
}

.cta-poster-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20vw;
  font-weight: 900;
  color: rgba(255,255,255,0.03);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}

.cta-poster-content {
  position: relative;
  z-index: 1;
}

/* ===== TYPEFORM OVERLAY ===== */
.tf-overlay {
  position: fixed;
  inset: 0;
  background: #0c0f1d;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tf-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.tf-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.tf-progress-fill {
  height: 100%;
  background: var(--color-blue-500);
  width: 0%;
  transition: width 0.4s ease;
}

.tf-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  transition: all 0.2s;
}

.tf-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.tf-steps-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.tf-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.tf-step.active {
  opacity: 1;
  transform: translateY(0);
}

.tf-overlay.open .tf-step.active {
  pointer-events: all;
}

.tf-step.exit-up {
  opacity: 0;
  transform: translateY(-60px);
}

.tf-step-inner {
  width: 100%;
  max-width: 620px;
}

.tf-question-num {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.tf-question {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  color: white;
  margin-bottom: 2rem;
  line-height: 1.25;
}

.tf-input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-family: var(--default-font-family);
  padding: 0.625rem 0;
  outline: none;
  transition: border-color 0.2s;
  caret-color: var(--color-blue-accent);
}

.tf-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.tf-input:focus {
  border-bottom-color: var(--color-blue-accent);
}

/* Phone input via intl-tel-input */
#tf-phone-wrapper .iti {
  width: 100%;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.2s;
}

#tf-phone-wrapper .iti:focus-within {
  border-bottom-color: var(--color-blue-accent);
}

#tf-phone-wrapper .iti__country-container,
#tf-phone-wrapper .iti__selected-country {
  background: transparent !important;
  border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-bottom: none !important;
}

#tf-phone-wrapper .iti__dial-code,
#tf-phone-wrapper .iti__selected-dial-code {
  color: white !important;
}

#tf-phone-wrapper .iti__arrow {
  border-top-color: rgba(255, 255, 255, 0.45) !important;
}

#tf-phone-wrapper .iti__arrow--up {
  border-bottom-color: rgba(255, 255, 255, 0.45) !important;
  border-top-color: transparent !important;
}

#tf-phone-wrapper .tf-phone-input {
  background: transparent;
  border: none;
  color: white;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-family: var(--default-font-family);
  padding: 0.625rem 0 0.625rem 0.75rem;
  outline: none;
  width: 100%;
  caret-color: var(--color-blue-accent);
}

#tf-phone-wrapper .tf-phone-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.tf-btn-ok {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-blue-500);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  font-family: var(--default-font-family);
}

.tf-btn-ok:hover {
  background: var(--color-blue-600);
  transform: translateY(-1px);
}

.tf-hint {
  margin-top: 0.625rem;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.25);
}

.tf-hint strong {
  color: rgba(255, 255, 255, 0.45);
}

.tf-error {
  min-height: 1.25rem;
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  color: #f87171;
}

.tf-options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.tf-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--default-font-family);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.tf-option:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--color-blue-500);
  color: white;
}

.tf-opt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.15s;
}

.tf-option:hover .tf-opt-key {
  background: var(--color-blue-500);
  border-color: var(--color-blue-500);
  color: white;
}

.tf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tf-back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: color 0.2s;
  font-family: var(--default-font-family);
}

.tf-back-btn:hover {
  color: white;
}

.tf-counter {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.25);
}

.tf-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--color-blue-500);
  border-radius: 50%;
  animation: tf-spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes tf-spin {
  to { transform: rotate(360deg); }
}
