/* ==========================================================================
   Anderson Matheus — Automação & IA
   Minimal, modern, responsive. No frameworks.
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #64748b;
  --line: #e2e8f0;

  --brand-1: #4f46e5;   /* indigo */
  --brand-2: #0ea5e9;   /* sky */
  --brand-3: #10b981;   /* emerald */
  --grad: linear-gradient(120deg, #4f46e5, #0ea5e9 55%, #22d3ee);

  --dark: #0b1220;
  --dark-soft: #111a2e;
  --dark-text: #cbd5e1;
  --dark-muted: #8b9bb4;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: var(--brand-1); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(var(--container), 92vw); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .32);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(79, 70, 229, .42); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline:hover { background: rgba(255, 255, 255, .1); }
.btn-sm { padding: .5rem 1.1rem; font-size: .875rem; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--grad); color: #fff; font-weight: 800;
  display: grid; place-items: center; letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; color: var(--ink); font-size: 1rem; }
.brand-tagline { font-size: .72rem; color: var(--ink-faint); font-family: var(--mono); }

.site-nav ul { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--brand-1); font-weight: 600; }
.nav-cta a { color: #fff !important; }

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

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(79, 70, 229, .18), transparent 60%),
    radial-gradient(800px 400px at -10% 20%, rgba(14, 165, 233, .14), transparent 60%),
    var(--dark);
  color: #fff;
  padding: clamp(5rem, 10vw, 8rem) 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 400px at 50% 0%, #000, transparent 75%);
}
.hero .container { position: relative; z-index: 1; max-width: 860px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); margin-bottom: .4em; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--dark-text); max-width: 640px; }

.eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-1); font-weight: 600; margin: 0 0 .75em;
}
.hero .eyebrow { color: #67e8f9; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 2.4rem; }

.hero-pills { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.hero-pills li {
  font-family: var(--mono); font-size: .78rem; color: var(--dark-text);
  border: 1px solid rgba(148, 163, 184, .3); padding: .3rem .7rem; border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */

.page-hero {
  background: var(--dark); color: #fff; padding: clamp(3.5rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}
.page-hero .container { max-width: 820px; }
.page-hero .eyebrow { color: #67e8f9; }
.page-lead { color: var(--dark-text); font-size: 1.1rem; max-width: 660px; margin: 0; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--surface-alt); }

.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: .3em; }
.section-head p:last-child { color: var(--ink-soft); }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1rem;
  display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: var(--shadow-sm);
}
.card-icon svg { width: 24px; height: 24px; }
.card-icon-lg { width: 60px; height: 60px; }
.card-icon-lg svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.card-tag {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--brand-1); font-weight: 600; margin-bottom: .6rem;
}
.card-date {
  font-family: var(--mono); font-size: .8rem; color: var(--ink-faint);
  margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em;
}

.text-link { font-weight: 600; font-size: .92rem; }
.card-post img { border-radius: var(--radius-sm); margin-bottom: 1rem; aspect-ratio: 16/9; object-fit: cover; }
.card-post h3 a { color: var(--ink); }
.card-post h3 a:hover { color: var(--brand-1); text-decoration: none; }

.card-highlight { background: var(--surface-alt); }
.card-highlight h3 { color: var(--brand-1); }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services-list { display: grid; gap: 1.8rem; }
.card-service-full { padding: 2rem; }
.service-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.service-head h2 { margin-bottom: 0; }
.service-summary { color: var(--ink-soft); margin: 1rem 0 1.4rem; font-size: 1.02rem; }
.service-details { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.service-details h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.check-list li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--brand-3); font-weight: 800;
}

.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.tag-list li {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-soft);
  background: var(--surface-alt); border: 1px solid var(--line);
  padding: .25rem .6rem; border-radius: 999px;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { display: grid; gap: .8rem; max-width: 760px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq-item summary {
  cursor: pointer; padding: 1rem 1.2rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--brand-1); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 1.2rem 1.1rem; margin: 0; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Sobre
   -------------------------------------------------------------------------- */

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
.prose p { color: var(--ink-soft); font-size: 1.05rem; }

.timeline { display: grid; gap: 1.4rem; max-width: 760px; }
.timeline-item {
  border-left: 3px solid var(--brand-1); padding-left: 1.4rem;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-1); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
}
.timeline-company { color: var(--brand-1); font-weight: 700; margin-bottom: .5rem; }
.timeline-item p:last-child { color: var(--ink-soft); margin: 0; }

.interest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.interest-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .55rem 1.1rem; font-weight: 600; font-size: .95rem;
}

/* --------------------------------------------------------------------------
   Coming soon / empty states
   -------------------------------------------------------------------------- */

.coming-soon {
  text-align: center; max-width: 640px; margin-inline: auto;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 3.5rem 2rem;
}
.coming-soon .card-icon { margin-inline: auto; }
.coming-soon p { color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2rem; align-items: start; }
.contact-info h2 { margin-bottom: .5em; }
.contact-info p { color: var(--ink-soft); }

.contact-channels { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .8rem; }
.contact-channels li { display: flex; align-items: center; gap: .7rem; }
.contact-channels svg { width: 20px; height: 20px; color: var(--brand-1); flex: none; }
.contact-channels a { color: var(--ink); font-weight: 600; }
.contact-channels a:hover { color: var(--brand-1); }

.contact-form { display: grid; gap: 1rem; }
.contact-form h2 { margin: 0 0 .3rem; }

.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .9rem; }
.optional { color: var(--ink-faint); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; color: var(--ink);
  background: var(--bg); transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }

.form-note { font-size: .8rem; color: var(--ink-faint); margin: 0; text-align: center; }

.alert { border-radius: var(--radius-sm); padding: .8rem 1rem; font-weight: 600; font-size: .92rem; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* --------------------------------------------------------------------------
   Blog post
   -------------------------------------------------------------------------- */

.post { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.post .container { max-width: 760px; }
.post-header { margin-bottom: 2.2rem; }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.post-tags { display: flex; gap: .45rem; flex-wrap: wrap; list-style: none; margin: 0 0 .8rem; padding: 0; }
.post-tags span {
  font-family: var(--mono); font-size: .75rem; color: var(--brand-1);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem;
}
.post-body { font-size: 1.05rem; color: var(--ink-soft); }
.post-body h2 { margin-top: 1.8em; }
.post-body h3 { margin-top: 1.5em; }
.post-body p { margin-bottom: 1.2em; }
.post-body ul, .post-body ol { margin-bottom: 1.2em; }
.post-body li { margin-bottom: .4em; }
.post-body code {
  font-family: var(--mono); font-size: .86em; background: var(--surface-alt);
  border: 1px solid var(--line); padding: .15em .4em; border-radius: 6px;
}
.post-body pre { background: var(--dark); color: #e2e8f0; padding: 1.2rem; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 1.4rem; }
.post-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: .85rem; }
.post-body blockquote { border-left: 3px solid var(--brand-1); margin: 1.4rem 0; padding: .2rem 1.2rem; color: var(--ink-soft); }
.post-body img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.post-body a { text-decoration: underline; }

.post-cta {
  margin-top: 3rem; text-align: center;
  background: var(--surface-alt); border-radius: var(--radius); padding: 2rem;
}
.post-cta p { font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta {
  background: var(--grad); color: #fff; text-align: center;
  padding: clamp(3.5rem, 7vw, 5rem) 0;
}
.cta .container { max-width: 640px; }
.cta h2 { margin-bottom: .3em; }
.cta p { opacity: .9; font-size: 1.05rem; }
.cta .hero-actions { justify-content: center; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--dark); color: var(--dark-text); padding: 3.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: .4rem; }
.footer-text { color: var(--dark-muted); margin: 0; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .8rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-links a { color: var(--dark-muted); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(148, 163, 184, .15); padding: 1.2rem 0; }
.footer-bottom p { margin: 0; font-size: .85rem; color: var(--dark-muted); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .two-col, .contact-grid { grid-template-columns: 1fr; }
  .service-details { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: 1rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: .4rem; }
  .site-nav a { display: block; padding: .7rem .5rem; }
  .nav-cta .btn { width: 100%; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .service-head .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
