:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f1f5fb;
  --text: #364166;
  --muted: #475569;
  --border: #dbe3ef;
  --accent: #364166;
  --brand: #ecff00;
  --brand-soft: #fbffcc;
  --highlight: #ecff00;
  --highlight-soft: #fbffcc;
  --success: #046c4e;
  --warning: #a16207;
  --danger: #b91c1c;
  --shadow: 0 10px 24px rgba(54, 65, 102, 0.14);
  --radius: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 3rem 0;
  scroll-margin-top: 92px;
}

.section-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.55rem, 2.9vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  max-width: 820px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #dbe782;
  border-radius: 999px;
  background: var(--highlight-soft);
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
}

.lead-tip {
  margin: 0.8rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
}

.surface {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  gap: 0.9rem;
}

.card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--surface-soft);
  color: var(--muted);
}

.badge--brand {
  border-color: #dbe782;
  background: var(--brand-soft);
  color: #364166;
}

.badge--new,
.badge--validated,
.badge--assigned,
.badge--progress,
.badge--review,
.badge--closed {
  font-weight: 700;
}

.badge--new {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

.badge--validated {
  background: #ecfeff;
  color: #155e75;
  border-color: #a5f3fc;
}

.badge--assigned {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.badge--progress {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}

.badge--review {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.badge--closed {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

/* Header/Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(236, 255, 0, 0.32);
  background: #364166;
  backdrop-filter: blur(8px);
}

.site-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand__logo {
  width: auto;
  height: 34px;
  object-fit: contain;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  position: relative;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.nav-panel {
  position: absolute;
  top: 74px;
  left: 1rem;
  right: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #364166;
  box-shadow: var(--shadow);
}

.nav-panel.is-open {
  display: flex;
}

.nav-link {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ecff00;
  background: rgba(255, 255, 255, 0.12);
}

.nav-desktop {
  display: none;
  gap: 0.25rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border-radius: 11px;
  border: 1px solid transparent;
  padding: 0 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #2d3655;
}

.btn-outline {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-outline:hover {
  border-color: #dbe782;
  background: var(--highlight-soft);
}

.btn-whatsapp {
  background: #059669;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #047857;
}

.btn[disabled] {
  opacity: 0.64;
  cursor: wait;
}

/* Home */
.hero {
  padding: 3.5rem 0 2.75rem;
}

.hero-grid {
  display: grid;
  gap: 1rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-copy p {
  margin: 1rem 0 0;
  color: var(--muted);
  max-width: 660px;
}

.hero-note {
  margin: 0.9rem 0 0;
  color: var(--text);
  font-size: 0.92rem;
}

.cta-row {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.hero-media {
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-copy .hero-media {
  margin: 0 0 1rem;
}

.hero-media__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  max-height: 44vh;
}

.workflow-visual {
  padding: 1rem;
}

.flow-banner {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  object-position: center center;
  max-height: 42vh;
  margin-bottom: 0.75rem;
}

.workflow-title {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.flow-diagram {
  display: grid;
  gap: 0.55rem;
}

.flow-node {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.58rem;
  background: #fff;
}

.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -12px;
  width: 2px;
  height: 12px;
  background: #c8d4ea;
}

.flow-node__index {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  background: var(--highlight-soft);
  border: 1px solid #dbe782;
}

.flow-node__content h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
}

.flow-node__content p {
  margin: 0.18rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.flow-node--consensus {
  border-color: #dbe782;
  background: var(--highlight-soft);
}

.flow-checkpoint {
  margin-top: 0.7rem;
  border: 1px dashed #dbe782;
  border-radius: 10px;
  background: var(--highlight-soft);
  padding: 0.65rem 0.72rem;
}

.flow-checkpoint strong {
  display: block;
  margin: 0;
  font-size: 0.84rem;
}

.flow-checkpoint span {
  display: block;
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.flow-card h3 {
  margin-bottom: 0.5rem;
}

.flow-card p {
  margin: 0 0 0.55rem;
}

.flow-list {
  margin: 0 0 0.7rem 1rem;
  padding: 0;
  color: var(--muted);
}

.flow-list li {
  margin: 0.18rem 0;
}

.flow-api {
  margin-top: 0.55rem;
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #dbe782;
  background: var(--highlight-soft);
  color: var(--text);
}

.flow-consensus {
  margin-top: 1rem;
  padding: 1rem;
}

.flow-consensus h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.flow-consensus p {
  margin: 0 0 0.55rem;
}

.fbos-flow-section .section-title {
  margin-bottom: 0.65rem;
}

.flow-editorial {
  margin-top: 1rem;
  padding: 0.95rem;
  display: grid;
  gap: 0.85rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(236, 255, 0, 0.16), transparent 40%),
    linear-gradient(145deg, #ffffff 0%, #f6f9ff 100%);
}

.flow-editorial__media-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  box-shadow: 0 8px 20px rgba(54, 65, 102, 0.12);
}

.flow-editorial__media {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
}

.flow-blocks {
  display: grid;
  gap: 0.5rem;
}

.flow-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  text-align: center;
}

.flow-support-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.flow-sequence {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 600;
}

.flow-sequence span[aria-hidden="true"] {
  color: #7b8aac;
}

.problem-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.problem-list li {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  color: var(--text);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.systems-grid {
  margin-top: 1rem;
}

.systems-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
}

.systems-banner-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid #d8e1ee;
  background:
    radial-gradient(circle at 15% 20%, rgba(236, 255, 0, 0.38), transparent 42%),
    radial-gradient(circle at 80% 65%, rgba(89, 156, 255, 0.24), transparent 42%),
    linear-gradient(135deg, #f8fafc 0%, #eef3fb 100%);
  display: flex;
  align-items: flex-end;
  padding: 0.65rem;
  overflow: hidden;
}

.systems-banner-placeholder span {
  font-size: 0.74rem;
  font-weight: 600;
  color: #556280;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #d6dfed;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
}

.role-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d7e1f2;
  padding: 0.18rem 0.58rem;
  background: #f3f7ff;
  color: #3f4d75;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.systems-support-line {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
}

.systems-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.systems-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.16rem 0.5rem;
}

.systems-cta-row {
  display: grid;
  gap: 0.55rem;
}

.number-steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.number-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  background: var(--surface);
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--highlight-soft);
  color: var(--text);
  border: 1px solid #dbe782;
  font-weight: 700;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.about-box,
.fbos-box,
.final-cta {
  padding: 1rem;
}

.final-cta {
  background: #364166;
  color: #fff;
}

.final-cta h2 {
  margin: 0;
}

.final-cta p {
  margin: 0.8rem 0 1rem;
  color: #eef2ff;
}

/* Forms */
.form-card {
  padding: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.field-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field-help {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 0.85rem;
  font: inherit;
  color: var(--text);
}

.textarea {
  min-height: 112px;
  resize: vertical;
  padding: 0.7rem 0.85rem;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid #bfdbfe;
  border-color: #93c5fd;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  padding: 0.55rem 0.6rem;
  border-radius: 9px;
  background: var(--surface);
  font-size: 0.9rem;
}

.inline-note,
.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-status.success {
  color: var(--success);
  font-weight: 600;
}

.form-status.error {
  color: var(--danger);
  font-weight: 600;
}

.ticket-box {
  margin-top: 0.9rem;
  border: 1px dashed #dbe782;
  border-radius: 10px;
  background: var(--highlight-soft);
  padding: 0.8rem;
  color: var(--text);
  font-weight: 600;
}

/* Canvas */
.board {
  display: grid;
  gap: 0.9rem;
}

.column {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  min-height: 170px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.column-header {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.column-title {
  margin: 0;
  font-size: 0.95rem;
}

.column-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.column-body {
  padding: 0.7rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.action-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.68rem;
  background: #fff;
  cursor: pointer;
}

.action-card:hover {
  border-color: #c5d4e8;
  box-shadow: 0 6px 16px rgba(54, 65, 102, 0.16);
}

.action-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.action-id {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.action-name {
  margin: 0.4rem 0 0.22rem;
  font-size: 0.96rem;
}

.action-meta {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.action-meta--problem {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-next {
  margin-top: 0.4rem;
  color: var(--text);
  font-size: 0.82rem;
}

.toolbar {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.2rem;
}

.toolbar-note {
  margin: -0.6rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.toolbar input,
.toolbar select {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 0.8rem;
  font: inherit;
}

/* History */
.history-grid {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.history-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  background: var(--surface);
  cursor: pointer;
}

.history-card:hover {
  border-color: #c5d4e8;
  box-shadow: 0 6px 16px rgba(54, 65, 102, 0.16);
}

.history-title {
  margin: 0.35rem 0 0.2rem;
  font-size: 1rem;
}

.history-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.history-outcome {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--text);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(54, 65, 102, 0.45);
  z-index: 50;
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(100%, 760px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.modal-head h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-body {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.detail-grid {
  display: grid;
  gap: 0.65rem;
}

.detail-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  background: #fff;
}

.detail-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  margin: 0.22rem 0 0;
  font-size: 0.91rem;
}

.modal-actions {
  display: grid;
  gap: 0.5rem;
}

.empty {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 640px) {
  .btn {
    width: auto;
  }

  .cta-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
  }

  .systems-cta-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .modal {
    align-items: center;
  }

  .modal-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .nav-toggle,
  .nav-panel {
    display: none;
  }

  .nav-desktop {
    display: flex;
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .hero-media__image {
    max-height: none;
    object-position: center right;
  }

  .flow-editorial {
    padding: 1.05rem;
    gap: 0.95rem;
  }

  .flow-blocks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid.cols-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .board {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .card-grid.cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
