/* ===================================================================
   BABG — styles.css
   Paleta "Monster Ultra Branca": branco + cinza/preto, acento azul-claro.
   Organizado por secções.
==================================================================== */

/* ----------------------------- Tokens ----------------------------- */
:root {
  /* Fundos */
  --bg:           #FFFFFF;
  --bg-alt:       #F4F5F7;
  --bg-dark:      #111315;
  --platinum:     #ECEEF1; /* cinzento claro do footer — ligeiramente mais claro */

  /* Acento azul-claro */
  --accent:       #7FC9E8;
  --accent-strong:#4FB3DD;
  --accent-soft:  #EAF6FC;

  /* Texto */
  --text:         #111315;
  --text-soft:    #8A8D91;
  --text-on-dark: #F4F5F7;

  /* Linhas / bordas */
  --line:         #E6E7E9;

  /* Sombras subtis */
  --shadow-sm: 0 4px 16px rgba(17, 19, 21, .05);
  --shadow-md: 0 12px 32px rgba(17, 19, 21, .08);
  --halo:      0 0 0 4px rgba(127, 201, 232, .25);

  /* Raio */
  --r-sm: 12px;
  --r:    16px;
  --r-lg: 24px;

  /* Tipografia */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: 24px;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ----------------------------- Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ----------------------------- Layout ----------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section--alt { background: var(--bg-alt); }

.accent { color: var(--accent-strong); }
.light  { font-weight: 400; color: var(--text); }

/* Eyebrow */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

/* Cabeçalho de secção */
.section__head { max-width: 760px; margin-inline: auto; text-align: center; margin-bottom: 3.5rem; }
.section__head--left { margin-inline: 0; text-align: left; }

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section__lead {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-top: 1.25rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.btn--accent { background: var(--accent); color: var(--text); }
.btn--accent:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--halo); }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ===================================================================
   1. HEADER
==================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: box-shadow .3s var(--ease), background .3s var(--ease), backdrop-filter .3s var(--ease);
}
.header.is-scrolled {
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header__logo img { height: 38px; width: auto; }

.header__right { display: flex; align-items: center; gap: 1.5rem; }
.nav__list { display: flex; gap: 2rem; }

/* Botão de idioma PT/EN */
.lang-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .42rem .85rem;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--text);
  line-height: 1;
  transition: border-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent-strong); box-shadow: var(--halo); }
.nav__link {
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  padding-block: .25rem;
  color: var(--text);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent-strong);
  transition: width .3s var(--ease);
}
.nav__link:hover::after { width: 100%; }

/* Hambúrguer */
.hamburger { display: none; flex-direction: column; gap: 5px; width: 28px; padding: 4px; z-index: 110; }
.hamburger span {
  display: block; height: 2px; width: 100%;
  background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile fullscreen */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__list { display: flex; flex-direction: column; gap: 1.5rem; text-align: center; }
.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.mobile-menu.is-open .mobile-menu__link { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-menu__link:nth-child(1) { transition-delay: .08s; }
.mobile-menu__list li:nth-child(2) .mobile-menu__link { transition-delay: .12s; }
.mobile-menu__list li:nth-child(3) .mobile-menu__link { transition-delay: .16s; }
.mobile-menu__list li:nth-child(4) .mobile-menu__link { transition-delay: .20s; }

/* ===================================================================
   2. HERO
==================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 55%;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 8.5rem);
  line-height: .98;
  letter-spacing: -0.03em;
}
.hero__title span { display: block; }
.hero__title .accent { color: var(--accent); display: inline; }
.hero__light { font-weight: 400; display: inline; }

/* Anel decorativo */
.hero__ring {
  display: inline-block;
  width: clamp(40px, 6vw, 72px);
  height: clamp(40px, 6vw, 72px);
  border: 3px solid var(--accent);
  border-radius: 50%;
  vertical-align: middle;
  margin-left: .5rem;
  animation: ring-pulse 3.5s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.12); opacity: .55; }
}

/* ===================================================================
   3. COMO PODEMOS AJUDAR? (cards)
==================================================================== */
.help__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.section--alt .card { background: #fff; }
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md), var(--halo);
}
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 1.25rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: .6rem; }
.card__text { color: var(--text-soft); font-size: .98rem; margin-bottom: 1.25rem; }
.card__link { font-weight: 600; color: var(--accent-strong); display: inline-flex; gap: .35rem; }
.card__link .arrow { transition: transform .3s var(--ease); }
.card__link:hover .arrow { transform: translate(3px, -3px); }

/* ===================================================================
   4. O QUE FAZEMOS? (tabs)
==================================================================== */
.services__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.tabs { display: flex; flex-direction: column; gap: .75rem; }
.tab {
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  color: var(--text-soft);
  transition: all .3s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.is-active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: var(--halo);
  background: var(--accent-soft);
}

.panels { position: relative; }
.panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.25rem;
}
.panel[hidden] { display: none; }
.panel.is-active { animation: panel-in .45s var(--ease); }
@keyframes panel-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}
.panel__content p { color: var(--text-soft); margin-bottom: 1.5rem; }
.checklist { display: grid; gap: .65rem; margin-bottom: 1.75rem; }
.checklist li { position: relative; padding-left: 1.9rem; font-weight: 500; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 50%;
  font-size: .75rem; font-weight: 700;
}
.panel__visual { display: grid; place-items: center; }
.panel__svg { width: 100%; max-width: 280px; }

/* ===================================================================
   5. PLATAFORMAS (marquee)
==================================================================== */
.platforms { overflow: hidden; }
.platforms__title { margin-bottom: 3rem; }
.platforms__title .bold { font-weight: 700; }
.platforms__title .normal { font-weight: 400; }
.platforms__title .accent { color: var(--accent); }

.platforms__connectors {
  position: absolute;
  inset: 40% 0 auto 0;
  width: 100%; height: 200px;
  z-index: 0;
  pointer-events: none;
  opacity: .6;
}
.platforms__connectors path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 8 10;
  animation: dash-flow 18s linear infinite;
}
@keyframes dash-flow { to { stroke-dashoffset: -400; } }

.marquee {
  position: relative;
  z-index: 1;
  display: flex;
  overflow: hidden;
  padding-block: .75rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  will-change: transform;
}
.marquee[data-direction="left"]  .marquee__track { animation: marquee-left 38s linear infinite; }
.marquee[data-direction="right"] .marquee__track { animation: marquee-right 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-left  { from { transform: translateX(0); }      to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); }   to { transform: translateX(0); } }

.logo-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  /* estado inicial do pop-in */
  opacity: 0;
  transform: scale(.85);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.logo-card.is-in { opacity: 1; transform: scale(1); }
.logo-card svg { width: 24px; height: 24px; fill: var(--text-soft); transition: fill .35s var(--ease); }
.logo-card:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: var(--text);
}
.logo-card:hover svg { fill: var(--accent-strong); }

/* pulso azul-claro a percorrer a fila */
.marquee::after {
  content: "";
  position: absolute;
  top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(127,201,232,.18), transparent);
  animation: pulse-sweep 5s ease-in-out infinite;
  pointer-events: none;
}
.marquee[data-direction="right"]::after { animation-delay: 2.5s; }
@keyframes pulse-sweep { 0% { left: -30%; } 60%, 100% { left: 130%; } }

/* ===================================================================
   6. PROJETOS RECENTES (accordion)
==================================================================== */
.projects__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.projects__svg { width: 100%; max-width: 380px; margin-inline: auto; }
.projects__node { animation: node-float 5s ease-in-out infinite; transform-origin: center; }
.projects__node:nth-child(odd) { animation-delay: -2.5s; }
@keyframes node-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.accordion { display: grid; gap: .75rem; margin-top: 2rem; }
.accordion__item {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.accordion__item.is-open { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.accordion__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
}
.accordion__icon {
  position: relative;
  flex: 0 0 auto;
  width: 22px; height: 22px;
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 2px;
  background: var(--accent-strong);
  transform: translate(-50%, -50%);
  transition: transform .35s var(--ease);
}
.accordion__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.accordion__item.is-open .accordion__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
}
.accordion__body p { padding: 0 1.5rem 1.4rem; color: var(--text-soft); }

/* ===================================================================
   7. REVIEWS
==================================================================== */
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.review {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.review:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.review__quote {
  position: absolute;
  top: .5rem; right: 1.25rem;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: .5;
}
.review__stars { color: var(--accent-strong); letter-spacing: .15em; margin-bottom: 1rem; }
.review__text { font-size: .98rem; margin-bottom: 1.5rem; }
.review__author { display: flex; align-items: center; gap: .85rem; }
.review__avatar {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-family: var(--font-display);
}
.review__meta { display: flex; flex-direction: column; font-size: .9rem; color: var(--text-soft); }
.review__meta strong { color: var(--text); font-size: .98rem; }

/* ===================================================================
   8. CONTACTO
==================================================================== */
.contact { background: var(--bg-alt); overflow: hidden; }
.contact__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.contact__inner { position: relative; z-index: 1; }

.form { max-width: 760px; margin-inline: auto; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form__group { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.form__group label { font-weight: 500; font-size: .92rem; margin-bottom: .5rem; }
.form input, .form textarea {
  font: inherit;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--text);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  resize: vertical;
}
.form input::placeholder, .form textarea::placeholder { color: #b8babd; }
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: var(--halo);
}
.form input.is-invalid, .form textarea.is-invalid { border-color: #e2557b; }
.form__error { color: #e2557b; font-size: .82rem; min-height: 1rem; margin-top: .3rem; }
.form__success {
  margin-top: 1rem;
  padding: .9rem 1.2rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  color: var(--text);
  font-weight: 600;
}
.form .btn--lg { width: 100%; justify-content: center; }

/* ===================================================================
   9. FOOTER
==================================================================== */
.footer { background: var(--platinum); color: var(--text); padding-block: 4rem 2rem; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(17,19,21,.10);
}
.footer__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  max-width: 14ch;
}
.footer__title .accent { color: var(--accent-strong); }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer__col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-strong); margin-bottom: 1rem; }
.footer__col li { margin-bottom: .65rem; }
.footer__col a { color: rgba(17,19,21,.65); font-size: .95rem; transition: color .25s var(--ease); }
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  flex-wrap: wrap;
}
.footer__logo img { height: 32px; width: auto; }
.footer__copy { color: rgba(17,19,21,.5); font-size: .88rem; }

/* Botão voltar ao topo */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .3s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-strong); transform: translateY(-3px); }

/* ===================================================================
   SCROLL REVEAL
==================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* ===================================================================
   RESPONSIVO
==================================================================== */
@media (max-width: 920px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .services__layout { grid-template-columns: 1fr; }
  .tabs { flex-direction: row; flex-wrap: wrap; }
  .tab { flex: 1 1 auto; text-align: center; }
  .projects__layout { grid-template-columns: 1fr; }
  .projects__visual { order: -1; max-width: 320px; margin-inline: auto; }
  .reviews__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .help__grid { grid-template-columns: 1fr; }
  .panel { grid-template-columns: 1fr; }
  .panel__visual { order: -1; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__cols { grid-template-columns: 1fr; }
}

/* ===================================================================
   PREFERS-REDUCED-MOTION
==================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .logo-card { opacity: 1; transform: none; }
}
