/* HERO */
.hero-section {
  padding-top: 88px;
  height: 684px;
  display: flex;
  align-items: stretch;
  font-family: 'Google Sans Flex', 'Geist', sans-serif;
}

.hero-card {
  position: relative;
  width: min(calc(100% - 32px), 1760px);
  margin: 8px auto 16px;
  /* DocBlocker: unified all corners to have the same curve, removing the bottom-right flat corner */
  border-radius: var(--radius-card);
  corner-shape: squircle;
  overflow: hidden;
  background: #000;
  flex: 1;
}

.hero-card picture {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #111834;
  container-type: size;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.hero-video.is-active {
  opacity: 1;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  right: 0;
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  width: max(100cqi, 177.78cqb);
  height: max(56.25cqi, 100cqb);
  border: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-video-native {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(17, 24, 52, .82) 0%, rgba(17, 24, 52, .56) 35%, rgba(17, 24, 52, .2) 66%, rgba(17, 24, 52, .28) 100%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, .04) 0%, rgba(0, 0, 0, .52) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 40px 24px 90px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  gap: 28px;
}

.hero-copy,
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-copy {
  gap: 24px;
}

.hero-actions {
  gap: 28px;
}

.hero-title {
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.35;
  letter-spacing: .5px;
}

.hero-desc {
  display: none;
  color: rgba(255, 255, 255, .88);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0;
  max-width: 520px;
}

/* hero-cta styles removed, now using global .btn component */

.hero-stats {
  display: flex;
  gap: 28px;
  color: #fff;
}

.hero-stats>div:nth-child(n+3) {
  display: none;
}

.stat-number {
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  font-weight: 300;
  opacity: .85;
  margin-top: 4px;
  line-height: 1.4;
}

/* Rating corner */
.hero-rating {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 4;
  /* DocBlocker: define a cor dos corners ::before e ::after via custom property.
   * Branco pois o rating card encosta no fundo escuro do hero-card. */
  --corner-color: #ffffff;
}

.hero-rating::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  /* DocBlocker: migrado de background: url(svg) para mask + background-color.
   * A cor vem de --corner-color (herda do .hero-rating) em vez de estar
   * embutida no SVG — resolve CORS e permite controle via CSS. */
  background-color: var(--corner-color, #ffffff);
  -webkit-mask: url("../../images/corner.svg") center / contain no-repeat;
  mask: url("../../images/corner.svg") center / contain no-repeat;
  transform: translateY(-100%) rotate(180deg);
}

.rating-card {
  position: relative;
  background: #fff;
  border-radius: 32px 0 0 0;
  padding: 12px 18px 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 4px;
  width: auto;
  min-height: 64px;
  margin: 0 0 0 32px;
}

.rating-card::after {
  content: "";
  position: absolute;
  left: -32px;
  bottom: 0;
  width: 32px;
  height: 32px;
  /* DocBlocker: migrado de background: url(svg) para mask + background-color.
   * Cor herdada via --corner-color do .hero-rating pai. */
  background-color: var(--corner-color, #ffffff);
  -webkit-mask: url("../../images/corner.svg") center / contain no-repeat;
  mask: url("../../images/corner.svg") center / contain no-repeat;
  transform: rotate(180deg);
}

.rating-avatars {
  display: flex;
  flex-shrink: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.rating-avatars img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -7px;
  object-fit: cover;
}

.rating-avatars img:first-child {
  margin-left: 0;
}

.rating-text {
  grid-column: 2;
  grid-row: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--cinza-texto);
  line-height: 1.1;
  white-space: nowrap;
}

.rating-stars {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.stars span {
  display: block;
  width: 13px;
  height: 13px;
  overflow: hidden;
  text-indent: -9999px;
  background: url("../../images/global-384-star.svg") center / 13px 13px no-repeat;
}

.rating-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--cinza-texto);
  line-height: 1;
}

@media (min-width: 1024px) {
  .hero-section {
    padding-top: 100px;
    align-items: flex-start;
    height: auto;
    min-height: 100svh;
  }

  .hero-card {
    width: min(calc(100% - 160px), 1760px);
    min-height: 776px;
    height: auto;
    margin: 12px auto 40px;
    /* DocBlocker: applied equal curve to all corners to match top/bottom-left pattern */
    border-radius: 76px;
    corner-shape: squircle;
    overflow: hidden;
    background: transparent;
    flex: none;
  }

  .hero-video,
  .hero-card picture,
  .hero-overlay {
    /* DocBlocker: removed mask; using mobile notch structure instead */
    border-radius: 76px;
    corner-shape: squircle;
  }

  .hero-video iframe {
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .hero-img {
    object-fit: contain;
    object-position: center;
  }

  .hero-overlay {
    display: block;
    background: linear-gradient(90deg, rgba(17, 24, 52, .78) 0%, rgba(17, 24, 52, .5) 32%, rgba(17, 24, 52, .08) 60%, rgba(17, 24, 52, .12) 100%);
  }

  .hero-content {
    position: relative;
    padding: 96px 0 96px 160px;
    width: 100%;
    height: auto;
    justify-content: flex-start;
    gap: 66px;
    max-width: calc(693px + 160px);
  }

  .hero-copy {
    gap: 30px;
    width: 693px;
  }

  .hero-actions {
    gap: 31px;
  }

  .hero-title {
    font-size: 42px;
    font-weight: 600;
    line-height: 1.389;
    letter-spacing: .84px;
    width: 693px;
    max-width: 693px;
  }

  .hero-desc {
    display: block;
    font-size: 18px;
    line-height: 1.389;
    letter-spacing: .36px;
    max-width: 693px;
  }

  /* hero-cta styles removed, now using global .btn component */
  .hero-stats {
    gap: 34px;
    align-items: flex-start;
  }

  .hero-stats>div:nth-child(n+3) {
    display: block;
  }

  .stat-number {
    font-size: 48px;
    font-weight: 300;
    line-height: 48px;
  }

  .stat-label {
    font-size: 16px;
    font-weight: 300;
    margin-top: 10px;
    line-height: 20.8px;
    opacity: 1;
  }

  /* DocBlocker: removed content:none to inherit mobile corner SVGs */
  .hero-rating::before,
  .rating-card::after {
    display: block;
  }

  .rating-card {
    /* DocBlocker: restoring white background to create the notch naturally, just like mobile */
    background: #fff;
    border-radius: 40px 0 0 0;
    corner-shape: squircle;
    padding: 24px 32px 24px 24px;
    grid-template-columns: 250px 158px;
    column-gap: 15px;
    width: auto;
    min-height: 70px;
    margin: 0;
    /* Touch edges to form notch */
  }

  .rating-avatars img {
    width: 70px;
    height: 70px;
    border: 3px solid #f5f5f5;
    margin-left: -10px;
  }

  .stars {
    gap: 4px;
  }

  .stars span {
    width: 16px;
    height: 16px;
    background-size: 16px 16px;
  }

  .rating-text {
    width: 158px;
    font-size: 16px;
    line-height: 16px;
  }

  .rating-score {
    font-size: 16px;
    line-height: 16px;
  }
}

/* Page-specific Hero Backgrounds */
body:not(.page-home) .hero-card {
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

body:not(.page-home) .hero-card picture {
  display: none !important;
}

body.page-sobre .hero-card {
  background-image: url("../../images/sobre-autoridade.png");
}

body.page-infra .hero-card {
  background-image: url("../../images/hero-infra.png");
}

body.page-pix .hero-card {
  background-image: url("../../images/hero-pix.png");
}

body.page-credito .hero-card {
  background-image: url("../../images/hero-credito.png");
}

body.page-b2b .hero-card {
  background-image: url("../../images/hero-b2b.png");
}

body.page-demonstracoes-contabeis .hero-card {
  background-image: url("../../images/sobre-autoridade.png");
}

/* Internal Page Hero Layout */
.hero--internal {
  height: 480px;
}

.hero--internal .hero-card {
  height: 100%;
}

.hero--internal .hero-content {
  justify-content: center;
  gap: 24px;
  height: 100%;
  padding-bottom: 40px;
}

/* Symmetrical title and description layout matching Figma */
.hero--internal .hero-title {
  font-size: clamp(32px, 8vw, 42px);
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.389;
  letter-spacing: .84px;
}

.hero--internal .hero-desc {
  display: block;
  color: rgba(255, 255, 255, .88);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.389;
  letter-spacing: .36px;
  max-width: 520px;
}

/* Bottom-right corner notch for internal pages */
.hero-notch {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 4;
  --corner-color: #ffffff;
}

.hero-notch::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background-color: var(--corner-color, #ffffff);
  -webkit-mask: url("../../images/corner.svg") center / contain no-repeat;
  mask: url("../../images/corner.svg") center / contain no-repeat;
  transform: translateY(-100%) rotate(180deg);
}

.notch-bg {
  position: relative;
  background: #ffffff;
  border-radius: 32px 0 0 0;
  width: 120px;
  height: 64px;
}

.notch-bg::after {
  content: "";
  position: absolute;
  left: -32px;
  bottom: 0;
  width: 32px;
  height: 32px;
  background-color: var(--corner-color, #ffffff);
  -webkit-mask: url("../../images/corner.svg") center / contain no-repeat;
  mask: url("../../images/corner.svg") center / contain no-repeat;
  transform: rotate(180deg);
}

@media (min-width: 1024px) {
  .hero--internal {
    min-height: unset;
    height: auto;
  }
  
  .hero--internal .hero-card {
    min-height: 682px;
    height: 682px;
    border-radius: 76px;
  }

  .hero--internal .hero-content {
    padding: 0 0 0 160px;
    max-width: calc(693px + 160px);
  }

  .hero--internal .hero-desc {
    max-width: 373px;
  }

  .notch-bg {
    border-radius: 40px 0 0 0;
    width: 270px;
    height: 165px;
  }
}