/* Studio Vitória · ferragens do fólio. The fixed socket and the moving cap were
   rendered together in Blender. Nine-slicing preserves the machined corners. */
@media (forced-colors: none) {
  html.vt-atelier-keys {
    --plate-up: url("assets/folio/botoes/marfim-solta.webp");
    --plate-down: url("assets/folio/botoes/marfim-pressionada.webp");
    --plate-ink: #28271e;
    --plate-wall: 4px 5px 5px;
    --plate-travel: 1px;
    --plate-return: 145ms cubic-bezier(.22, 1, .36, 1);
    --plate-shadow: drop-shadow(0 1px .5px #100e0a52);
  }
  html.vt-atelier-keys :is(
    .hero #vt-ver-combos.vt-oferta, .hero-invitation .action,
    .site-header .menu-toggle, #see-times, #closing-continue, #explore-body,
    #explore-machine, .map-quote-times, .pricing-mode button, .map-sides button,
    [data-relief], .pb-actions .pb-button
  ) {
    position: relative;
    isolation: isolate;
    border-color: transparent;
    border-radius: 0;
    color: var(--plate-ink);
    background: transparent;
    box-shadow: none;
    text-shadow: none;

    &::before, &::after {
      content: "";
      display: block;
      pointer-events: none;
      position: absolute;
      z-index: -1;
      inset: -1px;
      width: auto;
      height: auto;
      margin: 0;
      box-sizing: border-box;
      border: solid transparent;
      border-width: var(--plate-wall);
      border-image: var(--plate-up) 32 36 36 fill / var(--plate-wall) / 0 stretch;
      border-radius: 0;
      background: none;
      box-shadow: none;
      opacity: 1;
      filter: var(--plate-shadow);
      transform: none;
      translate: none;
      animation: none;
      transition: none;
    }
    &::after {
      border-image-source: var(--plate-down);
      filter: none;
      opacity: 0;
      transition: opacity var(--plate-return);
    }
    & > :where(span, strong, svg) {
      translate: 0 -.5px;
      transition: translate var(--plate-return);
    }
    &:is(.vt-cap-down,:active:where(html:not(.vt-cap-input) *)):not(:disabled) {
      box-shadow: none;
    }
    &:is(.vt-cap-down,:active:where(html:not(.vt-cap-input) *)):not(:disabled)::after {
      opacity: 1;
      transition-duration: 0s;
    }
    &:is(.vt-cap-down,:active:where(html:not(.vt-cap-input) *)):not(:disabled) > :where(span, strong, svg) {
      translate: 0 var(--plate-travel);
      transition-duration: 0s;
    }
    &:focus-visible {
      outline: 2px solid #f2d8a6;
      outline-offset: 3px;
      box-shadow: 0 0 0 4px #413a2c;
    }
    &:disabled { --plate-shadow: none; }
  }

  /* A dark, low-glare face for the mobile menu, map controls and main form. */
  html.vt-atelier-keys :is(
    .site-header .menu-toggle, #see-times, #explore-body, #explore-machine,
    .map-sides button, [data-relief="combo"], .pb-actions .pb-primary,
    .pricing-mode button[aria-pressed=true]
  ) {
    --plate-up: url("assets/folio/botoes/carvao-solta.webp");
    --plate-down: url("assets/folio/botoes/carvao-pressionada.webp");
    --plate-ink: #fff8e8;
  }
  html.vt-atelier-keys .hero #vt-ver-combos.vt-oferta,
  html.vt-atelier-keys #regioes [data-atlas-combo][aria-pressed=true] {
    --plate-up: url("assets/folio/botoes/champanhe-solta.webp");
    --plate-down: url("assets/folio/botoes/champanhe-pressionada.webp");
    --plate-ink: #2c241a;
  }
  html.vt-atelier-keys #regioes .map-sides button[aria-pressed=true] {
    --plate-up: url("assets/folio/botoes/marfim-solta.webp");
    --plate-down: url("assets/folio/botoes/marfim-pressionada.webp");
    --plate-ink: #28271e;
  }
  html.vt-atelier-keys .hero-invitation .action {
    --plate-wall: 5px 7px 6px;
    --plate-travel: 1.25px;
  }
  html.vt-atelier-keys .site-header .menu-toggle {
    --plate-wall: 3px 4px 4px;
  }

  /* The commercial choices have the deep cap. All other controls retain a
     narrow, tactile lip, including both states of the map-side switch. */
  html.vt-atelier-keys :is(#vt-ver-combos, [data-atlas-combo]) {
    --plate-wall: 10px 13px 12px;
    --plate-travel: 2px;
    --plate-shadow: drop-shadow(0 2px 1px #100e0a70);
  }
  html.vt-atelier-keys :is(#vt-ver-combos, [data-atlas-combo]).vt-cap-down {
    --plate-shadow: drop-shadow(0 1px .5px #100e0a50);
  }
  @media (prefers-reduced-motion: reduce) {
    html.vt-atelier-keys { --plate-return: 0s; }
  }
}
