/* =========================================================================
   AMSTech — Design System
   Dark-first, tokens, componentes e animações (transform/opacity only)
   ========================================================================= */

:root {
  /* Cores base (amostradas da identidade) */
  --bg:            #0A0D0F;
  --bg-alt:        #0E1417;
  --surface:       #10181B;
  --surface-2:     #131E22;
  --aurora:        #0C2123;

  --teal:          #20A0A2;   /* teal da logo */
  --accent:        #23D6CC;   /* teal-sinal (destaque) */
  --accent-strong: #37E7DD;

  --text:          #F4F7F8;
  --text-soft:     #9BA8AE;
  --text-dim:      #63727A;
  --border:        rgba(35, 214, 204, .12);
  --border-soft:   rgba(255, 255, 255, .06);

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

  /* Escala fluida */
  --step--1: clamp(.82rem, .78rem + .2vw, .9rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3:  clamp(2.1rem, 1.6rem + 2.6vw, 3.6rem);
  --step-4:  clamp(2.6rem, 1.8rem + 3.6vw, 4.7rem);

  /* Espaço & forma */
  --container: 1180px;
  --gap: clamp(1rem, .6rem + 1.6vw, 1.6rem);
  --section-y: clamp(4.5rem, 3rem + 7vw, 9rem);
  --radius: 18px;
  --radius-sm: 12px;

  --shadow: 0 20px 60px -30px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px var(--border), 0 24px 70px -40px rgba(35, 214, 204, .5);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 72px;
}

/* ------------------------------ Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.4rem, var(--container)); margin-inline: auto; }

/* Utilidades de cor */
.tx-accent { color: var(--accent); }
.tx-muted  { color: var(--text-dim); }

/* Skip link */
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--accent); color: #04110f; padding: .6rem 1rem;
  border-radius: 8px; font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ------------------------------ Kicker / labels ------------------------------ */
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--step--1); font-weight: 600;
  text-transform: uppercase; letter-spacing: .22em;
  color: var(--accent); margin-bottom: 1.1rem;
}
.kicker::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ------------------------------ Buttons ------------------------------ */
.btn {
  --pad-y: .9rem; --pad-x: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px; font-weight: 600; font-size: var(--step-0);
  letter-spacing: -.01em; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  will-change: transform;
}
.btn__arrow { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--teal));
  color: #04110f;
  box-shadow: 0 10px 30px -12px rgba(35, 214, 204, .6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(35, 214, 204, .75); }

.btn--ghost {
  color: var(--text); border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02); backdrop-filter: blur(6px);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

.btn--sm { --pad-y: .6rem; --pad-x: 1.1rem; font-size: var(--step--1); }
.btn--lg { --pad-y: 1.05rem; --pad-x: 2rem; font-size: var(--step-1); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--accent); font-weight: 600; margin-top: 1.6rem;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ------------------------------ Brand mark ------------------------------ */
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); }
.brand__mark { width: auto; height: 34px; transition: transform .35s var(--ease), filter .35s var(--ease); }
.brand:hover .brand__mark { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(35, 214, 204, .55)); }
.brand__word { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; }
.brand__word b { font-weight: 700; }
.brand__word i { color: var(--accent); font-style: normal; }

/* ------------------------------ Progress bar ------------------------------ */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; background: transparent; }
.progress__bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--accent-strong)); box-shadow: 0 0 12px var(--accent); }

/* ------------------------------ Header ------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), height .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 13, 15, .72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border-soft);
  height: 62px;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(100% - 2.4rem, var(--container)); margin-inline: auto; }
.site-header__actions { display: flex; align-items: center; gap: .8rem; }

.nav { display: flex; gap: .3rem; }
.nav__link {
  position: relative; padding: .5rem .85rem; border-radius: 8px;
  color: var(--text-soft); font-size: var(--step--1); font-weight: 500;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .28rem; height: 2px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--text); }

/* Nav toggle (mobile) */
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------ Hero ------------------------------ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .9; }
.hero__aurora {
  position: absolute; z-index: 0; pointer-events: none; inset: 0;
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(32, 160, 162, .35), transparent 60%),
    radial-gradient(50% 50% at 12% 90%, rgba(35, 214, 204, .14), transparent 60%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
}
.hero__inner { position: relative; z-index: 2; max-width: 980px; }
.hero__title { font-size: var(--step-4); margin: .3rem 0 1.4rem; text-wrap: balance; }
.hero__lead { font-size: var(--step-1); color: var(--text-soft); max-width: 60ch; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.hero__stats {
  display: inline-flex; flex-wrap: wrap; gap: 0;
  margin-top: 3.2rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(16, 24, 27, .55); backdrop-filter: blur(10px);
  overflow: hidden;
}
.hero__stats li {
  position: relative; display: flex; flex-direction: column;
  padding: 1.1rem 1.8rem 1.1rem 2.4rem;
}
.hero__stats li + li { border-left: 1px solid var(--border-soft); }
.hero__stats li::before {
  content: ""; position: absolute; left: 1.1rem; top: 1.55rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: stat-pulse 2.6s var(--ease) infinite;
}
.hero__stats li:nth-child(2)::before { animation-delay: .4s; }
.hero__stats li:nth-child(3)::before { animation-delay: .8s; }
@keyframes stat-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.hero__stats strong { font-family: var(--font-display); font-size: var(--step-1); color: var(--text); line-height: 1.1; }
.hero__stats span { font-size: var(--step--1); color: var(--text-soft); margin-top: .25rem; letter-spacing: .02em; }

.hero__scroll { position: absolute; left: 50%; bottom: 1.6rem; z-index: 2; transform: translateX(-50%); width: 26px; height: 42px; border: 1px solid var(--border); border-radius: 999px; display: grid; place-items: start center; padding-top: 8px; }
.hero__scroll span { width: 4px; height: 8px; border-radius: 4px; background: var(--accent); animation: scroller 1.8s var(--ease) infinite; }
@keyframes scroller { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ------------------------------ Sections ------------------------------ */
.section { padding: var(--section-y) 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border-soft); }
.section__head { max-width: 780px; margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.section__title { font-size: var(--step-3); text-wrap: balance; }
.section__lead { margin-top: 1.2rem; font-size: var(--step-1); color: var(--text-soft); line-height: 1.55; max-width: 62ch; }
.section__note { margin-top: 3rem; text-align: center; font-family: var(--font-display); font-size: var(--step-1); color: var(--text-soft); }

/* ------------------------------ Grid helpers ------------------------------ */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--bento { grid-template-columns: repeat(3, 1fr); }
.grid--split { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }

/* ------------------------------ Card ------------------------------ */
.card {
  position: relative; padding: 1.8rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-soft);
  transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  overflow: hidden;
}
/* brilho que segue o cursor */
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease); pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(35, 214, 204, .12), transparent 60%);
}
.card:hover { transform: translateY(-4px); border-color: var(--border); background: var(--surface-2); }
.card:hover::before { opacity: 1; }

.card__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  color: var(--accent); background: rgba(35, 214, 204, .08);
  border: 1px solid var(--border); margin-bottom: 1.2rem;
}
.card__icon svg { width: 24px; height: 24px; }
.card--pain .card__icon { color: #ff9a8b; background: rgba(255, 120, 100, .08); border-color: rgba(255, 120, 100, .18); }
.card__title { font-size: var(--step-1); margin-bottom: .5rem; }
.card__text { color: var(--text-soft); font-size: var(--step-0); }
.card__list { margin-top: 1.1rem; display: grid; gap: .5rem; }
.card__list li { position: relative; padding-left: 1.4rem; color: var(--text-soft); font-size: var(--step--1); }
.card__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.card--service { padding: 2rem; }

/* ------------------------------ Pillars (empresa) ------------------------------ */
.pillars { display: grid; gap: 1rem; }
.pillar {
  display: flex; gap: 1.2rem; padding: 1.4rem 1.6rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-soft);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.pillar:hover { transform: translateX(4px); border-color: var(--border); }
.pillar__no { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 1.05rem; opacity: .8; }
.pillar h3 { font-size: var(--step-1); margin-bottom: .3rem; }
.pillar p { color: var(--text-soft); font-size: var(--step-0); }

/* ------------------------------ Reasons (diferenciais) ------------------------------ */
.reason {
  padding: 1.8rem 1.6rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-soft);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.reason:hover { transform: translateY(-4px); border-color: var(--border); }
.reason__no { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.reason__no--tag { font-size: var(--step-2); letter-spacing: .02em; }
.reason p { color: var(--text-soft); font-size: var(--step-0); }

/* ------------------------------ Tech ------------------------------ */
.tech { text-align: center; }
.tech__head { max-width: 720px; margin-inline: auto; }
.tech .kicker { justify-content: center; }
.tech .kicker::before { display: none; }
.tech .section__lead { margin-inline: auto; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2.6rem; }
.chips li {
  padding: .7rem 1.2rem; border-radius: 999px; font-size: var(--step--1); font-weight: 500;
  color: var(--text-soft); background: var(--surface); border: 1px solid var(--border-soft);
  transition: transform .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chips li:hover { transform: translateY(-3px); color: var(--accent); border-color: var(--border); }

/* ------------------------------ Timeline (processo) ------------------------------ */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 22px; left: 6%; right: 6%; height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  opacity: .4;
}
.step { position: relative; padding-top: 3.4rem; }
.step__no {
  position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  color: var(--accent); background: var(--bg-alt); border: 1px solid var(--accent);
  box-shadow: 0 0 0 6px var(--bg-alt), 0 0 20px -4px var(--accent);
}
.step__title { font-size: var(--step-1); margin-bottom: .5rem; }
.step p { color: var(--text-soft); font-size: var(--step-0); }

/* ------------------------------ CTA ------------------------------ */
.cta { position: relative; padding: clamp(4rem, 8vw, 7rem) 0; overflow: hidden; text-align: center; border-top: 1px solid var(--border-soft); }
.cta__aurora { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 120% at 50% 0%, rgba(32, 160, 162, .3), transparent 60%); }
.cta__inner { position: relative; z-index: 2; max-width: 720px; }
.cta .kicker { justify-content: center; }
.cta .kicker::before { display: none; }
.cta__title { font-size: var(--step-3); }
.cta__lead { margin: 1.3rem auto 2.4rem; font-size: var(--step-1); color: var(--text-soft); max-width: 54ch; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* ------------------------------ FAQ ------------------------------ */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: .8rem; }
.faq__item { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: border-color .3s var(--ease); }
.faq__item[open] { border-color: var(--border); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 1.15rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-weight: 500; font-size: var(--step-1); color: var(--text);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; font-family: var(--font-body); font-size: 1.6rem; color: var(--accent);
  transition: transform .3s var(--ease); line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 1.4rem 1.3rem; color: var(--text-soft); font-size: var(--step-0); }

/* ------------------------------ Footer ------------------------------ */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border-soft); padding-top: clamp(3rem, 6vw, 5rem); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2.4rem; }
.site-footer__brand p { margin-top: 1.1rem; color: var(--text-soft); font-size: var(--step--1); max-width: 34ch; }
.site-footer__col h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 1.1rem; color: var(--text); }
.site-footer__col a { display: block; color: var(--text-soft); font-size: var(--step--1); padding: .32rem 0; transition: color .25s var(--ease); }
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom { margin-top: clamp(2.4rem, 5vw, 4rem); padding: 1.6rem 0; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer__bottom p { color: var(--text-dim); font-size: var(--step--1); }

/* ------------------------------ Floating actions ------------------------------ */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: linear-gradient(180deg, #25D366, #1aa851);
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6);
  transition: transform .3s var(--ease);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08) translateY(-2px); }

.to-top {
  position: fixed; right: 22px; bottom: 86px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text); background: rgba(16, 24, 27, .8); backdrop-filter: blur(8px);
  border: 1px solid var(--border); opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------ Reveal animation ------------------------------ */
/* stagger controlado por --d (definido via JS conforme a posição do elemento) */
.reveal {
  opacity: 0; transform: translateY(26px) scale(.985);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
.section__head.reveal { transform: translateY(34px) scale(.98); }

/* ------------------------------ Transições entre seções ------------------------------ */
/* Fio de sinal: linha vertical que liga uma seção à outra */
.section { --joint: none; }
.section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: clamp(3rem, 6vw, 5rem);
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .35; display: var(--joint);
}
main > .section + .section,
main > .cta + .section { --joint: block; }

/* Animações guiadas por scroll (progressive enhancement) */
@supports (animation-timeline: view()) {
  .hero__aurora { animation: drift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  .cta__aurora  { animation: drift-in linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  @keyframes drift    { to   { transform: translateY(14%); opacity: .4; } }
  @keyframes drift-in { from { transform: translateY(-10%); opacity: .3; } }

  /* Linha do processo preenche conforme o scroll */
  .timeline::after {
    content: ""; position: absolute; top: 22px; left: 6%; right: 6%; height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--accent-strong));
    box-shadow: 0 0 14px rgba(35, 214, 204, .5);
    transform-origin: left; transform: scaleX(0);
    animation: fill-x linear both; animation-timeline: view();
    animation-range: entry 30% cover 75%;
  }
  @keyframes fill-x { to { transform: scaleX(1); } }
}

/* ========================================================================
   Responsivo
   ======================================================================== */
@media (max-width: 940px) {
  .grid--3, .grid--bento { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--split { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Header: menu hambúrguer entra mais cedo p/ nav nunca colidir com a marca */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }

  /* Menu mobile em painel (visibility p/ transição funcionar) */
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    flex-direction: column; gap: 0; padding: 1rem 1.2rem 1.6rem;
    background: rgba(10, 13, 15, .96); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(-14px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease), visibility 0s .35s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .nav__link { padding: .9rem .4rem; font-size: var(--step-0); border-bottom: 1px solid var(--border-soft); }
  .nav__link::after { display: none; }
}

@media (max-width: 600px) {
  .site-header__actions .btn { display: none; }
}

@media (max-width: 720px) {
  .hero { padding-top: calc(var(--header-h) + 2rem); }
  .hero__stats { margin-top: 2.6rem; }
  .card, .card--service { padding: 1.5rem; }
}

/* Timeline vertical com fio conector no tablet/mobile */
@media (max-width: 940px) {
  .timeline { grid-template-columns: 1fr; gap: 2rem; padding-left: 8px; }
  .timeline::before {
    display: block; top: 10px; bottom: 10px; left: 22px; right: auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--border), var(--accent), var(--border));
  }
  .step { padding: 0 0 0 64px; }
  .step__no { top: -2px; box-shadow: 0 0 0 6px var(--bg-alt), 0 0 20px -4px var(--accent); }
  @supports (animation-timeline: view()) {
    .timeline::after {
      top: 10px; bottom: 10px; left: 22px; right: auto; width: 2px; height: auto;
      background: linear-gradient(180deg, var(--teal), var(--accent-strong));
      transform-origin: top; transform: scaleY(0);
      animation-name: fill-y;
    }
    @keyframes fill-y { to { transform: scaleY(1); } }
  }
}

@media (max-width: 560px) {
  :root { --section-y: clamp(3.6rem, 14vw, 5rem); }
  .container { width: min(100% - 2rem, var(--container)); }
  .grid--3, .grid--bento, .grid--4 { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.8rem; }

  .kicker { letter-spacing: .14em; font-size: .72rem; }
  .hero__title br, .section__title br, .cta__title br { display: none; }
  .hero__lead { font-size: var(--step-0); }
  .hero__stats { display: flex; flex-direction: column; width: 100%; }
  .hero__stats li + li { border-left: 0; border-top: 1px solid var(--border-soft); }
  .hero__stats li { padding: .95rem 1.4rem .95rem 2.4rem; }
  .hero__stats li::before { top: 1.35rem; }
  .hero__scroll { display: none; }

  .btn { width: 100%; }
  .hero__cta, .cta__actions { width: 100%; }
  .pillar { flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem; }
  .section__note { font-size: var(--step-0); }
  .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .to-top { right: 16px; bottom: 76px; }
}

/* Telas muito largas: respiro extra no hero */
@media (min-width: 1600px) {
  .hero { min-height: 88svh; }
}

/* Telas baixas (notebooks pequenos, landscape) */
@media (max-height: 700px) {
  .hero { min-height: auto; padding-bottom: 5rem; }
  .hero__scroll { display: none; }
}

/* ------------------------------ Reduced motion ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
  .hero__aurora, .cta__aurora, .timeline::after { animation: none !important; }
  .timeline::after { transform: none; }
}
