/* ═══════════════════════════════════════════════
   AVANCCE — hero.css
   Hero "Seu tempo de volta" com o relógio de pontos.
   Relógio e cartões de tarefa: hero.js (lista TASKS no começo do arquivo).
   O menu fixo do site (styles.css, .navbar) faz o papel do header do hero.
   ═══════════════════════════════════════════════ */

.av-hero {
  /* Altura da faixa do menu fixo (styles.css, .navbar) */
  --av-nav-h: 72px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  /* Mesmo fundo das outras seções (#11101C); o #211E3D fica só nas Soluções.
     O que tira o aspecto de cor batida é a textura (malha de pontos + grão,
     nos pseudo-elementos abaixo). */
  background-color: var(--surface-base);
  color: #EAECF0;
  font-family: var(--font);
  /* Medidas do layout original, sem o ajuste de altura do x do resto do site */
  font-size-adjust: none;
}
/* Malha de pontos (assinatura da marca, a mesma do hero antigo): textura
   uniforme no fundo todo, que só se apaga perto das bordas. */
.av-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 0V48M0 24H48' fill='none' stroke='%237638EA' stroke-width='0.5' opacity='0.55'/%3E%3Ccircle cx='24' cy='24' r='1.3' fill='%23AC96FF'/%3E%3C/svg%3E");
  background-size: 48px 48px;
  background-position: center top;
  opacity: 0.08;
  -webkit-mask-image: radial-gradient(90% 85% at 50% 50%, #000 45%, transparent 100%);
          mask-image: radial-gradient(90% 85% at 50% 50%, #000 45%, transparent 100%);
  pointer-events: none;
}
/* Grão: textura fina que tira o aspecto de cor chapada */
.av-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.av-hero__wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: var(--av-nav-h);
}

/* ── Layout ──────────────────────────────────── */
.av-hero__main {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 64px;
  padding: 40px 0 80px;
}
.av-hero__text {
  flex: 1 1 520px;
  min-width: 0;
}
.av-hero__kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: rgba(234, 236, 240, 0.72);
  animation: avFade 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.av-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 6.6vw, 96px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #EAECF0;
}
.av-hero__line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  padding-bottom: 0.06em;
}
.av-hero__line + .av-hero__line {
  margin-top: -0.04em;
}
.av-hero__line > span {
  display: inline-block;
  animation: avRise 1.1s cubic-bezier(0.16, 0.84, 0.24, 1) both;
}
.av-hero__line:nth-child(2) > span {
  animation-delay: 0.12s;
}
.av-hero__title em {
  font-style: normal;
  color: var(--action);
}
@keyframes avRise {
  from { transform: translateY(105%); }
  to   { transform: none; }
}
/* Frase de abertura = subtítulo da escala (--fs-h3); o texto abaixo dela é o
   texto de apoio, igual ao das seções (--fs-lead). */
.av-hero__lead {
  margin: 22px 0 0;
  max-width: 540px;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: var(--lh-h3);
  letter-spacing: -0.01em;
  color: var(--accent-soft);
}
.av-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
/* Botão secundário do hero: contorno lilás, mesmo canto do botão de ação */
.av-hero__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 26px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: var(--fs-button);
  font-weight: 600;
  color: #EAECF0;
  box-shadow: inset 0 0 0 1px rgba(172, 150, 255, 0.28);
  transition: background-color var(--dur-fast) var(--ease-ui);
}
.av-hero__ghost:hover {
  background: rgba(172, 150, 255, 0.1);
}
.av-hero__ghost:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}
.av-hero__fade {
  animation: avFade 1s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes avFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── Relógio ─────────────────────────────────── */
.av-hero__visual {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.av-clock {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1;
  animation: avClockIn 1.4s 0.2s cubic-bezier(0.16, 0.84, 0.24, 1) both;
}
@keyframes avClockIn {
  from { opacity: 0; transform: scale(0.96) rotate(-6deg); }
  to   { opacity: 1; transform: none; }
}
/* Camada que inclina com o mouse (hero.js). Os cartões ficam fora dela, para o
   texto não perder nitidez com a perspectiva. */
.av-clock__tilt {
  position: absolute;
  inset: 0;
  will-change: transform;
}
/* O desenho (hero.js) cobre 120% da caixa: a sombra e o brilho passam da borda */
.av-clock__cv {
  position: absolute;
  left: -10%;
  top: -10%;
  width: 120%;
  height: 120%;
  display: block;
  pointer-events: none;
}
/* Fechamento da volta, no centro do relógio */
.av-done {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 9px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #8D60F7 0%, #6A2FDA 100%);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(225, 217, 255, 0.22),
    0 0 40px -6px rgba(118, 56, 234, 0.75),
    0 26px 50px -18px rgba(4, 3, 12, 0.9);
  transition: opacity 0.5s var(--ease-out), transform 0.7s cubic-bezier(0.2, 1.3, 0.3, 1);
  pointer-events: none;
}
.av-done.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.av-done__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
}
.av-done__ic .av-ck {
  border-color: #5A24CF;
}

/* ── Cartão de tarefa ────────────────────────── */
/* Vidro escuro que nasce do encaixe da tarefa no aro (hero.js põe o
   transform-origin no encaixe) e volta para ele ao sair. */
.av-task {
  position: absolute;
  z-index: 2;
  width: clamp(184px, 43%, 240px);
  padding: 13px 14px 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(60, 52, 116, 0.74) 0%, rgba(27, 24, 56, 0.84) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
          backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(225, 217, 255, 0.13),
    0 30px 60px -24px rgba(4, 3, 12, 0.95),
    0 10px 22px -12px rgba(4, 3, 12, 0.6);
  opacity: 0;
  transform: scale(0.5);
  filter: blur(6px);
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.65s cubic-bezier(0.18, 1.25, 0.32, 1),
    filter 0.45s var(--ease-out);
}
.av-task.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}
.av-task.is-out {
  opacity: 0;
  transform: scale(0.6);
  filter: blur(4px);
  transition:
    opacity 0.4s var(--ease-ui),
    transform 0.55s cubic-bezier(0.5, 0, 0.75, 0),
    filter 0.4s var(--ease-ui);
}
.av-task__top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.av-task__ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #8D60F7 0%, #5F27D3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.av-task__ic svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.av-task__ch {
  font-size: 13px;
  font-weight: 600;
  color: rgba(244, 241, 255, 0.92);
}
.av-task__time {
  margin-left: auto;
  font-family: var(--font-support);
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(234, 236, 240, 0.48);
}
.av-task__txt {
  margin: 10px 0 12px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #F2F0FA;
}
/* Linha de progresso na base: enche enquanto a tarefa é automatizada */
.av-task__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #7638EA, #C9BBFF);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s 0.08s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.5s 0.3s;
}
.av-task.is-in .av-task__bar {
  transform: scaleX(1);
}
.av-task.is-done .av-task__bar {
  opacity: 0.35;
}
.av-task__txt span {
  background: linear-gradient(#AC96FF, #AC96FF) no-repeat 0 58% / 0% 1.5px;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
  transition: background-size 0.6s 0.5s cubic-bezier(0.7, 0, 0.2, 1), color 0.5s 0.6s;
}
.av-task.is-done .av-task__txt span {
  background-size: 100% 1.5px;
  color: rgba(234, 236, 240, 0.55);
}
.av-task__st {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-family: var(--font-support);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.av-task__st b,
.av-task__st strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  transition: opacity 0.35s, transform 0.35s;
}
.av-task__st b {
  color: rgba(234, 236, 240, 0.62);
  box-shadow: inset 0 0 0 1px rgba(234, 236, 240, 0.22);
}
.av-task__st strong {
  position: absolute;
  left: 0;
  top: 0;
  color: #FFFFFF;
  background: var(--accent);
  opacity: 0;
  transform: translateY(4px);
}
.av-ck {
  display: block;
  flex: none;
  width: 9px;
  height: 5px;
  border-left: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  transform: translateY(-1.5px) rotate(-45deg);
}
.av-task.is-done .av-task__st b {
  opacity: 0;
  transform: translateY(-4px);
}
.av-task.is-done .av-task__st strong {
  opacity: 1;
  transform: none;
}

/* ── Responsivo ──────────────────────────────── */
@media (max-width: 1024px) {
  .av-hero__main {
    padding: 48px 0 72px;
  }
}
@media (max-width: 560px) {
  .av-done {
    padding: 10px 14px;
    font-size: 12.5px;
  }
  .av-hero__ctas .btn,
  .av-hero__ctas .av-hero__ghost {
    flex: 1 1 100%;
  }
  .av-task {
    padding: 10px 11px 11px;
  }
  .av-task__ic {
    width: 22px;
    height: 22px;
  }
  .av-task__ch {
    font-size: 12px;
  }
  .av-task__txt {
    margin: 7px 0 9px;
    font-size: 12.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .av-hero__line > span,
  .av-hero__kicker,
  .av-hero__fade,
  .av-clock {
    animation: none;
  }
}
