/* MasterByte — Modern Monochrome Theme */
:root {
  --bg: #0b0c0f;
  --bg-muted: #111216;
  --text: #e7e7ea;
  --muted: #b4b4b9;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --wa-green: #25D366;
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-head: 'Poppins', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 16px/1.65 var(--font-ui);
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #14161c 10%, transparent 60%),
              radial-gradient(1000px 500px at 120% -20%, #161922 8%, transparent 55%),
              var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (min-width: 1280px) { body { font-size: 17px; } }
@media (min-width: 1600px) { body { font-size: 18px; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }

.container { width: min(1280px, 94vw); margin-inline: auto; }
.narrow { width: min(980px, 94vw); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; border-radius: 999px; padding: .72rem 1.1rem; border: 1px solid var(--line);
  text-decoration: none; transition: transform .15s ease, opacity .15s ease, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-white { background: #fff; color: #111; }
.btn-white:hover { opacity: .92; }
.btn-dark { background: #000; color: #fff; }
.btn.dark { background: #000; }
.outline { background: transparent; color: var(--text); border-color: var(--text); }
.full { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg), #000 12%/ 85%);
  backdrop-filter: saturate(160%) blur(8px);
}
.header-inner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-logo { width: 80px; height: 80px; object-fit: contain; filter: none; image-rendering: -webkit-optimize-contrast; }
.brand-name { font-weight: 700; letter-spacing: .2px; font-family: var(--font-head); font-size: 1.35rem; }

.nav { display: inline-flex; gap: 1.25rem; justify-self: center; font-family: var(--font-ui); }
.nav a { position: relative; padding: .5rem .25rem; color: var(--muted); font-weight: 500; font-size: 1rem; letter-spacing: .2px; }
.nav a:hover { color: var(--text); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; opacity: 0; transform: scaleX(.5); transition: .2s; }
.nav a:hover::after, .nav a.is-active::after { opacity: .6; transform: scaleX(1); }

.cta { display: inline-flex; gap: .6rem; }

.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: currentColor; }

/* Hero */
.hero { padding: clamp(72px, 8vw, 120px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.hero-copy h1 { font-size: clamp(34px, 4.8vw, 66px); line-height: 1.05; margin: 0 0 16px; font-family: var(--font-head); }
.hero-copy p { margin: 0 0 24px; color: var(--muted); }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-chips { list-style: none; padding: 0; margin: 14px 0 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-chips a { display: inline-block; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 999px; color: var(--muted); font-size: .9rem; }
.hero-chips a:hover { color: var(--text); border-style: solid; }
.hero-proof { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; margin-top: 8px; }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: color-mix(in oklab, var(--bg), #fff 3%); border: 1px solid var(--line); border-radius: 999px; }
.hero-media img { filter: grayscale(1) brightness(.95) contrast(1.05); border-radius: 18px; box-shadow: var(--shadow); }

/* Section */
.section { padding: 72px 0; }
.section.muted { background: linear-gradient(180deg, transparent, rgba(255,255,255,.02)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-header { text-align: center; margin-bottom: 28px; }
.overline { text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-size: .8rem; margin: 0 0 8px; }
.section-header h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); }

/* Grid / Cards */
.grid { display: grid; gap: 22px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: color-mix(in oklab, var(--bg), #fff 4%); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,.45); }
.card-media { width: 100%; height: 240px; object-fit: cover; }
.bw { filter: grayscale(1) contrast(1.05); }
.card-body { padding: 18px; }
.card-body h3 { margin: 0 0 8px; font-size: 1.05rem; letter-spacing: .3px; }
.card-body p { margin: 0; color: var(--muted); }

/* Diferenciais */
.diffs .card-body h3 { font-size: 1.02rem; }

/* Processo */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.process li { background: color-mix(in oklab, var(--bg), #fff 3%); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; }
.process li::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #000; color: #fff; font-weight: 700; }
.process strong { font-size: 1rem; }
.process span { color: var(--muted); font-size: .92rem; }

/* Área do Cliente */
.client-wrap { }
.client-card { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.client-form, .client-help { background: color-mix(in oklab, var(--bg), #fff 3%); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.client-form .field { display: grid; gap: 8px; margin-bottom: 12px; }
.client-form label { font-size: .86rem; color: #fff; }
.client-form input { width: 100%; background: #0f1014; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .9rem .9rem; outline: none; }
.client-form input:focus { border-color: #fff; }
.client-form .inline { display: flex; justify-content: space-between; align-items: center; }
.checkbox { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.form-note { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }

.client-help { display: grid; gap: 14px; }
.help-item { padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.help-item h3 { margin: 0 0 6px; font-size: 1rem; }
.help-item p { margin: 0; color: var(--muted); }

/* Contato */
.contact-grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
.contact-info { display: grid; gap: 12px; }
.info-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in oklab, var(--bg), #fff 3%); }
.info-item strong { display: block; font-size: .85rem; color: #fff; }
.info-item span { color: var(--muted); }

.form { background: color-mix(in oklab, var(--bg), #fff 3%); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.form-grid { grid-template-columns: 1fr 1fr; }
.form-grid .col-span-2 { grid-column: 1 / -1; }
.form input, .form textarea { width: 100%; background: #0f1014; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .9rem .9rem; outline: none; }
.form input:focus, .form textarea:focus { border-color: #fff; }
.form button { width: 100%; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #0a0b0d; padding: 26px 0; text-align: center; color: var(--muted); }

/* WhatsApp Floating Button + Chat */
.wa-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; justify-items: end; }
.wa-btn { width: 68px; height: 68px; border-radius: 50%; background: var(--wa-green); color: #fff; display: grid; place-items: center; border: none; box-shadow: 0 10px 28px rgba(0,0,0,.35); cursor: pointer; }
.wa-btn:hover { filter: brightness(1.06); }
.wa-chat { width: min(94vw, 380px); background: #0f1014; color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.wa-chat[hidden] { display: none !important; }
.wa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: color-mix(in oklab, var(--bg), #fff 3%); border-bottom: 1px solid var(--line); }
.wa-id { display: inline-flex; align-items: center; gap: 10px; }
.wa-id img { width: 40px; height: 40px; border-radius: 50%; filter: none; background: #fff; padding: 4px; border: 1px solid var(--line); object-fit: contain; }
.wa-id strong { display: block; font-size: 1.06rem; line-height: 1.1; }
.wa-id span { display: block; font-size: .86rem; color: var(--muted); }
.wa-close { background: transparent; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.wa-body { padding: 12px; display: grid; gap: 10px; max-height: 240px; overflow: auto; }
.wa-bubble { max-width: 85%; padding: 10px 12px; border-radius: 12px; font-size: .95rem; }
.wa-bubble.bot { background: #1a1b20; border: 1px solid var(--line); }
.wa-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.wa-form input { background: #0f1014; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; outline: none; }
.wa-form input:focus { border-color: #fff; }
.wa-form button { background: var(--wa-green); color: #0a0b0d; border: none; border-radius: 10px; padding: .7rem 1rem; font-weight: 600; cursor: pointer; }
.wa-form button:hover { filter: brightness(1.05); }

/* Responsive */
@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto auto 1fr auto; }
  .nav { display: none; }
  .cta { display: none; }
  .menu-toggle { display: inline-flex; justify-self: end; }
  .hero-grid { grid-template-columns: 1fr; }
  .brand-logo { width: 68px; height: 68px; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
}

/* Mobile nav */
.nav.open { position: fixed; inset: 60px 16px auto 16px; display: grid; gap: 10px; padding: 14px; background: #0f1014; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.nav.open a { padding: 14px 8px; border-bottom: 1px dashed var(--line); }
.nav.open a:last-child { border: 0; }

@media (max-width: 860px) { .client-card { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cards-3 { grid-template-columns: 1fr; } .contact-grid { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } .process { grid-template-columns: 1fr; } }

/* A11y: visible keyboard focus */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
button:focus-visible, a.btn:focus-visible, .menu-toggle:focus-visible { outline-color: #fff; }

/* A11y: comfortable tap targets */
.btn, .menu-toggle, .nav a { min-height: 44px; }

/* Clients (grid baseline) */
.clients { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: center; list-style: none; padding: 0; margin: 0; }
.clients img { width: 100%; height: 60px; object-fit: contain; filter: grayscale(1) contrast(1.1) brightness(.9); opacity: .8; transition: .2s; }

/* Clients slider override */
.clients-wrap { position: relative; overflow: hidden; }
.clients-wrap::before, .clients-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 56px; pointer-events: none; z-index: 2; }
.clients-wrap::before { left: 0; background: linear-gradient(90deg, #0b0c0f, rgba(11,12,15,0)); }
.clients-wrap::after { right: 0; background: linear-gradient(270deg, #0b0c0f, rgba(11,12,15,0)); }
.clients-wrap .clients { display: flex; gap: 22px; transition: transform 520ms ease; will-change: transform; align-items: center; }
.clients-wrap .clients li { flex: 0 0 auto; width: clamp(140px, 16vw, 200px); height: clamp(70px, 8vw, 96px); display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in oklab, var(--bg), #fff 3%); transition: transform .35s ease, border-color .35s ease, background .35s ease; }
.clients-wrap .clients img { width: 100%; height: 64px; object-fit: contain; filter: grayscale(1) contrast(1.1) brightness(.9); opacity: .7; transition: transform .35s ease, filter .35s ease, opacity .35s ease; }
.clients-wrap .clients li.active { transform: scale(1.06); border-color: rgba(255,255,255,.12); background: color-mix(in oklab, var(--bg), #fff 6%); }
.clients-wrap .clients li.active img { filter: none; opacity: 1; transform: scale(1.08); }

@media (max-width: 980px) {
  .clients-wrap .clients li { width: 140px; height: 80px; }
  .clients-wrap .clients img { height: 56px; }
}
@media (max-width: 700px) {
  .clients-wrap .clients li { width: 120px; height: 70px; }
  .clients-wrap .clients img { height: 52px; }
}
