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

:root {
  --sky:      #38BDF8;
  --sky-dark: #0EA5E9;
  --teal:     #2DD4BF;
  --sun:      #FCD34D;
  --coral:    #FB923C;
  --pink:     #F472B6;
  --lilac:    #A78BFA;
  --green:    #34D399;

  --hero-from: #0EA5E9;
  --hero-to:   #2DD4BF;

  --peak-c:   #F97316;
  --peak-lt:  #FFF3E8;
  --purple-c: #8B5CF6;
  --purple-lt:#F3F0FF;
  --teal-c:   #0D9488;
  --teal-lt:  #E6F7F6;
  --amber-c:  #D97706;
  --amber-lt: #FFFBEB;
  --blue-c:   #2563EB;
  --blue-lt:  #EFF6FF;
  --gray-c:   #64748B;

  --bg:       #F8FAFC;
  --surface:  #FFFFFF;
  --text:     #1E293B;
  --text-2:   #475569;
  --text-3:   #94A3B8;
  --border:   #E2E8F0;
  --radius:   16px;
  --shadow-sm:0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:   0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:0 10px 40px rgba(0,0,0,.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  padding: clamp(32px, 6vw, 64px) 20px clamp(48px, 8vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* bolhas decorativas */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: .18;
  pointer-events: none;
}
.hero::before {
  width: clamp(180px, 35vw, 340px);
  height: clamp(180px, 35vw, 340px);
  background: var(--sun);
  top: -60px; right: -60px;
}
.hero::after {
  width: clamp(120px, 25vw, 240px);
  height: clamp(120px, 25vw, 240px);
  background: var(--pink);
  bottom: -40px; left: -40px;
}

.hero-bubble {
  position: absolute;
  border-radius: 50%;
  opacity: .12;
  pointer-events: none;
}
.hero-bubble.b1 { width:80px; height:80px; background:var(--lilac); top:30%; left:8%; animation: float 6s ease-in-out infinite; }
.hero-bubble.b2 { width:50px; height:50px; background:var(--green); top:20%; right:15%; animation: float 8s ease-in-out infinite .5s; }
.hero-bubble.b3 { width:36px; height:36px; background:var(--sun);   bottom:25%; right:10%; animation: float 7s ease-in-out infinite 1s; }

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 40px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: white;
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--sun), #FFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(14px, 2.5vw, 16px);
  color: rgba(255,255,255,.88);
  max-width: 500px;
  margin: 0 auto 24px;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 36px);
  flex-wrap: wrap;
}
.hero-stat {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.hero-stat strong {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}
.hero-stat span {
  font-size: 11px;
  color: rgba(255,255,255,.8);
  margin-top: 3px;
  display: block;
}

/* ══════════════════════════════════
   CONTAINER
══════════════════════════════════ */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 72px;
}

/* ══════════════════════════════════
   FORMULÁRIO
══════════════════════════════════ */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 5vw, 40px) clamp(20px, 5vw, 36px);
  margin-top: -40px;
  position: relative;
  z-index: 10;
  border: 1px solid var(--border);
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.form-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--sky-dark), var(--teal));
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.form-card-header h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.form-card-header p {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.field input, .field select {
  height: 50px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
  width: 100%;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.field input:focus, .field select:focus {
  border-color: var(--sky-dark);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
  background: white;
}

.field .hint {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
}

.btn {
  margin-top: 20px;
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, var(--sky-dark) 0%, var(--teal) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s, transform .12s, box-shadow .2s;
  letter-spacing: .02em;
  box-shadow: 0 4px 16px rgba(14,165,233,.35);
  touch-action: manipulation;
}
.btn:hover  { opacity: .92; box-shadow: 0 6px 20px rgba(14,165,233,.45); }
.btn:active { transform: scale(.97); }

/* ══════════════════════════════════
   RESULTADO
══════════════════════════════════ */
#result { display: none; }
#result.visible { display: block; }

.section-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  font-weight: 800;
  color: var(--text);
  margin: 36px 0 16px;
  line-height: 1.25;
}
.section-title--chart { margin-top: 32px; }
.section-title small {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 4px;
}

/* milestones */
.milestones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.milestone {
  background: var(--surface);
  border-radius: 14px;
  padding: 16px 14px;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.milestone:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.milestone .m-icon  { font-size: 22px; margin-bottom: 8px; line-height: 1; }
.milestone .m-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.milestone .m-date  { font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.milestone .m-sub   { font-size: 10.5px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }

.milestone.type-birth { border-color: var(--border); }
.milestone.type-birth .m-label { color: var(--gray-c); }
.milestone.type-dpp   { border-color: #FDE68A; background: var(--amber-lt); }
.milestone.type-dpp .m-label   { color: var(--amber-c); }
.milestone.type-peak  { border-color: #FED7AA; background: var(--peak-lt); }
.milestone.type-peak .m-label  { color: var(--peak-c); }
.milestone.type-end   { border-color: #99F6E4; background: var(--teal-lt); }
.milestone.type-end .m-label   { color: var(--teal-c); }
.milestone.type-today { border-color: #BFDBFE; background: var(--blue-lt); }
.milestone.type-today .m-label { color: var(--blue-c); }

/* barra progresso */
.progress-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.prog-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}
.prog-bar-bg {
  background: var(--bg);
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.prog-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--sky-dark) 0%, var(--teal) 50%, var(--green) 100%);
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  width: 0%;
}
.prog-msg {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

/* gráfico */
.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--border);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.leg-line { width: 20px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.leg-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.leg-dash { width: 20px; height: 2px; background: repeating-linear-gradient(90deg,#2563EB 0,#2563EB 4px,transparent 4px,transparent 8px); flex-shrink: 0; }

#chartWrap { position: relative; width: 100%; height: clamp(240px, 45vw, 340px); }

.phase-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.phase-tag  { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }

/* ══════════════════════════════════
   PURPLE cards
══════════════════════════════════ */
.purple-intro {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 700px;
  margin-bottom: 4px;
}

.purple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.purple-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 16px;
  border: 1.5px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s;
}
.purple-card:hover { transform: translateY(-2px); border-color: var(--sky); }
.purple-letter {
  width: 38px; height: 38px;
  border-radius: 10px;
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.purple-card h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.purple-card p  { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }

/* ══════════════════════════════════
   DICAS
══════════════════════════════════ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tip-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px 16px;
  border: 1.5px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s;
}
.tip-card:hover { transform: translateY(-2px); }
.tip-icon { font-size: 30px; margin-bottom: 10px; line-height: 1; display: flex; justify-content: center; align-items: center; }
.tip-card h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.tip-card p  { font-size: 12px; color: var(--text-2); line-height: 1.65; }

/* FAQ */
.faq { margin-top: 40px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 18px;
  text-align: left;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  touch-action: manipulation;
}
.faq-q:hover { background: var(--bg); }
.faq-arrow { font-size: 16px; transition: transform .25s; flex-shrink: 0; color: var(--sky-dark); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
  padding: 0 18px;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 18px 16px; }

/* alerta */
.alert-box {
  margin-top: 24px;
  background: #FFF7ED;
  border-left: 4px solid var(--coral);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.alert-box .al-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.alert-box h4 { font-size: 13px; font-weight: 700; color: #C2410C; margin-bottom: 5px; }
.alert-box p  { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }

/* footer */
footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  line-height: 1.8;
}
footer a { color: var(--sky-dark); text-decoration: none; }

/* ══════════════════════════════════
   ANIMAÇÕES
══════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .45s ease forwards;
}
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }
.fade-in:nth-child(1){animation-delay:.04s}
.fade-in:nth-child(2){animation-delay:.10s}
.fade-in:nth-child(3){animation-delay:.16s}
.fade-in:nth-child(4){animation-delay:.22s}
.fade-in:nth-child(5){animation-delay:.28s}
.fade-in:nth-child(6){animation-delay:.34s}

/* ══════════════════════════════════
   RESPONSIVO — MOBILE
══════════════════════════════════ */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .purple-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr 1fr; }
  .milestones { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 10px; }
  .hero-stat  { padding: 8px 14px; }
  .hero { padding: 20px 16px 36px; }
  .form-card  { margin-top: 0; }
  .container  { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  .chart-card { padding: 12px 8px; }
}
@media (max-width: 400px) {
  .tips-grid  { grid-template-columns: 1fr; }
  .milestones { grid-template-columns: repeat(2, 1fr); }
}

/* Melhorar toque em mobile */
@media (hover: none) {
  .milestone:hover, .purple-card:hover, .tip-card:hover { transform: none; }
}

/* Safe area para iPhones com notch */
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
