@import './base.css';

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

body {
  padding-bottom: 60px;
  background: var(--paper-2);
}

.site-column {
  max-width: var(--site-max);
  width: 100%;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
}

.wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
header.top {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  background: var(--white);
}

.top-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo .rocket,
.brand-logo .brand-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.brand-logo .brand-name {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--ink);
  text-transform: uppercase;
}

.nav-login {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-50);
  padding: 4px;
  border-radius: 100px;
  margin-left: auto;
}

.nav-login-link {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 100px;
  transition: 0.15s;
  white-space: nowrap;
}

.nav-login-link:hover {
  background: var(--white);
  color: var(--ink);
}

.badge-piaui {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  padding: 6px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--primary-50);
  padding: 4px;
  border-radius: 100px;
}

.nav-tab {
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: 0.15s;
}

.nav-tab.active { background: var(--ink); color: var(--white); }

.nav-tab:disabled,
.nav-tab.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Mobile logo box */
.brand-mobile-box {
  display: none;
  width: 100%;
  padding: 12px 24px;
  background: var(--white);
}

.brand-mobile-box .brand-logo {
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.brand-mobile-box .brand-icon {
  width: 40px;
  height: 40px;
}

.header-desktop { display: contents; }

@media (max-width: 680px) {
  .brand-mobile-box { display: block; }

  header.top .brand-logo { display: none; }

  header.top .nav-login {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin: 8px 12px 12px;
  }

  header.top .nav-tabs,
  header.top .badge-piaui { display: none; }

  header.top { padding: 0; border-bottom: 1px solid var(--line); }
  header.top .top-inner { padding: 0; min-height: 0; }
}

/* ── Banner (landing only) ── */
.home-banner {
  display: none;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  overflow: hidden;
}

.home-banner.visible { display: block; }

.home-banner picture,
.home-banner img {
  display: block;
  width: 100%;
  height: auto;
}

#screen-landing {
  padding-top: 0;
}

#screen-landing.active {
  display: block;
}

.home-body {
  padding: 36px 0 20px;
}

.home-intro {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto 32px;
}

.home-intro .lede {
  margin-left: auto;
  margin-right: auto;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: stretch;
}

.home-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-side-banner {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 100%;
}

.home-side-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.role-card .icon.icon-rocket {
  background: var(--orange-100);
}

.role-card.startup .icon.icon-rocket {
  background: var(--orange-100);
}

.role-card .icon.icon-rocket img {
  width: 28px;
  height: 28px;
  display: block;
}

@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-side-banner {
    display: none;
  }
}

@media (max-width: 680px) {
  .home-banner {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
  }

  .home-body {
    padding-top: 24px;
  }

  .home-intro {
    text-align: left;
    max-width: none;
    margin-bottom: 24px;
  }

  .home-intro .lede {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ── Screens ── */
.screen { display: none; padding: 40px 0 20px; }
.screen.active { display: block; animation: fade 0.35s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--ink);
}

.lede {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-bottom: 8px;
  line-height: 1.55;
}

/* ── Role cards ── */
.roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

@media (max-width: 680px) { .roles { grid-template-columns: 1fr; } }

.role-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(26, 31, 28, 0.04), 0 4px 16px rgba(26, 31, 28, 0.05);
}

.role-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.role-card.startup:hover { border-color: var(--orange); }
.role-card.org:hover { border-color: #534AB7; }

a.role-card { text-decoration: none; color: inherit; display: block; }

.role-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.role-card .icon svg { width: 22px; height: 22px; }

.role-card.lider .icon { background: var(--primary); color: var(--white); }
.role-card.startup .icon { background: var(--orange); color: var(--white); }
.role-card.org .icon { background: #534AB7; color: var(--white); }

.role-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.role-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  line-height: 1.5;
}

.role-card .go {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.role-card.startup .go { color: var(--orange); }
.role-card.org .go { color: #534AB7; }

/* ── Resultados / Ata pública ── */
.home-resultados {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.home-resultados h2 {
  margin: 6px 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--ink);
}

.home-resultados .lede {
  margin: 0 0 20px;
  max-width: 58ch;
}

.resultados-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm, 12px);
  background: var(--white);
  overflow: hidden;
}

.resultados-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--primary-50);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.resultados-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.resultado-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.resultado-row:last-child { border-bottom: none; }

.resultado-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.resultado-nome {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.resultado-cidade {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.resultado-votos {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.resultado-votos strong {
  color: var(--primary);
  font-size: 16px;
}

.resultados-actions {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper-2, #f4f7f1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resultados-actions .btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.home-galeria-link {
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.home-galeria-link a {
  color: var(--primary);
  text-decoration: none;
}

.home-galeria-link a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .resultado-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.note-box {
  margin-top: 24px;
  background: var(--yellow-light);
  border: 1px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.note-box b { color: var(--ink); font-weight: 600; }

/* ── Cards & forms ── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

/* ── Stepper ── */
.stepper {
  display: flex;
  align-items: center;
  margin: 24px 0 28px;
  max-width: 360px;
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step .dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.step.done .dot { background: var(--primary); color: var(--white); }
.step.current .dot { background: var(--orange); color: var(--white); }

.step-line,
.line {
  height: 2px;
  background: var(--paper-3);
  flex: 1;
  margin: 0 6px;
}

.step-line.done,
.line.done { background: var(--primary); }

.step .label { display: none; }

/* ── Prefill banners ── */
.prefill {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--primary-deep);
  margin-bottom: 22px;
  line-height: 1.45;
}

.prefill.startup-prefill {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary-deep);
}

.field { margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.field .req { color: var(--orange); }

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.password-toggle:hover { color: var(--primary); background: var(--primary-50); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

input.invalid { border-color: var(--coral); }
.err-msg { font-size: 12px; color: var(--coral); margin-top: 5px; display: none; }
.err-msg.show { display: block; }

textarea { resize: vertical; min-height: 90px; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--yellow-light);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.check-row input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.check-row .txt { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.actions .btn-primary { flex: 1; justify-content: center; max-width: 220px; }
.actions .btn-ghost { min-width: 100px; }

@media (max-width: 480px) {
  .actions .btn-primary { max-width: none; flex: 1.2; }
}

.btn-text {
  background: transparent;
  color: var(--primary);
  padding: 8px 4px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.label-mobile { display: none; }
.label-desktop { display: inline; }

@media (max-width: 680px) {
  .label-mobile { display: inline; }
  .label-desktop { display: none; }
}

/* ── Review ── */
.review-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.review-block h4 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  border-top: 1px solid var(--paper-2);
}

.review-row:first-of-type { border-top: none; }
.review-row .k { color: var(--ink-faint); }
.review-row .v { font-weight: 600; text-align: right; color: var(--ink); }

.edit-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
}

/* ── Success / error ── */
.success-icon,
.error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--white);
}

.success-icon { background: var(--primary); }
.success-icon svg,
.error-icon svg { width: 28px; height: 28px; }
.error-icon { background: var(--coral); }

.lp-preview {
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
  background: var(--primary-50);
}

.lp-preview .tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.lp-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 20px;
}

.lp-card .lp-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--orange);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
}

.lp-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.lp-card .cat {
  font-size: 13px;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 10px;
}

.lp-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

.link-box { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.link-box input { font-family: 'IBM Plex Mono', monospace; font-size: 13px; background: var(--paper); flex: 1; min-width: 0; }

.btn-copy {
  background: var(--ink);
  color: var(--white);
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 13px;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
}

.next-list { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.next-list .item { display: flex; gap: 12px; font-size: 14px; color: var(--ink-soft); line-height: 1.45; align-items: flex-start; }

.next-list .n {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-50);
  border-radius: 6px;
  padding: 3px 8px;
  flex-shrink: 0;
}

/* ── Voto ── */
.category-select { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

.finalist-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s, background 0.15s;
}

.finalist-option:hover { border-color: var(--primary); }
.finalist-option.selected { border-color: var(--primary); background: var(--primary-50); }
.finalist-option input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }

.finalist-option .fi-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.finalist-option .fi-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

.vote-count-badge {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange-deep);
  background: var(--orange-100);
  border: 1px solid var(--orange);
  padding: 6px 14px;
  border-radius: 100px;
  display: inline-block;
  margin-top: 4px;
}

.voto-modal {
  text-align: center;
  max-width: 460px;
  padding: 32px 28px 28px;
}

.voto-modal-details {
  text-align: left;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.voto-modal-details div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 6px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}

.voto-modal-details div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.voto-modal-details div:first-child {
  padding-top: 0;
}

.voto-modal-details dt {
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.voto-modal-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

.voto-modal-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.voto-modal-actions .btn {
  min-width: 140px;
}

@media (max-width: 680px) {
  .voto-modal-details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

footer {
  max-width: 100%;
  margin: 32px auto 0;
  padding: 16px 24px;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 680px) {
  .screen { padding: 28px 0 16px; }
  .wrap { padding: 0 16px; }
  .card { padding: 20px; }
}
