/* ==========================================================================
   TECHOST — PÁGINAS DE SERVIÇO
   Base compartilhada + um tema por serviço (body.theme-*).
   Cada tema redefine os tokens de cor e traz sua própria arte.
     A. Base de serviço            D. Tema: Automações (azul)
     B. Componentes compartilhados E. Tema: Sistemas (laranja)
     C. Tema: IA (violeta)         F. Tema: Sites (verde)
     G. Keyframes                  H. Responsividade
   ========================================================================== */

/* --- A. BASE DE SERVIÇO -------------------------------------------------- */
/* link "voltar" com seta em vez da numeração da home */
.svc .nav-links li:first-child a::before { content: '←'; counter-increment: none; font-size: 0.85rem; }
.svc-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 64px) 0 96px;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--line);
}

.svc-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.svc-hero-bg::before,
.svc-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
}

.svc-hero-inner {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 72px;
    align-items: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--dim);
}

.breadcrumb a { text-decoration: none; transition: color var(--dur); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb b { color: var(--accent); font-weight: 500; }

.svc-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    line-height: 1.03;
    letter-spacing: -0.035em;
    font-weight: 600;
    margin: 24px 0 24px;
}

.svc-hero p {
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 40px;
}

.svc-art { position: relative; }

/* chip flutuante genérico sobre a arte */
.float-chip {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(5, 7, 10, 0.9);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text);
    white-space: nowrap;
    backdrop-filter: blur(6px);
    animation: floatY 6s ease-in-out infinite;
}

.float-chip b { color: var(--accent); font-weight: 500; }

/* Detalhes */
.service-wrapper > * { min-width: 0; }

.service-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 80px;
    align-items: center;
}

.service-text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 600;
    margin-bottom: 24px;
}

.service-text p {
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.tech-list {
    list-style: none;
    margin: 36px 0 40px;
    counter-reset: spec;
}

.tech-list li {
    counter-increment: spec;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    transition: border-color var(--dur);
}

.tech-list li:last-child { border-bottom: 1px solid var(--line); }

.tech-list li i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(var(--accent-rgb), 0.06);
    color: var(--accent);
    font-size: 0.95rem;
    transition: border-color var(--dur), background var(--dur);
}

.tech-list li:hover i { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }

.tech-list li div { display: flex; flex-direction: column; gap: 4px; }
.tech-list li strong { font-size: 1.02rem; font-weight: 600; }
.tech-list li span { color: var(--muted); font-size: 0.94rem; line-height: 1.55; }

/* Card de código / console */
.code-card {
    position: relative;
    background: #090c11;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 0 80px -30px rgba(var(--accent-rgb), 0.35);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.dot { width: 10px; height: 10px; border-radius: 50%; background: #262d38; display: inline-block; }
.code-card:hover .red { background: #ff5f56; }
.code-card:hover .yellow { background: #ffbd2e; }
.code-card:hover .green { background: #27c93f; }
.dot { transition: background var(--dur); }

.code-title {
    margin-left: 10px;
    color: var(--muted);
    font-size: 0.76rem;
}

.code-badge {
    margin-left: auto;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.code-content { padding: 22px 24px; color: #c9d1d9; font-size: 0.86rem; line-height: 1.75; }
.code-content pre { margin: 0; overflow-x: auto; font-family: inherit; }
.code-content code { font-family: inherit; color: inherit; }

/* destaque de sintaxe */
.tk-k { color: var(--accent-2); }
.tk-s { color: #a5d6ff; }
.tk-n { color: #ffa657; }
.tk-c { color: var(--dim); font-style: italic; }
.tk-p { color: var(--accent); }
.tk-t { color: #7ee787; }
.ok-c { color: var(--ok); }
.warn-c { color: var(--warn); }
.err-c { color: var(--danger); }

.code-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    font-size: 0.7rem;
    color: var(--dim);
    letter-spacing: 0.04em;
}

/* Linhas de terminal reveladas em sequência (ver main.js) */
.js [data-typeout] .t-line { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s; }
.js [data-typeout] .t-line.on { opacity: 1; transform: none; }

/* CTA */
.svc-cta { padding: 120px 0 64px; }

.cta-box {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 64px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 120% at 100% 0%, rgba(var(--accent-rgb), 0.16), transparent 60%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
        var(--surface);
}

.cta-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
}

.cta-box h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 600;
    margin-bottom: 12px;
}

.cta-box p { color: var(--muted); font-size: 1.05rem; max-width: 560px; }

/* Navegação entre serviços */
.svc-others { padding: 0 0 80px; }

.svc-others-label {
    display: block;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
}

.svc-others-list { display: flex; flex-wrap: wrap; gap: 10px; }

.svc-others-list a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color var(--dur), color var(--dur), transform var(--dur) var(--ease);
}

.svc-others-list a::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 1px;
    background: var(--c);
}

.svc-others-list a:hover { color: var(--text); border-color: var(--c); transform: translateY(-2px); }


/* --- B. COMPONENTES COMPARTILHADOS -------------------------------------- */
/* terminal */
.terminal { background: #070405; }
.terminal .code-header { background: #120a0c; }
.terminal .code-content { position: relative; }

.terminal .code-content::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px);
}

.terminal .t-line { display: block; min-height: 1.75em; }
.terminal .prompt { color: var(--accent); }

/* roadmap */
.roadmap { font-family: var(--font-sans); }
.roadmap .code-content { padding: 28px; }

.rm-objective {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.rm-objective small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.rm-objective strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; }

.rm-steps { list-style: none; position: relative; display: grid; gap: 22px; padding-left: 34px; }

.rm-steps::before,
.rm-steps::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    width: 2px;
    bottom: 8px;
    background: var(--surface-3);
}

/* trilho preenchendo até a etapa atual */
.rm-steps::after {
    background: var(--accent);
    bottom: auto;
    height: 0;
    animation: rail 1.8s var(--ease) 0.6s forwards;
}

.rm-steps li { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; color: var(--muted); }

.rm-steps li::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 50%;
    z-index: 1;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--surface-3);
}

.rm-steps li.done::before { background: var(--accent); border-color: var(--accent); }
.rm-steps li.now::before { border-color: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); animation: accentPing 2s infinite; }

.rm-steps b { font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; color: var(--accent); }
.rm-steps li.later b { color: var(--dim); }
.rm-steps li span { color: var(--text); }

.rm-steps em {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    color: var(--dim);
}

.rm-steps li.done em { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); }
.rm-steps li.now em { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.45); }

.rm-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.rm-metrics div { padding: 14px; }
.rm-metrics div + div { border-left: 1px solid var(--line); }
.rm-metrics small { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.rm-metrics strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.rm-metrics strong.ok-c { font-family: var(--font-mono); font-size: 0.95rem; }

/* monitor */
.monitor .code-content { font-size: 0.8rem; }
.mon-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line-strong); color: var(--muted); }
.mon-head b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

.meter { display: grid; grid-template-columns: 82px 1fr 118px; gap: 14px; align-items: center; padding: 8px 0; color: var(--muted); }
.meter .val { text-align: right; color: var(--text); }
.meter .val b { color: var(--ok); font-weight: 500; margin-left: 6px; }

.meter .bar {
    height: 8px;
    background: repeating-linear-gradient(90deg, #1a1f27 0 6px, transparent 6px 8px);
    position: relative;
    overflow: hidden;
}

.meter .bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 8px);
    animation: meterJitter 3s ease-in-out infinite;
}

.meter:nth-child(3) .bar span { animation-duration: 4.2s; }
.meter:nth-child(4) .bar span { animation-duration: 2.3s; }

.mon-line { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); border-top: 1px solid var(--line); }
.mon-line:first-of-type { margin-top: 10px; }
.mon-line b { color: var(--text); font-weight: 500; }
.mon-status { margin-top: 14px; padding: 12px 14px; display: flex; justify-content: space-between; border: 1px solid rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.05); border-radius: var(--radius); color: var(--muted); }
.mon-status b { color: var(--ok); font-weight: 500; letter-spacing: 0.1em; }

/* --- C. TEMA: IA (violeta, rede neural) --------------------------------- */
body.theme-ia {
    --accent: #a78bfa;
    --accent-rgb: 167, 139, 250;
    --accent-ink: #120a24;
    --accent-2: #f0abfc;
}

.theme-ia .svc-hero-bg {
    background:
        radial-gradient(ellipse 55% 60% at 25% 50%, rgba(167, 139, 250, 0.16), transparent 65%),
        radial-gradient(ellipse 40% 40% at 85% 20%, rgba(240, 171, 252, 0.08), transparent 70%),
        var(--bg);
}

/* matriz de pontos */
.theme-ia .svc-hero-bg::before {
    background-image: radial-gradient(circle, rgba(167, 139, 250, 0.22) 1px, transparent 1.6px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 70% 70% at 40% 50%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 40% 50%, #000 10%, transparent 70%);
}

.theme-ia .svc-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.theme-ia .svc-art { order: -1; }

.theme-ia .svc-hero h1 .highlight {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.neural { width: 100%; height: auto; overflow: visible; }
.neural .edges line { stroke: rgba(167, 139, 250, 0.12); stroke-width: 1; }

.neural .flows line {
    stroke: var(--accent);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 8 260;
    animation: dashFlow 3s linear infinite;
    filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.9));
}

.neural .nodes circle {
    fill: #0c0a18;
    stroke: var(--accent);
    stroke-width: 1.5;
    transform-box: fill-box;
    transform-origin: center;
    animation: nodePulse 3s ease-in-out infinite;
}

.neural .labels text {
    fill: var(--dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.theme-ia .float-chip.c1 { top: 4%; right: 2%; }
.theme-ia .float-chip.c2 { bottom: 14%; left: -2%; animation-delay: -3s; }

/* lista como pipeline vertical conectado */
.theme-ia .tech-list li {
    position: relative;
    border: 0;
    padding: 0 0 30px;
}

.theme-ia .tech-list li:last-child { border: 0; padding-bottom: 0; }

.theme-ia .tech-list li::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 4px;
    width: 1px;
    background: linear-gradient(180deg, var(--accent), transparent);
    opacity: 0.5;
}

.theme-ia .tech-list li:last-child::before { display: none; }

.theme-ia .tech-list li i {
    border-radius: 50%;
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.06), 0 0 18px rgba(167, 139, 250, 0.25);
}

/* console do agente */
.chat-console .code-content { display: flex; flex-direction: column; gap: 14px; font-family: var(--font-sans); font-size: 0.92rem; }

.msg {
    max-width: 86%;
    padding: 12px 16px;
    border-radius: 10px;
    line-height: 1.55;
}

.msg small {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
}

.msg.user { align-self: flex-end; background: var(--surface-3); border-bottom-right-radius: 2px; }

.msg.agent {
    align-self: flex-start;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-bottom-left-radius: 2px;
}

.msg.tool {
    align-self: flex-start;
    max-width: 100%;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.msg.tool b { color: var(--accent); font-weight: 500; }

.typing-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dotBounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.cap-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px; border-top: 1px solid var(--line); }

.cap-chips span {
    padding: 4px 9px;
    font-size: 0.68rem;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
}

.cap-chips span.on { color: var(--accent); border-color: rgba(167, 139, 250, 0.45); }

/* --- D. TEMA: AUTOMAÇÕES (azul, fluxo de dados) ------------------------- */
body.theme-auto {
    --accent: #38bdf8;
    --accent-rgb: 56, 189, 248;
    --accent-ink: #021018;
    --accent-2: #818cf8;
}

.theme-auto .svc-hero-bg {
    background:
        radial-gradient(ellipse 55% 60% at 75% 45%, rgba(56, 189, 248, 0.14), transparent 65%),
        linear-gradient(180deg, #061019 0%, var(--bg) 85%);
}

/* trilhos horizontais, como esteiras de dados */
.theme-auto .svc-hero-bg::before {
    background: repeating-linear-gradient(0deg, transparent 0 55px, rgba(56, 189, 248, 0.06) 55px 56px);
    mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}

.flow {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.flow-node {
    --i: 0;
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    background: rgba(12, 16, 22, 0.9);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(6px);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    animation: flowGlow 6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 1.5s);
}

.flow-node > i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent);
    font-size: 1rem;
}

.flow-node b { display: block; color: var(--text); font-weight: 500; font-size: 0.86rem; margin-bottom: 2px; }
.flow-node .flow-ok { font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ok); }

.flow-link {
    --i: 0;
    position: relative;
    width: 2px;
    height: 34px;
    margin-left: 39px;
    background: var(--line-strong);
    overflow: hidden;
}

/* pacote de dados descendo pelo conector */
.flow-link::after {
    content: '';
    position: absolute;
    left: -2px;
    top: -14px;
    width: 6px;
    height: 14px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    opacity: 0;
    animation: packet 6s linear infinite;
    animation-delay: calc(var(--i) * 1.5s + 0.8s);
}

.theme-auto .float-chip.c1 { top: -16px; right: -10px; }
.theme-auto .float-chip.c2 { bottom: -16px; left: -14px; animation-delay: -3s; }

/* lista como etapas de um fluxo */
.theme-auto .tech-list li { position: relative; }
.theme-auto .tech-list li i { border-radius: 50%; }

/* --- E. TEMA: SISTEMAS (laranja, software sob medida) ------------------- */
body.theme-sys {
    --accent: #fb923c;
    --accent-rgb: 251, 146, 60;
    --accent-ink: #1a0c02;
    --accent-2: #facc15;
}

.theme-sys .svc-hero-bg {
    background:
        radial-gradient(ellipse 50% 60% at 78% 50%, rgba(251, 146, 60, 0.12), transparent 65%),
        var(--bg);
}

/* grade de pontos de planta técnica */
.theme-sys .svc-hero-bg::before {
    background-image:
        radial-gradient(circle, rgba(251, 146, 60, 0.22) 1px, transparent 1.4px),
        linear-gradient(rgba(251, 146, 60, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251, 146, 60, 0.035) 1px, transparent 1px);
    background-size: 32px 32px, 32px 32px, 32px 32px;
    background-position: -16px -16px, 0 0, 0 0;
    mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, #000 20%, transparent 75%);
}

.app {
    position: relative;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    background: #0a0d12;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 80px -40px rgba(251, 146, 60, 0.45);
}

.app-side { border-radius: var(--radius-lg) 0 0 var(--radius-lg); padding: 16px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.app-side .brand { display: flex; align-items: center; gap: 8px; padding: 0 8px 14px; color: var(--text); font-weight: 500; }
.app-side .brand img { width: 18px; height: 18px; }
.app-side span { padding: 8px; border-radius: var(--radius); }
.app-side span.on { background: rgba(251, 146, 60, 0.12); color: var(--accent); }

.app-main { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.app-top { display: flex; justify-content: space-between; align-items: center; color: var(--text); font-size: 0.8rem; }
.app-top em { font-style: normal; padding: 4px 8px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-size: 0.66rem; }

.app-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.app-kpis div { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.app-kpis b { display: block; color: var(--text); font-size: 1.05rem; font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; }

.app-chart { display: flex; align-items: flex-end; gap: 4px; height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.app-chart i { flex: 1; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, var(--accent), rgba(251, 146, 60, 0.15)); transform-origin: bottom; animation: barGrow 1.2s var(--ease) both; }
.app-chart i:nth-child(2n) { animation-delay: 0.08s; }
.app-chart i:nth-child(3n) { animation-delay: 0.16s; }

.app-rows { display: flex; flex-direction: column; }
.app-rows div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.app-rows div:last-child { border-bottom: 0; }
.app-rows span:first-child { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-rows .st { font-size: 0.62rem; letter-spacing: 0.08em; }
.app-rows .st.ok { color: var(--ok); }
.app-rows .st.go { color: var(--accent); }
.app-rows .st.wait { color: var(--dim); }

.app-note { position: absolute; right: 12px; bottom: 8px; font-size: 0.6rem; color: var(--dim); }

.theme-sys .float-chip.c1 { top: -18px; right: 24px; }
.theme-sys .rm-metrics strong { font-size: 1.1rem; }
.theme-sys .float-chip.c2 { bottom: -18px; left: 10%; animation-delay: -3s; }

/* lista em mosaico 2x2 */
.theme-sys .tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.theme-sys .tech-list li {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color var(--dur), transform var(--dur) var(--ease);
}

.theme-sys .tech-list li:last-child { border-bottom: 1px solid var(--line); }
.theme-sys .tech-list li:hover { border-color: rgba(251, 146, 60, 0.45); transform: translateY(-3px); }

@keyframes flowGlow {
    0%, 32%, 100% { border-color: var(--line-strong); box-shadow: none; }
    6%, 24% { border-color: rgba(var(--accent-rgb), 0.8); box-shadow: 0 0 28px -6px rgba(var(--accent-rgb), 0.55); }
}

@keyframes packet {
    0% { top: -14px; opacity: 0; }
    2% { opacity: 1; }
    11% { top: 34px; opacity: 1; }
    12%, 100% { top: 34px; opacity: 0; }
}

@keyframes barGrow { from { transform: scaleY(0); } }

@keyframes accentPing {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* --- F. TEMA: SITES (verde, construção de interface) -------------------- */
body.theme-web {
    --accent: #4ade80;
    --accent-rgb: 74, 222, 128;
    --accent-ink: #03140a;
    --accent-2: #22d3ee;
}

.theme-web .svc-hero-bg {
    background:
        radial-gradient(ellipse 50% 60% at 80% 50%, rgba(74, 222, 128, 0.1), transparent 65%),
        var(--bg);
}

/* grade de pixels fina */
.theme-web .svc-hero-bg::before {
    background-image:
        linear-gradient(rgba(74, 222, 128, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 222, 128, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(74, 222, 128, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 222, 128, 0.08) 1px, transparent 1px);
    background-size: 16px 16px, 16px 16px, 128px 128px, 128px 128px;
    mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
}

.theme-web .svc-hero h1 {
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: -0.06em;
}

.theme-web .svc-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
.tag-bracket { color: var(--dim); font-weight: 400; white-space: nowrap; }

.browser {
    position: relative;
    background: #0a0d12;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 80px -40px rgba(74, 222, 128, 0.4);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.browser-url {
    flex: 1;
    margin-left: 10px;
    padding: 5px 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
}

.browser-url i { color: var(--accent); margin-right: 6px; font-size: 0.65rem; }

.browser-body { padding: 18px; display: grid; gap: 12px; }

.sk {
    position: relative;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
    opacity: 0;
    animation: buildIn 0.6s var(--ease) forwards;
}

/* brilho de carregamento */
.sk::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.12), transparent);
    transform: translateX(-100%);
    animation: shimmer 2.4s ease-in-out infinite;
}

.sk-nav { height: 14px; width: 100%; display: flex; justify-content: space-between; background: none; }
.sk-nav::before, .sk-nav::after { content: none; }
.sk-nav b { display: block; height: 14px; border-radius: 3px; background: var(--surface-3); }
.sk-nav b:first-child { width: 60px; background: var(--accent); opacity: 0.8; }
.sk-nav b:last-child { width: 120px; }
.sk-hero { height: 110px; background: linear-gradient(135deg, rgba(74, 222, 128, 0.14), rgba(34, 211, 238, 0.06)); }
.sk-line { height: 10px; }
.sk-line.w70 { width: 70%; }
.sk-line.w45 { width: 45%; }
.sk-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: none; }
.sk-row::after { content: none; }
.sk-row div { height: 64px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }

.browser-body > :nth-child(1) { animation-delay: 0.2s; }
.browser-body > :nth-child(2) { animation-delay: 0.45s; }
.browser-body > :nth-child(3) { animation-delay: 0.7s; }
.browser-body > :nth-child(4) { animation-delay: 0.85s; }
.browser-body > :nth-child(5) { animation-delay: 1.1s; }

.phone {
    position: absolute;
    left: -36px;
    bottom: -40px;
    width: 128px;
    padding: 18px 10px 14px;
    background: #0a0d12;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    display: grid;
    gap: 7px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
    animation: floatY 7s ease-in-out infinite;
}

.phone::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    width: 30px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--surface-3);
}

.phone .sk { animation-delay: 1.3s; }
.phone .sk-hero { height: 60px; }
.phone .sk-line { height: 7px; }

.lighthouse {
    position: absolute;
    right: -20px;
    bottom: -34px;
    display: flex;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(5, 7, 10, 0.92);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(6px);
}

.score { display: grid; justify-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.6rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }

@property --pct {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

.ring {
    --pct: 100;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, #0a0d12 78%, transparent 80%),
        conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--surface-3) 0);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 500;
    animation: ringFill 1.8s var(--ease) 1s both;
}

/* lista estilo comentário de código */
.theme-web .tech-list li {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 0 16px 20px;
    border: 0;
    border-left: 1px solid var(--line-strong);
    transition: border-color var(--dur), background var(--dur);
}

.theme-web .tech-list li:last-child { border-bottom: 0; }
.theme-web .tech-list li:hover { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(74, 222, 128, 0.05), transparent); }
.theme-web .tech-list li i { display: none; }
.theme-web .tech-list li strong { font-family: var(--font-mono); font-weight: 500; font-size: 0.92rem; color: var(--accent); }
.theme-web .tech-list li strong::before { content: '// '; color: var(--dim); }

/* IDE */
.ide-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.74rem; }
.ide-tabs span { padding: 10px 16px; color: var(--dim); border-right: 1px solid var(--line); }
.ide-tabs span.active { color: var(--text); background: #090c11; box-shadow: inset 0 2px 0 var(--accent); }

.ide .code-content { padding: 18px 0; }
.ide pre { counter-reset: ln; }

.ide .ln { display: block; padding: 0 20px 0 0; }

.ide .ln::before {
    counter-increment: ln;
    content: counter(ln);
    display: inline-block;
    width: 44px;
    margin-right: 16px;
    padding-right: 12px;
    text-align: right;
    color: #3a4250;
    border-right: 1px solid var(--line);
}

.ide .ln.hl { background: rgba(74, 222, 128, 0.06); }

.caret {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    vertical-align: -0.2em;
    background: var(--accent);
    animation: blink 1s steps(2, start) infinite;
}

.ide .code-footer { background: var(--surface); }
.ide .code-footer b { color: var(--accent); font-weight: 500; }

/* --- G. KEYFRAMES --------------------------------------------------------- */
@keyframes cloudDrift { to { transform: translate3d(6%, -4%, 0) scale(1.08); } }

@keyframes nodeOn {
    0%, 100% { background: rgba(56, 189, 248, 0.04); border-color: rgba(56, 189, 248, 0.18); box-shadow: none; }
    35%, 60% { background: rgba(56, 189, 248, 0.6); border-color: var(--accent); box-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
}

@keyframes nodeIdle {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.8; }
}

@keyframes scaleLoad {
    0%, 100% { width: 38%; }
    45% { width: 84%; }
    60% { width: 78%; }
}

@keyframes dashFlow { from { stroke-dashoffset: 268; } to { stroke-dashoffset: 0; } }

@keyframes nodePulse {
    0%, 100% { transform: scale(1); fill: #0c0a18; }
    50% { transform: scale(1.25); fill: rgba(167, 139, 250, 0.55); }
}

@keyframes dotBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes buildIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

@keyframes ringFill { from { --pct: 0; } }

@keyframes spin { to { transform: rotate(360deg); } }

/* blip acende quando a varredura passa e se apaga devagar */
@keyframes blip {
    0% { opacity: 0; transform: scale(0.6); }
    3% { opacity: 1; transform: scale(1.3); }
    40% { opacity: 0.4; transform: scale(1); }
    70%, 100% { opacity: 0; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

@keyframes ringPulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(3); }
}

@keyframes rail { to { height: calc(50% - 4px); } }

@keyframes goldPing {
    0% { box-shadow: 0 0 0 0 rgba(232, 176, 75, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(232, 176, 75, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 176, 75, 0); }
}

@keyframes led { 50% { opacity: 0.25; } }

@keyframes meterJitter {
    0%, 100% { transform: scaleX(1); transform-origin: left; }
    50% { transform: scaleX(1.12); transform-origin: left; }
}

/* --- H. RESPONSIVIDADE --------------------------------------------------- */
@media (max-width: 1024px) {
    .svc-hero-inner,
    .theme-ia .svc-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 64px; }
    .theme-ia .svc-art { order: 0; }
    .svc-art { max-width: 560px; width: 100%; margin: 0 auto; }
    .svc-hero { min-height: 0; }
}

@media (max-width: 900px) {
    .service-wrapper { grid-template-columns: minmax(0, 1fr); gap: 56px; }
    .cta-box { grid-template-columns: 1fr; padding: 44px 32px; gap: 28px; }
    .cta-box .btn-primary { justify-self: start; }
    .svc-cta { padding: 88px 0 48px; }
}

@media (max-width: 768px) {
    .svc-hero { padding: calc(var(--nav-h) + 40px) 0 72px; }
    .svc-hero p { font-size: 1.02rem; margin-bottom: 32px; }
    .svc-hero .hero-buttons a { flex: 1 1 100%; }
    .breadcrumb { margin-bottom: 20px; }

    .float-chip.c1,
    .float-chip.c2 { display: none; }

    .theme-sys .tech-list { grid-template-columns: 1fr; }

    .phone { left: -6px; bottom: -30px; width: 104px; }
    .lighthouse { right: -4px; bottom: -40px; gap: 10px; padding: 10px 12px; }
    .ring { width: 36px; height: 36px; font-size: 0.7rem; }

    .meter { grid-template-columns: 64px 1fr 92px; gap: 10px; font-size: 0.72rem; }
    .code-content { padding: 18px; font-size: 0.76rem; }
    .ide .ln::before { width: 28px; margin-right: 10px; padding-right: 8px; }

    .svc-others { padding-bottom: 64px; }
    .svc-others-list a { flex: 1 1 calc(50% - 10px); min-height: 44px; justify-content: flex-start; }
}

@media (max-width: 480px) {
    .cta-box { padding: 36px 22px; }
    .cta-box .btn-primary { justify-self: stretch; }

    .app { grid-template-columns: 1fr; }
    .app-side { display: none; }
    .app-kpis b { font-size: 0.92rem; }

    .flow-node { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
    .flow-node > i { width: 40px; height: 40px; }
    .flow-node .flow-ok { display: none; }
    .flow-link { margin-left: 33px; }

    .rm-steps li { grid-template-columns: 1fr; gap: 4px; }
    .rm-steps em { justify-self: start; }
    .rm-metrics { grid-template-columns: 1fr; }
    .rm-metrics div + div { border-left: 0; border-top: 1px solid var(--line); }

    .ide-tabs span:nth-child(n+3) { display: none; }
    .msg { max-width: 94%; }
    .phone { display: none; }
    .lighthouse { position: static; margin-top: 16px; justify-content: center; }
}

