/* ==========================================================================
   Autoral — base visual compartilhada (site + app)
   Paleta Branding Orange: #E8600C · #FF8C00 · #000000 · #BABABA · #FFFFFF
   ========================================================================== */

:root {
  /* Paleta de origem */
  --orange: #E8600C;
  --amber: #FF8C00;
  --black: #000000;
  --gray: #BABABA;
  --white: #FFFFFF;

  /* Superfícies (pretos levemente aquecidos, derivados do laranja) */
  --bg: #000000;
  --bg-2: #070605;
  --surface: #0E0D0C;
  --surface-2: #151413;
  --surface-3: #1D1B19;
  --surface-4: #262422;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);

  /* Texto */
  --text: #FFFFFF;
  --text-2: #BABABA;
  --text-3: #8C8A88;
  --text-4: #5F5D5B;

  /* Acento */
  --accent: #E8600C;
  --accent-2: #FF8C00;
  --accent-ink: #FFB066;
  --accent-soft: rgba(232, 96, 12, 0.13);
  --accent-soft-2: rgba(255, 140, 0, 0.2);
  --accent-line: rgba(232, 96, 12, 0.4);
  --grad: linear-gradient(135deg, #E8600C 0%, #FF8C00 100%);
  --grad-soft: linear-gradient(135deg, rgba(232, 96, 12, 0.18), rgba(255, 140, 0, 0.06));

  /* Semânticas (uso pontual) */
  --ok: #5BC98C;
  --ok-soft: rgba(91, 201, 140, 0.12);
  --warn: #FF8C00;
  --warn-soft: rgba(255, 140, 0, 0.12);
  --danger: #FF5B4A;
  --danger-soft: rgba(255, 91, 74, 0.12);

  /* Tipografia */
  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Raio, sombra, movimento */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 10px 40px -10px rgba(232, 96, 12, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.15s;
  --t: 0.25s;
  --t-slow: 0.5s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--white); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- Tipografia ---------- */
.display, h1.display, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-optical-sizing: auto;
}
.h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.025em; line-height: 1.1; }
.h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--text-2); line-height: 1.6; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); letter-spacing: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }
.accent { color: var(--accent-2); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.serif-i { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

/* ---------- Botões ---------- */
.btn {
  --btn-bg: var(--surface-3);
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r-full);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap; user-select: none;
  transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t);
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-3); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary {
  --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: transparent;
  background: var(--grad);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 24px -10px rgba(232, 96, 12, 0.8);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 12px 30px -10px rgba(255, 140, 0, 0.9); border-color: transparent; }
.btn-light { --btn-bg: var(--white); --btn-fg: #0b0b0b; --btn-bd: transparent; }
.btn-light:hover { --btn-bg: #f1eee9; border-color: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; color: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--surface-3); color: var(--text); border-color: transparent; }
.btn-outline { --btn-bg: transparent; --btn-bd: var(--line-2); }
.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: #ffb3a9; --btn-bd: rgba(255, 91, 74, 0.25); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-block { width: 100%; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label .hint { font-weight: 400; color: var(--text-3); font-size: 12px; }
.help { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.input, .select, .textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  font-size: 14px; line-height: 1.5;
  color: var(--text);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface-3); }
.textarea { resize: vertical; min-height: 88px; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23BABABA' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: var(--surface-2); color: var(--text); }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--surface-2) inset !important;
  -webkit-text-fill-color: #fff !important; caret-color: #fff;
}
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: var(--surface-4); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 4px solid var(--accent); cursor: grab; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 4px solid var(--accent); cursor: grab; }

/* Checkbox / switch */
.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: var(--surface-4); border: 1px solid var(--line-2); transition: background var(--t); cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--gray); transition: transform var(--t) var(--ease), background var(--t); }
.switch input:checked + span { background: var(--accent); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- Pílulas / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 500;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill svg { width: 12px; height: 12px; }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(232, 96, 12, 0.25); }
.pill-ok { background: var(--ok-soft); color: #93e2b7; border-color: rgba(91, 201, 140, 0.2); }
.pill-warn { background: var(--warn-soft); color: #ffc27a; border-color: rgba(255, 140, 0, 0.22); }
.pill-danger { background: var(--danger-soft); color: #ffb3a9; border-color: rgba(255, 91, 74, 0.22); }
.pill-white { background: #fff; color: #0b0b0b; border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
  background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--white); color: #0b0b0b; border-color: transparent; }
.chip svg { width: 14px; height: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 22px; }
.card-hover { transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t); }
.card-hover:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--surface-2); }
.border-glow { position: relative; }
.border-glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 140, 0, 0.55), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0) 60%, rgba(232, 96, 12, 0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); }

/* ---------- Utilitários ---------- */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.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; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

/* ---------- Grão / textura sutil ---------- */
.grain::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Animações ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.anim-up { animation: fadeUp 0.5s var(--ease-out) both; }
.anim-in { animation: fadeSlideIn 0.8s var(--ease-out) both; }
.d-1 { animation-delay: 0.06s; } .d-2 { animation-delay: 0.12s; } .d-3 { animation-delay: 0.18s; } .d-4 { animation-delay: 0.24s; } .d-5 { animation-delay: 0.3s; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 0px, var(--surface-3) 80px, var(--surface-2) 160px);
  background-size: 800px 100%;
  animation: shimmer 1.3s linear infinite;
}
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.7s linear infinite; flex: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); background-clip: padding-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.chip { white-space: nowrap; flex: none; }
