@import "./header-controls.css";

/* Keep the client count compact beside the strip, independent of the
   document's rem scale and the large section-heading typography. */
main > section:has(.Marquee-module__MBWIba__container) > div > h2 {
  min-width: 0;
  max-width: 100%;
  padding: 24px;
  font-family: Rooftop, sans-serif;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}
@media (min-width: 1024px) {
  main > section:has(.Marquee-module__MBWIba__container) > div > h2 {
    flex: 0 0 clamp(240px, 23vw, 320px);
  }
}
@media (max-width: 639px) {
  /* WebKit needs a nonzero lazy-load target before the mobile cards mount. */
  main > section:has(.Marquee-module__MBWIba__container) > div > div > .sm\:hidden > .relative {
    min-height: 1px;
  }
}

@font-face {
  font-family: Keymatic;
  src: url("/brand/Keymatic-Font.otf") format("opentype");
  font-display: swap;
}
:root {
  --keymatic-orange: #e86e2c;
  --keymatic-partner-action: #c9501b;
  --keymatic-instagram-gradient: linear-gradient(
    110deg,
    #9035e6 0%,
    #d02181 52%,
    #d2442f 100%
  );
  --keymatic-whatsapp-gradient: linear-gradient(
    110deg,
    #00866c 0%,
    #0b874f 65%,
    #128841 100%
  );
}

/* Official wordmark geometry, animated by the original header's state class. */
.keymatic-wordmark {
  overflow: hidden;
}
.keymatic-wordmark .TopBarRedesign-module__4Y2iAa__letter {
  transform-box: fill-box;
}
.TopBarRedesign-module__4Y2iAa__transformed
  .TopBarRedesign-module__4Y2iAa__logo,
.TopBarRedesign-module__4Y2iAa__transformed
  .TopBarRedesign-module__4Y2iAa__logoSlot {
  width: 1.959rem;
  max-width: 1.959rem;
}
.TopBarRedesign-module__4Y2iAa__transformed .keymatic-wordmark {
  color: var(--keymatic-orange);
}

.keymatic-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.keymatic-hero-actions .button {
  padding-inline: 1.2rem !important;
  font-size: 1.2rem !important;
}
.keymatic-hero-actions a:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

div:has(> img[src="/brand/meta-tech-provider.svg"]) {
  gap: 1rem;
}
div:has(> img[src="/brand/meta-tech-provider.svg"]) > img {
  width: calc((100vw - 5.2rem) / 3);
  max-width: 11.2rem;
  height: auto;
}

@media (min-width: 768px) {
  .TopBarRedesign-module__4Y2iAa__logo {
    width: 19.437rem;
  }
  .TopBarRedesign-module__4Y2iAa__transformed
    .TopBarRedesign-module__4Y2iAa__logo,
  .TopBarRedesign-module__4Y2iAa__transformed
    .TopBarRedesign-module__4Y2iAa__logoSlot {
    width: 2.743rem;
    max-width: 2.743rem;
  }
  .keymatic-hero-actions {
    gap: 1.2rem;
  }
  .keymatic-hero-actions .button {
    padding-inline: 2rem !important;
    font-size: 1.4rem !important;
  }
  div:has(> img[src="/brand/meta-tech-provider.svg"]) {
    gap: 2rem;
  }
  div:has(> img[src="/brand/meta-tech-provider.svg"]) > img {
    width: 14.5rem;
    max-width: none;
  }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .TopBarRedesign-module__4Y2iAa__nav_item {
    padding-inline: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .TopBarRedesign-module__4Y2iAa__logo,
  .TopBarRedesign-module__4Y2iAa__logoSlot,
  .keymatic-wordmark .TopBarRedesign-module__4Y2iAa__letter {
    transition: none !important;
    transition-delay: 0s !important;
  }
}
@media (max-width: 767px) {
  .keymatic-hero-actions .text_center {
    margin-inline: 0;
  }
  .keymatic-hero-actions .button {
    min-height: 4.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
.TopBarRedesign-module__4Y2iAa__container {
  --brand-neon-pink: var(--keymatic-orange);
  --color-brand-neon-pink: var(--keymatic-orange);
}

/* Keep the wordmark at its natural size while the slot crops/reveals letters.
   An explicit max-width at both ends avoids the previous none → px snap. */
.TopBarRedesign-module__4Y2iAa__logo {
  width: 13.883rem;
  max-width: 13.883rem;
  flex-shrink: 0;
  overflow: hidden;
  transition:
    width 1.2s cubic-bezier(0.4, 0.2, 0, 1),
    max-width 1.2s cubic-bezier(0.4, 0.2, 0, 1);
}
.keymatic-wordmark {
  width: 13.883rem;
  max-width: none;
  transition: color 600ms ease;
}
.keymatic-hero-actions .button {
  color: white;
  border: 0;
}
@media (min-width: 768px) {
  .TopBarRedesign-module__4Y2iAa__logo {
    width: 19.437rem;
    max-width: 19.437rem;
  }
  .keymatic-wordmark {
    width: 19.437rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .keymatic-wordmark {
    transition: none;
  }
}

/* Native dialog provides focus containment, Escape and return to the trigger. */
.keymatic-access {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(48rem, calc(100vw - 3.2rem));
  max-height: calc(100svh - 3.2rem);
  overflow: auto;
  border: 1px solid #e3e3e3;
  border-radius: 2rem;
  padding: 3.2rem;
  background: #fff;
  color: #171717;
  box-shadow: 0 2rem 8rem #0004;
}
.keymatic-access::backdrop {
  background: #0008;
  backdrop-filter: blur(6px);
}
.keymatic-access h2 {
  font-size: 2.8rem;
  line-height: 1.15;
  padding-right: 3rem;
}
.keymatic-access p {
  margin-top: 1rem;
  font-size: 1.6rem;
  line-height: 1.4;
}
.keymatic-access-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: #f3f3f3;
  font: 2.4rem system-ui;
  cursor: pointer;
}
.keymatic-access-links {
  display: grid;
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.keymatic-access-links a {
  display: grid;
  grid-template-columns: 0.6rem 1fr auto;
  align-items: center;
  gap: 1.6rem;
  padding: 1.6rem;
  border: 1px solid #ddd;
  border-radius: 1.2rem;
  color: inherit;
  text-decoration: none;
  font-size: 1.6rem;
}
.keymatic-access-links a::before {
  content: "";
  width: 0.6rem;
  height: 100%;
  border-radius: 1rem;
  background: var(--channel);
}
.keymatic-access-links strong {
  display: block;
  font-weight: 700;
}
.keymatic-access-links small {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.4rem;
  line-height: 1.4;
  color: #555;
}
.keymatic-access-links a:focus-visible,
.keymatic-access-close:focus-visible {
  outline: 3px solid var(--keymatic-orange);
  outline-offset: 3px;
}
@media (hover: hover) {
  .keymatic-access-links a:hover {
    background: #f6f6f6;
    border-color: #999;
  }
}

/* Shared channel identity; filled hero actions and restrained dialog accents. */
.keymatic-instagram {
  --action-background: var(--keymatic-instagram-gradient);
  --channel: linear-gradient(180deg, #833aff, #e62996 52%, #ff653d);
}
.keymatic-whatsapp {
  --action-background: var(--keymatic-whatsapp-gradient);
  --channel: linear-gradient(180deg, #00b486, #25d366);
}
.keymatic-parceiros {
  --action-background: var(--keymatic-partner-action);
  --channel: var(--keymatic-orange);
}
.keymatic-hero-actions .button {
  background: var(--action-background) !important;
  color: white;
}
.keymatic-access-links {
  grid-auto-rows: 1fr;
}
.keymatic-access-links .keymatic-choice {
  min-height: 10rem;
  background: white;
  color: #171717;
}
.keymatic-access-links .keymatic-choice small {
  color: #555;
  line-height: 1.4;
}
@media (hover: hover) {
  .keymatic-access-links .keymatic-choice:hover {
    background: #fafafa;
  }
}
section:has([class*="TemplatesSection"]) {
  padding-bottom: 8rem;
}
.keymatic-feature-scene {
  color-scheme: light;
}
section.keymatic-templates {
  padding-bottom: 8rem;
}
@media (min-width: 768px) {
  section.keymatic-templates {
    padding-bottom: 12rem;
  }
}
.keymatic-hero-photo {
  object-position: 50% center;
}
/* Keep white copy readable while leaving the subject and photograph clear. */
picture:has(.keymatic-hero-photo)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #0e1c148c 0%, #0e1c1433 35%, transparent 65%),
    linear-gradient(0deg, #0e1c1455, transparent 30%);
}
@media (max-width: 767px) {
  picture:has(.keymatic-hero-photo)::after {
    background: linear-gradient(
      180deg,
      #0e1c148c 0%,
      #0e1c1455 27%,
      transparent 48%,
      transparent 70%,
      #0e1c1477 100%
    );
  }
}
/* Footer: São Paulo, two colours (02/11/2026). #c84c14 carries white text
   at 4.67:1 (AA). Links and the legal line sit on a plain sky; below them a
   dense white engraving of the city (WebP on the same #c84c14) runs edge to
   edge and bleeds off the sides and the bottom. On landscape screens from
   1024 px (and on every screen from 1280 px) the whole footer fits one
   screen below the fixed header (2rem inset + 7.2rem row): the engraving
   takes the height left over, cropped from the foreground, never taller
   than its natural 1536 × 591. Same geometry as shared-footer.css. */
.keymatic-footer {
  --footer-orange: #c84c14;
  --footer-rule: #ffffff59;
  --footer-pad-x: 4rem;
  --footer-cover: calc(var(--campaign-height, 0px) + 9.2rem);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  /* The engraving measures itself against the footer's full width. */
  container-type: inline-size;
  background: var(--footer-orange);
  color: #fff;
  font-family: Rooftop, sans-serif;
  padding: 4.8rem var(--footer-pad-x) 0;
}
.keymatic-footer-inner {
  flex: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 128rem;
  margin: 0 auto;
  /* Sky between the legal line and the first spires. */
  padding-bottom: 3.2rem;
}
.keymatic-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 5rem;
}
.keymatic-footer-brand img {
  width: 24rem;
  height: auto;
  display: block;
}
.keymatic-footer-brand p {
  font-size: 1.6rem;
  line-height: 1.55;
  max-width: 29rem;
  margin-top: 2rem;
}
.keymatic-footer-start {
  display: inline-flex;
  gap: 2.8rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.2rem 2rem;
  border: 1px solid #fff;
  border-radius: 99px;
  font-size: 1.4rem;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.keymatic-footer-start span {
  font-size: 1.8rem;
}
.keymatic-footer nav h3 {
  font:
    700 1.5rem/1.4 Rooftop,
    sans-serif;
  margin-bottom: 1.2rem;
}
.keymatic-footer nav a {
  display: block;
  font-size: 1.5rem;
  line-height: 1.5;
  padding-block: 0.4rem;
  break-inside: avoid;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.keymatic-footer nav a .keymatic-footer-contact {
  display: block;
  font-size: 1.2rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* Decorative São Paulo engraving: the footer's full width, cancelling its
   side padding, at the picture's natural height. The picture's background
   is the footer orange, so there is no seam; cover crops the foreground and
   keeps the skyline whole at the top. */
.keymatic-footer-skyline {
  --footer-art-natural: calc((100cqw + 2 * var(--footer-pad-x)) * 591 / 1536);
  position: relative;
  flex: none;
  height: var(--footer-art-natural);
  margin-inline: calc(var(--footer-pad-x) * -1);
  overflow: hidden;
  pointer-events: none;
}
.keymatic-footer-skyline img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 0%;
}
.keymatic-footer-bottom {
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  font-size: 1.3rem;
}
/* Legal line under a translucent white rule. */
.keymatic-footer-disclaimer {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--footer-rule);
}
.keymatic-footer-languages {
  display: flex;
  gap: 0.4rem;
}
.keymatic-footer-languages button {
  padding: 1rem;
  min-width: 4.4rem;
  min-height: 4.4rem;
  border-radius: 0.6rem;
  font:
    1.3rem Rooftop,
    sans-serif;
  color: #fff;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.keymatic-footer-languages button[aria-pressed="true"] {
  background: #fff;
  color: var(--footer-orange);
}
.keymatic-footer a:focus-visible,
.keymatic-footer button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
@media (hover: hover) {
  .keymatic-footer nav a:hover {
    text-decoration-line: underline;
  }
  .keymatic-footer-start:hover,
  .keymatic-footer-languages button:hover {
    background: #fff;
    color: var(--footer-orange);
  }
}
.keymatic-footer-start:active,
.keymatic-footer-languages button:active {
  background: #fff;
  color: var(--footer-orange);
}
@media (max-width: 767px) {
  .keymatic-footer {
    --footer-pad-x: 2.4rem;
  }
  .keymatic-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.6rem 2rem;
  }
  .keymatic-footer-brand {
    grid-column: 1/-1;
  }
  .keymatic-footer-brand img {
    width: 22rem;
  }
  .keymatic-footer-grid nav:nth-last-child(-n + 2) {
    grid-column: 1/-1;
  }
  /* Alvo de toque de 40 px sem mudar o desenho: a linha cresce, o texto fica centrado. */
  .keymatic-footer nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 4rem;
    padding-block: 0;
    margin-top: 0.4rem;
  }
  /* Contatos já passam de 40 px com duas linhas; mantêm o respiro do desktop. */
  .keymatic-footer nav a:has(.keymatic-footer-contact) {
    margin-top: 1.3rem;
  }
  /* A band from the heart of the city: Copan, Itália and Banespa whole. */
  .keymatic-footer-skyline {
    height: clamp(220px, 62vw, 300px);
  }
  .keymatic-footer-skyline img {
    object-position: 55% 0%;
  }
  .keymatic-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.2rem;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .keymatic-footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .keymatic-footer-brand {
    grid-column: 1/-1;
  }
}
/* From 1024 px the brand is the first of five columns, so the links take a
   single row of columns and leave the height to the drawing. */
@media (min-width: 1024px) {
  .keymatic-footer-grid {
    gap: 3.2rem;
    margin-bottom: 2.4rem;
  }
  .keymatic-footer-brand img {
    width: 18rem;
  }
  .keymatic-footer nav a:has(.keymatic-footer-contact) {
    line-height: 1.4;
    padding-block: 0.3rem;
  }
  .keymatic-footer nav a .keymatic-footer-contact {
    line-height: 1.4;
  }
}
/* Up to 1279 px the Keymatic links break into two columns and Soluções
   sits over Acessar, so the longest list stays short and the engraving
   keeps its height. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .keymatic-footer-grid {
    grid-template-columns:
      minmax(0, 0.95fr) minmax(0, 2.15fr) minmax(0, 0.9fr)
      minmax(0, 1.05fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "brand keymatic solutions contact"
      "brand keymatic access contact";
    row-gap: 2rem;
  }
  .keymatic-footer-brand {
    grid-area: brand;
  }
  .keymatic-footer-grid > nav:nth-of-type(1) {
    grid-area: solutions;
  }
  .keymatic-footer-grid > nav:nth-of-type(2) {
    grid-area: keymatic;
    columns: 2;
    column-gap: 2.4rem;
  }
  .keymatic-footer-grid > nav:nth-of-type(2) h3 {
    column-span: all;
  }
  .keymatic-footer-grid > nav:nth-of-type(3) {
    grid-area: access;
  }
  .keymatic-footer-grid > nav:nth-of-type(4) {
    grid-area: contact;
  }
}
/* The Keymatic column breaks into two so the links stay short. */
@media (min-width: 1280px) {
  .keymatic-footer-grid {
    grid-template-columns:
      minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 2.5fr)
      minmax(0, 1fr) minmax(0, 1.1fr);
  }
  .keymatic-footer-grid > nav:nth-of-type(2) {
    columns: 2;
    column-gap: 2.4rem;
  }
  .keymatic-footer-grid > nav:nth-of-type(2) h3 {
    column-span: all;
  }
}
/* One screen: the footer is as tall as the space below the fixed header and
   the engraving absorbs what the links and the legal line leave, from a
   legible minimum up to its natural height; any surplus widens the sky. A
   portrait tablet keeps the natural height. */
@media (min-width: 1280px), (min-width: 1024px) and (orientation: landscape) {
  .keymatic-footer {
    min-height: calc(100svh - var(--footer-cover));
  }
  .keymatic-footer-skyline {
    flex: 1 1 0;
    height: auto;
    min-height: min(
      var(--footer-art-natural),
      max(220px, calc((100svh - var(--footer-cover)) * 0.4))
    );
    max-height: var(--footer-art-natural);
    margin-top: auto;
  }
}
/* Short laptop screens tighten the links and the legal line so the
   engraving keeps a legible height. */
@media (min-width: 1024px) and (max-height: 840px) {
  .keymatic-footer {
    padding-top: 2.4rem;
  }
  .keymatic-footer-inner {
    padding-bottom: 2rem;
  }
  .keymatic-footer-grid {
    margin-bottom: 0.8rem;
  }
  .keymatic-footer nav h3 {
    margin-bottom: 0.8rem;
  }
  .keymatic-footer nav a:has(.keymatic-footer-contact) {
    padding-block: 0.2rem;
  }
  .keymatic-footer-bottom {
    padding-top: 0.8rem;
  }
  .keymatic-footer-disclaimer {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
  }
}
video[data-keymatic-step] {
  visibility: hidden;
}
.keymatic-step-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Warm paper for product stories; terracotta for the scroll-driven channel reveal. */
.keymatic-features-palette,
.keymatic-features-palette .bg-dynamic-base {
  --bg-color-base: #fbf1e7 !important;
}
.keymatic-channel-scene .bg-dynamic-base,
.keymatic-channel-mobile,
.keymatic-channel-mobile .bg-dynamic-base {
  --bg-color-base: #f49a64 !important;
}
.keymatic-channel-scene img[data-keymatic-channel-photo] {
  object-position: 64% 35% !important;
}
.keymatic-channel-scene a.bg-dynamic-base,
.keymatic-channel-mobile a.bg-dynamic-base {
  --bg-color-base: #fffaf5 !important;
}
.keymatic-channel-mobile {
  background: #f49a64;
}

.keymatic-channel-scene > .sticky {
  /* The enlarged scroll lettering belongs inside its visual stage. */
  overflow: clip;
}

.keymatic-channel-word {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #fff7ed;
  font:
    normal 20vw/1 ManyChatGravity,
    sans-serif;
  letter-spacing: -0.04em;
  text-shadow: 0 3px 25px #3020131a;
  transform-origin: center;
  will-change: transform, opacity;
}

/* Leave time to read both cards before the original overlap transition. */
@media (min-width: 768px) {
  .keymatic-comparison [class*="200svh"] {
    height: 260svh;
  }
}

@media (max-width: 767px) {
  /* The supplied portrait outpaint fills the hero behind the copy. */
  [class*="HeroSectionRedesign"][class*="image_container"] {
    height: 100% !important;
    background: transparent;
  }
  .keymatic-hero-photo {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    object-fit: cover !important;
    object-position: 58% center;
    mask-image: none;
  }
  picture:has(.keymatic-hero-photo)::after {
    background: linear-gradient(180deg, #151515a8, #15151573 35%, transparent 60%, #15151555);
  }
  .keymatic-hero-actions {
    gap: 0.8rem;
  }
  .keymatic-hero-actions .button {
    padding-inline: 1rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  [class*="HeroSectionRedesign"][class*="image_container"] {
    height: 100% !important;
    background: transparent;
  }
  .keymatic-hero-photo {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    object-fit: cover !important;
    object-position: 50% 57%;
    mask-image: none;
  }
  picture:has(.keymatic-hero-photo)::after {
    background: linear-gradient(90deg, #151515a8, #15151555 45%, transparent 75%), linear-gradient(0deg, #15151555, transparent 30%);
  }
}

@media (max-width: 1023px) {
  .TopBarRedesign-module__4Y2iAa__menu_container > a[href="#comecar"] {
    margin-bottom: 3.2rem;
  }
  .keymatic-access {
    padding: 2.4rem;
  }
  .keymatic-access h2 {
    font-size: 2.6rem;
  }
}

@media (max-width: 1023px) {
  /* The original hidden mobile CTA still occupied horizontal space. Longer
     translated labels must not push the hamburger off a narrow screen. */
  .TopBarRedesign-module__4Y2iAa__container a[href="#comecar"].opacity-0 {
    display: none !important;
  }
}

.keymatic-hero-actions .button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.keymatic-access::backdrop {
  animation: keymatic-access-backdrop 250ms ease-out;
}
@keyframes keymatic-access-backdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .keymatic-access::backdrop {
    animation-duration: 100ms;
  }
}
@media (max-width: 767px) {
  .TopBarRedesign-module__4Y2iAa__logo {
    width: 11.1rem;
    max-width: 11.1rem;
    height: 1.6rem;
  }
  .keymatic-wordmark {
    width: 11.1rem;
    height: 1.6rem;
  }
  .TopBarRedesign-module__4Y2iAa__transformed
    .TopBarRedesign-module__4Y2iAa__logo {
    width: 1.6rem;
    max-width: 1.6rem;
  }
  div:has(> img[src="/brand/meta-tech-provider.svg"]) {
    gap: 2rem;
    align-items: center;
  }
  div:has(> img[src="/brand/meta-tech-provider.svg"]) > img {
    height: 2.4rem;
    width: auto;
    max-width: none;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .TopBarRedesign-module__4Y2iAa__logo {
    width: 15.1rem;
    max-width: 15.1rem;
    height: 2.176rem;
  }
  .keymatic-wordmark {
    width: 15.1rem;
    height: 2.176rem;
  }
  .TopBarRedesign-module__4Y2iAa__transformed
    .TopBarRedesign-module__4Y2iAa__logo {
    width: 2.176rem;
    max-width: 2.176rem;
  }
  div:has(> img[src="/brand/meta-tech-provider.svg"]) > img {
    height: 2.8rem;
    width: auto;
    max-width: none;
  }
}
@media (max-width: 359px) {
  main > section > .mx-mc-layout {
    max-width: calc(100% - 3.2rem);
    min-width: 0;
  }
  h2.mc-text-h1 {
    font-size: 3.6rem;
    line-height: 3.2rem;
    overflow-wrap: anywhere;
  }
}
@media (min-width: 1024px) {
  .keymatic-hero-photo {
    object-position: 50% top !important;
  }
}

/* The Instagram landing's quiet 32px paper grid, confined to the background.
   Existing section animations and demonstration surfaces stay independent. */
.keymatic-features-palette.md\:block .sticky,
.keymatic-features-palette.md\:hidden,
.keymatic-channel-scene > .sticky > .bg-dynamic-base,
.keymatic-channel-mobile {
  background-image:
    linear-gradient(#af8c9d12 1px, transparent 1px),
    linear-gradient(90deg, #af8c9d12 1px, transparent 1px),
    radial-gradient(ellipse at top right, #fde5ce80, transparent 70%);
  background-size:
    32px 32px,
    32px 32px,
    100% 100%;
}
.keymatic-features-palette [class*="BackgroundGrid"] {
  visibility: hidden;
}
/* One grid belongs to the pinned composition, never a second grid per slide. */
.keymatic-features-palette.md\:block,
.keymatic-features-palette .bg-grid-pattern {
  background-image: none;
}
.keymatic-features-palette.md\:block .sticky {
  background-position: 0 var(--feature-grid-offset, 0px);
}
.keymatic-channel-scene .bg-grid-pattern,
.keymatic-channel-mobile .bg-grid-pattern {
  background-image: none;
}
.keymatic-features-palette [class*="border-r-"] {
  border-right-color: transparent;
}

/* Shared with Keymatic Instagram: tokens.css --r-sm / --r-md / --r-lg. */
:root {
  --keymatic-radius-sm: 10px;
  --keymatic-radius-md: 14px;
  --keymatic-radius-lg: 20px;
}
a.button[class],
button.button[class],
a.button[class]::before,
button.button[class]::before,
.keymatic-hero-actions .button[class],
.keymatic-footer-start,
.keymatic-channel-scene a.button[class],
.keymatic-channel-mobile a.button[class] {
  border-radius: var(--keymatic-radius-md) !important;
}
.TopBarRedesign-module__4Y2iAa__container a.button[class],
.TopBarRedesign-module__4Y2iAa__container a.button[class]::before,
.keymatic-footer-languages button {
  border-radius: var(--keymatic-radius-sm) !important;
}
.keymatic-access .keymatic-choice {
  border-radius: var(--keymatic-radius-md);
}

/* The three hero destinations are the only pill-shaped marketing controls. */
.keymatic-hero-actions a.button[class],
.keymatic-hero-actions a.button[class]::before { border-radius:999px !important; }

/* Retain the native parallax. Its maximum upward travel is 180px;
   reserve that same overscan below the portrait throughout the scroll. */
@media (max-width: 1023px) {
  [class*="HeroSectionRedesign"][class*="image_container"] {
    height: calc(100% + 180px) !important;
  }
}
@media (max-width: 767px) {
  .keymatic-social-carousel + div:has([class*="SwiperPrevNext"]) {
    display: none;
  }
}
/* The mobile channel reveal may extend beyond its sticky photo stage. Keep
   those cards visible and contain the section's calculated trailing margin. */
@media (max-width: 1023px) {
  html, body { overscroll-behavior-x: none; }
  .page-wrapper { overflow-x: clip; max-width: 100%; }
  .keymatic-channel-mobile { display: flow-root; }
  .keymatic-channel-mobile > .keymatic-channel-scene > .sticky { overflow: visible; }
  .keymatic-channel-mobile .mx-mc-layout {
    margin-inline: 24px;
    width: calc(100% - 48px);
    max-width: calc(100% - 48px);
    padding-block: 64px;
  }
  .keymatic-channel-mobile h2 { font-size: clamp(32px, 8.5vw, 40px); line-height: 1.04; }
  .keymatic-channel-mobile a.bg-dynamic-base { min-width: 0; padding-inline: 20px; }
}
@media (min-width: 768px) and (max-width: 1023px) and (max-height: 800px) {
  .keymatic-hero-photo { object-position: 50% top; }
}
@media (min-width: 1024px) and (max-aspect-ratio: 1/1) {
  .keymatic-hero-photo { object-position: 75% top !important; }
}
/* Landscape phones need a compact copy column and a higher photo crop. */
@media (min-width: 640px) and (max-width: 1023px) and (max-height: 600px) {
  main > div:has(> [class*="HeroSectionRedesign"][class*="image_container"]) {
    min-height: 440px;
    height: max(100svh, 440px);
    max-height: none;
  }
  main > div:has(> [class*="HeroSectionRedesign"][class*="image_container"]) h1 {
    font-size: 36px;
    line-height: 0.98;
    max-width: 48vw;
  }
  main > div:has(> [class*="HeroSectionRedesign"][class*="image_container"]) section > div:has(> p) {
    max-width: 48vw;
  }
  main > div:has(> [class*="HeroSectionRedesign"][class*="image_container"]) section > div > p {
    font-size: 14px;
    line-height: 1.35;
  }
  .keymatic-hero-actions { max-width: 52vw; margin-top: 20px; }
  .keymatic-hero-photo { object-position: 50% 25%; }
}
@media (min-width: 1024px) and (min-aspect-ratio: 23/10) {
  .keymatic-hero-photo { object-position: 50% 25% !important; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .keymatic-hero-actions { max-width: 54vw; }
}

/* The preview owns the reserved media box before hydration and during a slow
   scene request. Original videos supply geometry/API refs only, never media. */
[data-feature-preview] {
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
[data-keymatic-feature] { aspect-ratio: 1200 / 2128; }
.keymatic-features-palette [class*="LazyLoader-module"] {
  opacity: 1;
  transition: none;
}
.keymatic-feature-scene:not([data-ready="true"]) { visibility: hidden; }

/* Retire the loading frame only when the real scene confirms it is ready. */
[data-feature-preview]:has(iframe[data-ready="true"]),
[data-keymatic-feature][data-scene-ready="true"] {
  background-image: none !important;
}

/* Preserve the compact header's appearance with a usable touch target. */
@media (max-width: 1023px) {
  .TopBarRedesign-module__4Y2iAa__container a.button_outlined {
    box-sizing: border-box;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Mobile channel reveal: a complete word over the photo, followed by a native
   scroll wipe. Its travel includes every card, even with enlarged text. */
@media (max-width: 767px) {
  .keymatic-channel-mobile > .keymatic-channel-scene {
    height: calc(100svh + var(--channel-cards-height, 900px)) !important;
    margin-bottom: 0 !important;
  }
  .keymatic-channel-mobile > .keymatic-channel-scene > .sticky {
    height: 100svh !important;
    overflow: clip !important;
  }
  .keymatic-channel-mobile .sticky > .bg-dynamic-base {
    top: 0 !important;
    clip-path: none !important;
    transform: translateY(var(--channel-card-y, 100svh)) !important;
    will-change: transform;
  }
  .keymatic-channel-mobile .sticky > .absolute_old:not(.bg-dynamic-base) {
    top: 40% !important;
    opacity: var(--channel-word-opacity, 1) !important;
    width: 100%;
  }
  .keymatic-channel-mobile .sticky > .absolute_old:not(.bg-dynamic-base) p {
    font-size: clamp(52px, 17vw, 88px);
    line-height: 1;
    color: #fff7ed;
  }
  .keymatic-channel-mobile .mx-mc-layout { padding-block: 48px; }
  .keymatic-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .keymatic-footer-grid > nav { grid-column: 1 / -1; min-width: 0; }
  .keymatic-footer nav h3 { margin-bottom: 12px; }
  .keymatic-footer nav a { align-items: flex-start; min-height: 44px; margin-top: 0; }
}
