/* ====== Base Reset & Typography ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  background: #050816;
  color: #e5e7eb;
  line-height: 1.7;
}

/* ====== Layout Helpers ====== */
.section-inner,
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

section {
  position: relative;
}

/* Subtle section separators */
section + section::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.4),
    transparent
  );
}

/* ====== Colors / Theme Tokens ====== */
:root {
  --bg-main: #050816;
  --bg-card: #0b1020;
  --bg-soft: #050b18;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-strong: #4f46e5;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
  --radius-xl: 18px;
}

/* ====== Hero Section ====== */
#hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, #1f2937, transparent 60%),
    radial-gradient(circle at bottom right, #111827, transparent 55%),
    linear-gradient(135deg, #020617, #020617);
  position: relative;
  overflow: hidden;
}

/* Glow circles */
#hero::before,
#hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

#hero::before {
  background: #6366f1;
  top: -80px;
  left: -120px;
}

#hero::after {
  background: #ec4899;
  bottom: -120px;
  right: -80px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

#hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 700;
  color: #f9fafb;
  letter-spacing: 0.03em;
  margin-bottom: 1.2rem;
}

#hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* ====== Brand ======= */
.brand a {
  display: inline-block;
}

.brand img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.brand img:hover {
  opacity: 0.8;
}

/* ====== Header nav ====== */
.main-nav {
  display: flex;
  gap: 1.75rem;            /* space between items */
  align-items: center;
}

.main-nav a {
  font-weight: 600;        /* bolder text */
  text-transform: uppercase;
  letter-spacing: 0.06em;  /* a bit more presence */
  font-size: 0.9rem;
  text-decoration: none;
  color: #1067bd;          /* tweak to match your palette */
  padding: 0.25rem 0;
  position: relative;
}

/* Optional hover underline */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: #0070f3;
  transition: width 0.2s ease-out;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ====== Buttons ====== */
.btn-primary {
  display: inline-block;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f9fafb;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 18px 50px rgba(79, 70, 229, 0.7);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.45);
}

/* ====== Headings ====== */
h2 {
  font-size: 1.9rem;
  color: #f9fafb;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #e5e7eb;
}

h4 {
  font-size: 1.05rem;
  margin: 1.2rem 0 0.5rem;
  color: #cbd5f5;
}

/* ====== Text & Lists ====== */
p {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
}

ul {
  margin: 0.35rem 0 0.9rem 1.35rem;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.35rem;
}

/* ====== Section Styles ====== */
#sobre .section-inner,
#o-que-fazemos .section-inner,
#como-trabalhamos .section-inner,
#para-quem .section-inner,
#contato .section-inner {
  background: radial-gradient(circle at top left, #020617, transparent 55%),
    linear-gradient(145deg, var(--bg-soft), #020617);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  margin-top: 3rem;
}

/* Add a subtle “tag” above section titles */
.section-inner h2::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  margin-right: 0.5rem;
  background: linear-gradient(90deg, var(--accent), #ec4899);
  vertical-align: middle;
}

/* Sub-sections cards inside "O que fazemos" */
#o-que-fazemos .section-inner > section {
  margin-top: 2.2rem;
  padding: 1.6rem 1.5rem;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #020617, transparent 60%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.78);
}

/* Highlight Data Manager & MCP in particular */
#data-manager-api {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 24px 55px rgba(79, 70, 229, 0.4);
}

#mcp-servers {
  border-color: rgba(236, 72, 153, 0.5);
}

/* Optional centered list helper */
.mcp-how-list {
  margin: 0 auto;
  max-width: 600px;
  padding-left: 1.5rem;
}

/* Centered ordered list for the "IA + MCP Server" steps */
.mcp-how-list-center {
  margin: 1rem auto;
  max-width: 550px;
  padding-left: 0;
  list-style-position: inside;
  text-align: left;
  text-indent: 50px;
}

.mcp-how-list-center li {
  margin-bottom: 0.5rem;
}

/* ====== “Como trabalhamos” & “Para quem” styling ====== */
#como-trabalhamos ul li,
#para-quem ul li {
  position: relative;
  padding-left: 1.3rem;
}

#como-trabalhamos ul li::before,
#para-quem ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent) 0, #ec4899 100%);
}

/* ====== Contact Section ====== */
#contato .contact-details {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.99)
  );
  border: 1px solid rgba(148, 163, 184, 0.4);
}

#contato .contact-details p {
  margin-bottom: 0.4rem;
  color: #e5e7eb;
}

/* ====== Links ====== */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Header with logo + language toggle ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 2px;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f9fafb;
  font-size: 0.98rem;
}

/* Logo centered inside hero */
.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.hero-logo-img {
  width: 194px;
  height: 194px;
  border-radius: 2px;
}

.hero-brand-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: #f9fafb;
  opacity: 0.9;
}

/* hero-inner is already centered in your theme */
#hero .hero-inner {
  text-align: center;
}

/* language toggle button */
.lang-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.lang-toggle:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(96, 165, 250, 0.8);
  transform: translateY(-1px);
}

.lang-toggle:active {
  transform: translateY(0);
}

/* ====== Footer ====== */
#site-footer {
  border-top: 1px solid #01040a;
  padding: 1rem 0 2rem;
  margin-top: 2rem;
  background: #020c17;
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

#site-footer a {
  color: #4f46e5;
  text-decoration: none;
  margin-left: 0.3rem;
}

#site-footer a:hover {
  text-decoration: underline;
}

/* === images === */
.figure-diagram {
  margin: 2rem auto;
  text-align: center;
}

.figure-diagram img {
  max-width: 480px;   /* desktop max size */
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
}

/* === Social link === */
/* Social links in contact section */
.social-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-color, #0055aa);
}

.social-link:hover,
.social-link:focus {
  opacity: 0.85;
}

.social-icon {
  width: 68px;
  height: 68px;
  display: block;
}

/* ====== Responsive Adjustments ====== */
@media (max-width: 768px) {
  .section-inner,
  .hero-inner {
    padding: 2.2rem 1.25rem;
  }

  #hero {
    min-height: 60vh;
  }

  #hero h1 {
    font-size: 1.9rem;
  }

  /* Header: stack logo + nav + button */
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

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

  .main-nav {
    flex-wrap: wrap;
    gap: 0.9rem;
  }

  .main-nav a {
    font-size: 0.8rem;
  }

  .hero-logo-img {
    width: 150px;
    height: 150px;
  }

  /* Diagrams & figures full-width on mobile */
  .figure-diagram img {
    max-width: 100%;
    width: 100%;
  }

  /* Social icon smaller on mobile */
  .social-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.6rem;
  }

  #hero p {
    font-size: 0.95rem;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .main-nav {
    gap: 0.6rem;
  }
}

/* ====== Motion preferences ====== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn-primary {
    transition: none;
  }
}
