/* AcessosFit UI system.
   Shared across index.html, checkout.php and sucesso.php. */

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f4;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --border: rgba(9, 9, 11, 0.10);

  --text: #0a0a0b;
  --muted: #3f3f46;
  --muted-2: #68686f;

  --accent: #16b45a;
  --accent-bright: #25d366;
  --accent-deep: #0f7a40;
  --accent-soft: rgba(37, 211, 102, 0.10);
  --accent-soft-2: rgba(22, 180, 90, 0.14);

  --danger: #ff5a5f;
  --warning: #f5c542;
  --ok: #16b45a;

  --shadow:
    0 1px 0 rgba(9, 9, 11, 0.02),
    0 12px 30px -18px rgba(9, 9, 11, 0.18);
  --shadow-raised: 0 28px 70px -34px rgba(9, 9, 11, 0.28);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --font-heading: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(640px circle at 8% -8%, rgba(37, 211, 102, 0.11), transparent 64%),
    radial-gradient(520px circle at 100% 20%, rgba(37, 211, 102, 0.06), transparent 64%),
    linear-gradient(180deg, var(--bg) 0%, #fbfbfa 52%, var(--bg-2) 100%);
  font-feature-settings: "ss01", "ss02", "cv11";
}

::selection {
  background: rgba(37, 211, 102, 0.22);
}

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

a:hover {
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 2px;
}

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

/* Type helpers */
.h-title {
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.text-muted {
  color: var(--muted);
}

.text-muted-2 {
  color: var(--muted-2);
}

.accent-text {
  color: var(--accent);
}

.text-accent {
  color: var(--accent) !important;
}

.border-accent {
  border-color: rgba(22, 180, 90, 0.50) !important;
}

.border-accent-soft {
  border-color: rgba(22, 180, 90, 0.24) !important;
}

.bg-accent-soft {
  background: var(--accent-soft) !important;
}

.bg-accent-soft-2 {
  background: var(--accent-soft-2) !important;
}

.hover-accent-border:hover {
  border-color: rgba(22, 180, 90, 0.42) !important;
}

.accent-gradient-text {
  color: var(--accent-deep);
}

/* Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.card--soft {
  background: var(--surface-2);
}

.panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.panel--soft {
  background: var(--surface-2);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand__fit {
  color: var(--accent-deep);
}

.brand__dot {
  width: 6px;
  height: 6px;
  margin-left: 6px;
  margin-top: -10px;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(37, 211, 102, 0.10);
}

.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 58px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.trust-bar__item i {
  color: var(--accent-deep);
}

.checkout-aside {
  position: sticky;
  top: 1.5rem;
}

.order-total {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.eyebrow {
  color: var(--accent-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-footer {
  color: var(--muted-2);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
}

/* Chips / Trust pills */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(22, 180, 90, 0.20);
  color: var(--accent-deep);
  font-size: 0.8125rem;
  line-height: 1;
  font-weight: 700;
}

.chip--muted {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(22, 180, 90, 0.24);
  color: var(--accent-deep);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: none;
}

/* Alerts */
.alert {
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.alert--danger {
  background: rgba(255, 90, 95, 0.09);
  border-color: rgba(255, 90, 95, 0.35);
  color: #8f1d22;
}

.alert--warning {
  background: rgba(245, 197, 66, 0.09);
  border-color: rgba(245, 197, 66, 0.35);
  color: #765d02;
}

/* Buttons */
.btn {
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition:
    transform 180ms ease-out,
    filter 180ms ease-out,
    background-color 180ms ease-out,
    border-color 180ms ease-out,
    box-shadow 180ms ease-out;
}

.btn-lg {
  padding: 1.05rem 1.25rem;
  font-size: 1.0625rem;
}

.btn-sm {
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, #0fa050 100%);
  color: #ffffff;
  border: 1px solid rgba(15, 122, 64, 0.30);
  box-shadow: 0 12px 28px -12px rgba(22, 180, 90, 0.62);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.99);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid rgba(22, 180, 90, 0.25);
  color: var(--accent-deep);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: rgba(22, 180, 90, 0.38);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Inputs */
.label {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--muted);
}

.input {
  width: 100%;
  border-radius: var(--radius-md);
  padding: 0.85rem 0.95rem;
  background: var(--surface);
  border: 1px solid rgba(9, 9, 11, 0.16);
  color: var(--text);
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.input::placeholder {
  color: #96969d;
}

.input:focus {
  outline: none;
  border-color: rgba(15, 122, 64, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.13);
}

.input[data-invalid="true"] {
  border-color: rgba(255, 90, 95, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.14);
}

.field-hint {
  margin-top: 0.35rem;
  color: var(--muted-2);
  font-size: 0.8125rem;
}

.field-error {
  margin-top: 0.35rem;
  color: #b4232a;
  font-size: 0.8125rem;
}

/* Stepper */
.stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c8c8cc;
}

.step[data-state="active"] {
  border-color: rgba(22, 180, 90, 0.28);
  background: var(--accent-soft);
  color: var(--text);
}

.step[data-state="active"] .step-dot {
  background: var(--accent);
}

.step[data-state="done"] {
  border-color: rgba(22, 180, 90, 0.22);
  background: rgba(37, 211, 102, 0.08);
  color: var(--text);
}

.step[data-state="done"] .step-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.14);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(104, 104, 111, 0.25);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 1s linear infinite;
}

.spinner--sm {
  width: 16px;
  height: 16px;
}

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

/* Toast */
.toast-host {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  margin: 0 auto;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  color: var(--text);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast .toast-icon {
  margin-top: 2px;
  color: var(--accent);
}

.toast[data-tone="danger"] .toast-icon {
  color: var(--danger);
}

.toast[data-tone="ok"] .toast-icon {
  color: var(--accent);
}

/* QR container: keep high scan reliability */
.qr-surface {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 28px -16px rgba(9, 9, 11, 0.38);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Tailwind utility compatibility for the legacy marketing selector. */
.marketing-page .text-white,
.checkout-page .text-white,
.success-page .text-white {
  color: var(--text) !important;
}

.marketing-page .text-slate-300 {
  color: var(--muted) !important;
}

.marketing-page .text-slate-400,
.marketing-page .text-slate-500 {
  color: var(--muted-2) !important;
}

.marketing-page .border-slate-800 {
  border-color: var(--border) !important;
}

.marketing-page .plan-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow);
}

.marketing-page .plan-card:hover {
  border-color: rgba(22, 180, 90, 0.36) !important;
  box-shadow: var(--shadow-raised);
}

@media (max-width: 767px) {
  .trust-bar {
    grid-template-columns: 1fr;
  }

  .trust-bar__item {
    min-height: 48px;
  }

  .checkout-aside {
    position: static;
  }

  .checkout-supporting {
    display: none;
  }
}
