/* ===== AgilCode — Design tokens ===== */
:root {
  --bg: #0a1628;
  --bg-2: #0f1e36;
  --bg-3: #13253f;
  --surface: #152a48;
  --border: rgba(110, 168, 254, 0.15);
  --text: #e6edf7;
  --text-dim: #9fb1cc;
  --muted: #6e819e;
  --brand: #2dd4ff;
  --brand-2: #4f8cff;
  --brand-grad: linear-gradient(135deg, #2dd4ff 0%, #4f8cff 100%);
  --accent: #7c5cff;
  --ring: 0 0 0 3px rgba(45, 212, 255, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #fff; }
h1,h2,h3,h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--text-dim); }
ul { padding-left: 1.2em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #001021; padding: .5rem 1rem; z-index: 999; font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-grad);
  color: #001021;
  box-shadow: 0 10px 30px -10px rgba(45, 212, 255, .55);
}
.btn-primary:hover { transform: translateY(-2px); color: #001021; box-shadow: 0 16px 40px -10px rgba(45, 212, 255, .75); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); color: #fff; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 40, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text); font-weight: 700; font-size: 1.15rem;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--brand-grad);
  color: #001021; font-family: 'JetBrains Mono', monospace; font-size: .85rem; font-weight: 700;
}
.brand-text strong { color: var(--brand); font-weight: 700; }
.menu { display: flex; gap: 1.8rem; }
.menu a { color: var(--text-dim); font-size: .95rem; font-weight: 500; }
.menu a:hover { color: var(--text); }
.nav-cta { padding: .6rem 1.1rem; font-size: .88rem; }

.menu-toggle {
  display: none; background: none; border: 0; width: 40px; height: 40px;
  padding: 8px; cursor: pointer;
}
.menu-toggle span {
  display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column; gap: .25rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.mobile-menu a { padding: .75rem 0; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; }

/* ===== Hero ===== */
.hero { position: relative; padding: 5rem 0 4rem; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(45, 212, 255, .18), transparent 60%),
    radial-gradient(700px 400px at 90% 20%, rgba(124, 92, 255, .18), transparent 60%),
    linear-gradient(180deg, transparent 0%, rgba(10,22,40,0) 60%, var(--bg) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(110, 168, 254, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 168, 254, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center top, rgba(0,0,0,.7), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center top, rgba(0,0,0,.7), transparent 70%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
}
.eyebrow {
  display: inline-block; padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(45, 212, 255, .1);
  border: 1px solid rgba(45, 212, 255, .25);
  color: var(--brand);
  font-size: .78rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.grad {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 60ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.hero-stats {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  border-top: 1px solid var(--border); padding-top: 1.5rem;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 1.9rem; font-weight: 800;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { color: var(--muted); font-size: .9rem; }

/* Hero code card */
.hero-visual { position: relative; }
.code-card {
  background: linear-gradient(180deg, #0c1f3a 0%, #0a1b33 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 0 1rem;
  overflow: hidden;
  transform: perspective(1200px) rotateX(2deg) rotateY(-4deg);
  transition: transform .6s var(--ease);
}
.code-card:hover { transform: perspective(1200px) rotateX(0deg) rotateY(0deg); }
.code-card-bar {
  display: flex; gap: .4rem; padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.code-card-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2d3f5b; }
.code-card-bar span:nth-child(1) { background: #ff5f57; }
.code-card-bar span:nth-child(2) { background: #febc2e; }
.code-card-bar span:nth-child(3) { background: #28c840; }
.code-card pre {
  margin: 0; padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .92rem; line-height: 1.7;
  color: #cbe0ff; overflow-x: auto;
}
.t-c { color: #ff6ac1; }
.t-v { color: #82aaff; }
.t-k { color: #2dd4ff; }
.t-s { color: #c3e88d; }

/* ===== Sections ===== */
.section { padding: 5rem 0; position: relative; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .sub { color: var(--text-dim); font-size: 1.05rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.check-list li {
  padding-left: 1.8rem; position: relative; margin-bottom: .6rem;
  color: var(--text);
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(45, 212, 255, .15); color: var(--brand);
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .3rem;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(45, 212, 255, .4); }
.stat-card strong {
  font-size: 2rem; font-weight: 800;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-card span { color: var(--muted); font-size: .9rem; }

/* Cards (serviços) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--brand-grad); opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(45, 212, 255, .35); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(45, 212, 255, .12); display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.card h3 { color: var(--text); }
.card ul { padding-left: 1.1rem; margin: .5rem 0 0; }
.card ul li { color: var(--text-dim); font-size: .92rem; margin-bottom: .35rem; }

/* Tech */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 3rem; }
.tech-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.tech-block h3 { color: var(--text); }
.tech-stack { color: var(--brand); font-family: 'JetBrains Mono', monospace; font-size: .9rem; margin-bottom: .75rem; }
.logo-cloud {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1rem;
  padding: 1.5rem; border-top: 1px solid var(--border);
}
.logo-cloud span {
  padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-dim); font-size: .88rem; font-weight: 500;
  background: rgba(255,255,255,.02);
  transition: all .3s var(--ease);
}
.logo-cloud span:hover { color: var(--brand); border-color: rgba(45, 212, 255, .4); }

/* Steps */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  counter-reset: step;
}
.steps li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.5rem;
  position: relative;
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; color: var(--brand); font-weight: 600;
  display: inline-block; margin-bottom: .75rem;
  padding: .2rem .6rem; border-radius: 6px;
  background: rgba(45, 212, 255, .12);
}

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.why-card {
  padding: 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.why-card:hover { transform: translateY(-4px); border-color: rgba(45, 212, 255, .4); }
.why-card h3 { color: var(--text); font-size: 1.05rem; }

/* ===== Form ===== */
.contato-wrap { max-width: 900px; }
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .88rem; color: var(--text-dim); font-weight: 500; }
.field input, .field textarea {
  padding: .8rem 1rem; font-size: .95rem; font-family: inherit;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
.form-status { margin: 0; font-size: .9rem; }
.form-status.ok { color: #7ddc92; }
.form-status.err { color: #ff8a8a; }

/* ===== Footer ===== */
.site-footer {
  background: #060f1e; border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  color: var(--text-dim);
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem;
  padding-bottom: 2rem; border-bottom: 1px solid var(--border);
}
.footer-grid h4 { color: var(--text); font-size: .95rem; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-grid a { color: var(--text-dim); font-size: .92rem; }
.footer-grid a:hover { color: var(--brand); }
.muted { color: var(--muted); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.5rem; font-size: .85rem;
}

/* ===== Reveal animations ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .menu, .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 520px; margin: 0 auto; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .cards, .tech-grid { grid-template-columns: 1fr 1fr; }
  .steps, .why-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 3rem 0; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats li:last-child { grid-column: 1 / -1; }
  .cards, .tech-grid, .steps, .why-grid, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .code-card { transform: none; }
}
