:root {
    color-scheme: dark;
    --bg: #08090b;
    --surface-1: #101216;
    --surface-2: #16191e;
    --border: rgba(247, 247, 248, 0.09);
    --border-strong: rgba(247, 247, 248, 0.16);
    --text-primary: #f4f4f6;
    --text-secondary: #9a9ba5;
    --text-muted: #64656e;
    --accent: #8b8ff8;
    --accent-strong: #6a6ef0;
    --accent-soft: rgba(139, 143, 248, 0.12);
    --good: #3ddc84;
    --whatsapp: #25d366;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --font-sans: "Manrope", -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }
  img, svg { max-width: 100%; display: block; }
  ::selection { background: var(--accent-soft); }

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

  h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; margin: 0; }

  /* ---------- Nav ---------- */
  header.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(8, 9, 11, 0.78);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
  }

  .brand img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }

  .nav-links { display: flex; align-items: center; gap: 1.75rem; }

  .nav-links a.section-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
  }

  .nav-links a.section-link:hover { color: var(--text-primary); }

  .nav-cta {
    background: var(--text-primary);
    color: #0a0a0c;
    padding: 0.5rem 1.05rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .nav-cta:hover { background: var(--accent); color: white; }

  @media (max-width: 720px) {
    .nav-links .section-link { display: none; }
  }

  /* ---------- Hero ---------- */
  .hero {
    padding: 6rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: "";
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 760px;
    height: 420px;
    background: radial-gradient(ellipse at center, var(--accent-soft), transparent 72%);
    pointer-events: none;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 2rem;
  }

  .eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18);
  }

  h1 {
    font-size: clamp(2.3rem, 5.4vw, 3.75rem);
    line-height: 1.08;
    font-weight: 800;
    margin: 0 auto 1.4rem;
    max-width: 780px;
    position: relative;
  }

  h1 .dim { color: var(--text-muted); }

  .hero p.lede {
    max-width: 560px;
    margin: 0 auto 2.4rem;
    color: var(--text-secondary);
    font-size: 1.08rem;
    position: relative;
  }

  .hero-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 4rem;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.35rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    border: 1px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  }

  .btn-primary { background: var(--text-primary); color: #0a0a0c; }
  .btn-primary:hover { background: var(--accent); color: white; transform: translateY(-1px); }

  .btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
  .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

  /* ---------- Terminal proof panel ---------- */
  .terminal {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  }

  .terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
  }

  .terminal-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border-strong);
  }

  .terminal-body {
    padding: 1.3rem 1.4rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.86rem;
  }

  .terminal-body .cmd { color: var(--text-muted); margin-bottom: 0.9rem; }
  .terminal-body .cmd::before { content: "$ "; color: var(--accent); }

  .terminal-row {
    display: grid;
    grid-template-columns: 1.1rem 1fr auto;
    gap: 0.9rem;
    align-items: baseline;
    padding: 0.45rem 0;
  }

  .terminal-row .ok { color: var(--good); }
  .terminal-row .app { color: var(--text-primary); font-weight: 500; }
  .terminal-row .domain { color: var(--text-muted); text-align: right; white-space: nowrap; }

  @media (max-width: 560px) {
    .terminal-row { grid-template-columns: 1.1rem 1fr; }
    .terminal-row .domain { grid-column: 2; text-align: left; margin-top: 0.1rem; }
  }

  .terminal-foot {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
  }

  /* ---------- Sections ---------- */
  section { padding: 5rem 0; }
  section.alt { background: var(--surface-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

  .section-head { max-width: 620px; margin: 0 0 2.75rem; }
  .section-head .kicker {
    display: block;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.7rem;
  }
  .section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 0.75rem; }
  .section-head p { color: var(--text-secondary); margin: 0; max-width: 46ch; }

  /* ---------- Projects ---------- */
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  @media (max-width: 760px) {
    .projects-grid { grid-template-columns: 1fr; }
  }

  .project-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  }

  .project-card:hover {
    border-color: var(--project-color, var(--accent));
    transform: translateY(-3px);
    box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.55);
  }

  .project-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

  .project-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--project-color, var(--accent)) 16%, transparent);
    color: var(--project-color, var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .project-card .tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--project-color, var(--accent));
    white-space: nowrap;
  }

  .project-card h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
  .project-card p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; flex-grow: 1; }

  .project-card .link-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.83rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
  }

  .project-card:hover .link-row { color: var(--project-color, var(--accent)); }

  /* ---------- Tech stack ---------- */
  .stack-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
  }

  .stack-group .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.85rem;
  }

  .stack-group .chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

  .tech-chip {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }

  /* ---------- About ---------- */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  @media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

  .about-grid p { color: var(--text-secondary); margin: 0 0 1rem; max-width: 46ch; }

  .stats-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; }

  .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.3rem;
    background: var(--bg);
  }

  .stat strong { font-size: 1.3rem; font-family: var(--font-mono); font-weight: 600; }
  .stat span { color: var(--text-muted); font-size: 0.85rem; text-align: right; }

  /* ---------- Contact ---------- */
  .contact-panel {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .contact-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 480px 240px at 50% 0%, var(--accent-soft), transparent 70%);
    pointer-events: none;
  }

  .contact-panel h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin: 0 0 0.75rem; position: relative; }
  .contact-panel p { color: var(--text-secondary); max-width: 480px; margin: 0 auto 2.25rem; position: relative; }

  .contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; position: relative; }

  .contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border-strong);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .contact-link:hover { border-color: var(--accent); color: var(--accent); }
  .contact-link.whatsapp:hover { border-color: var(--whatsapp); color: var(--whatsapp); }
  .contact-link svg { width: 17px; height: 17px; flex-shrink: 0; }

  footer {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border-top: 1px solid var(--border);
  }

  footer a { color: var(--text-secondary); text-decoration: none; }
  footer a:hover { color: var(--accent); }

  /* ---------- Services ---------- */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
  }

  .service {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
  }

  .service h3 { font-size: 1.08rem; font-weight: 700; margin: 0 0 0.6rem; }
  .service p { color: var(--text-secondary); font-size: 0.92rem; margin: 0 0 0.9rem; }
  .service h3 a { text-decoration: none; }
  .service h3 a:hover { color: var(--accent); }
  .service ul { margin: 0; padding-left: 1.1rem; color: var(--text-secondary); font-size: 0.88rem; }
  .service li { margin: 0.2rem 0; }

  /* ---------- Process ---------- */
  .steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    counter-reset: step;
  }

  .steps li {
    counter-increment: step;
    border-top: 1px solid var(--border-strong);
    padding-top: 1.1rem;
  }

  .steps li::before {
    content: "0" counter(step);
    display: block;
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .steps h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 0.4rem; }
  .steps p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

  /* ---------- FAQ ---------- */
  .faq { max-width: 780px; }

  .faq details {
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 0;
  }

  .faq summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }

  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); }
  .faq details[open] summary::after { content: "−"; }
  .faq details p { color: var(--text-secondary); margin: 0.7rem 0 0; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
  }

/* ---------- Páginas internas (geradas por web/landing-build) ---------- */
.page-hero { padding: 4.5rem 0 3rem; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; top: -40%; left: 30%; width: 760px; height: 420px; background: radial-gradient(ellipse at center, var(--accent-soft), transparent 72%); pointer-events: none; }
.page-hero .kicker { display: block; color: var(--accent); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.8rem; position: relative; }
.page-hero h1 { margin: 0 0 1.2rem; text-align: left; max-width: 820px; font-size: clamp(2rem, 4.6vw, 3.1rem); }
.page-hero .lede { color: var(--text-secondary); font-size: 1.08rem; max-width: 640px; margin: 0 0 2rem; position: relative; }
.hero-ctas.left { justify-content: flex-start; margin-bottom: 0; }
.crumbs { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1.6rem; position: relative; }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.75rem 2rem; }
.check-list li { color: var(--text-secondary); padding-left: 1.6rem; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--good); }
.prose { color: var(--text-secondary); max-width: 70ch; margin: 0 0 1rem; }
.service h3 a { text-decoration: none; }
.service h3 a:hover { color: var(--accent); }
.related { padding: 3rem 0; border-top: 1px solid var(--border); }
.related-title { font-size: 1.1rem; margin: 0 0 1rem; }
.related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.related-list a { display: inline-block; border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.88rem; color: var(--text-secondary); text-decoration: none; }
.related-list a:hover { border-color: var(--accent); color: var(--accent); }
