/* ============================================================
   Nevoli Telecom — Upgrade de Velocidade
   Identidade: verde-limão vibrante, mobile-first, animado
   ============================================================ */

:root {
  --green: #6dc02a;
  --green-mid: #4e9a1a;
  --green-dark: #3a7a0f;
  --green-deep: #1e4a08;
  --neon: #7ed81f;
  --red: #cc0000;

  --white: #ffffff;
  --cream: #f4f9ee;
  --paper: #ffffff;
  --ink: #16240b;
  --muted: #5e6b51;
  --line: #e4eed9;

  --grad-hero: radial-gradient(120% 120% at 80% 0%, #7ed81f 0%, #4e9a1a 45%, #1e4a08 100%);
  --grad-btn: linear-gradient(135deg, #7ed81f 0%, #5cae15 100%);
  --grad-card: linear-gradient(165deg, #4e9a1a 0%, #2d6b10 100%);

  --shadow-sm: 0 2px 10px rgba(30, 74, 8, 0.08);
  --shadow-md: 0 14px 40px rgba(30, 74, 8, 0.14);
  --shadow-btn: 0 10px 24px rgba(109, 192, 42, 0.45);
  --ring: 0 0 0 4px rgba(109, 192, 42, 0.25);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --font-display: "Montserrat", "Arial Black", sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --maxw: 720px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(60% 50% at 50% -5%, rgba(126, 216, 31, 0.12), transparent 60%),
    var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad-btn);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: var(--shadow-btn);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.brand-mark.small {
  width: 28px;
  height: 28px;
  font-size: 1rem;
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-family: var(--font-display);
}
.brand-text strong {
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--red);
  font-size: 1.05rem;
}
.brand-text em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--green-dark);
  text-transform: uppercase;
}

.whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--green-dark);
  background: rgba(109, 192, 42, 0.12);
  border: 1px solid rgba(109, 192, 42, 0.3);
  padding: 9px 15px;
  border-radius: var(--r-pill);
  transition: transform 0.2s, background 0.2s;
}
.whatsapp svg {
  width: 17px;
  height: 17px;
  fill: var(--green-mid);
}
.whatsapp:hover {
  transform: translateY(-1px);
  background: rgba(109, 192, 42, 0.2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  padding: 52px 20px 70px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
#fiber-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.7;
}
.hero-wifi {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.22));
  will-change: transform;
}
.hero-wifi.w-far {
  width: 92px;
  top: 14%;
  left: 5%;
  opacity: 0.26;
  animation: floatWifi 9s ease-in-out infinite;
}
.hero-wifi.w-mid {
  width: 150px;
  bottom: 6%;
  right: 6%;
  opacity: 0.4;
  animation: floatWifi 7.5s ease-in-out infinite reverse;
}
.hero-wifi.w-near {
  width: 66px;
  top: 58%;
  left: 52%;
  opacity: 0.2;
  animation: floatWifi 11s ease-in-out infinite;
}
@keyframes floatWifi {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-16px) rotate(5deg); }
}
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}
.hero-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}
.blob-1 {
  width: 240px;
  height: 240px;
  background: #b6ff5e;
  top: -60px;
  right: -40px;
}
.blob-2 {
  width: 180px;
  height: 180px;
  background: #2d6b10;
  bottom: -50px;
  left: -30px;
  animation-delay: -4s;
}
.blob-3 {
  width: 130px;
  height: 130px;
  background: #d7ff9c;
  top: 40%;
  left: 60%;
  opacity: 0.35;
  animation-delay: -8s;
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000 30%, transparent 75%);
}

.hero-content {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.campaign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 7px 14px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
  animation: fadeInUp 0.6s 0.05s both;
}
.campaign .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eaffcd;
  box-shadow: 0 0 0 0 rgba(234, 255, 205, 0.7);
  animation: pulseDot 1.8s infinite;
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  animation: fadeInUp 0.6s 0.12s both;
}
.hero h1 .hl {
  background: linear-gradient(100deg, #fff 20%, #eaffcd 45%, #fff 70%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  to { background-position: 220% center; }
}
.hero-copy {
  margin: 0 auto;
  max-width: 30ch;
  font-size: 1.02rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  animation: fadeInUp 0.6s 0.2s both;
}

.hero-signal {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 40px;
  margin-top: 22px;
  animation: fadeInUp 0.6s 0.28s both;
}
.hero-signal span {
  width: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  animation: equalize 1.1s ease-in-out infinite;
}
.hero-signal span:nth-child(1) { height: 14px; animation-delay: 0s; }
.hero-signal span:nth-child(2) { height: 22px; animation-delay: 0.15s; }
.hero-signal span:nth-child(3) { height: 34px; animation-delay: 0.3s; }
.hero-signal span:nth-child(4) { height: 22px; animation-delay: 0.45s; }
.hero-signal span:nth-child(5) { height: 14px; animation-delay: 0.6s; }

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}
.hero-wave svg {
  width: 100%;
  height: 56px;
  display: block;
}
.hero-wave path {
  fill: var(--cream);
}

/* ---------- Stage / Panels ---------- */
.stage {
  width: 100%;
  max-width: var(--maxw);
  margin: -18px auto 0;
  padding: 0 18px 48px;
  flex: 1;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  animation: panelIn 0.5s ease both;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-btn);
}

.section-title h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
}
.section-title p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}
.section-title.compact h2 {
  font-size: 1.3rem;
}

/* ---------- Form ---------- */
.lookup-form label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.input-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input[type="text"],
#cpf,
#birth-date {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 15px 18px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: #fbfdf8;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder {
  color: #aab59c;
  font-weight: 600;
}
input:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: var(--ring);
}
.birth-row {
  margin-top: 14px;
}
.birth-row label {
  margin-top: 4px;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  padding: 15px 26px;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s, background 0.18s;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(109, 192, 42, 0.6);
}
.btn-primary:hover::after {
  animation: shine 0.85s ease;
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-secondary {
  background: #eef6e4;
  color: var(--green-dark);
  border: 1.5px solid rgba(109, 192, 42, 0.35);
}
.btn-secondary:hover {
  background: #e4f1d4;
  transform: translateY(-1px);
}
.full {
  width: 100%;
  margin-top: 12px;
}

/* ---------- Feedback ---------- */
.feedback {
  margin-top: 16px;
  min-height: 1.2em;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--green-dark);
}
.feedback.error {
  color: var(--red);
}
.contact-help {
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #52634a;
  font: 700 0.88rem var(--font-display);
  text-decoration: underline;
  cursor: pointer;
}
.contact-block {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(181, 65, 65, 0.24);
  border-radius: 14px;
  background: #fff7f5;
  color: #70322d;
}
.contact-block p {
  margin: 7px 0 0;
  line-height: 1.45;
}

/* ---------- Trust row ---------- */
.trust-row {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 10px;
}
.trust-row li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
}
.trust-row svg {
  width: 20px;
  height: 20px;
  flex: none;
  padding: 3px;
  border-radius: 50%;
  background: rgba(109, 192, 42, 0.16);
  fill: none;
  stroke: var(--green-mid);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Contracts list ---------- */
.contracts-list {
  display: grid;
  gap: 14px;
}
.contract-card {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  background: #fbfdf8;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.contract-card:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 192, 42, 0.45);
  box-shadow: var(--shadow-sm);
}
.contract-card span {
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dark);
  background: rgba(109, 192, 42, 0.14);
  padding: 5px 11px;
  border-radius: var(--r-pill);
}
.contract-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
}
.contract-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 600;
}
.contract-card .contract-meta {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}
.contract-card small {
  color: var(--red);
  font-weight: 700;
}
.contract-card .btn-primary,
.contract-card .btn-secondary {
  width: 100%;
}

/* ---------- Offer ---------- */
.offer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.offer-head h2 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
}
.offer-head p {
  margin: 0;
  font-weight: 700;
  color: var(--green-dark);
}
.status-chip {
  flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--grad-btn);
  padding: 7px 12px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-btn);
}

.upgrade-card {
  position: relative;
  background: var(--grad-card);
  border-radius: var(--r-lg);
  padding: 26px 20px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(126, 216, 31, 0.3);
}
.upgrade-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 60%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-18deg);
  animation: cardShine 4.5s ease-in-out infinite;
}
.plan-col {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan-col span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}
.plan-col strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 1;
}
.plan-col small {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}
.plan-new strong {
  font-size: 2.1rem;
  color: var(--neon);
  text-shadow: 0 0 18px rgba(126, 216, 31, 0.7);
  animation: glowPulse 2.4s ease-in-out infinite;
}
.upgrade-card .arrow svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--neon);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(126, 216, 31, 0.6));
  animation: nudge 1.6s ease-in-out infinite;
}

/* ---------- Terms / Signature ---------- */
.terms {
  background: #fbfdf8;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 18px;
}
.terms > strong {
  font-family: var(--font-display);
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}
.terms p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}
.terms-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--green-mid);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contract-preview {
  margin: 14px 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}
.contract-preview > strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
}
.contract-preview dl {
  margin: 10px 0;
  display: grid;
  gap: 8px;
}
.contract-preview dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}
.contract-preview dt {
  color: var(--muted);
  font-weight: 700;
}
.contract-preview dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.contract-preview ol {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  display: grid;
  gap: 6px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.check-row input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--green-mid);
  margin-top: 1px;
}

.signature-box {
  position: relative;
  border: 2.5px dashed rgba(109, 192, 42, 0.55);
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(45deg, rgba(109, 192, 42, 0.03) 0 10px, transparent 10px 20px),
    #fff;
  height: 230px;
  overflow: hidden;
}
.signature-box canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  position: relative;
  z-index: 2;
  cursor: crosshair;
}
.signature-box span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(109, 192, 42, 0.13);
  z-index: 1;
  pointer-events: none;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  margin-top: 16px;
}

/* ---------- Success ---------- */
.panel.success {
  text-align: center;
}
.success-icon {
  width: 84px;
  height: 84px;
  margin: 6px auto 16px;
  border-radius: 50%;
  background: var(--grad-btn);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-btn);
  animation: bounceIn 0.6s cubic-bezier(0.18, 0.9, 0.3, 1.4) both;
}
.success-icon svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.panel.success h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  margin: 0 0 4px;
  color: var(--green-dark);
}
.panel.success > p {
  margin: 4px 0;
  color: var(--muted);
  font-weight: 600;
}
.protocol {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: #f0f8e6;
  border: 1.5px dashed rgba(109, 192, 42, 0.5);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  margin: 8px 0;
}
.hash-line {
  font-size: 0.78rem;
  word-break: break-all;
}
.hash-line code {
  font-family: "Courier New", monospace;
  color: var(--green-dark);
}
.success-copy {
  max-width: 36ch;
  margin: 8px auto 18px !important;
}
.download {
  display: inline-flex;
  margin-bottom: 4px;
}

.confetti {
  position: absolute;
  inset: 0 0 auto;
  height: 0;
  pointer-events: none;
}
.confetti i {
  position: absolute;
  top: 70px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti 1.5s ease-in forwards;
}
.confetti i:nth-child(1) { left: 12%; background: var(--green); animation-delay: 0.1s; }
.confetti i:nth-child(2) { left: 22%; background: var(--neon); animation-delay: 0.25s; }
.confetti i:nth-child(3) { left: 34%; background: #ffd700; animation-delay: 0.05s; }
.confetti i:nth-child(4) { left: 44%; background: var(--green-mid); animation-delay: 0.32s; }
.confetti i:nth-child(5) { left: 54%; background: var(--neon); animation-delay: 0.15s; }
.confetti i:nth-child(6) { left: 64%; background: var(--green); animation-delay: 0.28s; }
.confetti i:nth-child(7) { left: 74%; background: #ffd700; animation-delay: 0.12s; }
.confetti i:nth-child(8) { left: 84%; background: var(--green-mid); animation-delay: 0.22s; }
.confetti i:nth-child(9) { left: 30%; background: var(--neon); animation-delay: 0.4s; }
.confetti i:nth-child(10) { left: 68%; background: var(--green); animation-delay: 0.45s; }

/* ---------- Stepper de progresso ---------- */
.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px 4px 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex: 1;
  position: relative;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}
.step .step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.35s, background 0.35s, color 0.35s, box-shadow 0.35s;
}
.step::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: -1;
  transition: background 0.35s;
}
.step:first-child::before {
  display: none;
}
.step.is-active .step-dot {
  background: var(--grad-btn);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(109, 192, 42, 0.45);
  transform: scale(1.12);
}
.step.is-done .step-dot {
  background: var(--green-mid);
  border-color: transparent;
  color: #fff;
}
.step.is-done::before {
  background: var(--green);
}
.step.is-active {
  color: var(--green-dark);
}
.step em {
  font-style: normal;
}

/* ---------- Velocimetro (gauge) ---------- */
.gauge {
  position: relative;
  width: 210px;
  max-width: 72%;
  margin: 0 auto 20px;
}
.gauge svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.gauge-track {
  fill: none;
  stroke: #e4eed9;
  stroke-width: 14;
  stroke-linecap: round;
}
.gauge-fill {
  fill: none;
  stroke: #6dc02a;
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 0 251.3;
  filter: drop-shadow(0 0 6px rgba(109, 192, 42, 0.65));
}
.gauge-needle {
  stroke: var(--green-dark);
  stroke-width: 4;
  stroke-linecap: round;
}
.gauge-hub {
  fill: var(--green-dark);
}
.gauge-label {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  text-align: center;
}
.gauge-label strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.9rem;
  color: var(--green-dark);
  display: block;
  line-height: 1;
}
.gauge-label span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- Tilt 3D ---------- */
#state-offer {
  perspective: 900px;
}
.tilt {
  transition: transform 0.18s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- Ineligible ---------- */
.panel.ineligible {
  text-align: center;
}
.ineligible-icon {
  width: 74px;
  height: 74px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff4d6;
  border: 1px solid #f3dca0;
  animation: bounceIn 0.5s cubic-bezier(0.18, 0.9, 0.3, 1.4) both;
}
.ineligible-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #d99100;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.panel.ineligible h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.panel.ineligible p {
  color: var(--muted);
  font-weight: 600;
  max-width: 38ch;
  margin: 0 auto 18px;
}
.whatsapp-cta {
  background: linear-gradient(135deg, #25d366 0%, #128c4b 100%) !important;
  box-shadow: 0 10px 24px rgba(18, 140, 75, 0.4) !important;
}
.whatsapp-cta svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* ---------- Sucesso premium (SVG) ---------- */
.success-badge {
  width: 108px;
  height: 108px;
  margin: 4px auto 16px;
  animation: badgePop 0.5s cubic-bezier(0.18, 0.9, 0.3, 1.4) both;
}
.success-badge svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sb-ring {
  fill: rgba(109, 192, 42, 0.1);
  stroke: var(--green);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: sbRing 0.7s ease forwards;
  filter: drop-shadow(0 6px 16px rgba(109, 192, 42, 0.45));
}
.sb-check {
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: sbCheck 0.45s 0.55s ease forwards;
}
@keyframes badgePop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
@keyframes sbRing {
  to { stroke-dashoffset: 0; }
}
@keyframes sbCheck {
  to { stroke-dashoffset: 0; }
}

/* ---------- Skeleton loader ---------- */
.skeleton {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.sk {
  display: block;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef3e6 25%, #f8fbf3 37%, #eef3e6 63%);
  background-size: 400% 100%;
  animation: shimmerSk 1.3s ease infinite;
}
.sk-line {
  height: 16px;
  width: 80%;
}
.sk-line.short {
  width: 55%;
}
.sk-block {
  height: 54px;
  width: 100%;
  border-radius: 14px;
}
@keyframes shimmerSk {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- View Transitions (cara de app) ---------- */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.32s;
  }
}

/* ---------- Footer ---------- */
footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.9);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
}
.foot-brand strong {
  color: #fff;
}
.foot-meta {
  display: flex;
  gap: 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Contract modal ---------- */
.contract-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}
body.modal-open {
  overflow: hidden;
}
.contract-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 36, 11, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.contract-modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 86vh;
  background: #fff;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: panelIn 0.3s ease;
}
.contract-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.contract-modal__head p {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-mid);
  font-weight: 700;
}
.contract-modal__head h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f0f8e6;
  color: var(--green-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-close:hover {
  background: #e0f0cd;
}
#contract-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #f4f9ee;
}
.contract-modal__actions {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.contract-modal__actions .btn-secondary,
.contract-modal__actions .btn-primary {
  flex: 1;
}

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(20px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -18px) scale(1.06); }
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(234, 255, 205, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(234, 255, 205, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 255, 205, 0); }
}
@keyframes equalize {
  0%, 100% { transform: scaleY(0.5); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes shine {
  from { left: -120%; }
  to { left: 130%; }
}
@keyframes cardShine {
  0%, 100% { left: -60%; }
  55%, 70% { left: 130%; }
}
@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(126, 216, 31, 0.5); }
  50% { text-shadow: 0 0 24px rgba(126, 216, 31, 0.9); }
}
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@keyframes bounceIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
@keyframes confetti {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(220px) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Documento: seletor de tipo, câmera, preview ── */
.doc-type { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.doc-type-btn { padding: 10px 16px; border: 2px solid #d8e6cf; border-radius: 12px; background: #fff; cursor: pointer; font-size: 1rem; font-weight: 600; transition: border-color .15s, background .15s; }
.doc-type-btn.is-active { border-color: #3a7a0f; background: #f1f8ea; color: #3a7a0f; }
.identity-prep { display: grid; gap: 10px; margin: 16px 0 20px; }
.identity-prep div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 12px; border: 1px solid #d8e6cf; border-radius: 12px; background: #f8fbf5; }
.identity-prep strong { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #3a7a0f; color: #fff; font-size: .9rem; }
.identity-prep span { color: #304424; font-weight: 600; line-height: 1.35; }
.identity-progress { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0 12px; }
.identity-progress span { min-height: 8px; border-radius: 999px; background: #d8e6cf; }
.identity-progress span.is-active, .identity-progress span.is-done { background: #3a7a0f; }
.doc-side-label { font-weight: 700; color: #3a7a0f; margin: 6px 0 10px; font-size: 1.05rem; }
.doc-camera { --camera-aspect: 16 / 10; position: relative; border-radius: 16px; overflow: hidden; background: #0d0d0d; aspect-ratio: 16 / 10; max-height: 360px; }
.doc-camera.is-selfie { width: min(100%, 520px); aspect-ratio: var(--camera-aspect, 3 / 4); max-height: min(72vh, 640px); margin-inline: auto; }
.doc-camera video, .doc-camera .doc-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-camera.is-front video, .doc-camera.is-front .doc-preview { transform: scaleX(-1); }
.doc-camera .hidden { display: none !important; }
.camera-guide { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.camera-guide::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.camera-guide::after { content: attr(data-guide); position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; padding: 8px 13px; border-radius: 999px; background: rgba(0,0,0,.58); color: #fff; font-weight: 800; font-size: .84rem; white-space: nowrap; letter-spacing: 0; }
.camera-status { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 28px); padding: 9px 14px; border-radius: 999px; background: rgba(0,0,0,.66); color: #fff; font-weight: 800; font-size: .88rem; line-height: 1.2; text-align: center; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.24); }
.camera-status.is-ok { background: rgba(58,122,15,.92); }
.camera-status.is-warn { background: rgba(164,94,0,.92); }
.guide-face, .guide-document, .guide-corners { position: absolute; z-index: 1; display: none; }
.doc-camera.is-selfie .guide-face { display: block; width: min(74%, 340px); aspect-ratio: 3 / 4; top: 9%; border: 4px solid rgba(255,255,255,.96); border-radius: 48% 48% 44% 44% / 42% 42% 55% 55%; box-shadow: 0 0 0 999px rgba(0,0,0,.22), 0 0 0 8px rgba(126,216,31,.25); }
.doc-camera.is-document .guide-document { display: block; width: 92%; aspect-ratio: 1.58 / 1; border: 4px solid rgba(255,255,255,.96); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.22), 0 0 0 7px rgba(126,216,31,.2); }
.doc-camera.is-document .guide-corners { display: block; width: 92%; aspect-ratio: 1.58 / 1; }
.doc-camera.is-document .guide-corners::before, .doc-camera.is-document .guide-corners::after { content: ""; position: absolute; inset: -8px; border-color: #7ed81f; border-style: solid; border-width: 0; }
.doc-camera.is-document .guide-corners::before { border-top-width: 4px; border-left-width: 4px; border-radius: 12px 0 0 0; clip-path: polygon(0 0, 28% 0, 28% 12%, 12% 12%, 12% 28%, 0 28%); }
.doc-camera.is-document .guide-corners::after { border-right-width: 4px; border-bottom-width: 4px; border-radius: 0 0 12px 0; clip-path: polygon(72% 88%, 88% 88%, 88% 72%, 100% 72%, 100% 100%, 72% 100%); }

/* ── Assinatura digitada: nome + fontes ── */
.sig-typed label { display: block; font-weight: 700; margin-bottom: 6px; color: #1a2b10; }
.sig-typed input { width: 100%; padding: 12px 14px; border: 2px solid #d8e6cf; border-radius: 12px; font-size: 1.05rem; box-sizing: border-box; }
.sig-hint { font-size: .9rem; color: #555; margin: 14px 0 6px; }
.sig-fonts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sig-font-btn { padding: 10px 14px; border: 2px solid #d8e6cf; border-radius: 12px; background: #fff; cursor: pointer; font-size: 1.6rem; line-height: 1; transition: border-color .15s, background .15s; }
.sig-font-btn.is-active { border-color: #3a7a0f; background: #f1f8ea; }
.sig-preview-box { border: 2px dashed #cdd9c2; border-radius: 14px; background: #fafdf6; overflow: hidden; }
.sig-preview-box canvas { width: 100%; height: auto; display: block; }

/* ---------- Mobile fino ---------- */
@media (max-width: 480px) {
  .topbar {
    padding: 11px 14px;
  }
  .brand-logo {
    height: 30px;
  }
  .whatsapp {
    font-size: 0.74rem;
    padding: 8px 12px;
  }
  .hero {
    padding: 38px 16px 58px;
  }
  .stage {
    padding: 0 14px 40px;
  }
  .panel {
    padding: 22px 16px;
    border-radius: 20px;
  }
  .section-title h2 {
    font-size: 1.3rem;
  }
  .offer-head {
    flex-direction: column;
  }
  .upgrade-card {
    padding: 20px 12px;
    gap: 4px;
  }
  .plan-col strong {
    font-size: 1.4rem;
  }
  .plan-new strong {
    font-size: 1.85rem;
  }
  .upgrade-card .arrow svg {
    width: 24px;
    height: 24px;
  }
  .hero-wifi.w-near {
    display: none;
  }
  .actions {
    grid-template-columns: 1fr;
  }
  .protocol {
    font-size: 1.15rem;
    padding: 9px 14px;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 640px) {
  .hero {
    padding: 70px 20px 90px;
  }
  .input-row {
    flex-direction: row;
  }
  .input-row #cpf {
    flex: 1;
  }
  .input-row .btn-primary {
    flex: none;
    white-space: nowrap;
  }
  .trust-row {
    grid-auto-flow: column;
    justify-content: space-between;
  }
  .panel {
    padding: 32px 30px;
  }
  .plan-col strong {
    font-size: 2rem;
  }
  .plan-new strong {
    font-size: 2.6rem;
  }
  footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.otp-code {
  width: 100%;
  margin: .55rem 0 1rem;
  padding: .9rem;
  border: 1px solid rgba(36, 74, 21, .25);
  border-radius: 12px;
  font: 700 1.65rem/1 monospace;
  letter-spacing: .45rem;
  text-align: center;
}

.biometric-consent { margin: 1rem 0; }
