:root {
  --background: 222 47% 7%;
  --surface: 222 40% 10%;
  --foreground: 210 30% 96%;
  --primary: 221 83% 53%;
  --primary-light: 221 83% 66%;
  --primary-dark: 221 83% 43%;
  --webgest-orange: 24 95% 53%;
  --webgest-orange-light: 24 95% 65%;
  --muted-foreground: 215 20% 65%;
  --border: 217 33% 22%;
  --gradient-hero: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--webgest-orange)) 100%);
  --shadow-elegant: 0 10px 30px -10px hsl(var(--primary) / .35);
  --shadow-glow: 0 0 40px hsl(var(--webgest-orange) / .25);
  --radius: 0.85rem;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Ambient background: grid + glow, fixed behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(hsl(var(--foreground) / .045) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--foreground) / .045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(600px circle at 8% 8%, hsl(var(--primary) / .22), transparent 60%),
    radial-gradient(600px circle at 92% 28%, hsl(var(--webgest-orange) / .16), transparent 60%);
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(var(--background) / .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid hsl(var(--border));
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  height: 76px;
}

.logo img { height: 40px; width: auto; }

.nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color .2s;
}

.nav a::before {
  content: '/';
  font-family: var(--mono);
  color: hsl(var(--webgest-orange) / .7);
  margin-right: 0.3em;
}

.nav a:hover { color: hsl(var(--foreground)); }
.nav a:hover::before { color: hsl(var(--webgest-orange)); }
.nav a.active { color: hsl(var(--foreground)); font-weight: 600; }
.nav a.active::before { color: hsl(var(--webgest-orange)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: hsl(var(--foreground)); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.875rem; }
.btn-lg { padding: 0.95rem 2.1rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--gradient-hero);
  background-size: 160% 160%;
  background-position: 0% 50%;
  color: white;
  box-shadow: var(--shadow-elegant);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); background-position: 100% 50%; }

.btn-outline {
  border: 1.5px solid hsl(var(--border));
  color: hsl(var(--foreground));
  background: hsl(var(--surface) / .5);
  font-family: var(--mono);
}
.btn-outline:hover { border-color: hsl(var(--primary) / .6); background: hsl(var(--primary) / .08); }
.btn-outline::before { content: '['; margin-right: 0.55em; color: hsl(var(--webgest-orange) / .8); }
.btn-outline::after { content: ']'; margin-left: 0.55em; color: hsl(var(--webgest-orange) / .8); }

/* Hero */
.hero {
  position: relative;
  padding: 7.5rem 0 6rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(50% 50% at 50% 0%, hsl(var(--primary) / .25), transparent 70%),
    radial-gradient(40% 40% at 85% 30%, hsl(var(--webgest-orange) / .18), transparent 70%);
  filter: blur(10px);
  z-index: -1;
}
.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: hsl(var(--primary-light));
  background: hsl(var(--surface) / .8);
  border: 1px solid hsl(var(--border));
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: hsl(var(--webgest-orange));
  box-shadow: 0 0 8px hsl(var(--webgest-orange) / .9);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
}
.cursor {
  color: hsl(var(--webgest-orange));
  font-family: var(--mono);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* Code rain: animated matrix-style canvas, colored in brand hues */
.code-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .6;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 62% 60% at 50% 48%, transparent 35%, black 82%);
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 48%, transparent 35%, black 82%);
}
.hero-sub {
  font-size: 1.1rem;
  color: hsl(var(--muted-foreground));
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 6rem 0; position: relative; }
.section-alt { background: hsl(var(--surface) / .35); border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, hsl(var(--primary-light)), hsl(var(--webgest-orange-light)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.9rem;
}
.section-eyebrow::before { content: '//'; color: hsl(var(--webgest-orange)); -webkit-text-fill-color: hsl(var(--webgest-orange)); }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.75rem; }
.section h2::after {
  content: ' </>';
  font-family: var(--mono);
  font-size: 0.65em;
  font-weight: 500;
  color: hsl(var(--webgest-orange) / .45);
  vertical-align: middle;
}
.section-sub { color: hsl(var(--muted-foreground)); max-width: 560px; margin-bottom: 3.25rem; font-size: 1.05rem; }

.about-copy { max-width: 760px; }
.about-copy p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.about-copy p:last-child { margin-bottom: 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: hsl(var(--surface) / .55);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2.1rem 1.85rem;
  backdrop-filter: blur(6px);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: hsl(var(--primary) / .5);
  box-shadow: 0 16px 40px -14px hsl(var(--primary) / .35);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, hsl(var(--primary) / .18), hsl(var(--webgest-orange) / .18));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
}
.card:hover .card-icon { color: hsl(var(--webgest-orange-light)); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5rem;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--webgest-orange-light));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature p { color: hsl(var(--muted-foreground)); font-size: 0.92rem; }

.process { list-style: none; display: flex; flex-direction: column; gap: 0; max-width: 640px; }
.process li { display: flex; gap: 1.5rem; align-items: flex-start; position: relative; padding-bottom: 2.5rem; }
.process li:last-child { padding-bottom: 0; }
.process li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, hsl(var(--border)), transparent);
}
.process-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: white;
  font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  box-shadow: 0 0 0 4px hsl(var(--background)), 0 0 20px hsl(var(--primary) / .4);
  position: relative;
  z-index: 1;
}
.process h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.process p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

.cta-section { text-align: center; }
.cta-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / .5);
  position: relative;
  overflow: hidden;
}
.cta-inner::before {
  content: '';
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(50% 50% at 50% 100%, hsl(var(--primary) / .2), transparent 70%);
  z-index: -1;
}
.cta-inner h2 { margin-bottom: 0.75rem; }
.cta-inner p { color: hsl(var(--muted-foreground)); margin-bottom: 2rem; font-size: 1.05rem; }

/* Case / prova social */
.case-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 900px;
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / .5);
}
.case-card::before {
  content: '';
  position: absolute;
  inset: -30% -10%;
  background: radial-gradient(45% 55% at 0% 30%, hsl(var(--primary) / .16), transparent 70%);
  z-index: -1;
}
.case-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 1.5rem;
  background: hsl(var(--background) / .6);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.2rem);
}
.case-logo { width: 100%; height: auto; filter: drop-shadow(0 0 20px hsl(0 90% 50% / .3)); }
.case-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--webgest-orange-light));
  margin-bottom: 0.5rem;
}
.case-body h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.case-sub { color: hsl(var(--muted-foreground)); margin-bottom: 1.25rem; font-size: 1rem; }
.case-body > p:not(.case-tag):not(.case-sub) { margin-bottom: 1.5rem; color: hsl(var(--foreground) / .9); }
.case-highlights { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.75rem; }
.case-highlights span {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  background: hsl(var(--background) / .4);
}

@media (max-width: 720px) {
  .case-card { grid-template-columns: 1fr; }
  .case-media { max-width: 160px; margin: 0 auto; }
}

.case-footnote {
  margin-top: 1.5rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.92rem;
}
.case-footnote a { color: hsl(var(--webgest-orange-light)); text-decoration: underline; text-decoration-color: hsl(var(--webgest-orange) / .4); }

/* Widget: botão flutuante de WhatsApp */
#wg-wa-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: transform .15s ease;
}
#wg-wa-button:hover { transform: scale(1.06); }

#wg-wa-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 25, .65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#wg-wa-overlay.wg-wa-open { display: flex; }

#wg-wa-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 28px 24px 24px;
  color: hsl(var(--foreground));
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

#wg-wa-modal h3 { margin: 0 0 8px; font-size: 19px; }
#wg-wa-modal .wg-wa-sub { margin: 0 0 18px; font-size: 14px; color: hsl(var(--muted-foreground)); }

#wg-wa-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#wg-wa-name {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 15px;
  margin-bottom: 6px;
  font-family: inherit;
}
#wg-wa-name:focus { outline: none; border-color: hsl(var(--webgest-orange)); }

.wg-wa-error {
  display: none;
  color: #ff8a8a;
  font-size: 13px;
  margin: 4px 0 14px;
}
.wg-wa-error.wg-wa-show { display: block; }

.wg-wa-btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: var(--gradient-hero);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.wg-wa-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wg-wa-option-btn {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.wg-wa-option-btn:hover { border-color: hsl(var(--webgest-orange)); background: hsl(var(--surface)); }

.wg-wa-link-btn {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}

/* Footer */
.site-footer { border-top: 1px solid hsl(var(--border)); padding: 2.5rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-logo { height: 30px; }
.footer-inner p { color: hsl(var(--muted-foreground)); font-size: 0.85rem; font-family: var(--mono); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

@media (max-width: 1099px) and (min-width: 641px) {
  .cards-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards-grid, .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: hsl(var(--background) / .97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid hsl(var(--border));
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    margin: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid hsl(var(--border) / .6); }
  .nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .header-inner .btn { display: none; }
  .cta-inner { padding: 2.5rem 1.5rem; }
}
