/* ============================================================
   Tooweze — Inteligência Artificial
   Design system: dark premium SaaS, roxo, neon discreto
   ============================================================ */

:root {
  --bg: #0f0e18;
  --bg-2: #141226;
  --surface: #1a1728;
  --card: rgba(38, 34, 58, 0.52);
  --card-border: rgba(167, 139, 250, 0.17);
  --text: #ece9f5;
  --muted: #9b96b3;
  --muted-2: #726d8a;
  --brand: #8b5cf6;
  --brand-strong: #7c3aed;
  --brand-light: #a78bfa;
  --brand-glow: rgba(139, 92, 246, 0.45);
  --ring: rgba(139, 92, 246, 0.35);
  --radius: 20px;
  --maxw: 1200px;
}

* {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Background ambience ---- */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(800px 700px at 95% 10%, rgba(99, 102, 241, 0.15), transparent 60%),
    radial-gradient(1000px 800px at 60% 110%, rgba(139, 92, 246, 0.11), transparent 60%),
    radial-gradient(1400px 900px at 50% 55%, rgba(99, 102, 241, 0.05), transparent 68%),
    linear-gradient(180deg, #07060d 0%, #0e0d18 30%, #141226 62%, #12101f 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 15%, black 25%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at 50% 15%, black 25%, transparent 88%);
  pointer-events: none;
}

/* Faixas sutis entre seções — equilibra o peso visual pós-hero */
section:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.022);
}

section:nth-of-type(even)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(900px 420px at 50% 0%, rgba(139, 92, 246, 0.045), transparent 72%);
  z-index: 0;
}

/* ---- Typography helpers ---- */
.gradient-text {
  background: linear-gradient(120deg, #ffffff 0%, #d8caff 35%, #a78bfa 75%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #7c3aed, #8b5cf6 55%, #6366f1);
  box-shadow: 0 10px 30px -10px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px -12px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(167, 139, 250, 0.22);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}

/* ---- Cards & glow ---- */
.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

.glow-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.card-hover {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, background 0.3s ease;
  will-change: transform;
}
.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 24px 60px -28px rgba(124, 58, 237, 0.6);
  background: rgba(48, 42, 72, 0.62);
}

/* Solution card icon tile */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: var(--brand-light);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---- Case preview (resumo) ---- */
.case-preview {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.case-preview--featured {
  background: linear-gradient(145deg, rgba(30, 22, 54, 0.75), rgba(22, 18, 40, 0.55));
  border-color: rgba(167, 139, 250, 0.22);
}

.case-preview--featured::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18), transparent 70%);
  pointer-events: none;
}

.case-preview__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.case-preview__name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.case-preview__link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-2);
  margin-left: 0.5rem;
  text-decoration: none;
  vertical-align: middle;
}

.case-preview__link:hover {
  color: var(--brand-light);
}

.case-preview__sector {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-light);
}

.case-preview__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6ee7b7;
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.case-preview__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  flex-shrink: 0;
}

.case-preview__headline {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.case-preview__headline--sm {
  font-size: 1.05rem;
}

.case-preview__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
}

.case-preview__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.case-preview__metrics--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  grid-template-columns: unset;
}

.case-preview__metric {
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.case-preview__metric-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.case-preview__metric-lbl {
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  line-height: 1.3;
}

.case-preview__pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.18);
}

/* ---- Case studies ---- */
.case-metric {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.case-before,
.case-after {
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
}

.case-before {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.14);
}

.case-after {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.14);
}

.case-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.case-label--before { color: rgba(252, 165, 165, 0.85); }
.case-label--after { color: rgba(110, 231, 183, 0.85); }

/* ---- Featured case (Qyara) ---- */
.case-featured {
  background: linear-gradient(155deg, rgba(16, 50, 40, 0.55), rgba(20, 18, 38, 0.75));
  box-shadow:
    0 40px 100px -30px rgba(16, 185, 129, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.case-featured--qyara::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.04) 0%, transparent 45%, rgba(139, 92, 246, 0.04) 100%);
}

.case-badge-live {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.case-capability {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.case-capability:hover {
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(255, 255, 255, 0.045);
}

.case-capability__icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.case-sector-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.case-chat-preview {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

.case-chat-preview__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.case-chat-preview__body {
  padding: 1rem;
}

.case-chat-bubble {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.case-chat-bubble--in {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-top-left-radius: 4px;
}

.case-chat-bubble--out {
  margin-left: auto;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: rgba(255, 255, 255, 0.92);
  border-top-right-radius: 4px;
}

.case-chat-preview__note {
  padding: 0.65rem 1rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- Contact form ---- */
.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .contact-form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.contact-field--full {
  margin-top: 1rem;
}

.contact-field__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.contact-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-input::placeholder {
  color: var(--muted-2);
}

.contact-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.045);
}

.contact-input--textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

.contact-input:invalid:not(:placeholder-shown) {
  border-color: rgba(248, 113, 113, 0.45);
}

.contact-form__feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.contact-form__feedback.hidden {
  display: none;
}

.contact-form__feedback--error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.contact-form__feedback--success {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.contact-form.is-loading .contact-submit__label {
  opacity: 0.7;
}

.contact-form.is-loading .contact-submit__icon {
  animation: spin 0.8s linear infinite;
}

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

/* ---- Tech chips marquee ---- */
.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}
.marquee__track {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 100%;
  padding-right: 0.75rem;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cfc9e6;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(167, 139, 250, 0.16);
  flex-shrink: 0;
}
.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand-light);
  box-shadow: 0 0 10px var(--brand-glow);
  flex-shrink: 0;
}

/* ---- Process steps ---- */
.process-step {
  position: relative;
}

.process-step__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .process-step__head {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .process-step p {
    max-width: 12rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Timeline / process ---- */
.timeline-line {
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.1), rgba(167, 139, 250, 0.5), rgba(167, 139, 250, 0.1));
}
.node-dot {
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.12), 0 0 22px var(--brand-glow);
}

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: rgba(34, 30, 54, 0.48);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.faq-item[open] {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(28, 22, 50, 0.6);
}
.faq-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--brand-light);
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-body {
  padding: 0 1.4rem 1.3rem;
  color: var(--muted);
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Navbar ---- */
.nav-shell {
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.nav-scrolled {
  background: rgba(14, 13, 24, 0.78);
  border-bottom: 1px solid rgba(167, 139, 250, 0.14);
  backdrop-filter: blur(14px);
}

/* ---- Floating hero orbs ---- */
.float-slow { animation: float 9s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---- Stat number ---- */
.stat-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---- Logo wordmark ---- */
.logo-word {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.45rem;
  line-height: 1;
  background: linear-gradient(120deg, #ffffff, #c4b5fd 60%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}

/* ---- Selo Unicamp Empresa Filha ---- */
.unicamp-seal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  max-width: 16rem;
}

.unicamp-seal__img {
  height: 5.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.95;
  transition: opacity 0.25s ease;
}

.unicamp-seal__img:hover {
  opacity: 1;
}

/* ---- Section divider sheen ---- */
.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.35), transparent);
}

/* ---- Dash/Trace View (New Instrumentacao) ---- */
.dash-window {
  width: 100%;
  border-radius: 16px;
  background: #0d0e12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 40px 100px -20px rgba(0, 0, 0, 0.8),
    0 0 80px -20px var(--brand-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #15161a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dash-body {
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.02), transparent 50%);
}
.trace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .trace-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.trace-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}
.t-layer {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 1.5rem;
}
.t-layer:last-child {
  padding-bottom: 0;
}
.t-line {
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: -4px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.t-layer:last-child .t-line {
  display: none;
}
.t-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background-color: #121318;
}
.t-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.t-content:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.trace-io {
  position: sticky;
  top: 100px;
}

/* Selection */
::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #12101f; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4c3a8f, #2c2350);
  border-radius: 999px;
  border: 2px solid #12101f;
}
::-webkit-scrollbar-thumb:hover { background: #5b21b6; }

@keyframes telemetry-wave {
  0%, 100% { height: 8px; opacity: 0.4; }
  50% { height: 24px; opacity: 1; }
}
.telemetry-bar {
  width: 4px;
  border-radius: 999px;
  animation: telemetry-wave 1.4s ease-in-out infinite;
}
