/* ============================================================
   Round — Shared components
   Buttons, cards, tags, the split (image/text) layout used by
   sections 4 & 5, and the text-roll hover pattern borrowed from
   docs/prompt.md's interaction vocabulary.
   ============================================================ */

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: var(--space-4) var(--space-3) var(--space-4) var(--space-6);
  transition: background var(--duration-base) var(--ease-soft), box-shadow var(--duration-base) var(--ease-soft), transform var(--duration-base) var(--ease-soft), color var(--duration-base) var(--ease-soft), text-shadow var(--duration-base) var(--ease-soft);
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
}

.btn-primary:hover {
  background: var(--color-accent-primary);
  color: var(--color-white);
  box-shadow:
    0 0 0 1px rgba(224, 123, 62, 0.4),
    0 0 20px 4px rgba(224, 123, 62, 0.55),
    0 0 44px rgba(224, 123, 62, 0.35);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-body);
  border: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
}

.btn-ghost:hover {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-accent);
}

.on-dark .btn-ghost {
  color: var(--color-text-on-inverted);
  border-color: var(--color-border-on-inverted);
}

.on-dark .btn-ghost:hover {
  background: color-mix(in srgb, var(--color-accent-secondary) 55%, transparent);
  border-color: var(--color-accent-secondary);
  color: var(--color-white);
}

/* Text-roll hover: label duplicated in an overflow-hidden track that
   slides -50% vertically on hover. Borrowed pattern (see docs/prompt.md). */
.btn__label {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 18px;
  line-height: 18px;
}

.btn__label span {
  transition: transform var(--duration-slow) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn:hover .btn__label span {
  transform: translateY(-18px);
}

/* Circular icon (arrow) that rotates on hover */
.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--color-navy-900);
  color: var(--color-white);
  flex-shrink: 0;
}

.btn-primary .btn__icon {
  background: var(--color-white);
  color: var(--color-accent-primary);
}

.btn__icon svg {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-slow) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn:hover .btn__icon svg {
  transform: rotate(-45deg);
}

/* ---- WhatsApp CTA variant -------------------------------------------------- */
.btn-whatsapp {
  background: var(--color-navy-900);
  color: var(--color-white);
}

.btn-whatsapp:hover {
  background: var(--color-navy-800);
}

.btn-whatsapp .btn__icon {
  background: var(--color-accent-primary);
  color: var(--color-navy-900);
}

/* ---- Cards ------------------------------------------------------------------ */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--card-padding);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-soft), transform var(--duration-base) var(--ease-soft);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-tint);
  color: var(--color-accent-primary-hover);
  margin-bottom: var(--space-5);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-size: var(--text-h4);
  margin-bottom: var(--space-3);
}

.card p {
  color: var(--color-text-muted);
  font-size: var(--text-caption);
  line-height: var(--leading-relaxed);
}

/* ---- Tags / pills ------------------------------------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-caption);
  font-weight: 600;
  background: var(--color-accent-tint);
  color: var(--color-accent-primary-hover);
}

.tag--cyan {
  background: rgba(43, 184, 204, 0.14);
  color: var(--color-link-on-light);
}

/* ---- Split layout (sections 4 · Solução & 5 · Sobre) -------------------------
   Same grid + media-frame shell for both; each section CSS only sets the
   background tint / accent / column order delta via [data-split-side]. */
.split {
  display: grid;
  gap: var(--gap-split);
  align-items: center;
}

.split__media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__text {
  max-width: 46ch;
}

.split__text .eyebrow {
  margin-bottom: var(--space-5);
}

.split__text h2 {
  margin-bottom: var(--space-5);
}

.split__text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.on-dark .split__text p {
  color: var(--color-text-muted-on-inverted);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split[data-split-side="text-right"] .split__media {
    order: 1;
  }

  .split[data-split-side="text-right"] .split__text {
    order: 2;
    justify-self: start;
  }

  .split[data-split-side="text-left"] .split__text {
    order: 1;
  }

  .split[data-split-side="text-left"] .split__media {
    order: 2;
  }
}

/* ---- Step diagram (section 6 · Metodologia) ------------------------------------
   Horizontal stepper: numbered circles joined by a connecting line,
   single row on desktop, stacked (no line) on mobile. */
.steps {
  display: grid;
  gap: var(--space-8) var(--space-6);
  counter-reset: step;
}

.step {
  position: relative;
  text-align: center;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-accent-primary);
  color: var(--color-text-on-accent);
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 600;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 28px;
  left: calc(50% + 28px);
  width: calc(100% - 56px + var(--space-6));
  height: 2px;
  background: var(--color-border);
}

.step h3 {
  font-size: var(--text-h4);
  margin-bottom: var(--space-2);
}

.step p {
  color: var(--color-text-muted);
  font-size: var(--text-caption);
}

@media (max-width: 899px) {
  .step:not(:last-child)::after {
    display: none;
  }
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
