@media (max-width: 1180px) {
  :root {
    --gutter: clamp(20px, 4.2vw, 52px);
  }

  .hero {
    min-height: clamp(460px, 75svh, 780px);
    padding-block: 112px 64px;
  }

  #inicio .intro h1 {
    font-size: clamp(62px, 10.2vw, 124px);
  }

  #reels {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #reels > figure {
    grid-column: span 2;
  }

  /* Centraliza a última fileira sem aumentar as miniaturas. */
  #reels > figure:where(:nth-child(3n + 1):nth-last-child(2)) {
    grid-column: 2 / span 2;
  }

  #reels > figure:where(:nth-child(3n + 1):last-child) {
    grid-column: 3 / span 2;
  }

  .quote-layout {
    gap: clamp(24px, 4.5vw, 54px);
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: calc(82px + env(safe-area-inset-top, 0px));
  }

  header,
  header.scrolled {
    inset-block-start: calc(8px + env(safe-area-inset-top, 0px));
    width: min(calc(100% - 24px), 860px);
  }

  .bar {
    padding-inline: 15px 7px;
  }

  #menu,
  #mobile .close {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
  }

  #mobile {
    --menu-top: calc(8px + env(safe-area-inset-top, 0px));
    position: fixed;
    inset: var(--menu-top) 0 auto;
    width: min(calc(100% - 24px), 500px);
    max-height: calc(100dvh - var(--menu-top) - 12px - env(safe-area-inset-bottom, 0px));
    height: auto;
    margin: 0 auto;
    padding: clamp(12px, 3.4vw, 18px);
    border: 1px solid #334765;
    border-radius: 23px;
    background: radial-gradient(ellipse at 0% 0%, #172845, transparent 65%), #0b121d;
    color: var(--white);
    color-scheme: dark;
    box-shadow: 0 20px 56px #0009, inset 0 1px #ffffff0c;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #mobile::backdrop {
    background: #05080dc7;
  }

  #mobile[open] {
    animation: menu-appear .28s cubic-bezier(.18, .83, .26, 1) both;
  }

  #mobile[open].closing {
    animation: menu-appear .14s ease-in reverse both !important;
  }

  @keyframes menu-appear {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: none; }
  }

  .menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-left: 4px;
  }

  #mobile .close {
    position: static;
    flex: 0 0 44px;
    margin: 0;
    border: 1px solid #344967;
    background: #142237;
  }

  #mobile nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  #mobile nav a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 7px 10px;
    border: 1px solid #25364d;
    border-radius: 12px;
    background: #111b2a;
    color: #ecf3fc;
    font-size: clamp(15px, 3.7vw, 17px);
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .18s, border-color .18s;
  }

  #mobile nav a::before {
    content: none;
  }

  #mobile nav a:is(:hover, :focus-visible, [aria-current]) {
    border-color: #476faf;
    background: #172b49;
  }

  #mobile nav a > svg {
    color: #829bb9;
    justify-self: center;
  }

  .menu-link-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #a6c5e9;
    background: #1a2a3e;
  }

  #mobile .menu-glyph,
  #menu .menu-glyph {
    display: block;
    width: 18px;
    height: 18px;
    flex: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }

  #menu,
  #mobile .close {
    color: #c9ddf7;
  }

  #mobile nav a > .menu-glyph {
    width: 15px;
    height: 15px;
  }

  #mobile nav a[aria-current] .menu-link-icon {
    color: #d7e8ff;
    background: #203955;
  }

  #mobile .mobile-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid #427dff;
    border-radius: 12px;
    background: linear-gradient(110deg, #1353e2, #0065ff);
    text-align: center;
  }

  #mobile .mobile-quote:is(:hover, :focus-visible) {
    background: #064cc6;
  }

  .hero {
    padding-top: calc(106px + env(safe-area-inset-top, 0px));
  }

  #inicio .intro h1 {
    font-size: clamp(52px, 10.4vw, 94px);
  }

  .track {
    padding-block: 13px;
  }

  .design-format:is([data-layout="banners"], [data-layout="barrinhas"]) .format-pieces {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr));
  }

  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (min-width: 520px) and (max-width: 900px) {
  #mobile nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .price-card {
    border-radius: 16px;
  }

  .quote-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  #contato .quote-intro h2 {
    font-size: clamp(32px, 9cqi, 62px);
  }

  .quote-layout h2 + p {
    margin-top: 9px;
  }

  .quote-channels {
    gap: 9px;
    padding: 12px;
    border-radius: 18px;
  }

  .quote-channel {
    min-height: 64px;
    padding: 8px 10px;
  }
}

@media (max-width: 440px) {
  .price-card--packs .price-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-card--packs .price-items > div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: clamp(16px, 4.8vw, 29px);
  }

  .hero {
    min-height: clamp(390px, 72svh, 620px);
    padding-bottom: 48px;
  }

  #inicio .intro h1 {
    font-size: clamp(37px, 10.7vw, 64px);
    line-height: .94;
  }

  #inicio .intro .desc {
    max-width: 36ch;
    margin-block: 16px 20px;
    font-size: 16px;
  }

  #inicio .actions {
    gap: 8px;
  }

  #inicio .actions > a, #inicio .actions .work-selector > summary {
    padding-inline: 11px;
    font-size: 11px;
    letter-spacing: .055em;
  }

  .hero-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media video:not(:nth-child(2)) {
    display: none;
  }

  #inicio .hero-media::after {
    background:
      linear-gradient(90deg, #07090bd9, #07090b70),
      linear-gradient(0deg, var(--bg), transparent 55%, #07090b83);
  }

  #formatos h2, #videos h2, #precos h2 {
    font-size: clamp(35px, 9vw, 54px);
    line-height: .98;
    text-wrap: balance;
  }

  #formats-grid {
    gap: 18px;
  }

  .design-format {
    min-width: 0;
  }

  .design-format h3 {
    font-size: clamp(20px, 5vw, 28px);
  }

  .design-format .format-pieces {
    gap: 9px;
  }

  .design-format[data-layout="logos"] .format-pieces,
  .design-format[data-layout="publicidade"] .format-pieces {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-format[data-layout="publicidade"] .format-pieces + .format-pieces {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .design-format[data-layout="publicidade"] .format-pieces + .format-pieces > * {
    grid-column: span 2;
  }

  .design-format[data-layout="publicidade"] .format-pieces + .format-pieces > :nth-child(odd):last-child {
    grid-column: 2 / span 2;
  }

  #formats-grid .piece-open, #reels figure {
    border-radius: 11px;
  }

  #reel-categories {
    margin-block: 12px 9px;
  }

  .footer-main {
    gap: 7px 12px;
    padding-block: 18px 10px;
  }

  .footer-main .brand {
    font-size: 19px;
    gap: 6px;
  }

  .footer-main .footer-quote {
    padding-inline: 10px;
    font-size: 12px;
  }

  .footer-nav {
    gap: 4px 18px;
  }

  .footer-bottom {
    gap: 10px;
    padding-block: 14px;
  }

  #art-viewer {
    --viewer-margin: 8px;
    --viewer-padding: 9px;
    --image-height: max(0px, calc(100dvh - 88px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
    min-width: min(250px, var(--viewer-width));
    border-radius: 14px;
    overscroll-behavior: contain;
  }

  #art-viewer .art-toolbar {
    margin-bottom: 8px;
    column-gap: 8px;
  }
}

@media (max-width: 359px) {
  #inicio .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 260px;
  }

}

@media (max-width: 767px), (max-width: 1180px) and (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
  #reels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  #reels > figure {
    grid-column: auto;
  }

  #reels > figure:nth-child(n + 5) {
    display: none;
  }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: 0;
    padding-block: 82px 32px;
  }

  #inicio .intro h1 {
    font-size: clamp(40px, 8vw, 62px);
  }

  .menu-top {
    margin-bottom: 6px;
  }

  #mobile .mobile-quote {
    margin-top: 8px;
  }
}
