/* ======================================================
   GrandSystem — Landing de captação /acesso
   Tokens
====================================================== */
:root{
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --ink: #0B0B0C;
  --ink-soft: #58585C;
  --ink-faint: #9A9A9D;
  --border: #E8E6E2;
  --border-strong: #D9D7D2;
  --accent: #111113;
  --accent-hover: #2A2A2E;
  --success: #16A34A;
  --success-bg: #F0FBF4;
  --danger: #B3261E;
  --danger-bg: #FDF1F0;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15,15,15,0.04), 0 1px 1px rgba(15,15,15,0.03);
  --shadow-md: 0 8px 24px rgba(15,15,15,0.07), 0 2px 6px rgba(15,15,15,0.04);
  --shadow-lg: 0 24px 60px rgba(15,15,15,0.10), 0 6px 16px rgba(15,15,15,0.05);
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ======================================================
   Reset
====================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}
h1,h2,h3,p{ margin: 0; }
button{ font-family: inherit; }
input{ font-family: inherit; }
a{ color: inherit; }
img{ display:block; max-width: 100%; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ======================================================
   Ambient background — subtle dot grid (SaaS signature)
====================================================== */
.bg-grid{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 45% at 50% 0%, black 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 45% at 50% 0%, black 0%, transparent 70%);
  opacity: 0.55;
}

.page{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

/* ======================================================
   Hero
====================================================== */
.hero{
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: calc(28px + env(safe-area-inset-top));
}

.hero__brand{ margin-bottom: 34px; }

.brand{ display: inline-flex; align-items: center; gap: 9px; }
.brand__mark{
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand__mark img{ width: 15px; height: 15px; }
.brand__word{
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.brand__word--light{ color: var(--ink-faint); font-weight: 500; }

.hero__content{ display: flex; flex-direction: column; align-items: center; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.hero__title{
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 15ch;
}

.hero__desc{
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38ch;
}

.hero__microcopy{
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-faint);
}

.btn--hero{
  margin-top: 26px;
  width: 100%;
  max-width: 380px;
}

/* ======================================================
   Buttons
====================================================== */
.btn{
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: var(--radius-sm);
  transition: transform .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease), opacity .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active{ transform: scale(0.98); }

.btn--primary{
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover{ background: var(--accent-hover); }
.btn--primary:disabled{ opacity: 0.55; cursor: not-allowed; transform: none; }

.btn--ghost{
  background: transparent;
  color: var(--ink-soft);
  padding: 15px 18px;
}
.btn--ghost:hover{ color: var(--ink); }

.btn__spinner{
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  display: none;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner{ display: inline-block; }
.btn.is-loading .btn__label{ opacity: 0.85; }

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

/* ======================================================
   Form card
====================================================== */
.form-wrap{
  width: 100%;
  max-width: 560px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-card{
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 560px){
  .form-card{ padding: 34px 36px 30px; }
}

/* Progress */
.progress__top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.progress__count{
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.progress__track{
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress__fill{
  height: 100%;
  width: 25%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .45s var(--ease);
}

/* Honeypot (hidden from real users) */
.hp-field{
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Steps */
.step{
  margin-top: 26px;
  animation: step-in .38s var(--ease);
}
.step[hidden]{ display: none; }

@keyframes step-in{
  from{ opacity: 0; transform: translateX(10px); }
  to{ opacity: 1; transform: translateX(0); }
}
.step.is-leaving{
  animation: step-out .2s var(--ease) forwards;
}
@keyframes step-out{
  to{ opacity: 0; transform: translateX(-10px); }
}

.step__title{
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.step__desc{
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* Fields */
.field{ margin-top: 20px; }
.field label{
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.field .optional{ font-weight: 400; color: var(--ink-faint); }

.field input[type="text"],
.field input[type="tel"],
.field input[type="number"]{
  width: 100%;
  font-size: 16px; /* avoids iOS zoom on focus */
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #FCFCFB;
  color: var(--ink);
  transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input::placeholder{ color: var(--ink-faint); }
.field input:focus{
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(17,17,19,0.06);
}
.field input:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.field.has-error input{
  border-color: var(--danger);
  background: var(--danger-bg);
}
.field__error{
  display: block;
  min-height: 16px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--danger);
}

.field--reveal{
  animation: reveal-in .3s var(--ease);
}
@keyframes reveal-in{
  from{ opacity: 0; transform: translateY(-6px); max-height: 0; }
  to{ opacity: 1; transform: translateY(0); max-height: 140px; }
}

/* Option cards (grid, e.g. business type) */
.option-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.option-card{
  appearance: none;
  cursor: pointer;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  background: #FCFCFB;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .1s var(--ease);
}
.option-card:active{ transform: scale(0.98); }
.option-card:hover{ border-color: var(--ink-faint); }
.option-card.is-selected{
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Option list (rows, e.g. revenue ranges) */
.option-list{ display: flex; flex-direction: column; gap: 9px; }
.option-row{
  appearance: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  background: #FCFCFB;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .1s var(--ease);
}
.option-row:active{ transform: scale(0.99); }
.option-row:hover{ border-color: var(--ink-faint); }
.option-row::after{
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.option-row.is-selected{
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink);
}
.option-row.is-selected::after{
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: inset 0 0 0 3px #fff;
}

/* Option toggle (Sim / Não pills) */
.option-toggle{ display: flex; gap: 10px; }
.option-pill{
  flex: 1;
  appearance: none;
  cursor: pointer;
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  background: #FCFCFB;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), transform .1s var(--ease);
}
.option-pill:active{ transform: scale(0.98); }
.option-pill:hover{ border-color: var(--ink-faint); }
.option-pill.is-selected{
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Nav */
.form-nav{
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-nav .btn--primary{ flex: 1; }

.form-legal{
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-faint);
  text-align: center;
}
.form-legal a{
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-error-banner{
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(179,38,30,0.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: center;
}

/* ======================================================
   Success screen
====================================================== */
.success{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 4px 8px;
  animation: step-in .4s var(--ease);
}
.success__icon{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.success__title{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.success__desc{
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38ch;
}
.success__badge{
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid rgba(22,163,74,0.18);
  border-radius: 999px;
  padding: 7px 14px;
}

.footnote{
  margin-top: 22px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}

/* ======================================================
   Responsive tweaks
====================================================== */
@media (max-width: 380px){
  .option-grid{ grid-template-columns: 1fr 1fr; gap: 8px; }
  .option-card, .option-row, .option-pill{ padding: 12px 12px; }
}

/* Keep CTA reachable above mobile keyboards / browser bars */
@supports (height: 100dvh){
  .page{ min-height: 100dvh; }
}
