/* JMDC core — identidade compartilhada por todas as páginas de jmdc.com.br.
   Preto carvão domina, marrons dão profundidade, cobre só onde há ação. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --coal: #11100F;
  --coal-2: #161412;
  --obsidian: #211913;
  --obsidian-2: #2a2019;
  --bronze: #65452F;
  --copper: #C18A55;
  --copper-hi: #D9A673;
  --mineral: #D9D0C5;
  --ivory: #F5F1EB;

  --line: rgba(193, 138, 85, .16);
  --line-2: rgba(193, 138, 85, .32);
  --muted: rgba(217, 208, 197, .66);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --maxw: 77.5rem;
  --radius: 0.25rem;
  --header-h: 4.5rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--coal);
  color: var(--mineral);
  font-family: var(--f-display);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* anti-cópia: texto não selecionável fora de campos e blocos de código/configuração */
html[data-guard="strict"] body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, pre, code, [data-allow-copy] { -webkit-user-select: text; user-select: text; }
::selection { background: var(--copper); color: var(--coal); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 0.1875rem; border-radius: 2px; }

/* grão sutil: dá textura de metal escovado sem imagem externa */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
.c-copper { color: var(--copper); }
.c-dim { color: rgba(217, 208, 197, .42); }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.noscript { padding: 0.5rem var(--gutter); background: var(--obsidian); font-size: 0.875rem; }

.skip {
  position: absolute; left: 1rem; top: -3.75rem; z-index: 300;
  padding: 0.625rem 1rem; background: var(--copper); color: var(--coal); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--copper);
}
.eyebrow__dot { width: 0.375rem; height: 0.375rem; background: var(--copper); box-shadow: 0 0 0 0.25rem rgba(193, 138, 85, .14); }
.label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 400; }

/* ---------- botões ---------- */
.btn {
  --b: var(--copper);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 3rem; padding: 0 1.375rem;
  font: 600 0.9375rem/1 var(--f-display); font-stretch: 105%; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--b); border-radius: var(--radius);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease), border-color .3s, transform .3s var(--ease);
}
.btn .ico { transition: transform .3s var(--ease); }
.btn:hover .ico { transform: translateX(0.1875rem); }
.btn--copper { background: var(--copper); color: var(--coal); }
.btn--copper::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 240, 220, .45) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn--copper:hover::after { transform: translateX(120%); }
.btn--ghost { background: transparent; color: var(--ivory); --b: var(--line-2); }
.btn--ghost:hover { --b: var(--copper); color: var(--copper-hi); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: var(--copper); text-decoration: none; text-transform: uppercase; letter-spacing: .1em;
}
.link-arrow:hover .ico { transform: translateX(0.25rem); }
.link-arrow .ico { transition: transform .3s var(--ease); }

/* ---------- header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 200;
  height: var(--header-h);
  transition: background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(17, 16, 15, .82);
  -webkit-backdrop-filter: blur(0.875rem) saturate(1.2);
  backdrop-filter: blur(0.875rem) saturate(1.2);
  border-bottom-color: var(--line);
}
.topbar__inner {
  height: 100%; max-width: 87.5rem; margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; margin-right: auto; }
.brand img { width: 5.25rem; height: auto; }
.brand__tag { font-size: 0.5938rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); padding-left: 0.75rem; border-left: 1px solid var(--line-2); }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav__list { display: flex; gap: clamp(0.875rem, 1.6vw, 1.625rem); }
.nav__list a {
  position: relative; display: block; padding: 0.375rem 0;
  font-size: 0.9062rem; font-weight: 500; text-decoration: none; color: var(--mineral); white-space: nowrap;
  transition: color .25s;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--copper); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav__list a:hover, .nav__list a[aria-current="page"] { color: var(--ivory); }
.nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__list a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { min-height: 2.625rem; padding: 0 1rem; font-size: 0.875rem; }

.noc { display: none; align-items: center; gap: 0.5rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.noc i, .pulse-dot {
  display: inline-block; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--copper);
  box-shadow: 0 0 0 0 rgba(193, 138, 85, .6); animation: pulse 2.2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 0.5625rem rgba(193, 138, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(193, 138, 85, 0); } }

.burger {
  display: none; width: 2.875rem; height: 2.875rem; padding: 0; place-items: center;
  background: transparent; color: var(--ivory); border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer;
}
.burger .ico { width: 1.375rem; height: 1.375rem; grid-area: 1 / 1; transition: opacity .2s, transform .3s var(--ease); }
.burger .ico--close { opacity: 0; transform: rotate(-90deg); }
.burger[aria-expanded="true"] .ico--open { opacity: 0; transform: rotate(90deg); }
.burger[aria-expanded="true"] .ico--close { opacity: 1; transform: none; }

@media (min-width: 1280px) { .noc { display: inline-flex; } }

@media (max-width: 1080px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 190;
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2rem;
    padding: 1.5rem var(--gutter) max(2rem, env(safe-area-inset-bottom));
    background: rgba(17, 16, 15, .97);
    -webkit-backdrop-filter: blur(1rem); backdrop-filter: blur(1rem);
    border-top: 1px solid var(--line);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .5s var(--ease), visibility 0s .5s;
    overflow-y: auto;
  }
  .nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .5s var(--ease); }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__list a { padding: 1rem 0; font-size: clamp(1.375rem, 6vw, 1.875rem); font-weight: 600; font-stretch: 110%; color: var(--ivory); }
  .nav__list a::after { display: none; }
  .nav__cta { min-height: 3.375rem; font-size: 1rem; }
  .topbar.menu-open { background: var(--coal); border-bottom-color: var(--line); }
}

/* ---------- seções ---------- */
.section { padding-block: clamp(4.5rem, 12vh, 8.75rem); position: relative; }
.section--panel { background: linear-gradient(180deg, var(--obsidian), #1a1410); border-block: 1px solid var(--line); }
.section__head { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.section__head--wide { max-width: 51.25rem; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.section__head--row { flex-direction: row; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.section__head--row > div { display: flex; flex-direction: column; gap: 1.25rem; }
.section__title { font-size: clamp(1.875rem, 2.6vw + 1rem, 3.625rem); font-stretch: 110%; letter-spacing: -.03em; text-wrap: balance; max-width: 18ch; }
.section__lead { color: var(--muted); max-width: 52ch; font-size: clamp(0.9375rem, 1rem + .15vw, 1.125rem); }

.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split .section__head { position: sticky; top: calc(var(--header-h) + 2rem); }

.section__title { color: var(--ivory); margin: 0; font-weight: 700; line-height: 1.04; }
.section__lead { margin: 0; }

/* ---------- cabeçalho de página interna (Network Engineering: grade técnica + topologia) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(3rem, 9vh, 6rem)) 0 clamp(3rem, 7vh, 5rem);
  background:
    radial-gradient(55% 70% at 85% 20%, rgba(101, 69, 47, .42), transparent 70%),
    linear-gradient(180deg, #14110f, var(--coal));
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 4rem 4rem; opacity: .4;
  -webkit-mask-image: radial-gradient(80% 90% at 75% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(80% 90% at 75% 30%, #000 10%, transparent 75%);
}
.page-hero__inner { position: relative; display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.page-hero__title {
  margin: 0; color: var(--ivory);
  font-size: clamp(2.25rem, 3.4vw + 1.2rem, 4.75rem); font-weight: 800; font-stretch: 112%;
  letter-spacing: -.035em; line-height: 1; text-wrap: balance; max-width: 20ch;
}
.page-hero__title em { font-style: normal; color: var(--copper); }
.page-hero__lead { margin: 0; color: var(--muted); max-width: 60ch; font-size: clamp(1rem, 1rem + .3vw, 1.1875rem); }
.crumbs { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(217, 208, 197, .45); }
.crumbs a { color: var(--copper); text-decoration: none; }
.crumbs a:hover { color: var(--copper-hi); }

/* ---------- contato ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__copy { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.channels { display: grid; gap: 0.875rem; margin-top: 0.5rem; }
.channels li { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--muted); font-size: 0.9375rem; }
.channels .ico { color: var(--copper); margin-top: 0.1875rem; }
.channels a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.channels a:hover { border-color: var(--copper); }

.console { background: var(--coal); border: 1px solid var(--line-2); border-radius: 0.375rem; overflow: hidden; box-shadow: 0 2.5rem 5rem -2.5rem rgba(0, 0, 0, .9); }
.console__bar { display: flex; align-items: center; gap: 0.4375rem; padding: 0.75rem 1rem; background: #0c0b0a; border-bottom: 1px solid var(--line); }
.console__bar span { width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--bronze); }
.console__bar span:first-child { background: var(--copper); }
.console__bar em { font-style: normal; margin-left: 0.625rem; font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console__body { display: grid; gap: 1.125rem; padding: clamp(1.25rem, 3vw, 2rem); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem; }
.field { display: grid; gap: 0.5rem; }
.field__label { font-size: 0.7188rem; text-transform: uppercase; letter-spacing: .12em; color: var(--copper); }
.field__label::before { content: "> "; color: rgba(217, 208, 197, .35); }
.field input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), .field textarea {
  width: 100%; padding: 0.8125rem 0.875rem;
  font: 1rem/1.4 var(--f-display); color: var(--ivory);
  background: var(--coal-2); border: 1px solid rgba(193, 138, 85, .2); border-radius: var(--radius);
  transition: border-color .25s, background .25s, box-shadow .25s;
  resize: vertical;
}
.field textarea { min-height: 7.5rem; }
.field input::placeholder, .field textarea::placeholder { color: rgba(217, 208, 197, .32); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--copper); background: #1b1714; box-shadow: 0 0 0 0.1875rem rgba(193, 138, 85, .15); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b4553a; }
.hp { position: absolute !important; left: -624.9375rem; width: 1px; height: 1px; overflow: hidden; }
.console__status { min-height: 1.2em; font-size: 0.8125rem; color: var(--copper-hi); }
.console__status.is-error { color: #e08a6d; }

/* ---------- rodapé ---------- */
.footer { border-top: 1px solid var(--line); padding-top: clamp(3rem, 8vh, 5rem); background: #0d0c0b; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer__brand { display: grid; gap: 1rem; align-content: start; max-width: 36ch; }
.footer__brand img { width: 6rem; }
.footer__brand p { color: var(--muted); font-size: 0.9062rem; }
.footer__nav { display: grid; gap: 0.875rem; align-content: start; }
.footer__nav ul { display: grid; gap: 0.625rem; }
.footer__nav a { text-decoration: none; color: var(--mineral); font-size: 0.9375rem; transition: color .25s; }
.footer__nav a:hover { color: var(--copper-hi); }
.footer__base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  padding-block: 1.375rem calc(1.375rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: 0.75rem; color: rgba(217, 208, 197, .45);
}

/* ---------- WhatsApp flutuante ---------- */
.fab {
  position: fixed; right: max(1.125rem, env(safe-area-inset-right)); bottom: max(1.125rem, env(safe-area-inset-bottom)); z-index: 150;
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem;
  background: var(--copper); color: var(--coal); border-radius: 50%;
  box-shadow: 0 0.75rem 1.875rem -0.5rem rgba(193, 138, 85, .55);
  transition: transform .3s var(--ease), opacity .3s;
}
.fab .ico { width: 1.625rem; height: 1.625rem; stroke-width: 1.8; }
.fab:hover { transform: translateY(-0.1875rem) scale(1.04); }
.fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--copper); animation: ripple 2.8s infinite; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
body.menu-lock .fab { opacity: 0; pointer-events: none; }

/* ---------- escudo anti-inspeção ---------- */
.shield {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 1.5rem;
  background: rgba(10, 9, 8, .92);
  -webkit-backdrop-filter: blur(1.125rem); backdrop-filter: blur(1.125rem);
}
.shield[hidden] { display: none; }
.shield__box { max-width: 26.25rem; text-align: center; display: grid; gap: 0.875rem; justify-items: center; padding: 2.25rem 1.75rem; border: 1px solid var(--line-2); background: var(--obsidian); }
.shield__ico { width: 2.75rem; height: 2.75rem; color: var(--copper); }
.shield__title { font-size: 1.5rem; font-weight: 700; font-stretch: 110%; color: var(--ivory); }
.shield .mono { font-size: 0.8125rem; color: var(--muted); }
body.is-guarded > :not(.shield):not(.sprite) { filter: blur(0.875rem); }

/* ---------- revelação no scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(1.625rem); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* listas e imagens dos componentes compartilhados (sem reset global: páginas de ferramenta têm o próprio CSS) */
.nav__list, .footer ul, .channels, .tags { list-style: none; margin: 0; padding: 0; }
.footer p, .channels p { margin: 0; }
.brand img, .footer img { display: block; max-width: 100%; height: auto; }

/* isola o cabeçalho e o rodapé novos das regras legadas "header {}" / "footer {}" das ferramentas */
header.topbar { display: block; width: auto; padding: 0; margin: 0; justify-content: normal; box-shadow: none; }
header.topbar:not(.is-scrolled):not(.menu-open) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
footer.footer { display: block; text-align: left; padding-inline: 0; padding-bottom: 0; margin: 0; width: auto; font-size: 1rem; color: var(--mineral); }
footer.footer a { color: var(--mineral); }

@media (max-width: 900px) {
  :root { --header-h: 4rem; }
  .split, .contact { grid-template-columns: 1fr; }
  .split .section__head { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .brand__tag { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .fab { width: 3.25rem; height: 3.25rem; }
}
@media (max-width: 380px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* escala automática: acima de 100rem tudo em rem cresce junto com a tela (2K, 4K, ultrawide) */
@media (min-width: 1600px) { html { font-size: calc(16px + (100vw - 1600px) * .0085); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* impressão bloqueada nas páginas públicas; geradores de PDF (data-guard="app") imprimem normalmente */
@media print {
  html[data-guard="strict"] body * { display: none !important; }
  html[data-guard="strict"] body::after { content: "Conteúdo protegido · JMDC Consulting and Technology · jmdc.com.br"; display: block; padding: 2.5rem; font: 16px sans-serif; color: #000; }
}
