/* =========================================================
   Brm Digital — Refined Technical Corporate
   Design system: deep navy canvas · electric blue accent
   Display: Space Grotesk · Body: IBM Plex Sans · Labels: IBM Plex Mono
   ========================================================= */

:root {
  /* Color story */
  --navy-900: #070b16;
  --navy-850: #0a1020;
  --navy-800: #0e1730;
  --navy-700: #16223f;
  --line-dark: rgba(255, 255, 255, 0.08);

  --paper: #f6f7fb;
  --paper-card: #ffffff;
  --line: #e4e8f0;

  --ink: #0e1730;
  --ink-soft: #475069;
  --ink-mute: #717a90;

  --accent: #4f8cff;
  --accent-bright: #6fa3ff;
  --accent-deep: #2563eb;
  --accent-soft: #eaf1ff;

  --wa: #25d366;
  --wa-dark: #1eb858;

  /* Rhythm */
  --container: 1180px;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --radius: 18px;
  --radius-sm: 12px;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Shared type pieces ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  margin-bottom: 1.1rem;
}
.eyebrow .num { color: var(--accent-deep); font-weight: 500; }
.eyebrow--accent { color: var(--accent-bright); }
.eyebrow--accent .num { color: var(--accent-bright); }

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.section__title--light { color: var(--ink); }

.text-accent { color: var(--accent-bright); }

.prose { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 54ch; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose--muted { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn svg { transition: transform .2s ease; }
.btn--primary {
  background: var(--accent-deep);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(37, 99, 235, 0.7);
}
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn--whatsapp {
  background: var(--wa);
  color: #fff;
  margin-top: 2rem;
  box-shadow: 0 12px 30px -12px rgba(37, 211, 102, 0.7);
}
.btn--whatsapp:hover { background: var(--wa-dark); transform: translateY(-2px); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-block: 1.4rem;
  transition: background .3s ease, padding .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(246, 247, 251, 0.85);
  backdrop-filter: blur(12px);
  padding-block: 0.8rem;
  box-shadow: 0 1px 0 rgba(14, 23, 48, 0.04);
  border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 0.7rem; }
.logo__mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--accent-deep);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(37, 99, 235, 0.9);
  transition: transform .2s ease;
}
.logo:hover .logo__mark { transform: rotate(-6deg) scale(1.04); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo__tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 0.28rem;
}
/* On transparent (top of hero) the header text is light */
.site-header:not(.is-scrolled) .logo__name { color: #fff; }
.site-header:not(.is-scrolled) .logo__tag { color: rgba(255, 255, 255, 0.6); }
.site-header:not(.is-scrolled) .nav a { color: rgba(255, 255, 255, 0.8); }
.site-header:not(.is-scrolled) .nav-toggle { color: #fff; }
.logo--light .logo__name { color: #fff; }
.logo--light .logo__tag { color: rgba(255, 255, 255, 0.55); }

/* Nav */
.nav { display: flex; gap: 2rem; }
.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-block: 0.2rem;
  transition: color .2s ease;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { width: 100%; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--ink);
  padding: 0.3rem;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-close { display: block; }

.mobile-menu[hidden] { display: none; }
.mobile-menu {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 20px 40px -20px rgba(14, 23, 48, 0.25);
}
.mobile-menu a {
  padding: 1rem var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 500;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--accent); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: radial-gradient(120% 120% at 80% -10%, var(--navy-700) 0%, var(--navy-850) 45%, var(--navy-900) 100%);
  color: #fff;
  overflow: hidden;
}
/* Differentiation anchor: technical circuit grid */
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79, 140, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 140, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 80% at 70% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 80% at 70% 20%, #000 30%, transparent 75%);
}
.hero__glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; padding-block: 8rem 4rem; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 16ch;
}
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: rgba(255, 255, 255, 0.72);
  max-width: 52ch;
  margin-bottom: 2.4rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* =========================================================
   SECTIONS (generic)
   ========================================================= */
.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section--paper { background: var(--paper); }
.section--dark {
  background:
    radial-gradient(100% 140% at 10% 0%, var(--navy-800) 0%, var(--navy-900) 60%);
  color: #fff;
}
.section--dark .eyebrow { color: rgba(255, 255, 255, 0.6); }
.section--dark .section__title--light { color: #fff; }
.section__head { max-width: 40ch; margin-bottom: 3.2rem; }

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.fact {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}
.fact__icon {
  flex-shrink: 0;
  color: var(--accent-deep);
  display: grid; place-items: center;
  width: 42px; height: 42px;
  background: var(--accent-soft);
  border-radius: 10px;
}
.fact h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.fact p { font-size: 0.86rem; color: var(--ink-mute); line-height: 1.5; }

/* About visual — code card on a tilted accent panel (broken grid moment) */
.about__visual { position: relative; min-height: 360px; }
.about__panel {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.about__panel::before {
  content: '';
  position: absolute; inset: 8% 6%;
  background: linear-gradient(135deg, var(--accent-soft), #dde9ff);
  border-radius: 22px;
  transform: rotate(3deg);
  box-shadow: 0 30px 60px -30px rgba(37, 99, 235, 0.45);
}
.codecard {
  position: relative;
  width: min(100%, 420px);
  background: var(--navy-850);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  box-shadow: 0 30px 70px -30px rgba(7, 11, 22, 0.6);
  overflow: hidden;
}
.codecard__bar {
  display: flex; gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-dark);
}
.codecard__bar span { width: 11px; height: 11px; border-radius: 50%; background: #2c3a5c; }
.codecard__bar span:first-child { background: #ff5f57; }
.codecard__bar span:nth-child(2) { background: #febc2e; }
.codecard__bar span:nth-child(3) { background: #28c840; }
.codecard__body {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.85;
  color: #c3cde0;
  padding: 1.3rem 1.4rem;
  white-space: pre;
  overflow-x: auto;
}
.c-key { color: var(--accent-bright); }
.c-str { color: #7ee0a8; }
.c-ok { color: #febc2e; }

/* =========================================================
   SERVICES
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.card {
  padding: 1.8rem 1.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 140, 255, 0.45);
  background: rgba(79, 140, 255, 0.06);
}
.card--primary {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0.05));
  border-color: rgba(79, 140, 255, 0.5);
}
.card__icon {
  display: grid; place-items: center;
  width: 50px; height: 50px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-bright);
  margin-bottom: 1.2rem;
}
.card--primary .card__icon { background: var(--accent-deep); color: #fff; }
.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  margin-bottom: 0.6rem;
}
.card__text { font-size: 0.92rem; color: rgba(255, 255, 255, 0.65); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy-850);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 40px 90px -50px rgba(7, 11, 22, 0.7);
}
.contact__info { padding: clamp(2rem, 4vw, 3.5rem); color: #fff; }
.contact .section__title--light { color: #fff; }
.contact .prose--muted { color: rgba(255, 255, 255, 0.7); }
.contact__list { list-style: none; margin-top: 2.2rem; display: grid; gap: 1.5rem; }
.contact__list li { display: flex; align-items: center; gap: 1rem; }
.contact__icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent-bright);
}
.contact__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.contact__value { display: block; font-size: 1.05rem; font-weight: 500; }
.contact__value--link { transition: color .2s ease; }
.contact__value--link:hover { color: var(--accent-bright); }
.contact__map { min-height: 340px; background: #dfe4ee; }
.contact__map iframe { width: 100%; height: 100%; filter: grayscale(0.2) contrast(1.05); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.55);
  padding-block: 3.5rem;
  border-top: 1px solid var(--line-dark);
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}
.footer__nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.footer__nav a { font-size: 0.92rem; transition: color .2s ease; }
.footer__nav a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem;
}

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.fab-whatsapp {
  position: fixed;
  bottom: 1.6rem; right: 1.6rem;
  z-index: 60;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(37, 211, 102, 0.7);
  transition: transform .2s ease, background .2s ease;
}
.fab-whatsapp:hover { background: var(--wa-dark); transform: scale(1.08); }
.fab-whatsapp:focus-visible { outline: 4px solid rgba(37, 211, 102, 0.4); outline-offset: 2px; }

/* =========================================================
   SUBPAGES (legal / atendimento)
   ========================================================= */
.subpage-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 251, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-block: 0.9rem;
}
.subpage-header .header__inner {
  display: flex; align-items: center; justify-content: space-between;
}
.back-link {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-display);
  font-weight: 500; font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.back-link svg { transition: transform .2s ease; }
.back-link:hover { color: var(--accent); }
.back-link:hover svg { transform: translateX(-3px); }

.legal { padding-block: clamp(3rem, 7vw, 5rem); background: var(--paper); }
.legal__inner { max-width: 820px; }
.legal h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 0.7rem;
}
.legal__updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-bottom: 2.4rem;
}
.legal__lead { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 1rem; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-top: 2.6rem;
  margin-bottom: 0.9rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--line);
}
.legal h2 .num {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-right: 0.6ch;
}
.legal h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
  margin: 1.6rem 0 0.5rem;
}
.legal p { color: var(--ink-soft); margin-bottom: 1rem; }
.legal ul, .legal ol { color: var(--ink-soft); margin: 0 0 1.2rem 1.25rem; }
.legal li { margin-bottom: 0.5rem; padding-left: 0.3rem; }
.legal a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent); }
.legal strong { color: var(--ink); }
.legal__card {
  margin-top: 1.4rem;
  padding: 1.4rem 1.5rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.legal__card p { margin-bottom: 0.35rem; font-size: 0.94rem; }
.legal__card p:last-child { margin-bottom: 0; }

/* Atendimento — grade de canais */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2.2rem 0;
}
.support-card {
  padding: 1.6rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: transform .2s ease, border-color .2s ease;
}
.support-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.support-card__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  margin-bottom: 1rem;
}
.support-card h3 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.support-card p { color: var(--ink-mute); font-size: 0.9rem; margin-bottom: 0.5rem; }
.support-card a { font-weight: 500; color: var(--accent-deep); }
.support-card a:hover { color: var(--accent); }

/* Links legais no rodapé */
.footer__legal {
  display: flex; gap: 1.6rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
}
.footer__legal a {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  transition: color .2s ease;
}
.footer__legal a:hover { color: var(--accent-bright); }

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   FOCUS / ACCESSIBILITY
   ========================================================= */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__visual { min-height: 320px; order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
  .contact__map { min-height: 300px; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .cards { grid-template-columns: 1fr; }
  .hero__inner { padding-block: 7rem 3.5rem; }
  .footer__bottom { flex-direction: column; }
  .support-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .fab-whatsapp:hover, .logo:hover .logo__mark { transform: none; }
}
