/* ==========================================================================
   Relacional TI + ExaGrid — Landing page
   Mesma estrutura do styles.css (LP Nutanix), com as cores da marca ExaGrid:
   canvas azul-marinho, verde do logo nos CTAs e azul nos acentos secundários.
   ========================================================================== */

:root {
  --primary: #6cc24a;
  --primary-bold: #4da82d;
  --primary-pressed: #3f8f23;
  --on-primary: #06121f;
  --blue: #5aa0e6;
  --blue-bold: #2f7fd0;
  --navy: #18467f;
  --danger: #f0645a;

  --canvas: #081624;
  --surface-1: #0c1d30;
  --surface-2: #12263d;
  --surface-3: #1c3554;

  --hairline: #142a42;
  --hairline-strong: #1f3a5c;
  --hairline-soft: #2c4b72;

  --ink: #e6edf5;
  --ink-muted: #b3c1d1;
  --ink-subtle: #93a6bc;
  --ink-tertiary: #5f7590;
  --ink-deepest: #040c16;

  --font-sans: "Raleway", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  background: var(--canvas);
  color-scheme: dark;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Raleway usa algarismos old-style por padrão */
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}

::selection { background: rgba(77, 168, 45, .45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Backgrounds SVG ---------- */
.bg-grid     { background-image: url("../assets/backgrounds/exagrid/bg-grid.svg"); background-size: 48px 48px; }
.bg-dots     { background-image: url("../assets/backgrounds/bg-dots.svg"); background-size: 20px 20px; }
.bg-diagonal { background-image: url("../assets/backgrounds/bg-diagonal.svg"); background-size: 14px 14px; }

.mask-fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.mask-fade-y { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent); }
.mask-radial { -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%); }

/* ---------- Tipografia ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  line-height: 1.6;
}
.eyebrow .idx { color: var(--ink-tertiary); margin-right: 10px; }
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; border-radius: 9999px; background: var(--primary); margin-right: 10px; vertical-align: middle; }
.eyebrow .sep { color: var(--ink-tertiary); margin: 0 8px; }

.display-xl {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fafafa;
}
.display-lg {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--ink-muted);
}
.h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fafafa;
  text-wrap: balance;
}
.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-muted);
}
.text-pretty { text-wrap: pretty; }

.mark {
  color: #fafafa;
  background: linear-gradient(transparent 62%, rgba(77, 168, 45, .35) 62%);
}

/* ---------- Botões ---------- */
/* Padrão único: pílula verde (cor do logo) com texto azul-marinho, altura fixa de 48px */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  border-radius: 9999px;
  transition: background-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 480px) { .btn { padding: 12px 18px; font-size: 15px; gap: 8px; } }
@media (max-width: 359px) { .btn { white-space: normal; text-align: center; } }

.btn-primary {
  background: var(--primary-bold);
  color: var(--on-primary);
  box-shadow: 0 0 0 1px rgba(108, 194, 74, .25) inset, 0 8px 30px -10px rgba(77, 168, 45, .7);
}
.btn-primary:hover { background: #5bb83a; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(108, 194, 74, .4) inset, 0 12px 36px -10px rgba(77, 168, 45, .85); }
.btn-primary:active { background: var(--primary-pressed); transform: translateY(0); }

.link-accent {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(108, 194, 74, .4);
  transition: text-decoration-color .18s var(--ease);
}
.link-accent:hover { text-decoration-color: var(--primary); }

/* ---------- Navegação ---------- */
.top-nav {
  height: var(--nav-h);
  background: rgba(8, 22, 36, .72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.top-nav.is-scrolled { border-bottom-color: var(--hairline); background: rgba(8, 22, 36, .9); }
.nav-link {
  color: var(--ink-muted);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .18s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: #fff; }

.mobile-menu { display: none; }
.mobile-menu.is-open { display: block; }

/* ---------- Cards e frames ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.card-hover:hover { border-color: var(--surface-3); background: #10233a; }
.card-hover:hover .icon-tile { border-color: rgba(108, 194, 74, .6); background: rgba(77, 168, 45, .2); }

.icon-tile {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--primary);
  background: rgba(77, 168, 45, .1);
  border: 1px solid rgba(108, 194, 74, .22);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
  flex: none;
}
.icon-tile svg { width: 20px; height: 20px; stroke-width: 1.6; }

.window {
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02);
}
.window-bar {
  height: 34px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--ink-subtle);
}
.window-bar .dot { width: 10px; height: 10px; border-radius: 9999px; }
.window-bar .dot:nth-child(1) { background: #ff5f57; }
.window-bar .dot:nth-child(2) { background: #febc2e; }
.window-bar .dot:nth-child(3) { background: #28c840; }
.window-bar .title { font-family: var(--font-mono); font-size: 11px; margin-left: 10px; color: var(--ink-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.window > img { display: block; width: 100%; height: auto; }

.hero-glow {
  position: absolute;
  inset: auto -10% -20% -10%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(77, 168, 45, .35), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.chip svg { width: 16px; height: 16px; color: var(--primary); }

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(108, 194, 74, .3);
  background: rgba(77, 168, 45, .08);
}

/* ---------- Tabs de soluções ---------- */
.tab {
  position: relative;
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-subtle);
  transition: all .2s var(--ease);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
@media (max-width: 639px) {
  .tab { padding: 12px 14px; font-size: 14px; line-height: 1.3; }
  .tab .tab-idx { font-size: 10px; }
  .tab .tab-bar { left: 14px; right: 14px; }
}
.tab:hover { border-color: var(--hairline-strong); color: var(--ink); }
.tab[aria-selected="true"] {
  background: var(--surface-1);
  border-color: rgba(108, 194, 74, .55);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(108, 194, 74, .15) inset;
}
.tab .tab-idx { font-family: var(--font-mono); font-size: 11px; color: var(--ink-tertiary); letter-spacing: .06em; }
.tab[aria-selected="true"] .tab-idx { color: var(--primary); }
.tab .tab-bar { position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.tab[aria-selected="true"] .tab-bar { transform: scaleX(1); }

.tabpanel[hidden] { display: none; }
.tabpanel { animation: panel-in .35s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Plugin row + toggle (Impacto) ---------- */
.plugin-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  transition: border-color .2s var(--ease);
}
.plugin-row:hover { border-color: var(--surface-3); }
.toggle {
  flex: none;
  width: 36px;
  height: 20px;
  padding: 2px;
  border-radius: 9999px;
  background: var(--surface-3);
  position: relative;
  transition: background-color .3s var(--ease);
  margin-top: 2px;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #fff;
  transition: transform .3s var(--ease);
}
.is-visible .toggle, .toggle.on { background: var(--primary-bold); }
.is-visible .toggle::after, .toggle.on::after { transform: translateX(16px); }

/* ---------- Bento ---------- */
.bento-card { position: relative; overflow: hidden; }
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/backgrounds/bg-dots.svg");
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000, transparent 60%);
  mask-image: radial-gradient(ellipse at top right, #000, transparent 60%);
  opacity: .9;
  pointer-events: none;
}
.bento-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -110px;
  right: -110px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(77, 168, 45, .25), transparent 70%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.bento-card:hover::after { opacity: 1; }
.bento-card > * { position: relative; z-index: 1; }

.custom-icon { width: 44px; height: 44px; }

/* Hero: aura, dashboard real e parallax */
.hero-aura {
  height: 900px;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(47, 127, 208, .38), transparent 70%),
    radial-gradient(ellipse 30% 30% at 50% 62%, rgba(108, 194, 74, .12), transparent 70%);
}
.hero-stage { position: relative; perspective: 1600px; }
.hero-dashboard {
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55));
  transform-origin: 50% 0%;
  will-change: transform;
}
[data-parallax] { will-change: transform; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--hairline-strong); }
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon { transition: transform .25s var(--ease); }
.faq-item[open] .faq-icon { transform: rotate(45deg); color: var(--primary); }
.faq-item[open] summary .faq-q { color: #fff; }
.faq-body { animation: panel-in .3s var(--ease); }

/* ---------- Formulário ---------- */
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field label .req { color: var(--primary); }
.input {
  width: 100%;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 11px 12px;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input::placeholder { color: var(--ink-tertiary); }
.input:hover { border-color: #3a5a80; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(77, 168, 45, .25); }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2393a6bc' stroke-width='2' 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;
  padding-right: 40px;
}
select.input:invalid { color: var(--ink-tertiary); }
select.input option { color: var(--ink); background: var(--surface-1); }
textarea.input { resize: vertical; min-height: 96px; }
.field.has-error .input { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.field .error-msg { display: none; font-size: 12px; color: #fca5a5; margin-top: 6px; }
.field.has-error .error-msg { display: block; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 9999px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Selo de certificação ---------- */
.badge-img { filter: drop-shadow(0 18px 40px rgba(77, 168, 45, .35)); }

/* ---------- WhatsApp flutuante ---------- */
.float-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--primary-bold);
  color: var(--on-primary);
  box-shadow: 0 12px 30px -8px rgba(77, 168, 45, .8);
  transform: translateY(120px);
  transition: transform .35s var(--ease), background-color .18s var(--ease);
}
.float-wa.is-shown { transform: none; }
.float-wa:hover { background: #5bb83a; }
.float-wa svg { width: 26px; height: 26px; }
.float-wa::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--primary);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Faixa de números (abaixo do hero) ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  background: rgba(12, 29, 48, .7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
@media (min-width: 1024px) { .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 22px 20px; border-color: var(--hairline); border-style: solid; border-width: 0; }
.stat:nth-child(odd) { border-right-width: 1px; }
.stat:nth-child(-n+2) { border-bottom-width: 1px; }
@media (min-width: 1024px) {
  .stat { padding: 28px 28px; border-bottom-width: 0 !important; border-right-width: 1px; }
  .stat:last-child { border-right-width: 0; }
}
.stat-value {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-value .unit { color: var(--primary); }
.stat-label { margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--ink-muted); }

/* ---------- Diagrama do hero: fluxo de dados animado ---------- */
.arch-flow { stroke-dasharray: 6 7; animation: dash-flow 1.1s linear infinite; }
.arch-flow.slow { animation-duration: 1.8s; }
.arch-flow.reverse { animation-direction: reverse; }
@keyframes dash-flow { to { stroke-dashoffset: -26; } }
.arch-packet { offset-rotate: 0deg; animation: packet 2.4s var(--ease) infinite; }
@keyframes packet { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.arch-pulse { transform-box: fill-box; transform-origin: center; animation: pulse-ring 2.4s var(--ease) infinite; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
.arch-blink { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.arch-fill { transform-box: fill-box; transform-origin: left center; animation: fill-bar 4.5s var(--ease) infinite; }
@keyframes fill-bar { 0% { transform: scaleX(.12); } 55%, 100% { transform: scaleX(1); } }
.arch-block { animation: block-in 4.5s var(--ease) infinite; }
@keyframes block-in { 0%, 40% { opacity: 0; } 55%, 100% { opacity: 1; } }

/* ---------- Faixa de aplicações de backup (marquee) ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 12px; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  background: var(--surface-1);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.app-pill::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--primary); }

/* ---------- Foto com moldura ---------- */
.photo-frame { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--hairline-strong); }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8, 22, 36, .85)); pointer-events: none; }
.photo-frame .scan {
  position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(180deg, transparent, rgba(90, 160, 230, .16), transparent);
  animation: scan 5s linear infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes scan { from { top: -30%; } to { top: 100%; } }

/* ---------- Ícone com alerta (desafios) ---------- */
.icon-tile.is-danger { color: var(--danger); background: rgba(240, 100, 90, .1); border-color: rgba(240, 100, 90, .3); }
.card-hover:hover .icon-tile.is-danger { background: rgba(240, 100, 90, .18); border-color: rgba(240, 100, 90, .6); }

/* ---------- Ícones personalizados: leve flutuação no hover ---------- */
.bento-card .custom-icon { transition: transform .3s var(--ease); }
.bento-card:hover .custom-icon { transform: translateY(-3px); }

/* ---------- Depoimento ---------- */
.quote-mark { font-size: 64px; line-height: .6; color: var(--primary); font-weight: 700; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .06s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .12s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .18s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .24s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .30s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: .36s; }

.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }

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